- Home /
Question by
stuart6854 · Feb 15, 2014 at 07:08 PM ·
eventslowdowncurrent
Slow down Event.current.button
How can i slow down the 'Event.current.button' tests because using the code below, if the mouse button is clicked it is called twice(or more).
Code:
if(labelRect.Contains(Event.current.mousePosition) && Event.current.button == 0 && Event.current.isMouse){
showChangelogWindow = !showChangelogWindow;
showSurvivalWindow = false;
showOptionsWindow = false;
}
Comment
Best Answer
Answer by MakeCodeNow · Feb 15, 2014 at 07:10 PM
You need to also check Event.current.type to see if it's MouseDown or MouseUp.
Ah, Thanks.
Thought it might be something basic.
$$anonymous$$arked as answer and gave like.
Have a good day/night(depending on your timezone) :)