summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authorplanetmaker <planetmaker@openttd.org>2014-09-13 13:30:31 +0000
committerplanetmaker <planetmaker@openttd.org>2014-09-13 13:30:31 +0000
commit61e129cc22d1eab769d368d9e68a257a19db743d (patch)
tree55f8e3fe36ff59a5506e377aa27e06d87f4958c7 /src/window.cpp
parentdb06971ded17cba0b29801925103cd0f4ffe772e (diff)
downloadopenttd-61e129cc22d1eab769d368d9e68a257a19db743d.tar.xz
(svn r26815) -Change: Allow to set the granularity of the tooltip hover time in milliseconds instead of seconds. New default value is 250ms
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 5b3511573..3b6b08df1 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -752,7 +752,7 @@ static void DispatchRightClickEvent(Window *w, int x, int y)
if (w->OnRightClick(pt, wid->index)) return;
}
- if (_settings_client.gui.hover_delay == 0 && wid->tool_tip != 0) GuiShowTooltips(w, wid->tool_tip, 0, NULL, TCC_RIGHT_CLICK);
+ if (_settings_client.gui.hover_delay_ms == 0 && wid->tool_tip != 0) GuiShowTooltips(w, wid->tool_tip, 0, NULL, TCC_RIGHT_CLICK);
}
/**
@@ -2879,7 +2879,7 @@ void HandleMouseEvents()
static uint32 hover_time = 0;
static Point hover_pos = {0, 0};
- if (_settings_client.gui.hover_delay > 0) {
+ if (_settings_client.gui.hover_delay_ms > 0) {
if (!_cursor.in_window || click != MC_NONE || mousewheel != 0 || _left_button_down || _right_button_down ||
hover_pos.x == 0 || abs(_cursor.pos.x - hover_pos.x) >= MAX_OFFSET_HOVER ||
hover_pos.y == 0 || abs(_cursor.pos.y - hover_pos.y) >= MAX_OFFSET_HOVER) {
@@ -2887,7 +2887,7 @@ void HandleMouseEvents()
hover_time = _realtime_tick;
_mouse_hovering = false;
} else {
- if (hover_time != 0 && _realtime_tick > hover_time + _settings_client.gui.hover_delay * 1000) {
+ if (hover_time != 0 && _realtime_tick > hover_time + _settings_client.gui.hover_delay_ms) {
click = MC_HOVER;
_input_events_this_tick++;
_mouse_hovering = true;