(svn r27144) -Change: The chatbox-width setting now uses percent of screen width instead of pixels.

This commit is contained in:
frosch 2015-02-12 20:00:23 +00:00
parent 853e96e67b
commit 2f7de4fd99
3 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -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

View File

@ -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]