Fixed tooltip issue #1053

Tooltips should now behave more like RCT2.
This commit is contained in:
Robert Jordan 2015-05-20 12:53:02 -04:00
parent 86a1ba3994
commit dc38087f07
2 changed files with 5 additions and 3 deletions

View File

@ -1067,10 +1067,12 @@ static void input_update_tooltip(rct_window *w, int widgetIndex, int x, int y)
RCT2_GLOBAL(RCT2_ADDRESS_TOOLTIP_TIMEOUT, uint16) = RCT2_GLOBAL(0x009DE588, uint16);
int bp = 2000;
if (RCT2_GLOBAL(RCT2_ADDRESS_TOOLTIP_NOT_SHOWN_TICKS, uint16) <= 1000)
if (RCT2_GLOBAL(RCT2_ADDRESS_TOOLTIP_NOT_SHOWN_TICKS, uint16) >= 1)
bp = 0;
if (bp > RCT2_GLOBAL(RCT2_ADDRESS_TOOLTIP_TIMEOUT, uint16))
if (bp > RCT2_GLOBAL(RCT2_ADDRESS_TOOLTIP_TIMEOUT, uint16)) {
RCT2_GLOBAL(RCT2_ADDRESS_TOOLTIP_NOT_SHOWN_TICKS, sint16)++;
return;
}
window_tooltip_open(w, widgetIndex, x, y);
// RCT2_CALLPROC_X(0x006EA10D, x, y, 0, widgetIndex, w, widget, 0); // window_tooltip_open();

View File

@ -140,7 +140,7 @@ void window_dispatch_update_all()
rct_window *w;
RCT2_GLOBAL(0x01423604, sint32)++;
RCT2_GLOBAL(RCT2_ADDRESS_TOOLTIP_NOT_SHOWN_TICKS, sint16)++;
//RCT2_GLOBAL(RCT2_ADDRESS_TOOLTIP_NOT_SHOWN_TICKS, sint16)++;
for (w = RCT2_LAST_WINDOW; w >= g_window_list; w--)
window_event_update_call(w);