mirror of
https://github.com/ocornut/imgui.git
synced 2025-02-02 12:37:20 +01:00
Docs: added more references to IsKeyDown(), InFlags. (#8317)
This commit is contained in:
parent
1d962820d8
commit
a28ffa81c4
@ -153,11 +153,12 @@ Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v
|
|||||||
Breaking changes:
|
Breaking changes:
|
||||||
|
|
||||||
- Commented out pre-1.87 IO system (equivalent to using IMGUI_DISABLE_OBSOLETE_KEYIO or IMGUI_DISABLE_OBSOLETE_FUNCTIONS before).
|
- Commented out pre-1.87 IO system (equivalent to using IMGUI_DISABLE_OBSOLETE_KEYIO or IMGUI_DISABLE_OBSOLETE_FUNCTIONS before).
|
||||||
- io.KeyMap[] and io.KeysDown[] are removed (obsoleted February 2022).
|
- io.KeyMap[] and io.KeysDown[] are removed (obsoleted February 2022). Use IsKeyDown() instead.
|
||||||
- io.NavInputs[] and ImGuiNavInput are removed (obsoleted July 2022).
|
- io.NavInputs[] and ImGuiNavInput are removed (obsoleted July 2022).
|
||||||
- Pre-1.87 backends are not supported:
|
- Pre-1.87 backends are not supported:
|
||||||
- backends need to call io.AddKeyEvent(), io.AddMouseEvent() instead of writing to io.KeysDown[], io.MouseDown[] fields.
|
- backends need to call io.AddKeyEvent(), io.AddMouseEvent() instead of writing to io.KeysDown[], io.MouseDown[] fields.
|
||||||
- backends need to call io.AddKeyAnalogEvent() for gamepad values instead of writing to io.NavInputs[] fields.
|
- backends need to call io.AddKeyAnalogEvent() for gamepad values instead of writing to io.NavInputs[] fields.
|
||||||
|
- you can use IsKeyDown() instead of reading from io.KeysDown[].
|
||||||
- For more references:
|
- For more references:
|
||||||
- read 1.87 and 1.88 part of API BREAKING CHANGES in imgui.cpp or read Changelog for 1.87 and 1.88.
|
- read 1.87 and 1.88 part of API BREAKING CHANGES in imgui.cpp or read Changelog for 1.87 and 1.88.
|
||||||
- read https://github.com/ocornut/imgui/issues/4921
|
- read https://github.com/ocornut/imgui/issues/4921
|
||||||
@ -2390,6 +2391,7 @@ Breaking Changes:
|
|||||||
- For all calls to IO new functions, the Dear ImGui context should be bound/current.
|
- For all calls to IO new functions, the Dear ImGui context should be bound/current.
|
||||||
- Reworked IO keyboard input API: (#4921, #2625, #3724) [@thedmd, @ocornut]
|
- Reworked IO keyboard input API: (#4921, #2625, #3724) [@thedmd, @ocornut]
|
||||||
- Added io.AddKeyEvent() function, obsoleting writing directly to io.KeyMap[], io.KeysDown[] arrays.
|
- Added io.AddKeyEvent() function, obsoleting writing directly to io.KeyMap[], io.KeysDown[] arrays.
|
||||||
|
- You can use IsKeyDown() instead of reading from io.KeysDown[].
|
||||||
- For keyboard modifiers, you can call io.AddKeyEvent() with ImGuiKey_ModXXX values,
|
- For keyboard modifiers, you can call io.AddKeyEvent() with ImGuiKey_ModXXX values,
|
||||||
obsoleting writing directly to io.KeyCtrl, io.KeyShift etc.
|
obsoleting writing directly to io.KeyCtrl, io.KeyShift etc.
|
||||||
- Added io.SetKeyEventNativeData() function (optional) to pass native and old legacy indices.
|
- Added io.SetKeyEventNativeData() function (optional) to pass native and old legacy indices.
|
||||||
|
@ -647,7 +647,7 @@ CODE
|
|||||||
- Backend writing to io.MouseHoveredViewport -> backend should call io.AddMouseViewportEvent() [Docking branch w/ multi-viewports only]
|
- Backend writing to io.MouseHoveredViewport -> backend should call io.AddMouseViewportEvent() [Docking branch w/ multi-viewports only]
|
||||||
note: for all calls to IO new functions, the Dear ImGui context should be bound/current.
|
note: for all calls to IO new functions, the Dear ImGui context should be bound/current.
|
||||||
read https://github.com/ocornut/imgui/issues/4921 for details.
|
read https://github.com/ocornut/imgui/issues/4921 for details.
|
||||||
- 2022/01/10 (1.87) - inputs: reworked keyboard IO. Removed io.KeyMap[], io.KeysDown[] in favor of calling io.AddKeyEvent(). Removed GetKeyIndex(), now unnecessary. All IsKeyXXX() functions now take ImGuiKey values. All features are still functional until IMGUI_DISABLE_OBSOLETE_KEYIO is defined. Read Changelog and Release Notes for details.
|
- 2022/01/10 (1.87) - inputs: reworked keyboard IO. Removed io.KeyMap[], io.KeysDown[] in favor of calling io.AddKeyEvent(), ImGui::IsKeyDown(). Removed GetKeyIndex(), now unnecessary. All IsKeyXXX() functions now take ImGuiKey values. All features are still functional until IMGUI_DISABLE_OBSOLETE_KEYIO is defined. Read Changelog and Release Notes for details.
|
||||||
- IsKeyPressed(MY_NATIVE_KEY_XXX) -> use IsKeyPressed(ImGuiKey_XXX)
|
- IsKeyPressed(MY_NATIVE_KEY_XXX) -> use IsKeyPressed(ImGuiKey_XXX)
|
||||||
- IsKeyPressed(GetKeyIndex(ImGuiKey_XXX)) -> use IsKeyPressed(ImGuiKey_XXX)
|
- IsKeyPressed(GetKeyIndex(ImGuiKey_XXX)) -> use IsKeyPressed(ImGuiKey_XXX)
|
||||||
- Backend writing to io.KeyMap[],io.KeysDown[] -> backend should call io.AddKeyEvent() (+ call io.SetKeyEventNativeData() if you want legacy user code to stil function with legacy key codes).
|
- Backend writing to io.KeyMap[],io.KeysDown[] -> backend should call io.AddKeyEvent() (+ call io.SetKeyEventNativeData() if you want legacy user code to stil function with legacy key codes).
|
||||||
|
@ -1247,11 +1247,11 @@ struct ImGuiNextItemData
|
|||||||
struct ImGuiLastItemData
|
struct ImGuiLastItemData
|
||||||
{
|
{
|
||||||
ImGuiID ID;
|
ImGuiID ID;
|
||||||
ImGuiItemFlags ItemFlags; // See ImGuiItemFlags_
|
ImGuiItemFlags ItemFlags; // See ImGuiItemFlags_ (called 'InFlags' before v1.91.4).
|
||||||
ImGuiItemStatusFlags StatusFlags; // See ImGuiItemStatusFlags_
|
ImGuiItemStatusFlags StatusFlags; // See ImGuiItemStatusFlags_
|
||||||
ImRect Rect; // Full rectangle
|
ImRect Rect; // Full rectangle
|
||||||
ImRect NavRect; // Navigation scoring rectangle (not displayed)
|
ImRect NavRect; // Navigation scoring rectangle (not displayed)
|
||||||
// Rarely used fields are not explicitly cleared, only valid when the corresponding ImGuiItemStatusFlags ar set.
|
// Rarely used fields are not explicitly cleared, only valid when the corresponding ImGuiItemStatusFlags are set.
|
||||||
ImRect DisplayRect; // Display rectangle. ONLY VALID IF (StatusFlags & ImGuiItemStatusFlags_HasDisplayRect) is set.
|
ImRect DisplayRect; // Display rectangle. ONLY VALID IF (StatusFlags & ImGuiItemStatusFlags_HasDisplayRect) is set.
|
||||||
ImRect ClipRect; // Clip rectangle at the time of submitting item. ONLY VALID IF (StatusFlags & ImGuiItemStatusFlags_HasClipRect) is set..
|
ImRect ClipRect; // Clip rectangle at the time of submitting item. ONLY VALID IF (StatusFlags & ImGuiItemStatusFlags_HasClipRect) is set..
|
||||||
ImGuiKeyChord Shortcut; // Shortcut at the time of submitting item. ONLY VALID IF (StatusFlags & ImGuiItemStatusFlags_HasShortcut) is set..
|
ImGuiKeyChord Shortcut; // Shortcut at the time of submitting item. ONLY VALID IF (StatusFlags & ImGuiItemStatusFlags_HasShortcut) is set..
|
||||||
|
Loading…
x
Reference in New Issue
Block a user