Fix tunnel build viewport length tooltip when hover mode is right click

pull/78/head
Jonathan G Rennison 5 years ago
parent 2bd33c1869
commit 828a4399f9

@ -774,6 +774,7 @@ struct TooltipsWindow : public Window
case TCC_RIGHT_CLICK: if (!_right_button_down) delete this; break;
case TCC_LEFT_CLICK: if (!_left_button_down) delete this; break;
case TCC_HOVER: if (!_mouse_hovering) delete this; break;
case TCC_NEXT_LOOP: this->delete_next_mouse_loop = true; break;
case TCC_HOVER_VIEWPORT:
if (_settings_client.gui.hover_delay_ms == 0) {

@ -3783,7 +3783,7 @@ void VpSetPresizeRange(TileIndex from, TileIndex to)
_thd.next_drawstyle = HT_RECT;
/* show measurement only if there is any length to speak of */
if (distance > 1) ShowMeasurementTooltips(STR_MEASURE_LENGTH, 1, &distance, TCC_HOVER);
if (distance > 1) ShowMeasurementTooltips(STR_MEASURE_LENGTH, 1, &distance, _settings_client.gui.hover_delay_ms == 0 ? TCC_NEXT_LOOP : TCC_HOVER);
}
static void VpStartPreSizing()

@ -924,6 +924,7 @@ enum TooltipCloseCondition {
TCC_LEFT_CLICK,
TCC_HOVER,
TCC_HOVER_VIEWPORT,
TCC_NEXT_LOOP,
};
void GuiShowTooltips(Window *parent, StringID str, uint paramcount = 0, const uint64 params[] = NULL, TooltipCloseCondition close_tooltip = TCC_HOVER);

Loading…
Cancel
Save