[request] Add Button OnMouseDown / OnMouseOver Triggers

0 favourites
  • 5 posts
From the Asset Store
Game Triggers is as versatile as a Swiss army knife, and will be a great resource for any type of game you're creating.
  • Edit: Bump x 1 (and final)

    The Button object and the Mouse objects don't play nicely together. It is not possible to detect when a mouse pointer is over a button object without using other objects to do the detecting. Would it be possible to add triggers like OnMouseDown and OnMouseOver so that it is easier to create feedback effects (by using css)?

    -----------------------

    Old post below:

    I just put together this css your buttons tutorial and in the process learned that it is not possible to detect when the left mouse button is pressed with the mouse pointer over a button. The button on clicked trigger only actions on mouse button release and there is no way of detecting the action using the mouse object. This means that any visual feedback for a mouse click can only be given when the user has finished their input - it looks a bit odd if you hold the mouse button down for 1/2 sec first, for example.

    Please could we add a condition to the button object for 'onmousedown' so that we can better control our button effects? Thanks.

    Edit: kudos AllanR for discovering the expression.

  • I second that motion! : ) OnMouseDown would be very helpful with making more realistic buttons. It would also be nice to be able to implement several other events as well: onmousemove, onmouseout, onmouseover, onmouseup, onwheel.

    At first I thought about submitting a bug report. Because when I first started playing with Colludium's tutorial, I tried to use Mouse plugin events (mouse button is down, on button released) as a work-around. But found that the mouse plugin events don't play nicely with the button plugin. If the mouse button is pressed down over a button, but then the mouse is moved off the button object, and then the mouse button is released, the on button released event does not fire. So, if you move the mouse back over the button object, then it was acting like the mouse button was still down (when it wasn't). But, just using mouse events within the button plugin fixed that issue - but meant I had to hack the button plugin to add the onmousedown trigger.

  • Bump - 1st and last - see post 1.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • i would like to see this too

  • Same here!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)