Ejemplo n.º 1
0
 void Button::mouseReleased(MouseEvent& mouseEvent)
 {
     if (mouseEvent.GetButton() == MouseEvent::LEFT
         && mMousePressed
         && mHasMouse)
     {
         mMousePressed = false;
         distributeActionEvent();
         mouseEvent.consume();
     }
     else if (mouseEvent.GetButton() == MouseEvent::LEFT)
     {
         mMousePressed = false;
         mouseEvent.consume();
     }
 }
Ejemplo n.º 2
0
 void CheckBox::mouseClicked(MouseEvent& mouseEvent)
 {
     if (mouseEvent.GetButton() == MouseEvent::LEFT)
     {
         toggleSelected();
     }
 }
Ejemplo n.º 3
0
 void Button::mousePressed(MouseEvent& mouseEvent)
 {
     if (mouseEvent.GetButton() == MouseEvent::LEFT)
     {
         mMousePressed = true;
         mouseEvent.consume();
     }
 }
Ejemplo n.º 4
0
 void TextField::mousePressed(MouseEvent& mouseEvent)
 {
     if (mouseEvent.GetButton() == MouseEvent::LEFT)
     {
         mCaretPosition = GetFont()->getStringIndexAt(mText, mouseEvent.getX() + mXScroll);
         fixScroll();
     }
 }