Revert moving ImGuiKeyModFlags to internal.h (amendc906c65)

# Conflicts:
#	imgui.cpp
This commit is contained in:
ocornut 2022-01-28 15:53:09 +01:00
parent d5f0d45ae4
commit 27004aca70
4 changed files with 11 additions and 14 deletions

View File

@ -146,8 +146,6 @@ Breaking Changes:
io.AddKeyEvent(), io.AddKeyAnalogEvent().
- Added io.AddKeyAnalogEvent() function, obsoleting writing directly to io.NavInputs[] arrays.
- Renamed ImGuiKey_KeyPadEnter to ImGuiKey_KeypadEnter to align with new symbols. Kept redirection enum. (#2625)
- Moved ImGuiKeyModsFlags definition from imgui.h to imgui_internal.h. Was never advertised and used in a place
marked "private" in comments. Will still be used internally.
- Removed support for legacy arithmetic operators (+,+-,*,/) when inputing text into a slider/drag. (#4917, #3184)
This doesn't break any api/code but a feature that was accessible by end-users (which seemingly no one used).
(Instead you may implement custom expression evaluators to provide a better version of this).

View File

@ -392,7 +392,6 @@ CODE
- likewise io.MousePos and GetMousePos() will use OS coordinates.
If you query mouse positions to interact with non-imgui coordinates you will need to offset them, e.g. subtract GetWindowViewport()->Pos.
- 2022/01/26 (1.87) - inputs: moved ImGuiKeyModsFlags definition from imgui.h to imgui_internal.h. Was never advertised and used in a place marked "private" in comments. Will still be used internally.
- 2022/01/20 (1.87) - inputs: reworded gamepad IO.
- Backend writing to io.NavInputs[] -> backend should call io.AddKeyEvent()/io.AddKeyAnalogEvent() with ImGuiKey_GamepadXXX values.
- 2022/01/19 (1.87) - sliders, drags: removed support for legacy arithmetic operators (+,+-,*,/) when inputing text. This doesn't break any api/code but a feature that used to be accessible by end-users (which seemingly no one used).

12
imgui.h
View File

@ -65,7 +65,7 @@ Index of this file:
// Version
// (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)
#define IMGUI_VERSION "1.87 WIP"
#define IMGUI_VERSION_NUM 18614
#define IMGUI_VERSION_NUM 18615
#define IMGUI_CHECKVERSION() ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx))
#define IMGUI_HAS_TABLE
#define IMGUI_HAS_VIEWPORT // Viewport WIP branch
@ -1516,6 +1516,16 @@ enum ImGuiKey_
#endif
};
// Helper "flags" version of key-mods to store and compare multiple key-mods easily. Sometimes used for storage (e.g. io.KeyMods) but otherwise not much used in public API.
enum ImGuiKeyModFlags_
{
ImGuiKeyModFlags_None = 0,
ImGuiKeyModFlags_Ctrl = 1 << 0,
ImGuiKeyModFlags_Shift = 1 << 1,
ImGuiKeyModFlags_Alt = 1 << 2,
ImGuiKeyModFlags_Super = 1 << 3 // Cmd/Super/Windows key
};
// Gamepad/Keyboard navigation
// Keyboard: Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard to enable. NewFrame() will automatically fill io.NavInputs[] based on your io.AddKeyEvent() calls.
// Gamepad: Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad to enable. Backend: set ImGuiBackendFlags_HasGamepad and fill the io.NavInputs[] fields before calling NewFrame(). Note that io.NavInputs[] is cleared by EndFrame().

View File

@ -1184,16 +1184,6 @@ enum ImGuiKeyPrivate_
ImGuiKey_Gamepad_END = ImGuiKey_GamepadRStickRight + 1
};
// Helper to store all mods easily. Stored in e.g. io.KeyMods.
enum ImGuiKeyModFlags_
{
ImGuiKeyModFlags_None = 0,
ImGuiKeyModFlags_Ctrl = 1 << 0,
ImGuiKeyModFlags_Shift = 1 << 1,
ImGuiKeyModFlags_Alt = 1 << 2,
ImGuiKeyModFlags_Super = 1 << 3 // Cmd/Super/Windows key
};
enum ImGuiInputEventType
{
ImGuiInputEventType_None = 0,