Download

Widget Scritping- Difference between on clicked and on pressed?

Hey guys just a quick question about the difference between on clicked and on pressed events in the widget editor. What is the difference the two? Is it mouse event versus controller/keyboard event?

On Pressed happens the moment you click on the widget. On Clicked, on the other hand, triggers when you release the mouse button. You can try it out by holding your left mouse button down for a second.

Perfect Thanks Storm…

According to this stack overflow answer it lies a bit more “complicated”.

There are five events: press, click, release, hover and unhover.

  • The press event is triggered when the mouse button is pushed down.
  • The release event is triggered when the mouse button is released.
  • The clicked event is triggered when the mouse button is pushed down and then released afterwards (both pressed and released have been triggered as well at this point).
  • hover and unhover are probably self-explaining (hover is when the mouse pointer enters the widget and unhover is when it is leaving the widget)