void SaveButton::OnMouseUnclick(int x, int y, unsigned int button) { if(button != 1) { return; //left click only! } if(x>=Size.X-20 && y>=6 && y<=20 && x<=Size.X-6 && selectable) { selected = !selected; DoSelection(); return; } if(isButtonDown) { isButtonDown = false; if(isMouseInsideHistory) DoAltAction(); else if(isMouseInsideAuthor) DoAltAction2(); else DoAction(); } }
void Button::OnMouseUnclick(int x, int y, unsigned int button) { if(button == 1) { if(isButtonDown) { isButtonDown = false; DoAction(); } } else if(button == 3) { if(isAltButtonDown) { isAltButtonDown = false; DoAltAction(); } } }
void SaveButton::OnContextMenuAction(int item) { switch(item) { case 0: DoAction(); break; case 1: selected = !selected; DoSelection(); break; case 2: DoAltAction(); break; case 3: DoAltAction2(); break; } }