I am trying to build a little pop-up menu for the game I’m working on:
The frame is a box node with a 9-slice texture set to manual size mode in the editor that provides the background of the menu:
When displaying the menu I calculate the size of all the labels I’m adding (by copying item_prototype
) and then try to resize it as follows:
gui.set_size_mode(self.frame, gui.SIZE_MODE_MANUAL)
gui.set_size(self.frame, vmath.vector3(frame_width * 2, frame_height, 1))
I don’t think the first line should be necessary, but without it I get log output WARNING:GUI: Can not set size on auto-sized nodes.
. With it the size seems to be adjusted, but the texture seems to stay the same size:
Is there a way to get it to resize ? Sorry, I couldn’t figure this out from the documentation or Google.