Changeset - r21988:24cc96a34d30
[Not reviewed]
master
0 3 0
frosch - 9 years ago 2015-02-12 20:00:23
frosch@openttd.org
(svn r27144) -Change: The chatbox-width setting now uses percent of screen width instead of pixels.
3 files changed with 6 insertions and 6 deletions:
0 comments (0 inline, 0 general)
src/network/network_chat_gui.cpp
Show inline comments
 
@@ -117,13 +117,13 @@ void NetworkReInitChatBoxSize()
 
void NetworkInitChatMessage()
 
{
 
	MAX_CHAT_MESSAGES    = _settings_client.gui.network_chat_box_height;
 

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

	
 
	for (uint i = 0; i < MAX_CHAT_MESSAGES; i++) {
 
		_chatmsg_list[i].message[0] = '\0';
 
	}
src/settings_type.h
Show inline comments
 
@@ -141,13 +141,13 @@ struct GUISettings {
 
	uint16 console_backlog_length;           ///< the minimum amount of items in the console backlog before items will be removed.
 

	
 
	uint8  station_gui_group_order;          ///< the order of grouping cargo entries in the station gui
 
	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
 

	
 
	uint8  developer;                        ///< print non-fatal warnings in console (>= 1), copy debug output to console (== 2)
 
	bool   show_date_in_logs;                ///< whether to show dates in console logs
src/table/settings.ini
Show inline comments
 
@@ -3504,18 +3504,18 @@ full     = _news_display
 
str      = STR_CONFIG_SETTING_NEWS_GENERAL_INFORMATION
 
strhelp  = STR_CONFIG_SETTING_NEWS_GENERAL_INFORMATION_HELPTEXT
 
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]
 
ifdef    = ENABLE_NETWORK
 
var      = gui.network_chat_box_height
 
type     = SLE_UINT8
0 comments (0 inline, 0 general)