The International Simutrans Forum

Development => Extension Requests => Topic started by: Andarix on October 16, 2021, 07:37:13 AM

Title: theme support
Post by: Andarix on October 16, 2021, 07:37:13 AM
For the height of input fields there is the parameter gui_edit_height.

Which parameter sets the height of selection fields?

(https://forum.simutrans.com/index.php?action=dlattach;topic=21179.0;attach=29948;image)
Title: Re: r10154 - theme support
Post by: Dwachs on October 16, 2021, 10:31:23 AM
This setting was ignored mostly. Fixed it in r10158. Note that gui_edit_height is not used anywhere.
Title: Re: r10154 - theme support
Post by: Andarix on October 16, 2021, 11:58:46 AM
https://simutrans-germany.com/wiki/wiki/en_ThemeDef#Sizes (https://simutrans-germany.com/wiki/wiki/en_ThemeDef#Sizes)

Which of the parameters are still missing?
Title: Re: r10154 - theme support
Post by: Andarix on October 16, 2021, 03:02:26 PM
r10164

Now the input field is again smaller than the selection field.

How do you get the same height for both fields?

(https://forum.simutrans.com/index.php?action=dlattach;topic=21179.0;attach=29957;image)
Title: Re: r10154 - theme support
Post by: Dwachs on October 16, 2021, 04:19:21 PM
The height of the selection field also depends on the heights of the arrow-graphics. If they are large then the selection field maybe higher than the input.

What theme is this? I cannot reproduce it.


Quote
https://simutrans-germany.com/wiki/wiki/en_ThemeDef#Sizes

Which of the parameters are still missing?

No idea. There is a long list of theme related variables in the code, but it is hard to track down, which of the are used somewhere. See gui/gui_theme.h and .cc.
Title: Re: r10154 - theme support
Post by: Andarix on October 16, 2021, 06:28:34 PM
Quote from: Dwachs on October 16, 2021, 04:19:21 PM
The height of the selection field also depends on the heights of the arrow-graphics. If they are large then the selection field maybe higher than the input.

What theme is this? I cannot reproduce it.
...

themes.zip (https://simutrans-germany.com/files/upload/themes.zip)
Title: Re: r10154 - theme support
Post by: Dwachs on October 17, 2021, 10:17:28 AM
You set the gui-arrow-left to a very large value, which is used for the height of the select-box.
Title: Re: r10154 - theme support
Post by: Andarix on October 17, 2021, 10:50:16 AM
Quote from: Dwachs on October 17, 2021, 10:17:28 AM
You set the gui-arrow-left to a very large value, which is used for the height of the select-box.

I don't set anything there. The graphic is 32 x 24 pixels. And that is not very large on the television with 3840 x 2160 pixels resolution used at the time.
Title: Re: r10154 - theme support
Post by: Dwachs on October 17, 2021, 11:12:17 AM
This line in the tab file is the reason:

gui_horizontal_arrow_height = 36

If this setting would not be there, the size of the graphics would be used instaed.
Title: theme support
Post by: Andarix on November 25, 2021, 06:32:24 AM
Is it possible to insert a zoom parameter for themes that enlarges the vehicles in the depot and in the other dialogs?
Title: Re: theme support
Post by: prissi on November 25, 2021, 01:24:20 PM
Since the menu buttons can be displayed zoomed but non-darknend with player colors, this should be possible without too much effort for vehicles as well.
Title: Re: r10154 - theme support
Post by: Andarix on November 26, 2021, 08:14:36 AM
Quote from: Dwachs on October 17, 2021, 11:12:17 AM
This line in the tab file is the reason:

gui_horizontal_arrow_height = 36

If this setting would not be there, the size of the graphics would be used instaed.

It is desirable that the fields have a uniform size behavior.

(https://forum.simutrans.com/index.php?action=dlattach;topic=21179.0;attach=30001;image)
Title: Re: theme support
Post by: Dwachs on November 26, 2021, 12:32:13 PM
Yes. But size also depends on font size. Also the depot window is a bad example, this is one (if not the last) that is still not converted to the 'new' scalable gui system.
Title: Re: theme support
Post by: prissi on November 29, 2021, 01:41:25 PM
Thank you for actually converting this boss monster window to the new system!
Title: Re: theme support
Post by: Dwachs on November 29, 2021, 02:34:40 PM
It  was much easier than expected :)
Title: Re: theme support
Post by: Yona-TYT on November 30, 2021, 11:55:09 AM
😎