1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 06:44:38 +01:00

Followup on #12475 post-mortem comments (#12745)

* Remove using namespace OpenRCT2 from header

* Fix using wronf undefined enum for shortcut key map
This commit is contained in:
Tulio Leao
2020-08-21 12:07:38 -03:00
committed by GitHub
parent 5330f7fb86
commit 4caf571c22
3 changed files with 3 additions and 4 deletions

View File

@@ -149,7 +149,7 @@ void KeyboardShortcuts::Set(int32_t key)
auto shortcut = GetFromKey(key);
if (shortcut != Input::Shortcut::Undefined)
{
_keys[static_cast<size_t>(shortcut)] = static_cast<uint16_t>(Input::Shortcut::Undefined);
_keys[static_cast<size_t>(shortcut)] = static_cast<uint16_t>(Input::ScanCodeUndefined);
}
// Map shortcut to this key

View File

@@ -70,7 +70,7 @@ static rct_window_event_list window_shortcut_change_events = {
static rct_string_id CurrentShortcutKeyStringId{};
rct_window* window_shortcut_change_open(Input::Shortcut shortcut, rct_string_id key_string_id)
rct_window* window_shortcut_change_open(OpenRCT2::Input::Shortcut shortcut, rct_string_id key_string_id)
{
// Move this to window_shortcut_change_open
window_close_by_class(WC_CHANGE_KEYBOARD_SHORTCUT);

View File

@@ -16,7 +16,6 @@
#include <openrct2/windows/tile_inspector.h>
#include <string_view>
using namespace OpenRCT2;
using loadsave_callback = void (*)(int32_t result, const utf8* path);
using scenarioselect_callback = void (*)(const utf8* path);
struct Peep;
@@ -64,7 +63,7 @@ rct_window* window_save_prompt_open();
rct_window* window_server_list_open();
rct_window* window_server_start_open();
#endif
rct_window* window_shortcut_change_open(Input::Shortcut shortcut, rct_string_id key_string_id);
rct_window* window_shortcut_change_open(OpenRCT2::Input::Shortcut shortcut, rct_string_id key_string_id);
rct_window* window_shortcut_keys_open();
rct_window* window_staff_list_open();
rct_window* window_staff_open(Peep* peep);