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
Add hover effect for buttons #262
Comments
Why not? :) GUI needs complete rework but it's unlikely that I'll find time for it soon. Though it'll not help on android :( |
Hmm, I can add the hover feature but it will likely get thrown out since it will just be bolting on functionality without really making it good long term. I suggested it as it's a small feature to get used to the code base a bit so I might still do it. I can try reworking the UI if you would like; I have written a small (and incomplete) Gui framework in Rust before so I have some notion of what is involved, though I'm not yet familiar with gfx and how to build a single vertex list for the ui to render in a single draw call. Do you have a design in mind for the gui? I don't mind trying to implement your design if you have one. The simplest thing to me seems to be to take the current approach and extend it by adding panel/layout widgets and a Widget trait so you can aggregate different widget types (buttons/images/labels/etc). Then you can likely get rid of ButtonManager. Maybe something like this?
Thoughts? |
Submitted a smallish PR that adds an on_hover effect for buttons (changes color) and does some of the things above. I'll finish the work if you agree with the approach. |
🐌 Sorry for the slow response - you made me think about ZoC's middle-term plan. Aaaand I'm leaning towards trying to port ZoC to Amethyst in a few months. Because by that time I'm hoping to start improving the visual part of the game and it makes little sense for me to develop my own "big" graphics engine alone. A big part of the current ZoC's visualizer code will be thrown away. Thus serious contributions to the current gui (and anything other than |
Makes sense. Is there anything specific you would like contributions to? I have some free time I'm trying to fill up with Rust in some way :) |
Hmmm, let's discuss this in gitter - https://gitter.im/ozkriff |
It's hard to distinguish buttons currently. I can add a hover effect in the draw step since the context is passed (and can obtain the mouse pos). Something simple like a bg color or text color change.
Let me know if you are interested in such a change and will submit a PR.
The text was updated successfully, but these errors were encountered: