diff --git a/examples/common/imgui/imgui.cpp b/examples/common/imgui/imgui.cpp index 36b0fc3b1..951c118ed 100644 --- a/examples/common/imgui/imgui.cpp +++ b/examples/common/imgui/imgui.cpp @@ -220,111 +220,111 @@ struct OcornutImguiContext m_keyMap[ii] = ImGuiKey_None; } - m_keyMap[(int)entry::Key::Esc] = ImGuiKey_Escape; - m_keyMap[(int)entry::Key::Return] = ImGuiKey_Enter; - m_keyMap[(int)entry::Key::Tab] = ImGuiKey_Tab; - m_keyMap[(int)entry::Key::Space] = ImGuiKey_Space; - m_keyMap[(int)entry::Key::Backspace] = ImGuiKey_Backspace; - m_keyMap[(int)entry::Key::Up] = ImGuiKey_UpArrow; - m_keyMap[(int)entry::Key::Down] = ImGuiKey_DownArrow; - m_keyMap[(int)entry::Key::Left] = ImGuiKey_LeftArrow; - m_keyMap[(int)entry::Key::Right] = ImGuiKey_RightArrow; - m_keyMap[(int)entry::Key::Insert] = ImGuiKey_Insert; - m_keyMap[(int)entry::Key::Delete] = ImGuiKey_Delete; - m_keyMap[(int)entry::Key::Home] = ImGuiKey_Home; - m_keyMap[(int)entry::Key::End] = ImGuiKey_End; - m_keyMap[(int)entry::Key::PageUp] = ImGuiKey_PageUp; - m_keyMap[(int)entry::Key::PageDown] = ImGuiKey_PageDown; - m_keyMap[(int)entry::Key::Print] = ImGuiKey_PrintScreen; - m_keyMap[(int)entry::Key::Plus] = ImGuiKey_Equal; - m_keyMap[(int)entry::Key::Minus] = ImGuiKey_Minus; - m_keyMap[(int)entry::Key::LeftBracket] = ImGuiKey_LeftBracket; - m_keyMap[(int)entry::Key::RightBracket] = ImGuiKey_RightBracket; - m_keyMap[(int)entry::Key::Semicolon] = ImGuiKey_Semicolon; - m_keyMap[(int)entry::Key::Quote] = ImGuiKey_Apostrophe; - m_keyMap[(int)entry::Key::Comma] = ImGuiKey_Comma; - m_keyMap[(int)entry::Key::Period] = ImGuiKey_Period; - m_keyMap[(int)entry::Key::Slash] = ImGuiKey_Slash; - m_keyMap[(int)entry::Key::Backslash] = ImGuiKey_Backslash; - m_keyMap[(int)entry::Key::Tilde] = ImGuiKey_GraveAccent; - m_keyMap[(int)entry::Key::F1] = ImGuiKey_F1; - m_keyMap[(int)entry::Key::F2] = ImGuiKey_F2; - m_keyMap[(int)entry::Key::F3] = ImGuiKey_F3; - m_keyMap[(int)entry::Key::F4] = ImGuiKey_F4; - m_keyMap[(int)entry::Key::F5] = ImGuiKey_F5; - m_keyMap[(int)entry::Key::F6] = ImGuiKey_F6; - m_keyMap[(int)entry::Key::F7] = ImGuiKey_F7; - m_keyMap[(int)entry::Key::F8] = ImGuiKey_F8; - m_keyMap[(int)entry::Key::F9] = ImGuiKey_F9; - m_keyMap[(int)entry::Key::F10] = ImGuiKey_F10; - m_keyMap[(int)entry::Key::F11] = ImGuiKey_F11; - m_keyMap[(int)entry::Key::F12] = ImGuiKey_F12; - m_keyMap[(int)entry::Key::NumPad0] = ImGuiKey_Keypad0; - m_keyMap[(int)entry::Key::NumPad1] = ImGuiKey_Keypad1; - m_keyMap[(int)entry::Key::NumPad2] = ImGuiKey_Keypad2; - m_keyMap[(int)entry::Key::NumPad3] = ImGuiKey_Keypad3; - m_keyMap[(int)entry::Key::NumPad4] = ImGuiKey_Keypad4; - m_keyMap[(int)entry::Key::NumPad5] = ImGuiKey_Keypad5; - m_keyMap[(int)entry::Key::NumPad6] = ImGuiKey_Keypad6; - m_keyMap[(int)entry::Key::NumPad7] = ImGuiKey_Keypad7; - m_keyMap[(int)entry::Key::NumPad8] = ImGuiKey_Keypad8; - m_keyMap[(int)entry::Key::NumPad9] = ImGuiKey_Keypad9; - m_keyMap[(int)entry::Key::Key0] = ImGuiKey_0; - m_keyMap[(int)entry::Key::Key1] = ImGuiKey_1; - m_keyMap[(int)entry::Key::Key2] = ImGuiKey_2; - m_keyMap[(int)entry::Key::Key3] = ImGuiKey_3; - m_keyMap[(int)entry::Key::Key4] = ImGuiKey_4; - m_keyMap[(int)entry::Key::Key5] = ImGuiKey_5; - m_keyMap[(int)entry::Key::Key6] = ImGuiKey_6; - m_keyMap[(int)entry::Key::Key7] = ImGuiKey_7; - m_keyMap[(int)entry::Key::Key8] = ImGuiKey_8; - m_keyMap[(int)entry::Key::Key9] = ImGuiKey_9; - m_keyMap[(int)entry::Key::KeyA] = ImGuiKey_A; - m_keyMap[(int)entry::Key::KeyB] = ImGuiKey_B; - m_keyMap[(int)entry::Key::KeyC] = ImGuiKey_C; - m_keyMap[(int)entry::Key::KeyD] = ImGuiKey_D; - m_keyMap[(int)entry::Key::KeyE] = ImGuiKey_E; - m_keyMap[(int)entry::Key::KeyF] = ImGuiKey_F; - m_keyMap[(int)entry::Key::KeyG] = ImGuiKey_G; - m_keyMap[(int)entry::Key::KeyH] = ImGuiKey_H; - m_keyMap[(int)entry::Key::KeyI] = ImGuiKey_I; - m_keyMap[(int)entry::Key::KeyJ] = ImGuiKey_J; - m_keyMap[(int)entry::Key::KeyK] = ImGuiKey_K; - m_keyMap[(int)entry::Key::KeyL] = ImGuiKey_L; - m_keyMap[(int)entry::Key::KeyM] = ImGuiKey_M; - m_keyMap[(int)entry::Key::KeyN] = ImGuiKey_N; - m_keyMap[(int)entry::Key::KeyO] = ImGuiKey_O; - m_keyMap[(int)entry::Key::KeyP] = ImGuiKey_P; - m_keyMap[(int)entry::Key::KeyQ] = ImGuiKey_Q; - m_keyMap[(int)entry::Key::KeyR] = ImGuiKey_R; - m_keyMap[(int)entry::Key::KeyS] = ImGuiKey_S; - m_keyMap[(int)entry::Key::KeyT] = ImGuiKey_T; - m_keyMap[(int)entry::Key::KeyU] = ImGuiKey_U; - m_keyMap[(int)entry::Key::KeyV] = ImGuiKey_V; - m_keyMap[(int)entry::Key::KeyW] = ImGuiKey_W; - m_keyMap[(int)entry::Key::KeyX] = ImGuiKey_X; - m_keyMap[(int)entry::Key::KeyY] = ImGuiKey_Y; - m_keyMap[(int)entry::Key::KeyZ] = ImGuiKey_Z; + m_keyMap[entry::Key::Esc] = ImGuiKey_Escape; + m_keyMap[entry::Key::Return] = ImGuiKey_Enter; + m_keyMap[entry::Key::Tab] = ImGuiKey_Tab; + m_keyMap[entry::Key::Space] = ImGuiKey_Space; + m_keyMap[entry::Key::Backspace] = ImGuiKey_Backspace; + m_keyMap[entry::Key::Up] = ImGuiKey_UpArrow; + m_keyMap[entry::Key::Down] = ImGuiKey_DownArrow; + m_keyMap[entry::Key::Left] = ImGuiKey_LeftArrow; + m_keyMap[entry::Key::Right] = ImGuiKey_RightArrow; + m_keyMap[entry::Key::Insert] = ImGuiKey_Insert; + m_keyMap[entry::Key::Delete] = ImGuiKey_Delete; + m_keyMap[entry::Key::Home] = ImGuiKey_Home; + m_keyMap[entry::Key::End] = ImGuiKey_End; + m_keyMap[entry::Key::PageUp] = ImGuiKey_PageUp; + m_keyMap[entry::Key::PageDown] = ImGuiKey_PageDown; + m_keyMap[entry::Key::Print] = ImGuiKey_PrintScreen; + m_keyMap[entry::Key::Plus] = ImGuiKey_Equal; + m_keyMap[entry::Key::Minus] = ImGuiKey_Minus; + m_keyMap[entry::Key::LeftBracket] = ImGuiKey_LeftBracket; + m_keyMap[entry::Key::RightBracket] = ImGuiKey_RightBracket; + m_keyMap[entry::Key::Semicolon] = ImGuiKey_Semicolon; + m_keyMap[entry::Key::Quote] = ImGuiKey_Apostrophe; + m_keyMap[entry::Key::Comma] = ImGuiKey_Comma; + m_keyMap[entry::Key::Period] = ImGuiKey_Period; + m_keyMap[entry::Key::Slash] = ImGuiKey_Slash; + m_keyMap[entry::Key::Backslash] = ImGuiKey_Backslash; + m_keyMap[entry::Key::Tilde] = ImGuiKey_GraveAccent; + m_keyMap[entry::Key::F1] = ImGuiKey_F1; + m_keyMap[entry::Key::F2] = ImGuiKey_F2; + m_keyMap[entry::Key::F3] = ImGuiKey_F3; + m_keyMap[entry::Key::F4] = ImGuiKey_F4; + m_keyMap[entry::Key::F5] = ImGuiKey_F5; + m_keyMap[entry::Key::F6] = ImGuiKey_F6; + m_keyMap[entry::Key::F7] = ImGuiKey_F7; + m_keyMap[entry::Key::F8] = ImGuiKey_F8; + m_keyMap[entry::Key::F9] = ImGuiKey_F9; + m_keyMap[entry::Key::F10] = ImGuiKey_F10; + m_keyMap[entry::Key::F11] = ImGuiKey_F11; + m_keyMap[entry::Key::F12] = ImGuiKey_F12; + m_keyMap[entry::Key::NumPad0] = ImGuiKey_Keypad0; + m_keyMap[entry::Key::NumPad1] = ImGuiKey_Keypad1; + m_keyMap[entry::Key::NumPad2] = ImGuiKey_Keypad2; + m_keyMap[entry::Key::NumPad3] = ImGuiKey_Keypad3; + m_keyMap[entry::Key::NumPad4] = ImGuiKey_Keypad4; + m_keyMap[entry::Key::NumPad5] = ImGuiKey_Keypad5; + m_keyMap[entry::Key::NumPad6] = ImGuiKey_Keypad6; + m_keyMap[entry::Key::NumPad7] = ImGuiKey_Keypad7; + m_keyMap[entry::Key::NumPad8] = ImGuiKey_Keypad8; + m_keyMap[entry::Key::NumPad9] = ImGuiKey_Keypad9; + m_keyMap[entry::Key::Key0] = ImGuiKey_0; + m_keyMap[entry::Key::Key1] = ImGuiKey_1; + m_keyMap[entry::Key::Key2] = ImGuiKey_2; + m_keyMap[entry::Key::Key3] = ImGuiKey_3; + m_keyMap[entry::Key::Key4] = ImGuiKey_4; + m_keyMap[entry::Key::Key5] = ImGuiKey_5; + m_keyMap[entry::Key::Key6] = ImGuiKey_6; + m_keyMap[entry::Key::Key7] = ImGuiKey_7; + m_keyMap[entry::Key::Key8] = ImGuiKey_8; + m_keyMap[entry::Key::Key9] = ImGuiKey_9; + m_keyMap[entry::Key::KeyA] = ImGuiKey_A; + m_keyMap[entry::Key::KeyB] = ImGuiKey_B; + m_keyMap[entry::Key::KeyC] = ImGuiKey_C; + m_keyMap[entry::Key::KeyD] = ImGuiKey_D; + m_keyMap[entry::Key::KeyE] = ImGuiKey_E; + m_keyMap[entry::Key::KeyF] = ImGuiKey_F; + m_keyMap[entry::Key::KeyG] = ImGuiKey_G; + m_keyMap[entry::Key::KeyH] = ImGuiKey_H; + m_keyMap[entry::Key::KeyI] = ImGuiKey_I; + m_keyMap[entry::Key::KeyJ] = ImGuiKey_J; + m_keyMap[entry::Key::KeyK] = ImGuiKey_K; + m_keyMap[entry::Key::KeyL] = ImGuiKey_L; + m_keyMap[entry::Key::KeyM] = ImGuiKey_M; + m_keyMap[entry::Key::KeyN] = ImGuiKey_N; + m_keyMap[entry::Key::KeyO] = ImGuiKey_O; + m_keyMap[entry::Key::KeyP] = ImGuiKey_P; + m_keyMap[entry::Key::KeyQ] = ImGuiKey_Q; + m_keyMap[entry::Key::KeyR] = ImGuiKey_R; + m_keyMap[entry::Key::KeyS] = ImGuiKey_S; + m_keyMap[entry::Key::KeyT] = ImGuiKey_T; + m_keyMap[entry::Key::KeyU] = ImGuiKey_U; + m_keyMap[entry::Key::KeyV] = ImGuiKey_V; + m_keyMap[entry::Key::KeyW] = ImGuiKey_W; + m_keyMap[entry::Key::KeyX] = ImGuiKey_X; + m_keyMap[entry::Key::KeyY] = ImGuiKey_Y; + m_keyMap[entry::Key::KeyZ] = ImGuiKey_Z; io.ConfigFlags |= 0 | ImGuiConfigFlags_NavEnableGamepad | ImGuiConfigFlags_NavEnableKeyboard ; - m_keyMap[(int)entry::Key::GamepadStart] = ImGuiKey_GamepadStart; - m_keyMap[(int)entry::Key::GamepadBack] = ImGuiKey_GamepadBack; - m_keyMap[(int)entry::Key::GamepadY] = ImGuiKey_GamepadFaceUp; - m_keyMap[(int)entry::Key::GamepadA] = ImGuiKey_GamepadFaceDown; - m_keyMap[(int)entry::Key::GamepadX] = ImGuiKey_GamepadFaceLeft; - m_keyMap[(int)entry::Key::GamepadB] = ImGuiKey_GamepadFaceRight; - m_keyMap[(int)entry::Key::GamepadUp] = ImGuiKey_GamepadDpadUp; - m_keyMap[(int)entry::Key::GamepadDown] = ImGuiKey_GamepadDpadDown; - m_keyMap[(int)entry::Key::GamepadLeft] = ImGuiKey_GamepadDpadLeft; - m_keyMap[(int)entry::Key::GamepadRight] = ImGuiKey_GamepadDpadRight; - m_keyMap[(int)entry::Key::GamepadShoulderL] = ImGuiKey_GamepadL1; - m_keyMap[(int)entry::Key::GamepadShoulderR] = ImGuiKey_GamepadR1; - m_keyMap[(int)entry::Key::GamepadThumbL] = ImGuiKey_GamepadL3; - m_keyMap[(int)entry::Key::GamepadThumbR] = ImGuiKey_GamepadR3; + m_keyMap[entry::Key::GamepadStart] = ImGuiKey_GamepadStart; + m_keyMap[entry::Key::GamepadBack] = ImGuiKey_GamepadBack; + m_keyMap[entry::Key::GamepadY] = ImGuiKey_GamepadFaceUp; + m_keyMap[entry::Key::GamepadA] = ImGuiKey_GamepadFaceDown; + m_keyMap[entry::Key::GamepadX] = ImGuiKey_GamepadFaceLeft; + m_keyMap[entry::Key::GamepadB] = ImGuiKey_GamepadFaceRight; + m_keyMap[entry::Key::GamepadUp] = ImGuiKey_GamepadDpadUp; + m_keyMap[entry::Key::GamepadDown] = ImGuiKey_GamepadDpadDown; + m_keyMap[entry::Key::GamepadLeft] = ImGuiKey_GamepadDpadLeft; + m_keyMap[entry::Key::GamepadRight] = ImGuiKey_GamepadDpadRight; + m_keyMap[entry::Key::GamepadShoulderL] = ImGuiKey_GamepadL1; + m_keyMap[entry::Key::GamepadShoulderR] = ImGuiKey_GamepadR1; + m_keyMap[entry::Key::GamepadThumbL] = ImGuiKey_GamepadL3; + m_keyMap[entry::Key::GamepadThumbR] = ImGuiKey_GamepadR3; #endif // USE_ENTRY bgfx::RendererType::Enum type = bgfx::getRendererType();