How to set frame of tilesource for gui (solved)

Hi,

so, I have an 256 x 512 ‘icons.png’ with 16x16 sized icons for my in game icons (buffs, items, skills, …)

now I am making an item button for my equipment slot: just a box with ‘icons.tilesource’ and some other text/effects.

My question is, how do I change the icon in runtime?

  1. I know we have cursor for sprite, but i’m in gui collection.

  2. currently I use a script to modify ‘icons.tilesource’ file like this, and gui.play_flipbook(icon, tostring(item.index)), it works, but is there another way? I mean, the formal process defold would suggest.

512 animations continues…

Using gui.play_flipbook() is the only way to change the image on a box node in a gui.

i see, i’ll just keep my way now.

thank you!