#A bit of GUI help

1 messages · Page 1 of 1 (latest)

willow raven
#

If you press control F5 to enable GUI debug tooltips (or control F6, one of the 2. the one that does not put red rects in guis)
Then hover the text box to see its properties. My current guess is that it has a maximal width

#

@trail plank and a ping to make sure you see the thread ;)

trail plank
#

😄 thanks

willow raven
#

Ah, no maximal width, but it does have natural_width and width. You can try setting those to 0 on the textbox style (just like how you set horizontally stretchable), which will tell it that "it doesn't have that property set", kind of. I think it may be the natural width that's getting in the way, but I could be wrong, so for the sake of learning how exactly it works I'd suggest trying them individually and then trying setting both to 0 if neither worked

trail plank
#

setting width to 0 enables streching

#

my guess is that it uses default style of the text-box

#

setting the style also works, however looking through base and core I could find them. nvm the last part, made a typo

willow raven
#

Yea it uses the textbox by default, it has to have some style. All the styles are in core/prototypes/style.lua

trail plank
#

looks now much better

#

thanks

trail plank
willow raven
#

The screenshot doesn't show like the actual source file so I just wanted to make sure. It's a good file to have as a reference when making GUIs

willow raven
# trail plank like in the code itself?

Yea, in the factorio files itself. If you're using steam then go to the install folder, with standalone it's all right there anyway. It's specifically in the data folder which contains the core and base mods

trail plank
#

still abit confused but thanks

trail plank
#

ok, somehow the gui fail to load the only thing I have not changed

#

nvm compare to wrong gui element

trail plank
#

so this is the end product