// Backend used new io.AddKeyEvent() API: Good! Verify that old arrays are never written too.
for(intn=0;n<IM_ARRAYSIZE(io.KeysDown);n++)
IM_ASSERT(io.KeysDown[n]==false&&"Backend needs to either only use io.AddKeyEvent(), either only fill legacy io.KeysDown[] + io.KeyMap[]. Not both!");
// Backend used new io.AddKeyEvent() API: Good! Verify that old arrays are never written to externally.
for(intn=0;n<ImGuiKey_LegacyNativeKey_END;n++)
IM_ASSERT((io.KeysDown[n]==false||IsKeyDown(n))&&"Backend needs to either only use io.AddKeyEvent(), either only fill legacy io.KeysDown[] + io.KeyMap[]. Not both!");
IM_ASSERT(g.IO.KeyMap[n]>=-1&&g.IO.KeyMap[n]<IM_ARRAYSIZE(g.IO.KeysDown)&&"io.KeyMap[] contains an out of bound value (need to be 0..511, or -1 for unmapped key)");
IM_ASSERT(g.IO.KeyMap[n]>=-1&&g.IO.KeyMap[n]<ImGuiKey_LegacyNativeKey_END&&"io.KeyMap[] contains an out of bound value (need to be 0..511, or -1 for unmapped key)");
// Check: required key mapping (we intentionally do NOT check all keys to not pressure user into setting up everything, but Space is required and was only added in 1.60 WIP)
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens)
ImGuiConfigFlagsConfigFlags;// = 0 // See ImGuiConfigFlags_ enum. Set by user/application. Gamepad/keyboard navigation options, etc.
ImGuiBackendFlagsBackendFlags;// = 0 // See ImGuiBackendFlags_ enum. Set by backend (imgui_impl_xxx files or custom backend) to communicate features supported by the backend.
ImVec2DisplaySize;// <unset> // Main display size, in pixels (generally == GetMainViewport()->Size)
floatDeltaTime;// = 1.0f/60.0f // Time elapsed since last frame, in seconds.
ImVec2DisplaySize;// <unset> // Main display size, in pixels (generally == GetMainViewport()->Size). May change every frame.
floatDeltaTime;// = 1.0f/60.0f // Time elapsed since last frame, in seconds. May change every frame.
floatIniSavingRate;// = 5.0f // Minimum time between saving positions/sizes to .ini file, in seconds.
constchar*IniFilename;// = "imgui.ini" // Path to .ini file (important: default "imgui.ini" is relative to current working dir!). Set NULL to disable automatic .ini loading/saving or if you want to manually call LoadIniSettingsXXX() / SaveIniSettingsXXX() functions.
constchar*LogFilename;// = "imgui_log.txt"// Path to .log file (default parameter to ImGui::LogToFile when no file is specified).
@ -2006,7 +2006,7 @@ struct ImGuiIO
// This is still temporarily supported as a legacy feature. However the new preferred scheme is for backend to call io.AddKeyEvent().
#ifndef IMGUI_DISABLE_OBSOLETE_KEYIO
intKeyMap[ImGuiKey_COUNT];// [LEGACY] Input: map of indices into the KeysDown[512] entries array which represent your "native" keyboard state. The first 512 are now unused and should be kept zero. Legacy backend will write into KeyMap[] using ImGuiKey_ indices which are always >512.
boolKeysDown[512];// [LEGACY] Input: Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys).
boolKeysDown[ImGuiKey_COUNT];// [LEGACY] Input: Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys). This used to be [512] sized. It is now ImGuiKey_COUNT to allow legacy io.KeysDown[GetKeyIndex(...)] to work without an overflow.
ImU16MouseClickedLastCount[5];// Count successive number of clicks. Stays valid after mouse release. Reset after another click is done.
boolMouseReleased[5];// Mouse button went from Down to !Down
boolMouseDownOwned[5];// Track if button was clicked inside a dear imgui window or over void blocked by a popup. We don't request mouse capture from the application if click started outside ImGui bounds.
boolMouseDownOwnedUnlessPopupClose[5];//Track if button was clicked inside a dear imgui window.
boolMouseDownOwnedUnlessPopupClose[5];//Track if button was clicked inside a dear imgui window.
floatMouseDownDuration[5];// Duration the mouse button has been down (0.0f == just clicked)
floatMouseDownDurationPrev[5];// Previous time the mouse button has been down
floatMouseDragMaxDistanceSqr[5];// Squared maximum distance of how much mouse has traveled from the clicking point (used for moving thresholds)
structfuncs{staticboolIsLegacyNativeDupe(ImGuiKeykey){returnkey<512&&ImGui::GetIO().KeyMap[key]!=-1;}};// Hide Native<>ImGuiKey duplicates when both exists in the array