RRokkenAudio
07-30-2010, 11:22 AM
Been trying some things today to try to get the PromptUserInput to disapear.
I want it to display when the user pushes down(onmousedown) and disapear on onmouseup, but getting it to disapear, I havent found a way..
//Momentary switch (contact control) that has 3 states. Get the extra state by pressing down Right mouse button while button is pressed.
//RR
#include "../IControl.h"
class ModifierContactControl : public ISwitchControl
{
public:
ModifierContactControl(IPlugBase* pPlug, int x, int y, int paramIdx, IBitmap* pBitmap)
: ISwitchControl(pPlug, x, y, paramIdx, pBitmap) {
// the standard double click sets-to-default behaviour doesn't make sense for
// IContactControl and leads to fast single clicks getting lost, so turn it off.
mDblAsSingleClick=false;
}
~ModifierContactControl() {}
void OnMouseUp(int x, int y, IMouseMod* pMod);
void OnMouseDown(int x, int y, IMouseMod* pMod);
};
void ModifierContactControl::OnMouseUp(int x, int y, IMouseMod* pMod)
{
//need to get rid of the prompt box...
mValue = 0.0;
SetDirty();
}
void ModifierContactControl::OnMouseDown(int x, int y, IMouseMod* pMod)
{
PromptUserInput();
mValue = 0.5;
if(pMod->L && pMod->R){
mValue =1.0; //set the value
}
SetDirty();
}
I want it to display when the user pushes down(onmousedown) and disapear on onmouseup, but getting it to disapear, I havent found a way..
//Momentary switch (contact control) that has 3 states. Get the extra state by pressing down Right mouse button while button is pressed.
//RR
#include "../IControl.h"
class ModifierContactControl : public ISwitchControl
{
public:
ModifierContactControl(IPlugBase* pPlug, int x, int y, int paramIdx, IBitmap* pBitmap)
: ISwitchControl(pPlug, x, y, paramIdx, pBitmap) {
// the standard double click sets-to-default behaviour doesn't make sense for
// IContactControl and leads to fast single clicks getting lost, so turn it off.
mDblAsSingleClick=false;
}
~ModifierContactControl() {}
void OnMouseUp(int x, int y, IMouseMod* pMod);
void OnMouseDown(int x, int y, IMouseMod* pMod);
};
void ModifierContactControl::OnMouseUp(int x, int y, IMouseMod* pMod)
{
//need to get rid of the prompt box...
mValue = 0.0;
SetDirty();
}
void ModifierContactControl::OnMouseDown(int x, int y, IMouseMod* pMod)
{
PromptUserInput();
mValue = 0.5;
if(pMod->L && pMod->R){
mValue =1.0; //set the value
}
SetDirty();
}