Description:
Currently as is stands os pullEvent/Raw are used massively. Now the pulling of specific events is handy too when you provide an argument
os.pullEvent("mouse_click")
now my question/suggestion here is, that when this "mouse_click" event fires it returns these variables:"mouse_click", <button>, <mouse-x>, <mouse-y>
So seeing that the event that fired is still in there, I had an idea, could it be possible to have multiple arguments so we could use this
os.pullEvent("timer", "mouse_click")
And it would only continue when either of these events has fired. Now I know that this IS doable in CC, as a matter of fact I've helped people do it before with something similar to this
local function wait()
while true do
local event = { os.pullEvent() }
if event[1] == "timer" or event[1] == "mouse_click" then
return unpack(event)
end
end
end
Now the way I understand how CC works, using os.pullEvent("timer"), means that the CC wont even run the computer until that computer gets the timer, which makes it handy if your trying to minimise on the CPU strain and such, using the code I gave above does the exact opposite of this, thats why I think having multiple arguments could be useful as the program still holds until it gets the event, but its 'checking' for multiple events. Now if I'm wrong in my understanding of how CC works then sorry for wasting your time with this one :)/>Mouse Triggering
Description:
Don't worry I'm not about to go say give us "mouse_up" or "mouse_down", I know its on the do not ask list :P/>
What I'm asking today, is that if the up/down aren't coming in the immediate future, or you end up not being able to find a nice way to do it with the multi-user environment, I ask this of you. Can the way the "mouse_click" event is fired be changed. What I mean is, currently the "mouse_click" event occurs when the mouse is well, clicked. Now when using Windows, OSX, Linux, Android, iOS, Windows Mobile, (….. the list goes on), when you click/tap on something, say a button, the action isn't triggered right away. This gives the user a chance to change their mind and move the cursor away from the button so as to not click that button.
Now currently is seems that CC has it so that when LWJGL gives it a mouse down, it triggers the "mouse_click" event. All I ask, is that if there are no immediate plans for mouse up/down, that the mouse_click event could be changed to fire on mouse up, instead of mouse down.
Thank you for reading :)/>
— TheOriginalBIT