View Single Post
Old 02-23-2019, 10:09 AM   #6
Space Raiders
Human being with feelings
 
Join Date: Aug 2017
Posts: 69
Default

Thanks for the help everyone.

Code:
class IVSwitchControlMomentary : public IVSwitchControl {
public:
  IVSwitchControlMomentary(
    IRECT bounds,
    int paramIdx = kNoParameter,
    IActionFunction actionFunc = FlashCircleClickActionFunc,
    const char* str = "",
    const IVColorSpec& colorSpec = DEFAULT_SPEC,
    int numStates = 2
  ) :
  IVSwitchControl(bounds, paramIdx, actionFunc, str, colorSpec, numStates){};
  void OnMouseUp(float x, float y, const IMouseMod& mod) override{
    mValue = 0.0;
    SetDirty(true);
  }
};
Space Raiders is offline   Reply With Quote