Hey,
I had a question about nodes. I wanted to add some more feel to one of my games, and I thought that a good way to do that was make it so that when the mouse hovers over one of the buttons, the button dims, or in other words, slightly changes colors.
How might I go about doing that?
Thanks so much for your time again!
Use gui.pick_node() every time you get a callback to on_input() with mouse movement. Track what node that the mouse/finger is currently hovering and when you detect a transition from āno nodeā to āsome nodeā you apply the effect and then reverse it when going from āsome nodeā to āno nodeā.
@Vgreen, hereās an example which should put you in the right direction
@Axel and @samuel.nystedt: Is it possible to see the actual page title here instead of the āFree 2D game engineā ? (E.g. āDefold-examples: Pointer overā
Yeah, definitely. The Onebox, as Discourse calls the preview box, fetches the title property, so it would be a matter of setting this on all learn pages (and more, perhaps) to āDefold examples ā Pointer overā and such. Iāll add it to the backlog.
Thank you all very much for your time again! I will take a look at the manual, Iām sure that it will come in handy!
Thanks all again!
Ok, so I was able to use the code from that manual to make a hovering mouse effect. The next question I have is how to ac tally tint the node⦠not quite sure how to do that.
Any insight?
Thanks again!
Just use gui.set_color(node, color)
.
Oh duh, thank you very much!
haha