Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Iron_Chef |
I am working on a basic menu system and need a way to type in data. I have managed to make the textedits appear in the proper size and location, but they cannot be selected. I know it is displaying text correctly because I preset it with random text which shows.
Code
for key in TheMap.keys():
var lb = lbScene.instance()#create a label scene
lb.text = key
m.add_child(lb) #add to menu
lb.rect_position[0] = (x/width) * i
lb.rect_position[1] = 60 * p
var tb = tbScene.instance()
m.add_child(tb) # add to menu
tb.rect_position[1] = (50 * p) + 24 # set y pos
tb.rect_position[0] = (x/width) * i # set x pos
i = i+1
tb.text = ('fwjg;jbw;gbo')
if (i >= width):
i = 0
p = p+1 #new row
get_tree().change_scene("res://NewMenu.tscn")
If it helps at all, the textedits were selectable when I was using nested VBoxContainers and HBoxContainers for positioning, however they were always the minimum thickness no matter what I did. Any help is appreciated.