raygui icon indicating copy to clipboard operation
raygui copied to clipboard

Input blocking / input event consuming

Open ssoher opened this issue 1 year ago • 2 comments

Currently if user clicks where two controls overlap, both controls activate. The first control that is drawn on top should "consume" the input event and the one behind that should not get activated in such cases.

ssoher avatar Mar 14 '24 13:03 ssoher

@ssoher Events consumption does not depend on raygui but on the underlying inputs mnagement layer, in this case raylib. It seems an issue that could only affects on some specific use cases, dependant on UI design.

raysan5 avatar May 07 '24 08:05 raysan5

If the assumption is "GUI controls can never ever overlap" then in its current state there is no problem. But when we allow the user to alter the GUI dynamically (move, scale) then it becomes a problem. But I understand if it's the library user's responsibility to track the state of input and check if any gui item is already interacted with in a given frame so that other controls return early/don't do anything.

ssoher avatar May 07 '24 11:05 ssoher