Skip to reading
Buttons, Labels & Text Boxes

Choose the right mouse event

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page
On this page
Source table from Choose the right mouse event, page 18
EventWhat to use it for
HoverA small pointer-enter response. It can repeat when the pointer leaves and re-enters.
ClickThe ordinary left-click command.
Double ClickA separate double-left-click response.
Right ClickAn alternate/context command.
Double Right ClickA separate double-right-click response.

These are mouse-event choices, not five different image slots. Hover and held-click images are appearance settings. An event action might instead open a GUI, change a variable or call a script.

The generic Click event is dispatched on the press. Releasing clears a configured pressed picture; it does not undo a variable change that the press already made.

Avoid accidentally running two commands#

A double-click normally includes an earlier single click. Do not award unrelated points on both events and assume only one will run. Keep the primary action and its additional steps deliberate, and check for a leftover Legacy Click Action when converting an old button.

Labels and text boxes can have mouse events too#

The same event areas are available on these elements. A clickable label can show help. A text box's Click event still means clicking the box; it does not mean its text changed or the player submitted an answer. Use the dedicated Enter options or a separate submit button for that.

For keyboard, controller or touch support, test the actual input route in gameplay. A focused button or a working hover image does not by itself prove that every authored mouse event is mapped to every other device.

Page 18 of 46Permalink
Go to page