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

This commit is contained in:
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

@@ -974,6 +974,15 @@ struct DepotWindow : Window {
}
}
bool last_overlay_state;
void OnMouseLoop() override
{
if (last_overlay_state != ShowCargoIconOverlay()) {
last_overlay_state = ShowCargoIconOverlay();
this->SetDirty();
}
}
void OnMouseDrag(Point pt, WidgetID widget) override
{
if (this->sel == INVALID_VEHICLE) return;