I am working on updating my mods to new version.
But I found the default GUI style have changed. Notably, the button has gone unnecessarily elongated, which makes my 0.16 code looks bad.
How could I adjust the width of "button" type?
[Solved] How to change button width in 0.17?
-
Schallfalke
- Fast Inserter

- Posts: 162
- Joined: Sun Oct 28, 2018 7:57 am
- Contact:
[Solved] How to change button width in 0.17?
Last edited by Schallfalke on Sat Mar 02, 2019 4:16 pm, edited 1 time in total.
Re: How to change button width in 0.17?
button.style.width, button.style.natural_width, button.style.minimal_width, button.style.maximal_width...
Take your pick
Take your pick
Re: How to change button width in 0.17?
Is here in vanilla someone standard style button with compact size? Default compact text style?Klonan wrote: Fri Mar 01, 2019 7:46 am button.style.width, button.style.natural_width, button.style.minimal_width, button.style.maximal_width...
Take your pick
-
Schallfalke
- Fast Inserter

- Posts: 162
- Joined: Sun Oct 28, 2018 7:57 am
- Contact:
Re: How to change button width in 0.17?
Thank you.
Though the shrinked text button does not look as nice as in 0.16, like font change, button background colour, etc. I cannot find any documentation on default styles, so cannot mimic the original style fully.
Anyway, I will instead use a sprite button here, sounds much easier than fighting with style settings...
EDIT: Just found a lot of settings in core\prototypes\style.lua. I will see if there is anything I can use from there...
Though the shrinked text button does not look as nice as in 0.16, like font change, button background colour, etc. I cannot find any documentation on default styles, so cannot mimic the original style fully.
Anyway, I will instead use a sprite button here, sounds much easier than fighting with style settings...
EDIT: Just found a lot of settings in core\prototypes\style.lua. I will see if there is anything I can use from there...

