diff options
-rw-r--r-- | src/network/network_chat_gui.cpp | 2 | ||||
-rw-r--r-- | src/settings_type.h | 2 | ||||
-rw-r--r-- | src/table/settings.ini | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/network/network_chat_gui.cpp b/src/network/network_chat_gui.cpp index fdfc4acff..d55407fdd 100644 --- a/src/network/network_chat_gui.cpp +++ b/src/network/network_chat_gui.cpp @@ -120,7 +120,7 @@ void NetworkInitChatMessage() _chatmsg_list = ReallocT(_chatmsg_list, _settings_client.gui.network_chat_box_height); _chatmsg_box.x = 10; - _chatmsg_box.width = _settings_client.gui.network_chat_box_width; + _chatmsg_box.width = _settings_client.gui.network_chat_box_width_pct * _screen.width / 100; NetworkReInitChatBoxSize(); _chatmessage_visible = false; diff --git a/src/settings_type.h b/src/settings_type.h index 9ea98caea..41366a771 100644 --- a/src/settings_type.h +++ b/src/settings_type.h @@ -144,7 +144,7 @@ struct GUISettings { uint8 station_gui_sort_by; ///< sort cargo entries in the station gui by station name or amount uint8 station_gui_sort_order; ///< the sort order of entries in the station gui - ascending or descending #ifdef ENABLE_NETWORK - uint16 network_chat_box_width; ///< width of the chat box in pixels + uint16 network_chat_box_width_pct; ///< width of the chat box in percent uint8 network_chat_box_height; ///< height of the chat box in lines uint16 network_chat_timeout; ///< timeout of chat messages in seconds #endif diff --git a/src/table/settings.ini b/src/table/settings.ini index 3cd29e067..d7f24d625 100644 --- a/src/table/settings.ini +++ b/src/table/settings.ini @@ -3507,12 +3507,12 @@ strval = STR_CONFIG_SETTING_NEWS_MESSAGES_OFF [SDTC_VAR] ifdef = ENABLE_NETWORK -var = gui.network_chat_box_width +var = gui.network_chat_box_width_pct type = SLE_UINT16 flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC -def = 620 -min = 200 -max = 65535 +def = 40 +min = 10 +max = 100 cat = SC_EXPERT [SDTC_VAR] |