Godot Version
v4.4.1.stable
Question
Minecraft has one texture for every button and they have different lengths, but they don’t stretch or compress. How could I do that or something similar on Godot? I am using pixel art btw
v4.4.1.stable
Minecraft has one texture for every button and they have different lengths, but they don’t stretch or compress. How could I do that or something similar on Godot? I am using pixel art btw
They use a nine-patch style texture, where the nine sections each have different scaling/tiling settings. The corners do not stretch or tile, edges tile in one direction top and bottom for instance only stretch/tile horizontally, and the middle patch stretches or tiles in every direction.
Game maker’s documentation on such feature seems to demonstrate it well.
In Godot you will probably prefer themes, even though there is a NinePatchRect node.
Here’s a StyleBoxTexture applied to a panel, using the godot icon the panel keeps the blue border while filling the background with the center icon.
I think you have the tile option selected in the expand drop down field.
that worked, thank you. one thing though, it’s pixel art so it’s tiny. is there a way to change the scale?
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.