1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-19 18:32:35 +01:00

Add: Overlay cargo icon in vehicle/depot list when holding shift+ctrl. (#12938)

This commit is contained in:
Peter Nelson
2024-09-22 10:33:44 +01:00
committed by GitHub
parent 9404a03663
commit e45e8a39c8
9 changed files with 155 additions and 4 deletions

View File

@@ -692,6 +692,15 @@ public:
}
}
bool last_overlay_state;
void OnMouseLoop() override
{
if (last_overlay_state != ShowCargoIconOverlay()) {
last_overlay_state = ShowCargoIconOverlay();
this->SetDirty();
}
}
void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override
{
switch (widget) {