News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

theme support

Started by Andarix, October 16, 2021, 07:37:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andarix

For the height of input fields there is the parameter gui_edit_height.

Which parameter sets the height of selection fields?


Dwachs

This setting was ignored mostly. Fixed it in r10158. Note that gui_edit_height is not used anywhere.
Parsley, sage, rosemary, and maggikraut.


Andarix

r10164

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

How do you get the same height for both fields?


Dwachs

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.
Parsley, sage, rosemary, and maggikraut.

Andarix

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

Dwachs

You set the gui-arrow-left to a very large value, which is used for the height of the select-box.
Parsley, sage, rosemary, and maggikraut.

Andarix

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.

Dwachs

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.
Parsley, sage, rosemary, and maggikraut.

Andarix

#9
Is it possible to insert a zoom parameter for themes that enlarges the vehicles in the depot and in the other dialogs?

prissi

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.

Andarix

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.


Dwachs

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.
Parsley, sage, rosemary, and maggikraut.

prissi

Thank you for actually converting this boss monster window to the new system!

Dwachs

It  was much easier than expected :)
Parsley, sage, rosemary, and maggikraut.