MCPcopy Create free account
hub / github.com/GPUOpen-LibrariesAndSDKs/Cauldron / ImGUI_UpdateIO

Function ImGUI_UpdateIO

src/common/base/ImGuiHelper.cpp:62–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62void ImGUI_UpdateIO(int w, int h)
63{
64 ImGuiIO& io = ImGui::GetIO();
65
66 // Setup display size (every frame to accommodate for window resizing)
67 RECT rect;
68 GetClientRect(g_hWnd, &rect);
69 ImVec2 windowSize((float)(rect.right - rect.left), (float)(rect.bottom - rect.top));
70
71 io.DisplaySize = ImVec2((float)w, (float)h);
72
73 // Read keyboard modifiers inputs
74 io.KeyCtrl = (GetKeyState(VK_CONTROL) & 0x8000) != 0;
75 io.KeyShift = (GetKeyState(VK_SHIFT) & 0x8000) != 0;
76 io.KeyAlt = (GetKeyState(VK_MENU) & 0x8000) != 0;
77 io.KeySuper = false;
78 // io.KeysDown : filled by WM_KEYDOWN/WM_KEYUP events
79 // io.MousePos : filled by WM_MOUSEMOVE events
80 // io.MouseDown : filled by WM_*BUTTON* events
81 // io.MouseWheel : filled by WM_MOUSEWHEEL events
82
83 // Hide OS mouse cursor if ImGui is drawing it
84 if (io.MouseDrawCursor)
85 SetCursor(NULL); // Start the frame
86}
87
88static bool IsAnyMouseButtonDown()
89{

Callers

nothing calls this directly

Calls 1

ImVec2Class · 0.85

Tested by

no test coverage detected