GUI box node textures sized incorrectly?

Hey,

I’m not sure if I’m missing something stupid here, but could someone shed some light on why this texture is not showing correctly in the editor (or in-game)?

The texture itself (85 x 43)

The tile source (bar_test.tilesource)

Using a GUI box node, with the following properties…

The result is this:

It seems the box is defaulting to 128 x 64 despite the texture being 85 x 43? Setting the size to manual and changing the value shrinks the node, but the texture inside is still aligned strangely.

Do textures for GUI nodes have to be a specific size (IE power of 2)? Is there something stupidly obvious I’ve missed here?

This look s really strange. @sicher is testing this as we speak. Have you tried using an atlas instead of a tilesource?

Switched to use an atlas instead, it now works as intended. I guess tilesource was not intended for this use!

I tried your setup with the image you posted, with a tilesource, but I cannot reproduce the problem - the button looks right.

The only difference I can see is that you’ve set the texture to use “anim” for the texture, where as my tilesource doesn’t even have an animation. That might explain why the editor doesn’t list it as a texture and it needs to be typed in manually, hm.

Ah, yes. I missed that. Removing the anim and manually typing the image name reproduces the problem.

Notice that the texture dropdown in the GUI editor is empty if a tilesource has no animations. You do need to define animations in a tilesource. Still images are also defined as animations, albeit one frame ones.

Thanks for finding this. It is a bug but I doubt that we will fix it in Editor 1.

3 Likes