Merge PR #556 into jgrpp
This commit is contained in:
		@@ -2121,3 +2121,6 @@ STR_TOWN_DIRECTORY_INFO                                         :{BLACK}{STRING1
 | 
			
		||||
 | 
			
		||||
STR_GAME_OPTIONS_GUI_SCALE_MAIN_TOOLBAR                         :{BLACK}Bigger main toolbar
 | 
			
		||||
STR_GAME_OPTIONS_GUI_SCALE_MAIN_TOOLBAR_TOOLTIP                 :{BLACK}Check this box to increase the scale of the main toolbar
 | 
			
		||||
 | 
			
		||||
STR_CONFIG_SETTING_INSTANT_TILE_TOOLTIP                         :Show tooltips for tiles without a right-click: {STRING2}
 | 
			
		||||
STR_CONFIG_SETTING_INSTANT_TILE_TOOLTIP_HELPTEXT                :Allow tooltips for tiles, such as industries, to show without the need for a right-click, if latter is set to be necessary for all tooltips.
 | 
			
		||||
 
 | 
			
		||||
@@ -528,7 +528,8 @@ struct MainWindow : Window
 | 
			
		||||
 | 
			
		||||
	virtual void OnMouseOver(Point pt, int widget) override
 | 
			
		||||
	{
 | 
			
		||||
		if (pt.x != -1 && _game_mode != GM_MENU && (_settings_client.gui.hover_delay_ms == 0 ? _right_button_down : _mouse_hovering)) {
 | 
			
		||||
		if (pt.x != -1 && _game_mode != GM_MENU &&
 | 
			
		||||
			(_settings_client.gui.hover_delay_ms == 0 && (_right_button_down || _settings_client.gui.instant_tile_tooltip) || _mouse_hovering)) {
 | 
			
		||||
			/* Show tooltip with last month production or town name */
 | 
			
		||||
			const Point p = GetTileBelowCursor();
 | 
			
		||||
			const TileIndex tile = TileVirtXY(p.x, p.y);
 | 
			
		||||
 
 | 
			
		||||
@@ -1924,6 +1924,7 @@ static SettingsContainer &GetSettingsTree()
 | 
			
		||||
			{
 | 
			
		||||
				general->Add(new SettingEntry("gui.osk_activation"));
 | 
			
		||||
				general->Add(new SettingEntry("gui.hover_delay_ms"));
 | 
			
		||||
				general->Add(new SettingEntry("gui.instant_tile_tooltip"));
 | 
			
		||||
				general->Add(new SettingEntry("gui.errmsg_duration"));
 | 
			
		||||
				general->Add(new SettingEntry("gui.window_snap_radius"));
 | 
			
		||||
				general->Add(new SettingEntry("gui.window_soft_limit"));
 | 
			
		||||
 
 | 
			
		||||
@@ -132,6 +132,7 @@ struct GUISettings : public TimeSettings {
 | 
			
		||||
	uint8  auto_scrolling;                   ///< scroll when moving mouse to the edge (see #ViewportAutoscrolling)
 | 
			
		||||
	byte   errmsg_duration;                  ///< duration of error message
 | 
			
		||||
	uint16 hover_delay_ms;                   ///< time required to activate a hover event, in milliseconds
 | 
			
		||||
	bool   instant_tile_tooltip;             ///< don't require a right click to activate a hover event to show a tooltip for an in-game tile (e.g. industry).
 | 
			
		||||
	bool   link_terraform_toolbar;           ///< display terraform toolbar when displaying rail, road, water and airport toolbars
 | 
			
		||||
	uint8  smallmap_land_colour;             ///< colour used for land and heightmap at the smallmap
 | 
			
		||||
	uint8  scroll_mode;                      ///< viewport scroll mode
 | 
			
		||||
 
 | 
			
		||||
@@ -4544,6 +4544,13 @@ str      = STR_CONFIG_SETTING_HOVER_DELAY
 | 
			
		||||
strhelp  = STR_CONFIG_SETTING_HOVER_DELAY_HELPTEXT
 | 
			
		||||
strval   = STR_CONFIG_SETTING_HOVER_DELAY_VALUE
 | 
			
		||||
 | 
			
		||||
[SDTC_BOOL]
 | 
			
		||||
var     = gui.instant_tile_tooltip
 | 
			
		||||
flags   = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
 | 
			
		||||
def     = true
 | 
			
		||||
str     = STR_CONFIG_SETTING_INSTANT_TILE_TOOLTIP
 | 
			
		||||
strhelp = STR_CONFIG_SETTING_INSTANT_TILE_TOOLTIP_HELPTEXT
 | 
			
		||||
 | 
			
		||||
[SDTC_OMANY]
 | 
			
		||||
var      = gui.osk_activation
 | 
			
		||||
type     = SLE_UINT8
 | 
			
		||||
 
 | 
			
		||||
@@ -158,7 +158,7 @@ public:
 | 
			
		||||
 | 
			
		||||
	virtual void OnMouseOver(Point pt, int widget) override
 | 
			
		||||
	{
 | 
			
		||||
		if (pt.x != -1 && (_settings_client.gui.hover_delay_ms == 0 ? _right_button_down : _mouse_hovering)) {
 | 
			
		||||
		if (pt.x != -1 && (_settings_client.gui.hover_delay_ms == 0 && (_right_button_down || _settings_client.gui.instant_tile_tooltip) || _mouse_hovering)) {
 | 
			
		||||
			/* Show tooltip with last month production or town name */
 | 
			
		||||
			const Point p = GetTileBelowCursor();
 | 
			
		||||
			const TileIndex tile = TileVirtXY(p.x, p.y);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user