News:

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

Macro constants for padding both horizontal sides of buttons.

Started by RESTRICTED ACCOUNT, November 05, 2021, 05:08:06 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RESTRICTED ACCOUNT

I found it useful to have this.
Replace gui_theme_t::gui_button_text_offset.w + gui_theme_t::gui_button_text_offset_right.x with D_BUTTON_PADDINGS_X.
This is used when the GUI designer wants the width of the button to fit the width of the text.
There are currently two places in Standard where this applies. But extended is used in many more places.
I submit a patch for the purpose of code standardization.

Dwachs

Parsley, sage, rosemary, and maggikraut.