| 23 | static HWND g_hWnd; |
| 24 | |
| 25 | bool ImGUI_Init(void *hwnd) |
| 26 | { |
| 27 | g_hWnd = (HWND)hwnd; |
| 28 | |
| 29 | ImGuiIO& io = ImGui::GetIO(); |
| 30 | io.KeyMap[ImGuiKey_Tab] = VK_TAB; // Keyboard mapping. ImGui will use those indices to peek into the io.KeyDown[] array that we will update during the application lifetime. |
| 31 | io.KeyMap[ImGuiKey_LeftArrow] = VK_LEFT; |
| 32 | io.KeyMap[ImGuiKey_RightArrow] = VK_RIGHT; |
| 33 | io.KeyMap[ImGuiKey_UpArrow] = VK_UP; |
| 34 | io.KeyMap[ImGuiKey_DownArrow] = VK_DOWN; |
| 35 | io.KeyMap[ImGuiKey_PageUp] = VK_PRIOR; |
| 36 | io.KeyMap[ImGuiKey_PageDown] = VK_NEXT; |
| 37 | io.KeyMap[ImGuiKey_Home] = VK_HOME; |
| 38 | io.KeyMap[ImGuiKey_End] = VK_END; |
| 39 | io.KeyMap[ImGuiKey_Delete] = VK_DELETE; |
| 40 | io.KeyMap[ImGuiKey_Backspace] = VK_BACK; |
| 41 | io.KeyMap[ImGuiKey_Enter] = VK_RETURN; |
| 42 | io.KeyMap[ImGuiKey_Escape] = VK_ESCAPE; |
| 43 | io.KeyMap[ImGuiKey_A] = 'A'; |
| 44 | io.KeyMap[ImGuiKey_C] = 'C'; |
| 45 | io.KeyMap[ImGuiKey_V] = 'V'; |
| 46 | io.KeyMap[ImGuiKey_X] = 'X'; |
| 47 | io.KeyMap[ImGuiKey_Y] = 'Y'; |
| 48 | io.KeyMap[ImGuiKey_Z] = 'Z'; |
| 49 | |
| 50 | io.RenderDrawListsFn = NULL; |
| 51 | io.ImeWindowHandle = g_hWnd; |
| 52 | |
| 53 | return true; |
| 54 | } |
| 55 | |
| 56 | void ImGUI_Shutdown() |
| 57 | { |
nothing calls this directly
no outgoing calls
no test coverage detected