mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Added storage for up to 5 mouse buttons for convenience (even though ImGui itself only uses 1)
This commit is contained in:
parent
6267905a17
commit
fa0aa5ace6
@ -110,7 +110,6 @@
|
||||
ISSUES AND TODO-LIST
|
||||
|
||||
- misc: allow user to call NewFrame() multiple times without a render.
|
||||
- misc: add extra mouse buttons for user storage (and clarify that ImGui doesn't use them)
|
||||
- misc: merge ImVec4 / ImGuiAabb, they are essentially duplicate containers
|
||||
- window: autofit is losing its purpose when user relies on any dynamic layout (window width multiplier, column). maybe just discard autofit?
|
||||
- window: support horizontal scroll
|
||||
@ -151,7 +150,6 @@
|
||||
- shortcuts: add a shortcut api, e.g. parse "&Save" and/or "Save (CTRL+S)", pass in to widgets or provide simple ways to use (button=activate, input=focus)
|
||||
- keyboard: full keyboard navigation and focus
|
||||
- misc: not thread-safe
|
||||
- tooltip: add a BeginTooltip()/EndTooltip() helper.
|
||||
- optimisation/render: use indexed rendering
|
||||
- optimisation/render: move clip-rect to vertex data? would allow merging all commands
|
||||
- optimisation/render: merge command-list of all windows into one command-list?
|
||||
|
12
imgui.h
12
imgui.h
@ -402,7 +402,7 @@ struct ImGuiIO
|
||||
|
||||
// Input - Fill before calling NewFrame()
|
||||
ImVec2 MousePos; // Mouse position, in pixels (set to -1,-1 if no mouse / on another screen, etc.)
|
||||
bool MouseDown[2]; // Mouse buttons
|
||||
bool MouseDown[5]; // Mouse buttons. ImGui itself only uses button 0 (left button) but you can use others as storage for convenience.
|
||||
int MouseWheel; // Mouse wheel: -1,0,+1
|
||||
bool KeyCtrl; // Keyboard modifier pressed: Control
|
||||
bool KeyShift; // Keyboard modifier pressed: Shift
|
||||
@ -419,11 +419,11 @@ struct ImGuiIO
|
||||
// [Internal] ImGui will maintain those fields for you
|
||||
ImVec2 MousePosPrev;
|
||||
ImVec2 MouseDelta;
|
||||
bool MouseClicked[2];
|
||||
ImVec2 MouseClickedPos[2];
|
||||
float MouseClickedTime[2];
|
||||
bool MouseDoubleClicked[2];
|
||||
float MouseDownTime[2];
|
||||
bool MouseClicked[5];
|
||||
ImVec2 MouseClickedPos[5];
|
||||
float MouseClickedTime[5];
|
||||
bool MouseDoubleClicked[5];
|
||||
float MouseDownTime[5];
|
||||
float KeysDownTime[512];
|
||||
|
||||
ImGuiIO();
|
||||
|
Loading…
Reference in New Issue
Block a user