mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 10:21:57 -05:00
Tile inspector invisibility shortcut does not use a game action
This commit is contained in:
parent
39ecab4bd2
commit
95169f9632
5 changed files with 22 additions and 14 deletions
|
@ -102,7 +102,7 @@ The following people are not part of the development team, but have been contrib
|
||||||
* Karst van Galen Last (AuraSpecs) - Ride paint (bounding boxes, extra track pieces), soundtrack, sound effects, misc.
|
* Karst van Galen Last (AuraSpecs) - Ride paint (bounding boxes, extra track pieces), soundtrack, sound effects, misc.
|
||||||
* (8street) - Misc.
|
* (8street) - Misc.
|
||||||
* Umar Ahmed (umar-ahmed) - MacOS file watcher
|
* Umar Ahmed (umar-ahmed) - MacOS file watcher
|
||||||
* Andrew Arnold (fidwell) - Added window support for more scenery groups.
|
* Andrew Arnold (fidwell) - Misc.
|
||||||
* Josh Trzebiatowski (trzejos) - Ride and scenery filtering
|
* Josh Trzebiatowski (trzejos) - Ride and scenery filtering
|
||||||
* (kyphii) - Extended color selection, reversed ride vehicles, misc.
|
* (kyphii) - Extended color selection, reversed ride vehicles, misc.
|
||||||
* Phumdol Lookthipnapha (beam41) - Misc.
|
* Phumdol Lookthipnapha (beam41) - Misc.
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
- Fix: [#20737] Spent money in player window underflows when getting refunds.
|
- Fix: [#20737] Spent money in player window underflows when getting refunds.
|
||||||
- Fix: [#20778] [Plugin] Incorrect target api when executing custom actions.
|
- Fix: [#20778] [Plugin] Incorrect target api when executing custom actions.
|
||||||
- Fix: [#19722] “Forbid tree removal” restriction doesn't forbid removal of large scenery tree items.
|
- Fix: [#19722] “Forbid tree removal” restriction doesn't forbid removal of large scenery tree items.
|
||||||
|
- Fix: [#16453] Tile inspector invisibility shortcut does not use a game action.
|
||||||
|
|
||||||
0.4.6 (2023-09-03)
|
0.4.6 (2023-09-03)
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
|
@ -517,20 +517,10 @@ static void TileInspectorMouseDown(WidgetIndex widgetIndex)
|
||||||
|
|
||||||
static void ShortcutToggleVisibility()
|
static void ShortcutToggleVisibility()
|
||||||
{
|
{
|
||||||
// TODO: Once the tile inspector window has its own class, move this to its own function
|
WindowBase* window = WindowFindByClass(WindowClass::TileInspector);
|
||||||
if (windowTileInspectorSelectedIndex < 0)
|
if (window != nullptr)
|
||||||
return;
|
|
||||||
|
|
||||||
WindowBase* w = WindowFindByClass(WindowClass::TileInspector);
|
|
||||||
if (w == nullptr)
|
|
||||||
return;
|
|
||||||
|
|
||||||
extern TileCoordsXY windowTileInspectorTile;
|
|
||||||
TileElement* tileElement = MapGetNthElementAt(windowTileInspectorTile.ToCoordsXY(), windowTileInspectorSelectedIndex);
|
|
||||||
if (tileElement != nullptr)
|
|
||||||
{
|
{
|
||||||
tileElement->SetInvisible(!tileElement->IsInvisible());
|
WindowTileInspectorKeyboardShortcutToggleInvisibility();
|
||||||
w->Invalidate();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1697,6 +1697,14 @@ public:
|
||||||
_elementCopied = false;
|
_elementCopied = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ToggleInvisibility()
|
||||||
|
{
|
||||||
|
if (windowTileInspectorSelectedIndex >= 0 && windowTileInspectorSelectedIndex < windowTileInspectorElementCount)
|
||||||
|
{
|
||||||
|
ToggleInvisibility(windowTileInspectorSelectedIndex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetPage(const TileInspectorPage p)
|
void SetPage(const TileInspectorPage p)
|
||||||
{
|
{
|
||||||
|
@ -2369,3 +2377,10 @@ void WindowTileInspectorClearClipboard()
|
||||||
if (window != nullptr)
|
if (window != nullptr)
|
||||||
static_cast<TileInspector*>(window)->ClearClipboard();
|
static_cast<TileInspector*>(window)->ClearClipboard();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WindowTileInspectorKeyboardShortcutToggleInvisibility()
|
||||||
|
{
|
||||||
|
auto* window = WindowFindByClass(WindowClass::TileInspector);
|
||||||
|
if (window != nullptr)
|
||||||
|
static_cast<TileInspector*>(window)->ToggleInvisibility();
|
||||||
|
}
|
||||||
|
|
|
@ -680,6 +680,8 @@ void WindowFootpathKeyboardShortcutSlopeUp();
|
||||||
void WindowFootpathKeyboardShortcutBuildCurrent();
|
void WindowFootpathKeyboardShortcutBuildCurrent();
|
||||||
void WindowFootpathKeyboardShortcutDemolishCurrent();
|
void WindowFootpathKeyboardShortcutDemolishCurrent();
|
||||||
|
|
||||||
|
void WindowTileInspectorKeyboardShortcutToggleInvisibility();
|
||||||
|
|
||||||
void WindowFollowSprite(WindowBase& w, EntityId spriteIndex);
|
void WindowFollowSprite(WindowBase& w, EntityId spriteIndex);
|
||||||
void WindowUnfollowSprite(WindowBase& w);
|
void WindowUnfollowSprite(WindowBase& w);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue