|
Used to overlaps a 'hot region' where you want to catch inputs with and have specific events occur based on individual callbacks. More...
Public Member Functions | |
Callbacks | |
void | onMouseDown (U8 modifier, Point2I mousePoint, U8 mouseClickCount) |
Callback that occurs whenever the mouse is pressed down while in this control. | |
void | onMouseDragged (U8 modifier, Point2I mousePoint, U8 mouseClickCount) |
Callback that occurs whenever the mouse is dragged while in this control. | |
void | onMouseEnter (U8 modifier, Point2I mousePoint, U8 mouseClickCount) |
Callback that occurs whenever the mouse enters this control. | |
void | onMouseLeave (U8 modifier, Point2I mousePoint, U8 mouseClickCount) |
Callback that occurs whenever the mouse leaves this control. | |
void | onMouseMove (U8 modifier, Point2I mousePoint, U8 mouseClickCount) |
Callback that occurs whenever the mouse is moved (without dragging) while in this control. | |
void | onMouseUp (U8 modifier, Point2I mousePoint, U8 mouseClickCount) |
Callback that occurs whenever the mouse is released while in this control. | |
void | onRightMouseDown (U8 modifier, Point2I mousePoint, U8 mouseClickCount) |
Callback that occurs whenever the right mouse button is pressed while in this control. | |
void | onRightMouseDragged (U8 modifier, Point2I mousePoint, U8 mouseClickCount) |
Callback that occurs whenever the mouse is dragged in this control while the right mouse button is pressed. | |
void | onRightMouseUp (U8 modifier, Point2I mousePoint, U8 mouseClickCount) |
Callback that occurs whenever the right mouse button is released while in this control. | |
Public Attributes | |
Input | |
bool | lockMouse |
Whether the control should lock the mouse between up and down button events. |
Used to overlaps a 'hot region' where you want to catch inputs with and have specific events occur based on individual callbacks.
Mouse event callbacks supported by this control are: onMouseUp, onMouseDown, onMouseMove, onMouseDragged, onMouseEnter, onMouseLeave, onRightMouseDown, onRightMouseUp and onRightMouseDragged.
new GuiMouseEventCtrl() { lockMouse = "0"; //Properties not specific to this control have been omitted from this example. };
void GuiMouseEventCtrl::onMouseDown | ( | U8 | modifier, | |
Point2I | mousePoint, | |||
U8 | mouseClickCount | |||
) |
Callback that occurs whenever the mouse is pressed down while in this control.
modifier | Key that was pressed during this callback. Values are: |
$EventModifier::RSHIFT
$EventModifier::SHIFT
$EventModifier::LCTRL
$EventModifier::RCTRL
$EventModifier::CTRL
$EventModifier::CTRL
$EventModifier::RALT
$EventModifier::ALT
mousePoint | X/Y location of the mouse point | |
mouseClickCount | How many mouse clicks have occured for this event |
// Mouse was pressed down in this control, causing the callback GuiMouseEventCtrl::onMouseDown(%this,%modifier,%mousePoint,%mouseClickCount) { // Code to call when a mouse event occurs. }
void GuiMouseEventCtrl::onMouseDragged | ( | U8 | modifier, | |
Point2I | mousePoint, | |||
U8 | mouseClickCount | |||
) |
Callback that occurs whenever the mouse is dragged while in this control.
modifier | Key that was pressed during this callback. Values are: |
$EventModifier::RSHIFT
$EventModifier::SHIFT
$EventModifier::LCTRL
$EventModifier::RCTRL
$EventModifier::CTRL
$EventModifier::CTRL
$EventModifier::RALT
$EventModifier::ALT
mousePoint | X/Y location of the mouse point | |
mouseClickCount | How many mouse clicks have occured for this event |
// Mouse was dragged in this control, causing the callback GuiMouseEventCtrl::onMouseDragged(%this,%modifier,%mousePoint,%mouseClickCount) { // Code to call when a mouse event occurs. }
void GuiMouseEventCtrl::onMouseEnter | ( | U8 | modifier, | |
Point2I | mousePoint, | |||
U8 | mouseClickCount | |||
) |
Callback that occurs whenever the mouse enters this control.
modifier | Key that was pressed during this callback. Values are: |
$EventModifier::RSHIFT
$EventModifier::SHIFT
$EventModifier::LCTRL
$EventModifier::RCTRL
$EventModifier::CTRL
$EventModifier::CTRL
$EventModifier::RALT
$EventModifier::ALT
mousePoint | X/Y location of the mouse point | |
mouseClickCount | How many mouse clicks have occured for this event |
// Mouse entered this control, causing the callback GuiMouseEventCtrl::onMouseEnter(%this,%modifier,%mousePoint,%mouseClickCount) { // Code to call when a mouse event occurs. }
void GuiMouseEventCtrl::onMouseLeave | ( | U8 | modifier, | |
Point2I | mousePoint, | |||
U8 | mouseClickCount | |||
) |
Callback that occurs whenever the mouse leaves this control.
modifier | Key that was pressed during this callback. Values are: |
$EventModifier::RSHIFT
$EventModifier::SHIFT
$EventModifier::LCTRL
$EventModifier::RCTRL
$EventModifier::CTRL
$EventModifier::CTRL
$EventModifier::RALT
$EventModifier::ALT
mousePoint | X/Y location of the mouse point | |
mouseClickCount | How many mouse clicks have occured for this event |
// Mouse left this control, causing the callback GuiMouseEventCtrl::onMouseLeave(%this,%modifier,%mousePoint,%mouseClickCount) { // Code to call when a mouse event occurs. }
void GuiMouseEventCtrl::onMouseMove | ( | U8 | modifier, | |
Point2I | mousePoint, | |||
U8 | mouseClickCount | |||
) |
Callback that occurs whenever the mouse is moved (without dragging) while in this control.
modifier | Key that was pressed during this callback. Values are: |
$EventModifier::RSHIFT
$EventModifier::SHIFT
$EventModifier::LCTRL
$EventModifier::RCTRL
$EventModifier::CTRL
$EventModifier::CTRL
$EventModifier::RALT
$EventModifier::ALT
mousePoint | X/Y location of the mouse point | |
mouseClickCount | How many mouse clicks have occured for this event |
// Mouse was moved in this control, causing the callback GuiMouseEventCtrl::onMouseMove(%this,%modifier,%mousePoint,%mouseClickCount) { // Code to call when a mouse event occurs. }
void GuiMouseEventCtrl::onMouseUp | ( | U8 | modifier, | |
Point2I | mousePoint, | |||
U8 | mouseClickCount | |||
) |
Callback that occurs whenever the mouse is released while in this control.
modifier | Key that was pressed during this callback. Values are: |
$EventModifier::RSHIFT
$EventModifier::SHIFT
$EventModifier::LCTRL
$EventModifier::RCTRL
$EventModifier::CTRL
$EventModifier::CTRL
$EventModifier::RALT
$EventModifier::ALT
mousePoint | X/Y location of the mouse point | |
mouseClickCount | How many mouse clicks have occured for this event |
// Mouse was released in this control, causing the callback GuiMouseEventCtrl::onMouseUp(%this,%modifier,%mousePoint,%mouseClickCount) { // Code to call when a mouse event occurs. }
void GuiMouseEventCtrl::onRightMouseDown | ( | U8 | modifier, | |
Point2I | mousePoint, | |||
U8 | mouseClickCount | |||
) |
Callback that occurs whenever the right mouse button is pressed while in this control.
modifier | Key that was pressed during this callback. Values are: |
$EventModifier::RSHIFT
$EventModifier::SHIFT
$EventModifier::LCTRL
$EventModifier::RCTRL
$EventModifier::CTRL
$EventModifier::CTRL
$EventModifier::RALT
$EventModifier::ALT
mousePoint | X/Y location of the mouse point | |
mouseClickCount | How many mouse clicks have occured for this event |
// Right mouse button was pressed in this control, causing the callback GuiMouseEventCtrl::onRightMouseDown(%this,%modifier,%mousePoint,%mouseClickCount) { // Code to call when a mouse event occurs. }
void GuiMouseEventCtrl::onRightMouseDragged | ( | U8 | modifier, | |
Point2I | mousePoint, | |||
U8 | mouseClickCount | |||
) |
Callback that occurs whenever the mouse is dragged in this control while the right mouse button is pressed.
modifier | Key that was pressed during this callback. Values are: |
$EventModifier::RSHIFT
$EventModifier::SHIFT
$EventModifier::LCTRL
$EventModifier::RCTRL
$EventModifier::CTRL
$EventModifier::CTRL
$EventModifier::RALT
$EventModifier::ALT
mousePoint | X/Y location of the mouse point | |
mouseClickCount | How many mouse clicks have occured for this event |
// Right mouse button was dragged in this control, causing the callback GuiMouseEventCtrl::onRightMouseDragged(%this,%modifier,%mousePoint,%mouseClickCount) { // Code to call when a mouse event occurs. }
void GuiMouseEventCtrl::onRightMouseUp | ( | U8 | modifier, | |
Point2I | mousePoint, | |||
U8 | mouseClickCount | |||
) |
Callback that occurs whenever the right mouse button is released while in this control.
modifier | Key that was pressed during this callback. Values are: |
$EventModifier::RSHIFT
$EventModifier::SHIFT
$EventModifier::LCTRL
$EventModifier::RCTRL
$EventModifier::CTRL
$EventModifier::CTRL
$EventModifier::RALT
$EventModifier::ALT
mousePoint | X/Y location of the mouse point | |
mouseClickCount | How many mouse clicks have occured for this event |
// Right mouse button was released in this control, causing the callback GuiMouseEventCtrl::onRightMouseUp(%this,%modifier,%mousePoint,%mouseClickCount) { // Code to call when a mouse event occurs. }
Whether the control should lock the mouse between up and down button events.