1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Adding gridlines display toggle shortcut. (#6313)

This feature existed in the original RCT1/2 games but was not present in
the latest development commit.

The original shortcut for this key was '7', placing it between the
"Invisible people toggle" (6) shortcut and the "Height marks on land
toggle" (8). This commit preserves as much as possible, using
placeholder comments that signify the relevant values which this
feature actually uses where this is not possible.
This commit is contained in:
zyliwax
2017-11-22 07:02:23 -05:00
committed by Ted John
parent 65ab767597
commit 7bffc4ae33
7 changed files with 16 additions and 0 deletions

View File

@@ -4469,6 +4469,7 @@ STR_6157 :Console
STR_6158 :Failed to load this file...{NEWLINE}Incompatible RCTC version: {COMMA16}
STR_6159 :Smooth Nearest Neighbour
STR_6160 :{WINDOW_COLOUR_2}Available vehicles: {BLACK}{STRING}
STR_6161 :Gridlines display toggle
#############
# Scenarios #

View File

@@ -11,6 +11,7 @@
- Feature: [#6292] Allow building queue lines in the Scenario Editor.
- Feature: [#6295] TrueType fonts are now rendered with light font hinting by default.
- Feature: [#6307] Arrows are now shown when placing park entrances.
- Feature: [#6313] Add keyboard shortcut for toggle gridlines.
- Feature: [#6324] Add command to deselect unused objects from the object selection.
- Feature: [#6325] Allow using g1.dat from RCT Classic.
- Feature: [#6353] Show custom RCT1 scenarios in New Scenario window.

View File

@@ -311,6 +311,14 @@ static void shortcut_invisible_people_toggle()
toggle_view_flag(VIEWPORT_FLAG_INVISIBLE_PEEPS);
}
static void shortcut_gridlines_toggle()
{
if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)
return;
toggle_view_flag(VIEWPORT_FLAG_GRIDLINES);
}
static void shortcut_height_marks_on_land_toggle()
{
if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)
@@ -807,6 +815,7 @@ namespace
shortcut_ride_construction_demolish_current,
shortcut_load_game,
shortcut_clear_scenery,
shortcut_gridlines_toggle,
};
}

View File

@@ -307,4 +307,5 @@ const uint16 KeyboardShortcuts::DefaultKeys[SHORTCUT_COUNT] =
SDL_SCANCODE_KP_MINUS, // SHORTCUT_RIDE_CONSTRUCTION_DEMOLISH_CURRENT
PLATFORM_MODIFIER | SDL_SCANCODE_L, // SHORTCUT_LOAD_GAME
SDL_SCANCODE_B, // SHORTCUT_CLEAR_SCENERY
SDL_SCANCODE_7, // SHORTCUT_GRIDLINES_DISPLAY_TOGGLE
};

View File

@@ -96,6 +96,7 @@ enum
SHORTCUT_RIDE_CONSTRUCTION_DEMOLISH_CURRENT,
SHORTCUT_LOAD_GAME,
SHORTCUT_CLEAR_SCENERY,
SHORTCUT_GRIDLINES_DISPLAY_TOGGLE,
SHORTCUT_COUNT,

View File

@@ -153,6 +153,7 @@ const rct_string_id ShortcutStringIds[SHORTCUT_COUNT] = {
STR_SHORTCUT_RIDE_CONSTRUCTION_DEMOLISH_CURRENT,
STR_LOAD_GAME,
STR_SHORTCUT_CLEAR_SCENERY,
STR_SHORTCUT_GRIDLINES_DISPLAY_TOGGLE,
};
}

View File

@@ -3820,6 +3820,8 @@ enum {
STR_AVAILABLE_VEHICLES = 6160,
STR_SHORTCUT_GRIDLINES_DISPLAY_TOGGLE = 6161,
// Have to include resource strings (from scenarios and objects) for the time being now that language is partially working
STR_COUNT = 32768
};