-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draw things behind the UI #15
Comments
I think you are mixing two problems here:
Drawing things behind the GUI is possible today because of the way OpenGL works. Every draw calls that happens before the ones done by oil when you call Oil has currently no real support for user events in any ways. The examples use a simple match on keys to switch the focus. We need to think first about a design that would be flexible enough to cover each use cases without compromising too much the user experience of the UI designer. Your use case is really interesting, and I see multiple requirements to solve it:
That might be a good first start. |
The question is to decide whenever the UI needs to use an event. Moreover, we have to think to an intermediate event system. Indeed, let's imagine the UI is an inventory and the player wants to delete an item (let says he has to hit How to deal with that? Forward the |
Ah I see, you're right, the library need some kind of metadata when the event is consumed. As We could eventually redesign it to be something like: <button action="bar({player.name})" /> Where |
I disagree: key pressed, released etc. is to UI oriented event. I propose to add something like After that, code registers to signal it wants. (sorry for the spam) |
I think you are reacting a bit to quickly here. Several points:
|
I think it's better if you divide this issue into two (as you first pointed out). I'll need to write a little my thoughts, because I's messy in my head for now. |
Hi there,
I am no expert here, but I think it might be useful to add a layer behind the UI one, where it is possible to draw things (basically, the game). A good behavior should be that UI catches keystrokes first, then if it can do nothing with it, gives it back to this layer.
Thus, in “HUD UI”, arrows are transfered. But when Escap is hit, it switches to menu and arrows are catches. That way, character is not longer moving.
Is something like that already existing in OIL?
I want to write a PoC client and I need something like that!
The text was updated successfully, but these errors were encountered: