/// <description> /// If #useMouseEvents is true, this is called when the left mouse button is pressed on an (active) button. /// </description> public virtual void OnMouseDown() { InternalUnsafeMethods.OnMouseDown__Args _args = new InternalUnsafeMethods.OnMouseDown__Args() { }; InternalUnsafeMethods.OnMouseDown()(ObjectPtr, _args); }
/// <summary>Callback that occurs whenever the mouse is pressed down while in this control.</summary> /// <description> /// /// </description> /// <param name="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</param> /// <param name="mousePoint">X/Y location of the mouse point</param> /// <param name="mouseClickCount">How many mouse clicks have occured for this event</param> /// <code> /// // Mouse was pressed down in this control, causing the callback /// GuiMouseEventCtrl::onMouseDown(%this,%modifier,%mousePoint,%mouseClickCount) /// { /// // Code to call when a mouse event occurs. /// } /// </code> /// <see cref="GuiControl" /> public virtual void OnMouseDown(int modifier, Point2I mousePoint, int mouseClickCount) { mousePoint.Alloc(); InternalUnsafeMethods.OnMouseDown__Args _args = new InternalUnsafeMethods.OnMouseDown__Args() { modifier = modifier, mousePoint = mousePoint.internalStructPtr, mouseClickCount = mouseClickCount, }; InternalUnsafeMethods.OnMouseDown()(ObjectPtr, _args); mousePoint.Free(); }