-
Notifications
You must be signed in to change notification settings - Fork 1
Event Press vs Hold #439
Comments
Mouse presses and releases are fired as separate events (this is standard among most frameworks). For the rest of the events you can get the button state with What needs clarity? I do not think we need any additional functionality, but we could change some naming. |
Same goes for key events, except we only keep track of very specific keys for general events (Both alts, both controls, both shifts and spacebar). Keys also support repeats (when a key is held down). |
I think at this stage its most important to know when those special keys are held. |
No, it can be checked by doing |
Take a look here: void EngineCore::onMouseDragEventForce(const MouseDragEvent& event)
{
if (event.isType(EventType_MouseButtonMiddle)
|| event.isType(EventType_MouseButtonLeft | EventType_SpaceBar))
{
onMouseDragEvent(event);
}
} |
On a sidenote: I do not think that logic should sit in that function, we might have to move it. |
This issue has made me think how we work with input and spawned #444. |
Currently we have event types
EventType_MousePress
andEventType_MouseRelease
, as well asEventType_KeyPress
andEventType_KeyRelease
.It is unclear, however, what is set during a mouse hold. Is the 'press' true the whole time the button is depressed, or is this only true on the press? Additionally, is the release true whenever the key is not depressed, or is this set once on release and then back to false?
My current assumption is that these are only set true on state changes (i.e. both normally false, and both false during a hold).
If this is not the case, we need to be able to differentiate between all these events somehow.
The current API also needs some more clarity.
The text was updated successfully, but these errors were encountered: