Shortcut: added Shortcut() function and ImGuiInputFlags in public API + Demo. (#456, #2637)

This commit is contained in:
ocornut
2022-12-08 18:15:00 +01:00
parent 1dae7df26f
commit 0949acb6e6
5 changed files with 145 additions and 45 deletions

View File

@ -39,6 +39,12 @@ Breaking changes:
Other changes:
- Inputs: added Shortcut() function (w/ routing policies) in public API. (#456, #2637)
Added ImGuiInputFlags_RouteFocused, ImGuiInputFlags_RouteGlobalXXX and other routing policies.
e.g. ImGui::Shortcut(ImGuiMod_Ctrl | ImGuiKey_C); with default policy:
- check that CTRL+C is pressed,
- and that current window is in focus stack,
- and that no other requests for CTRL+C have been made from deeper locations of the window/item stack.
- Fixed cases where CTRL+Tab or Modal can occasionally lead to the creation of ImDrawCmd with
zero triangles, which would makes the render loop of some backends assert (e.g. Metal with
debugging, Allegro). (#4857, #5937)
@ -61,6 +67,7 @@ Other changes:
be implemented with public API.
- Fonts: added a 'void* UserData' field in ImFontAtlas, as a convenience for use by
applications using multiple font atlases.
- Demo: added "Inputs->Shortcut Routing" section.
- Demo: simplified "Inputs" section, moved contents to Metrics->Inputs.
- Debug Tools: Metrics: added "Inputs" section, moved from Demo for consistency.
- Misc: fixed parameters to IMGUI_DEBUG_LOG() not being dead-stripped when building