Version 1.90.7

This commit is contained in:
ocornut 2024-05-27 15:07:14 +02:00
parent f814ef816f
commit 00ad3c65bc
8 changed files with 31 additions and 30 deletions

View File

@ -36,9 +36,11 @@ HOW TO UPDATE?
- Please report any issue!
-----------------------------------------------------------------------
VERSION 1.90.7 WIP (In Progress)
VERSION 1.90.7 (Released 2024-05-27)
-----------------------------------------------------------------------
Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.90.7
Breaking changes:
- Inputs: on macOS X, Cmd and Ctrl keys are now automatically swapped by io.AddKeyEvent(),
@ -53,9 +55,9 @@ Breaking changes:
- Commented out obsolete symbols renamed in 1.88 (May 2022):
CaptureKeyboardFromApp() -> SetNextFrameWantCaptureKeyboard()
CaptureMouseFromApp() -> SetNextFrameWantCaptureMouse()
- Backends: SDL_Renderer2/SDL_Renderer3: and ImGui_ImplSDLRenderer2_RenderDrawData() and
- Backends: SDL_Renderer2/SDL_Renderer3: ImGui_ImplSDLRenderer2_RenderDrawData() and
ImGui_ImplSDLRenderer3_RenderDrawData() now takes a SDL_Renderer* parameter. This was previously
overlooked from the API but it will facilitate eventual support for multi-viewports.
overlooked from the API but it will allow eventual support for multi-viewports.
Other changes:
@ -63,11 +65,11 @@ Other changes:
- Windows: BeginChild(): fixed auto-fit calculation when using either (not both) ResizeX/ResizeY
and double-clicking on a border. Calculation incorrectly didn't always account for scrollbar as
it assumed the other axis would also be auto-fit. (#1710)
- Inputs: added shortcut and routing system in public API. (#456, #2637)
- Inputs: added shortcut and routing system in public API. (#456, #2637) [BETA]
- The general idea is that several callers may register interest in a shortcut, and only one owner gets it.
Parent -> call Shortcut(Ctrl+S) // When Parent is focused, Parent gets the shortcut.
Child1 -> call Shortcut(Ctrl+S) // When Child1 is focused, Child1 gets the shortcut (Child1 overrides Parent shortcuts)
Child2 -> no call // When Child2 is focused, Parent gets the shortcut.
- in Parent: call Shortcut(Ctrl+S) // When Parent is focused, Parent gets the shortcut.
- in Child1: call Shortcut(Ctrl+S) // When Child1 is focused, Child1 gets the shortcut (Child1 overrides Parent shortcuts)
- in Child2: no call // When Child2 is focused, Parent gets the shortcut.
The whole system is order independent, so if Child1 makes its calls before Parent, results will be identical.
This is an important property as it facilitate working with foreign code or larger codebase.
- Added Shortcut() function:
@ -90,10 +92,10 @@ Other changes:
- ImGuiInputFlags_Repeat: for use by Shortcut() and by upcoming rework of various
input functions (which are still internal for now).
- ImGuiInputFlags_Tooltip: for SetNextItemShortcut() to show a tooltip when hovering item.
- ImGuiInputFlags_RouteGlobalOverFocused
- ImGuiInputFlags_RouteGlobalOverActive
- ImGuiInputFlags_RouteUnlessBgFocused
- ImGuiInputFlags_RouteFromRootWindow
- ImGuiInputFlags_RouteOverFocused: global route takes priority over focus route.
- ImGuiInputFlags_RouteOverActive: global route takes priority over active item.
- ImGuiInputFlags_RouteUnlessBgFocused: global route disabled if no imgui window focused.
- ImGuiInputFlags_RouteFromRootWindow: route evaluated from the point of view of root window rather than current window.
- Inputs: (OSX) Fixes variety of code which inconsistently required using Ctrl instead of Cmd.
- e.g. Drags/Sliders now use Cmd+Click to input a value. (#4084)
- Some shortcuts still uses Ctrl on Mac: e.g. Ctrl+Tab to switch windows. (#4828)
@ -121,9 +123,9 @@ versions of IsKeyPressed(), IsKeyChordPressed(), IsMouseClicked() prior to this
- Inputs (Internals): Renamed ImGuiKeyOwner_None to ImGuiKeyOwner_NoOwner, to make use more
explicit and reduce confusion with the fact it is a non-zero value and cannot be a default.
- Inputs (Internals): Renamed symbols global routes:
Renamed ImGuiInputFlags_RouteGlobalLow -> ImGuiInputFlags_RouteGlobal (this is the suggest global route)
Renamed ImGuiInputFlags_RouteGlobal -> ImGuiInputFlags_RouteGlobalOverFocused (override focused route)
Renamed ImGuiInputFlags_RouteGlobalHigh -> ImGuiInputFlags_RouteGlobalHighest
Renamed ImGuiInputFlags_RouteGlobalLow -> ImGuiInputFlags_RouteGlobal (this is the suggested global route)
Renamed ImGuiInputFlags_RouteGlobal -> ImGuiInputFlags_RouteGlobal | ImGuiInputFlags_RouteOverFocused
Renamed ImGuiInputFlags_RouteGlobalHigh -> ImGuiInputFlags_RouteGlobal | ImGuiInputFlags_RouteOverFocused | ImGuiInputFlags_RouteOverActive
- Inputs (Internals): Shortcut(), SetShortcutRouting(): swapped last two parameters order
in function signatures:
Before: Shortcut(ImGuiKeyChord key_chord, ImGuiID owner_id = 0, ImGuiInputFlags flags = 0);
@ -134,8 +136,7 @@ versions of IsKeyPressed(), IsKeyChordPressed(), IsMouseClicked() prior to this
After: IsKeyPressed(ImGuiKey key, ImGuiInputFlags flags, ImGuiID owner_id = 0);
Before: IsMouseClicked(ImGuiMouseButton button, ImGuiID owner_id, ImGuiInputFlags flags = 0);
After: IsMouseClicked(ImGuiMouseButton button, ImGuiInputFlags flags, ImGuiID owner_id = 0);
- For several reasons those changes makes sense. They are being made because making some of
- For several reasons those changes makes sense. They were all made before making some of
those API public. Only past users of imgui_internal.h with the extra parameters will be affected.
Added asserts for valid flags in various functions to detect _some_ misuses, BUT NOT ALL.

View File

@ -1,4 +1,4 @@
// dear imgui, v1.90.7 WIP
// dear imgui, v1.90.7
// (main code and documentation)
// Help:
@ -8610,9 +8610,9 @@ ImGuiKeyRoutingData* ImGui::GetShortcutRoutingData(ImGuiKeyChord key_chord)
}
// Current score encoding (lower is highest priority):
// - 0: ImGuiInputFlags_RouteGlobalOverActive
// - 0: ImGuiInputFlags_RouteGlobal | ImGuiInputFlags_RouteOverActive
// - 1: ImGuiInputFlags_ActiveItem or ImGuiInputFlags_RouteFocused (if item active)
// - 2: ImGuiInputFlags_RouteGlobalOverFocused
// - 2: ImGuiInputFlags_RouteGlobal | ImGuiInputFlags_RouteOverFocused
// - 3+: ImGuiInputFlags_RouteFocused (if window in focus-stack)
// - 254: ImGuiInputFlags_RouteGlobal
// - 255: never route

12
imgui.h
View File

@ -1,4 +1,4 @@
// dear imgui, v1.90.7 WIP
// dear imgui, v1.90.7
// (headers)
// Help:
@ -27,8 +27,8 @@
// Library Version
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
#define IMGUI_VERSION "1.90.7 WIP"
#define IMGUI_VERSION_NUM 19068
#define IMGUI_VERSION "1.90.7"
#define IMGUI_VERSION_NUM 19070
#define IMGUI_HAS_TABLE
/*
@ -939,7 +939,7 @@ namespace ImGui
IMGUI_API const char* GetKeyName(ImGuiKey key); // [DEBUG] returns English name of the key. Those names a provided for debugging purpose and are not meant to be saved persistently not compared.
IMGUI_API void SetNextFrameWantCaptureKeyboard(bool want_capture_keyboard); // Override io.WantCaptureKeyboard flag next frame (said flag is left for your application to handle, typically when true it instructs your app to ignore inputs). e.g. force capture keyboard when your widget is being hovered. This is equivalent to setting "io.WantCaptureKeyboard = want_capture_keyboard"; after the next NewFrame() call.
// Inputs Utilities: Shortcut Testing & Routing
// Inputs Utilities: Shortcut Testing & Routing [BETA]
// - ImGuiKeyChord = a ImGuiKey + optional ImGuiMod_Alt/ImGuiMod_Ctrl/ImGuiMod_Shift/ImGuiMod_Super.
// ImGuiKey_C // Accepted by functions taking ImGuiKey or ImGuiKeyChord arguments)
// ImGuiMod_Ctrl | ImGuiKey_C // Accepted by functions taking ImGuiKeyChord arguments)
@ -1482,7 +1482,7 @@ enum ImGuiInputFlags_
ImGuiInputFlags_Repeat = 1 << 0, // Enable repeat. Return true on successive repeats. Default for legacy IsKeyPressed(). NOT Default for legacy IsMouseClicked(). MUST BE == 1.
// Flags for Shortcut(), SetNextItemShortcut()
// - Routing policies: RouteGlobalOverActive >> RouteActive or RouteFocused (if owner is active item) >> RouteGlobalOverFocused >> RouteFocused (if in focused window stack) >> RouteGlobal.
// - Routing policies: RouteGlobal+OverActive >> RouteActive or RouteFocused (if owner is active item) >> RouteGlobal+OverFocused >> RouteFocused (if in focused window stack) >> RouteGlobal.
// - Default policy is RouteFocused. Can select only 1 policy among all available.
ImGuiInputFlags_RouteActive = 1 << 10, // Route to active item only.
ImGuiInputFlags_RouteFocused = 1 << 11, // Route to windows in the focus stack (DEFAULT). Deep-most focused window takes inputs. Active item takes inputs over deep-most focused window.
@ -1495,7 +1495,7 @@ enum ImGuiInputFlags_
ImGuiInputFlags_RouteFromRootWindow = 1 << 17, // Option: route evaluated from the point of view of root window rather than current window.
// Flags for SetNextItemShortcut()
ImGuiInputFlags_Tooltip = 1 << 18, // Automatically display a tooltip when hovering item.
ImGuiInputFlags_Tooltip = 1 << 18, // Automatically display a tooltip when hovering item [BETA] Unsure of right api (opt-in/opt-out)
};
#ifndef IMGUI_DISABLE_OBSOLETE_KEYIO

View File

@ -1,4 +1,4 @@
// dear imgui, v1.90.7 WIP
// dear imgui, v1.90.7
// (demo code)
// Help:

View File

@ -1,4 +1,4 @@
// dear imgui, v1.90.7 WIP
// dear imgui, v1.90.7
// (drawing and font code)
/*

View File

@ -1,4 +1,4 @@
// dear imgui, v1.90.7 WIP
// dear imgui, v1.90.7
// (internal structures/api)
// You may use this file to debug, understand or extend Dear ImGui features but we don't provide any guarantee of forward compatibility.

View File

@ -1,4 +1,4 @@
// dear imgui, v1.90.7 WIP
// dear imgui, v1.90.7
// (tables and columns code)
/*

View File

@ -1,4 +1,4 @@
// dear imgui, v1.90.7 WIP
// dear imgui, v1.90.7
// (widgets code)
/*