How to move a sprite in a gui? (SOLVED)

Hello,

Ok I have this working, which is in my menu.collection there is also a game object containing the sprite with the ‘menu selector’ image - when I mouse over a gui node, it send a message to that go, and that relocates the sprite.

I’m sure this can be done somehow in the gui script alone, without the extra game object or messages, but how ?

You can make a box node with the “menu selector” image and move that around instead of the sprite.

2 Likes

Oh - I see it now !? I somehow did this wrong the first time I tried it.
Yes, I see - I can add an atlas, and I can set the texture for that box node.
What is a good way to show/hide them - just change the alpha from either 1 --> 0 or 0 --> 1 maybe ?

Oh right - or possibly just move that node around, right, I’ll experiment some more :slight_smile:

Cool, yep just moving that box node around works just fine - I’ve refactored this menu to do that instead.

1 Like