Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tile inspector element type #13134

Merged
merged 2 commits into from
Jan 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/openrct2-ui/input/KeyboardShortcut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <openrct2/title/TitleScreen.h>
#include <openrct2/util/Util.h>
#include <openrct2/windows/Intent.h>
#include <openrct2/windows/tile_inspector.h>
#include <openrct2/world/Park.h>
#include <openrct2/world/Scenery.h>

Expand Down Expand Up @@ -947,7 +948,7 @@ static void ShortcutIncreaseElementHeight()
if (w != nullptr)
{
int action = -1;
switch (w->page)
switch (w->tileInspectorPage)
{
case WC_TILE_INSPECTOR__TILE_INSPECTOR_PAGE_SURFACE:
action = WC_TILE_INSPECTOR__WIDX_SURFACE_SPINNER_HEIGHT_INCREASE;
Expand Down Expand Up @@ -976,6 +977,8 @@ static void ShortcutIncreaseElementHeight()
case WC_TILE_INSPECTOR__TILE_INSPECTOR_PAGE_CORRUPT:
action = WC_TILE_INSPECTOR__WIDX_CORRUPT_SPINNER_HEIGHT_INCREASE;
break;
case TileInspectorPage::Default:
break;
}
if (action != -1 && !WidgetIsDisabled(w, action) && w->widgets[action].type != WindowWidgetType::Empty)
window_event_mouse_down_call(w, action);
Expand All @@ -989,7 +992,7 @@ static void ShortcutDecreaseElementHeight()
if (w != nullptr)
{
int action = -1;
switch (w->page)
switch (w->tileInspectorPage)
{
case WC_TILE_INSPECTOR__TILE_INSPECTOR_PAGE_SURFACE:
action = WC_TILE_INSPECTOR__WIDX_SURFACE_SPINNER_HEIGHT_DECREASE;
Expand Down Expand Up @@ -1018,6 +1021,8 @@ static void ShortcutDecreaseElementHeight()
case WC_TILE_INSPECTOR__TILE_INSPECTOR_PAGE_CORRUPT:
action = WC_TILE_INSPECTOR__WIDX_CORRUPT_SPINNER_HEIGHT_DECREASE;
break;
case TileInspectorPage::Default:
break;
}
if (action != -1 && !WidgetIsDisabled(w, action) && w->widgets[action].type != WindowWidgetType::Empty)
window_event_mouse_down_call(w, action);
Expand Down
Loading