Re: What do you want in a GUI library?
Posted: Mon Apr 18, 2016 5:20 am
I see what you mean, and will definitely implement that change.kikito wrote:I explain that here: http://kiki.to/blog/2014/04/11/rule-4-m ... s-modules/
I have not implemented any key-based anything, and other than accepting input in a text input box, I had not planned to. I like your idea of making it possible for someone to set that up themselves and will look into how I could do it.Don't assume that "esc", or the joypad "b", are for "going back". Give me a hook for setting up the "go back" action. Same with "enter/a/activate", "up/up/previous", "down/down/next", etc. Don't assume that the mouse is in love.mouse.getposition. Give me a hook function in case I want to apply transformations to the gui in a way which changes the mouse, or I want to move the cursor with the pad.
As for the mouse, right now it consumes mousepressed/mousereleased events from Love and assumes they are correct positions relative to everything in the GUI. How would you recommend breaking away from that?
As for moving the cursor with a pad, what's wrong with expecting someone to use Love's mouse.setPosition based on whatever inputs they want to move the mouse? Are you saying I should make that part of the library? Or is there an entirely different approach you would recommend?
The way it works internally is based on pixels. The way I intend for it to work for the user is similar to what you're saying, although I have not fully worked out how I will do that yet. My biggest motivation for making this is to make it so I can throw together a GUI with "gimmie this element over there, with this menu and these buttons" without having to know or worry about pixels and padding and positioning and sizing.I mean that instead of saying "this button is 30px width and 50 px high", I want a gui were I can say "in this group of buttons, each one is as wide as the container, and 25% its height". The only place I should have to specify pixel dimensions would be the root "window"; this way, the Gui would work in any resolution.
My biggest question with this is do you think it's okay for everything internally to still be pixels? Or will this hamper my attempts to make it easier to use?
Have you any recommendations for reference material on a good way to do this?