Commit Graph

2197 Commits

Author SHA1 Message Date
ocornut 57a5b73a4c InputText: fixed cursor navigation when pressing Up Arrow on the last character of a multiline buffer which doesn't end with a carriage return. (#6000)
Simplify stb_textedit_find_charpos(). Leaving that to simmer for a while before attempting an upstream PR.
2023-01-04 17:58:07 +01:00
ocornut 4b39c1f654 Docs: adding Tests badge + more references to Test Engine. 2023-01-03 20:26:26 +01:00
ocornut 59b63defe5 Misc shallow merge/sync from docking designed to faciliate cross-merging between docking and string_view. 2022-12-08 21:14:39 +01:00
ocornut 0949acb6e6 Shortcut: added Shortcut() function and ImGuiInputFlags in public API + Demo. (#456, #2637) 2022-12-08 18:54:41 +01:00
ocornut 1dae7df26f Misc: added GetItemID() in public API. 2022-12-08 18:45:04 +01:00
ocornut 48215231f9 Demo: moved WantCapture overrides items + various comments related to ImGuiKey, ImGuiMod 2022-12-08 18:30:48 +01:00
ocornut fd0b3734d3 Tables, Nav, Scrolling: fixed scrolling functions and focus tracking with frozen rows and columns. (#5143, #4868, #3692) 2022-12-06 21:07:50 +01:00
ocornut 0e2a167bdb Fonts: added a 'void* UserData' field in ImFontAtlas, as a convenience for use by applications using multiple font atlases.
+ fixed mislocated Changelog entries added recently.
2022-12-01 20:10:37 +01:00
ocornut 87caf27ac4 Inputs, Scrolling: better selection of scrolling window when hovering nested windows and backend/OS is emitting dual-axis wheeling inputs. (#3795, #4559) 2022-11-30 17:49:59 +01:00
ocornut 1a497c2499 Inputs, IO: reworked ImGuiMod_Shortcut to redirect to Ctrl/Super at runtime instead of compile-time. (#5923, #456) 2022-11-29 19:07:50 +01:00
ocornut bd96f6eac4 Text: Fixed layouting of wrapped-text block when the last source line is above the clipping region. Regression added in 1.89. (#5720, #5919)
+ Update version marker
2022-11-28 14:59:13 +01:00
ocornut 6af38b1a43 Fixed version string for consistency (#5918) 2022-11-28 14:42:30 +01:00
ocornut a8df192df0 Version 1.89.1 2022-11-24 21:24:33 +01:00
ocornut 27c58c3946 Scrolling, Focus, Combo: fixed SetKeyboardFocusHere()/SetItemDefaultFocus()/ScrollToRectEx() during an appearing form not centering item. (#5902, #2812, #4242, #2900)
Amend 44f801186 and 8f495e554
2022-11-24 20:57:41 +01:00
ocornut 3a685749cb ColorEdit: fixed label overlapping when using style.ColorButtonPosition == ImGuiDir_Left. (#5912)
Amend 54fb051e5
+ Internals: added IsKeyboardKey(), IsMouseKey() helpers.
2022-11-23 15:00:50 +01:00
ocornut 5bb2874940 Version 1.89.1 WIP 2022-11-16 17:55:27 +01:00
ocornut d60985df7f Inputs: fix moving a window or drag and dropping from capture mods. (#5888, #4921, #456)
Amend change of SetActiveIdUsingAllKeyboardKeys() in 4448d97 which seemingly accidentally reverted the change intended by fd408c97
2022-11-16 17:41:24 +01:00
ocornut 83cee9e091 InputText: replaced some uses of SetKeyOwner() + IsKeyPressed() with Shortcut()
Which makes it easier to hook/disable those keys from outside if needed.
2022-11-16 17:09:14 +01:00
ocornut 81160fee56 Version 1.89
+ fix warning from a582d92
2022-11-15 15:20:36 +01:00
ocornut 7380b9816e Scrolling: Exposed SetNextWindowScroll() in public API. (#1526) 2022-11-09 17:03:07 +01:00
ocornut cda26635cd Inputs: refacotr/extract CalcRoutingScore() out of SetShortcutRouting(), easier to follow with early returns.
+ clarified comments about GetMouseCursor() #5739
2022-11-09 16:35:50 +01:00
ocornut 7ff2d3353c Inputs: added wip/experiment routing system: Shortcut(), RoutingFocused policy, SetShortcutRouting(). (#456, #2637, #3724)
- InputText() uses Shortcut().
2022-11-08 20:37:58 +01:00
ocornut 4448d975d1 Inputs: added wip/internal Input Owner system. (#456, #2637, #2620, #2891, #3370, #4828, #5108, #5242, #5641)
- Added SetKeyOwner(), SetItemKeyOwner(), TestKeyOwner().
- Added new IsKeyXXX IsMouseXXX functions with ImGuID owner_id and flags.
- Obsoleted SetItemUsingMouseWheel(). (#2891)
- Removed IsKeyPresseedEx() which was a recent internal addition 2022-07-08 deemed to be temporary exactly for this.
- Added ImGuiButtonFlags_NoSetKeyOwner, ImGuiButtonFlags_NoTestKeyOwner
- Added ImGuiSelectableFlags_NoSetKeyOwner.
- Added ImGuiInputFlags_LockThisFrame, ImGuiInputFlags_LockUntilRelease for for SetKeyOwner(), SetItemKeyOwner().
- Added ImGuiInputFlags_CondXXX values for SetItemKeyOwner().
2022-11-08 18:47:36 +01:00
ocornut 9f66a3a9ed Internals: rework FocusScope system, current scope doesn't need to be in window + child doesn't inherit.
Intended as part of work for input routing + blind menu processing shortcuts. Some of this commit will be stripped by next commit.
Intent was to sort windows along with focus scope to build a hierarchy, but for our needs we'd need a persistant one, so scrapping the idea. Not squashing this with next commit to keep a bit of history for future references.
2022-11-04 12:19:20 +01:00
ocornut 6e9dfe1de1 Window: Auto-fit size takes account of work rectangle (menu bars eating from viewport). (#5843) 2022-11-02 12:36:22 +01:00
ocornut a61bbdc239 Commented out redirecting OpenPopupContextItem() which was briefly the name of OpenPopupOnItemClick() from 1.77 to 1.79. 2022-10-26 22:22:53 +02:00
ocornut 9a35bfea39 Internals: added temporary ImGuiItemStatusFlags_Visible (used internally - please do not use).
Used by BeginMenu() as I'm experimenting with blind menus honoring shortcuts.
Extra comments about KeyMap and ImGuiKeys
2022-10-21 14:57:10 +02:00
ocornut e3fa56ae05 BeginMenu(): Menus: Fixed a one-frame issue where SetNextWindowXXX data are not consumed by a BeginMenu().
+ Shallow tweaks to reduce diff of future branches. Removing early return also facilitate some changes.
2022-10-19 14:12:04 +02:00
ocornut 5ac94ad898 Window: Fixed an issue where uncollapsed a window would show a scrollbar for a frame.
Amend / fix regression from 6e8e2c0
2022-10-18 16:43:38 +02:00
ocornut 81176737f8 Menus: Fixed using IsItemHovered()/IsItemClicked() on BeginMenu(). (#5775) 2022-10-14 17:39:04 +02:00
ocornut 3920b1c764 Removed commented out old flags from when Tables was a branch.
ImGuiTableFlags_ColumnsWidthFixed, ImGuiTableFlags_ColumnsWidthStretch,
ImGuiTableFlags_SizingPolicyFixed, ImGuiTableFlags_SizingPolicyStretch
ImGuiTableColumnFlags_WidthAuto
2022-10-14 16:36:41 +02:00
ocornut b15347cb7d Tables: activating an ID (e.g. clicking button inside) column doesn't prevent columns output flags from having ImGuiTableColumnFlags_IsHovered set. (#2957) 2022-10-13 15:15:42 +02:00
ocornut 3e8d198133 Removed runtime patching of obsolete/invalid "%f"/"%.0f" types of format strings for DragInt()/SliderInt(). 2022-10-12 23:09:09 +02:00
ocornut f2a522d70d ImDrawList: Not using alloca() anymore, lift single polygon size limits. (#5704, #1811) 2022-09-30 15:58:55 +02:00
ocornut cc5058e5d7 IO: Filter duplicate input events during the AddXXX() calls. (#5599, #4921) 2022-09-29 22:01:11 +02:00
ocornut bd2355a047 Menus, Nav: Fixed using left/right navigation when appending to an existing menu (multiple BeginMenu() call with same names). (#1207) 2022-09-29 19:25:26 +02:00
ocornut 3532ed1621 Menus, Nav: Fixed keyboard/gamepad navigation occasionally erroneously landing on menu-item in parent when the parent is not a popup. (#5730)
Replace BeginMenu/MenuItem swapping g.NavWindow with a more adequate ImGuiItemFlags_NoWindowHoverableCheck.
Expecting more subtle issues to stem from this.
Note that NoWindowHoverableCheck is not supported by IsItemHovered() but then IsItemHovered() on BeginMenu() never worked: fix should be easy in BeginMenu() + add test is IsItemHovered(), will do later
2022-09-29 18:44:19 +02:00
Andrew D. Zonenberg e74a50f525 Added GetGlyphRangesGreek() helper for Greek & Coptic glyph range. (#5676, #5727) 2022-09-28 17:46:20 +02:00
ocornut d17627b9c6 InputText: leave state->Flags uncleared for the purpose of backends emitting an on-screen keyboard for passwords. (#5724) 2022-09-28 17:38:41 +02:00
ocornut 4d4889bf1b Refactor CalcWordWrapPositionA() to take on the responsability of minimum character display. Add CalcWordWrapNextLineStartA(), simplify caller code.
Should be no-op but incrementing IMGUI_VERSION_NUM just in case.
Preparing for #5720
2022-09-28 14:57:15 +02:00
ocornut 12c0246890 Removed support for 1.42-era IMGUI_DISABLE_INCLUDE_IMCONFIG_H / IMGUI_INCLUDE_IMCONFIG_H. (#255) 2022-09-28 12:08:21 +02:00
ocornut a725db17b7 Comments for flags discoverability + add to debug log (#3795, #4559) 2022-09-27 20:08:40 +02:00
ocornut 83a0030c0a Added ImGuiMod_Shortcut which is ImGuiMod_Super on Mac and ImGuiMod_Ctrl otherwise. (#456) 2022-09-26 10:43:26 +02:00
ocornut fd408c9790 Renamed and merged keyboard modifiers key enums and flags into a same set:. ImGuiKey_ModXXX -> ImGuiMod_XXX and ImGuiModFlags_XXX -> ImGuiMod_XXX. (#4921, #456)
Changed signature of GetKeyChordName() to use ImGuiKeyChord.
Additionally SetActiveIdUsingAllKeyboardKeys() doesn't set ImGuiKey_ModXXX but we never need/use those and the system will be changed in upcoming commits.
2022-09-26 10:43:26 +02:00
ocornut f359dca0dc Misc input related changes to facilitate upcoming merges. 2022-09-22 19:00:30 +02:00
ocornut 85f327d8d3 InputText: added ImGuiInputTextFlags_EscapeClearsAll (#5688) 2022-09-21 16:23:44 +02:00
ocornut 4b522e145c Experiment: ImGuiKey is now a typed enum, allowing ImGuiKey_XXX symbols to be named in debuggers. (#4921, #4537)
May affect binding generators.
2022-09-20 12:42:29 +02:00
ocornut 1dd964f87d Popups & Modals: Fix (amended) somehow undocumented Popup+Child behavior (useful for e.g. #718, #4461 and probably other things)
(broken by 1c4066cd)
2022-09-16 23:27:16 +02:00
ocornut 440f257688 Popups & Modals: fixed nested Begin() being erroneously input-inhibited. (useful for e.g. #718, #4461 and probably other things) 2022-09-16 22:08:11 +02:00
ocornut 472f8013bd Moved version number higher up in imgui.h to increase visibility
- This allow using version number in imconfig
- This technically makes the #ifdef IMGUI_VERSION check valid in case of using IMGUI_DISABLE
- This makes available IMGUI_VERSION/IMGUI_VERSION_NUM with IMGUI_DISABLE - bit of a harmless leak
2022-09-16 22:07:33 +02:00
tocic 6c3c9cea7f Fix typos in source comments (#5675) 2022-09-13 11:09:34 +02:00
ocornut 513c1ba996 Removed the bizarre legacy default argument for 'TreePush(const void* ptr = NULL)' (#1057)
Followup to e605f2179
2022-09-12 16:00:19 +02:00
ocornut 52d9ee0dc2 Tabs: Fixed ShrinkWidths() redistribution of remainder leading to infinite bug (second fix). (#5652, #5262)
Amend b137f31
2022-09-09 20:01:59 +02:00
ocornut b137f31b8c Tabs: Fixed ShrinkWidths() redistribution of remainder leading to infinite bug + over redistribution. (#5652)
Amend c4b91017
2022-09-07 12:22:49 +02:00
Constantine Tarasenkov b87e58fab3 ImGui::InputText: added support for shift+click style selection. (#5619)
(Amend, force-push: sorry wrong edit by omar)
2022-09-05 18:27:58 +02:00
ocornut 9e1ccf8fab Commented out redirecting functions/enums names that were marked obsolete in 1.77 and 1.78 (June 2020): (#3361)
- DragScalar(), DragScalarN(), DragFloat(), DragFloat2(), DragFloat3(), DragFloat4() with signature ending with (..., float power = 1.0f)
- SliderScalar(), SliderScalarN(), SliderFloat(), SliderFloat2(), SliderFloat3(), SliderFloat4() with signatures ending with (..., float power = 1.0f)
- BeginPopupContextWindow(const char*, ImGuiMouseButton, bool)
2022-09-05 14:38:00 +02:00
ocornut edcd5b113e Obsoleted using SetCursorPos()/SetCursorScreenPos() to extend parent window/cell boundaries. (#5548)
This incorrect pattern has been mentioned or suggested in: #4510, #3355, #1760, #1490, #4152, #150
2022-09-02 16:37:35 +02:00
Rokas Kupstys b3ea01d86f Menus: Fix sub-menu inhibition stopping working in some cases. (Amend WIP) (#2517, #5614, noticed in #5546)
Amend bda2cde6
Fixes the case where following menu hover sequence results in incorrect RestoreNavWindow (previously SourceWindow) pointing to opened sub-menu:
1. Hover "Menu -> Options" - Open ##Menu_01 window
2. Hover "Menu -> Colors"  - SourceWindow incorrectly points to ##Menu_01 window
2022-09-01 17:02:46 +02:00
ocornut a502ceb075 Added commented out older obsolete names (1.42 to 1.52) 2022-09-01 12:22:39 +02:00
ocornut 2569c64740 Demo: Improved "Constrained-resizing window" example, more clearly showcase aspect-ratio. (#5627, #5618) 2022-09-01 11:13:39 +02:00
ocornut 747c9a7adf IsKeyPressed(), IsMouseClicked(), GetKeyPressedAmount(): add a (normally unnecessary) test for ->Down next to ->DownDuration tests, facilitating the use of key eating mechanism.
Consider removing when we add support for input ownership.
2022-08-31 19:15:13 +02:00
ocornut e13913ed57 IsItemHovered: Added ImGuiHoveredFlags_DelayNormal, ImGuiHoveredFlags_DelayShort, ImGuiHoveredFlags_NoSharedDelay. (#1485)
IsItemHovered() can't have a non-zero default, but higher-level tooltip helpers may enable a different default later.
2022-08-24 21:32:13 +02:00
ocornut b3b3a07133 Nav: Fixed regression in e99c4fc preventing CTR+Tab to work without NavEnableKeyboard (#5504, #4023); 2022-08-24 14:45:11 +02:00
Geoffrey McRae 2c1262b436 ImVector: fix undefined behaviour during copy operator if source vector is null. (#5608) 2022-08-24 10:57:14 +02:00
ocornut 5b0510c5b7 TestEngine: facilitate aiming at InputScalar() using wildcards + removed unnecessary IDStack.size hack (require TestEngine latest) 2022-08-20 22:55:51 +02:00
Vlad Serebrennikov c911901b5e
Fix ImGuiIO docs and default values (#5540) 2022-08-03 22:46:31 +02:00
ocornut 0a4ddd7246 Fix being unable to mouse wheel while dragging a payload (fix 1480bc5, #4921, #2891) 2022-08-03 22:02:00 +02:00
ocornut 4a2ae06ca4 Changed signature of ImageButton() function: Added 'const char* str_id' parameter + removed 'int frame_padding = -1' parameter. (#5533, #4471, #2464, #1390).
Also removed frame_padding parameter from ImageButtonEx(), amend e0ec69d8.
2022-08-03 21:04:33 +02:00
Rokas Kupstys 0e95cf0dec Fix appending to windows causing a child window to be inserted to g.WindowsFocusOrder which eventually causes a crash. (#5515, #3496, #4797)
Amend a528398
2022-08-03 14:44:05 +02:00
ocornut 6ab5fd1da9 Tables,Columns: fixed a layout issue where SameLine() prior to a row change would set the next row in such state where subsequent SameLine() would move back to previous row. 2022-07-18 17:40:52 +02:00
ocornut 1480bc5d4e Added ImGuiKey_MouseXXX aliases. (#4921) Reworked SetItemUsingMouseWheel() to use this for ActiveId. (#2891)
The rework of SetItemUsingMouseWheel() is half-complete since there's a HoveredIdUsingMouseWheel component. This will however be totally cleaned when we transtion to InputOwner system.
2022-07-08 18:32:25 +02:00
ocornut 105bb3ef8a Legacy: clear g.ActiveIdUsingNavInputMask when active id is clear + Internals: added helpers GetKeyChordName(), ImGuiModFlags_All.
Amend 8b8a61b
2022-07-08 17:51:46 +02:00
ocornut 8b8a61bdf9 Removed io.NavInputs[] and ImGuiNavInput enum. Kept inline redirection code. (#4921, #4858, #787, #1599, #323) 2022-07-08 16:02:07 +02:00
ocornut 92d0924b82 Fixed build with IMGUI_DISABLE_OBSOLETE_KEYIO + made all examples comments refer to StyleColorsLight(). 2022-07-06 20:58:20 +02:00
ocornut 4711b9b05a Add trailing commas to enum (to simplify the diff/patch of further additions) (#4537)
Possible since we are now C++11 + fix warning in GetNavInputAmount().
2022-07-06 20:39:39 +02:00
ocornut 90ef327882 Reordered keys representing directions to follow a consistent L/R/U/D order everywhere. (#2625, #4921, #3724)
Amended to avoid static analysis false positive.
2022-07-06 17:48:01 +02:00
ocornut 467a1cd4a5 Misc: io.Framerate moving average now converge in 60 frames instead of 120. (#5236, #4138) 2022-07-01 17:09:58 +02:00
ocornut 609b935a8c InputText: added experimental io.ConfigInputTextEnterKeepActive feature to make pressing Enter keep the input active and select all text. 2022-06-30 15:47:54 +02:00
ocornut 24dfe6db8a Version 1.89 WIP 2022-06-27 16:55:55 +02:00
ocornut 9aae45eb4a Version 1.88
(fix "Show Debug Log" checkbox in Metrics window)
2022-06-21 18:11:50 +02:00
ocornut d3fd2630b7 Sliders: An initial click within the knob/grab doesn't shift its position. (#1946, #5328) + Adjust default GrabMinSize. 2022-06-20 18:13:10 +02:00
Rokas Kupstys 37a07858a9 Nav: Fixed inability to cancel nav in modal popups. (#5400) 2022-06-17 14:58:26 +02:00
ocornut 07efd7cc20 Renamed IMGUI_DISABLE_METRICS_WINDOW to IMGUI_DISABLE_DEBUG_TOOLS. 2022-06-15 16:02:55 +02:00
ocornut 1d6e34f3f9 Debug: Added ShowDebugLogWindow().
Internal: renamed old IMGUI_DEBUG_LOG() to IMGUI_DEBUG_PRINT().
Amended once.
2022-06-13 19:05:55 +02:00
ocornut 076d8fc868 Nav: Fixed issues with nav request being transferred to another window when calling SetKeyboardFocusHere() and simultaneous changing window focus. (#4449) 2022-06-10 19:25:53 +02:00
ocornut a35e876978 InputText: Amends and tidying up: Fixed undo/redo state corruption when editing buffer in user callback. (#4947, #4949) 2022-06-08 15:27:36 +02:00
ocornut 64d6c30562 InputText: Fixed an undo-state corruption issue when editing buffer before reactivating item. (#4947) + Metrics: Added "InputText" section. 2022-06-07 15:34:21 +02:00
ocornut 74f02703e6 Misc comments + Demo: use IsItemVisible() when using direct ImDrawList calls. 2022-06-07 11:48:05 +02:00
ocornut 65c4c0a490 IO: Added SetAppAcceptingEvents() function (#4921, #4858) 2022-06-02 16:56:00 +02:00
Rokas Kupstys f58bd817e2 Tables: Fix drawcall merging of last column. (#4843, #4844)
Amend 83d22f4e
2022-05-31 14:22:23 +02:00
ocornut 697ce2d67b InputText: Fixed a one-frame display glitch where pressing Escape to revert after a deletion would lead to small garbage being displayed for one frame. (#3008)
Curiously very old, amend 83efdce and bdbb2b2. Using stb_ functions updated ->CurLenA without updating ->TextA, leading to `buf_display_end = buf_display + state->CurLenA;` in the display.
Since f3ab5e62 they are 1 case out of 4 which didn't apply back to ->TextA and this is essentially the one where we ensure appliance. Another solution would be to alter the lower display code, but applying to TextA makes things more consistent.
2022-05-25 18:39:00 +02:00
ocornut 7bf07d2526 Renamed CaptureMouseFromApp() and CaptureKeyboardFromApp() to SetNextFrameWantCaptureMouse() and SetNextFrameWantCaptureKeyboard(). Added demo. (#5304, #4831, #4480, #533) 2022-05-23 11:22:46 +02:00
ocornut e346059eef IO: Fixed input queue trickling of mouse wheel events. (#4921, #4821) 2022-05-18 14:16:02 +02:00
ocornut 9e0517a134 DrawList: Fixed divide-by-zero or glitches with Radius/Rounding values close to zero. (#5249, #5293, #3491)
Amend 8ed34af6f8
2022-05-13 17:19:51 +02:00
ocornut 55f8989392 Docs update, binaries link + Backend: Allegro: fix warning (#5281) 2022-05-04 15:16:05 +02:00
ocornut 6d27fecce1 Debug: added DebugTextEncoding() to help diagnose between text encoding issues and font loading issues. Simplified code + extracted DebugNodeFontGlyph().
Helper to diagnose issues such as #4866, #3558, #3436, #2233, #1880, #1780, #905, #832, #762, #726, #609, #565, #307)
2022-05-03 19:23:54 +02:00
ocornut 3e5dde9a26 Tables: Fixed incorrect auto-fit of parent windows when using non-resizable weighted columns. (#5276) 2022-05-02 16:45:27 +02:00
ocornut 5b29d14783 Layout: Fixed mixing up SameLine() and SetCursorPos() together. SameLine() is a stateful.
+ minor unrelatedcomments.
2022-04-22 17:48:06 +02:00
Andrea Palmatè 14ca75d4e7 Backends: SDL, OpenGL3: Small fixes for AmigaOS4. (#5190) + Allow redefining IM_COL32_XXX layout macros. (#5190, #767, #844) 2022-04-13 20:43:35 +02:00
ocornut 90386780e3 Misc: Fixed calling GetID("label") _before_ a widget emitting this item inside a group (such as InputInt()) from causing an assertion when closing the group. (#5181). 2022-04-12 14:44:57 +02:00
David Maas 937d073328 Updated comment about Edit.NavigateTo to Edit.GoToAll. (#5179)
This command was renamed in Visual Studio 2017.
2022-04-11 17:11:51 +02:00
ocornut f7f30476d5 Added comments about requirement for bilinear filtering. (#5156, #3245) + Backends: SDL_Renderer: Explicitely call SDL_SetTextureScaleMode(). (#4927) 2022-04-07 14:28:08 +02:00
ocornut 2c03aac6d3 Renamed ImGuiKeyModFlags to ImGuiModFlags (Breaking but technically never advertised type) 2022-04-05 15:45:00 +02:00
ocornut c521883be4 Sliders, Drags: Fixed manual input when using hexadecimal display format string. (#5165, #3133)
InputScalar: Fixed manual input when using %03d style width in display format string.
(amended once)
2022-04-04 18:42:04 +02:00
ocornut 508c9aaf60 Sliders, Drags: Fixed using hexadecimal display format strings (pretty much never worked). (#5165, #3133)
Ditched unnecessary code. When transitioning from float in 3e8087458 we added an unnecessary path there, which evolved in c5fb92955.
2022-04-04 14:43:30 +02:00
ocornut f5c5926fb9 Internals: remove obsolete variants of RenderArrow(), RenderBullet(), ImHash() + misc comments. 2022-03-29 15:43:47 +02:00
ocornut 2747a8ca40 Turned ImVec2 to const ref to RenderChar(), RenderText(), ColorButton(), PushClipRect(). for consistency. Comments about polygon filling winding order. 2022-03-29 12:13:31 +02:00
ocornut 0dec430707 Menus: Adjusted BeginMenu() closing logic so hovering void or non-MenuItem() in parent window always lead to menu closure. 2022-03-28 12:33:58 +02:00
ocornut 3587ee492b Viewports: store Viewport field in ImGuiWindow to facilitate using code accross branches + fix PVS warnings. 2022-03-25 15:40:20 +01:00
ocornut 16ddc1698d Fixed creating multiple-context (regression in 28ba54a). (#5135) 2022-03-24 11:01:46 +01:00
ocornut 28ba54a32a Internals: add AddSettingsHandler(), RemoveSettingsHandler(). 2022-03-14 10:23:30 +07:00
ocornut fd06ed833b Misc: tweaks + fix warnings on backends withtout -wno-memaccess (#4995, #5104) 2022-03-13 17:57:32 +07:00
ocornut fa2b318dd6 IO: Fixed input queue trickling of interleaved keys/chars events when InputText() is not active. (#4921, #4858) 2022-02-22 14:36:27 +01:00
ocornut 5659db5529 IO: Fixed backward-compatibility accesses to io.KeysDown[]. (#4921, #4858)
+ Snuck in unrelated comments and removed the "fill once" comment (#5043)
2022-02-21 21:31:01 +01:00
ocornut dca527be1b Clipper: Assert on extraneous calls to Step(). (#4822) + Demo tweak. 2022-02-18 18:40:43 +01:00
ocornut 29d462ebce Set HoveredID even when g.NavDisableMouseHover is set by gamepad/keyboard navigation. This will facilitate the use of future InputOwner API based on HoveredID/ActiveID.
Note that this widen the small gap between polling g.HoveredID and using IsItemHovered() the later does various filtering.
Added IsItemHovered(ImGuiHoveredFlags_NoNavOverride) to disable that specific state redirect/filter.
Side-effect: fix EndGroup() use of combining HoveredId values when gamepad/keyboard nav is active. Unlikely to have user-visible side effect since IsItemHovered() would have filtered out anyway.
Side-effect: fix IsAnyItemHovered() when gamepad/keyboard is active (but this wasn't the primary intent of this change).
Side-effect: fix using SetItemUsingMouseWheel() while hovering an item and gamepad/keyboard is active. (#2891)
2022-02-17 18:39:03 +01:00
ocornut d9e60d29e1 Clipper: Fixed a regresssion when not calling End() + calling End() twice as well. (#4822) 2022-02-17 11:09:06 +01:00
thedmd 5c8f8d0311 ImVector: Fixed erase() with empty range. (#5009) amend/fix b6b8f66
Actual change was missing in b6b8f66
2022-02-16 20:08:58 +01:00
ocornut 2dfa71fad5 Inputs: Fixed IsMouseClicked() repeat mode rate being half of keyboard repeat rate. Using KeyModAlt. Removed KeyModsPrev. 2022-02-16 20:08:58 +01:00
thedmd b6b8f6634e ImVector: Fixed erase() with empty range. (#5009) 2022-02-15 11:16:08 +01:00
Jeff Mears 71f98dd056 Declare ImVec2 and ImVec4 constructors as constexpr (#4995) 2022-02-11 12:27:27 +01:00
thedmd 4691fa0ed5 ImDrawList: PthArcTo: Add small tolerance when comparing angles (#4993) 2022-02-08 17:37:45 +01:00
ocornut 88de982071 Version 1.88 WIP 2022-02-08 14:45:26 +01:00
ocornut 97b1abd6dd Internals: rework RenderMouseCursor() signature so we can use it in docking branch more naturally. 2022-02-08 12:22:46 +01:00
ocornut c71a50deb5 Version 1.87 2022-02-07 18:16:54 +01:00
ocornut 6f73dbea80 TestEngine: submit window data to item system. 2022-02-01 15:20:32 +01:00
Clownacy 422902dbda Correct typos (#4954, #4955), use IM_STATIC_ASSERT now that old pre-C++11 macro has been obsoleted. 2022-01-31 11:58:33 +01:00
ocornut 49e38a5b32 Revert moving ImGuiKeyModFlags to internal.h (amendc906c65) 2022-01-28 15:53:09 +01:00
ocornut c906c65cac (BREAKING) Replaced AddKeyModsEvent() added by 790132a in favor of unified key enum system. Backends: update most. (#4921, #4858)
Sorry this is an unusual breaking but since we are WIP it is a good time to make a correction.
2022-01-27 17:46:48 +01:00
ocornut 8555335935 Shallow alignment of ImGuiKey stuff + moving some in internals. Internals: add offset to ImBitArray<>, simpify ActiveIdUsingKeyInputMask. 2022-01-25 18:11:34 +01:00
ocornut b17b2fb732 Popups: Fixed an issue when reopening a same popup multiple times would offset them by 1 pixel on the right. (#4936)
Passing explicit ImGuiPopupFlags_MouseButtonRight to OpenPopupOnItemClick() calls somehow document the unusual (due to legacy) default value.
2022-01-24 13:24:54 +01:00
sergeyn dd6a44abb1
Fix compiler warning for Intel compiler (#4934) 2022-01-24 12:09:02 +01:00
ocornut 26e59c8742 Nav: Fixed gamepad navigation in wrapping popups not wrapping all the way. (#4365) 2022-01-21 14:41:34 +01:00
ocornut 62d6be3747 IO: Removed ImGuiInputSource from public api for now, unnecessary. (#4858, #787) 2022-01-20 17:39:25 +01:00
ocornut f33bb99821 IO: added AddKeyAnalogEvent() and support for ImGuiKey_GamepadXXXX. (#4858, #787) 2022-01-20 17:24:52 +01:00
Rokas Kupstys 19471da3fd Popups: Fix a crash when a new window is created after a modal on the same frame. (#4920) 2022-01-20 15:03:56 +01:00
ocornut 7ad42ff431 IO: renamed io.ConfigInputEventQueue to io.ConfigInputTrickleEventQueue. (#4858) 2022-01-19 18:45:57 +01:00
ocornut 97b1ffcb3b IO: Reorder enums, compact a little in header. Removed const from internal GetKeyData(). 2022-01-19 15:42:27 +01:00
ocornut 91ae56af45 Removed support for legacy arithmetic operators (+*/) when inputing text into a slider/drag. (#4917, #3184) 2022-01-19 15:10:42 +01:00
ocornut 673f5e588d IO: moved fields to put more focus on the new functions + update misc docs/references + update main.mm in Apple+Metal example (#4858) 2022-01-18 17:41:35 +01:00
ocornut 7374b96f5c IO: Added input queue. (#4858, #2787, #1992, #3383, #2525, #1320) 2022-01-17 17:36:55 +01:00
thedmd b8e56dce83 IO: Added AddMousePosEvent(), AddMouseButtonEvent(), AddMouseWheelEvent() api + updated all Backends. (#4858) (input queue code will be next commit)
Details: note that SDL, OSX and GLFW backends removed recording of MouseJustPressed[] which will be unnecessary with input queue (which is the NEXT commit). (#2787, #1992, #3383, #2525, #1320)
2022-01-17 17:35:37 +01:00
ocornut 92c4ff1c2f Rename ImGuiKey_LeftControl to ImGuiKey_LeftCtrl, ImGuiKey_RightControl to ImGuiKey_RightCtrl + made key order match mods order. (#4858) 2022-01-17 15:42:04 +01:00
ocornut eb823655af Removed support for pre-C++11 compilers. We'll stop supporting VS2010. (#4537)
Build all
2022-01-17 11:54:11 +01:00
ocornut 7f8a89c25c Backends: Win32, SDL: maintain MouseButtonsDown instead of using IsAnyMouseDown(). Internals: added GetInputSourceName(). 2022-01-12 16:12:10 +01:00
ocornut 956e03009a Backends: OSX: Build fIx. Made GetKeyName() input tolerant. Internals: added GetNavInputName(). 2022-01-11 18:48:16 +01:00
ocornut e8172fdfbc Rename io.AddKeyModEvent() -> io.AddKeyModsEvent() and updated backends accordingly. (#2625, #4858)
Amend 790132a (breaking)
2022-01-10 17:00:32 +01:00
ocornut 790132a672 Added io.AddKeyModEvent() and updated backends accordingly. (#2625, #4858) 2022-01-10 15:17:00 +01:00
ocornut bf08c13e9b Inputs: Extra Keys / AddKeyEvent(): bidirectional mapping, basic CI, simplify backends, asserts on misuses, tested backward compat. (#2625, #4858, #2787)
(edit: simplified backends merged into previous commits to make history clearer)
2022-01-10 15:09:56 +01:00
thedmd 3b66929301 Inputs: Extra Keys / AddKeyEvent(): Added ImGuiKey values, io.AddKeyEvent(), GetKeyName(), IMGUI_DISABLE_OBSOLETE_KEYIO. Obsoleted GetKeyIndex(), io.KeyMap[], io.KeysDown[]. (#2625, #4858, #2787) 2022-01-10 15:09:56 +01:00
ocornut afffcd5810 Inputs: rename ImGuiKey_KeyPadEnter > ImGuiKey_KeypadEnter (#2625) 2022-01-06 14:25:56 +01:00
Liu Liu de36ff043e Platform IME: add ImGuiPlatformImeData::InputLineHeight (unused by win32). (#3113) 2022-01-05 13:47:21 +01:00
actboy168 29a8ee0826 Platform IME: add ImGuiPlatformImeData::WantVisible, hide IME when not used. (#2589) 2022-01-05 13:47:21 +01:00
ocornut 3a90dc3893 Platform IME: changed io.ImeSetInputScreenPosFn() to io.SetPlatformImeDataFn() API.
Ref #2589, #2598, #3108, #3113, #3653, #4642
2022-01-05 13:47:20 +01:00
ocornut 04bc0b0bb8 Fix IdxBuffer related comments. (#4845, #4863) 2022-01-05 12:20:33 +01:00
ocornut 206b9ead8f IO: removed unused MouseDragMaxDistanceAbs(). Using a shortcut variable in UpdateMouseInputs(). 2022-01-04 13:01:30 +01:00
ocornut c5a3cae83a Reordered some IO fields. Misc comments. Removed beta marker from tables comments. 2022-01-04 13:01:30 +01:00
ocornut 2402958aec Commented out redirecting functions/enums names that were marked obsolete in 1.69, 1.70, 1.71, 1.72
- ImGui::SetNextTreeNodeOpen() -> use ImGui::SetNextItemOpen()
- ImGui::GetContentRegionAvailWidth() -> use ImGui::GetContentRegionAvail().x
- ImGui::TreeAdvanceToLabelPos() -> use ImGui::SetCursorPosX(ImGui::GetCursorPosX() + ImGui::GetTreeNodeToLabelSpacing());
- ImFontAtlas::CustomRect -> use ImFontAtlasCustomRect
- ImGuiColorEditFlags_RGB/HSV/HEX -> use ImGuiColorEditFlags_DisplayRGB/HSV/Hex
2022-01-03 16:37:33 +01:00
ocornut dbeea7220f Backends: Silence overzealous warnings. (#4834) Add comments about SetDragDropPayload() return value. (#4835) 2021-12-29 12:44:12 +01:00
ocornut 89a28209e8 Version 1.87 WIP + Backends: OpenGL3: Fixed a buffer overflow in imgui_impl_opengl3_loader.h init, added in 1.86 (#4468, #4830) 2021-12-26 20:02:02 +01:00
ocornut 980deb4c9e Add missing include guard to avoid declaring ImFontAtlasGetBuilderForStbTruetype() function.
https://github.com/cimgui/cimgui/issues/193
https://github.com/imgui-rs/imgui-rs/pull/582
2021-12-26 19:51:10 +01:00
ocornut 512c54bbc0 Version 1.86 2021-12-22 15:31:13 +01:00
ocornut 4a43dcb940 Internals: reduced side-effects of setting window->HiddenFramesForRenderOnly > 0 2021-12-15 16:05:15 +01:00
ocornut 48f263336b Menus: fixed closing a menu inside a popup/modal. Fixed menu inside a popup/modal not inhibiting hovering of items in the popup/modal. (#3496, #4797)
Fixed sub-menu items inside a popups from closing the popup (debatable).
2021-12-14 16:54:23 +01:00
ocornut a528398c77 Internals: support for varying _ChildWindow flag for menu windows. (#3496, #4797) 2021-12-14 16:19:43 +01:00
xndcn 8a9fe26866 Menus: fixed closing a menu by clicking on its menu-bar item when inside a popup. (#3496, #4797) 2021-12-10 18:58:41 +01:00
ocornut e03383d088 Fixes for tooltip over modals leading to incorrect modal dimming. (#4729)
Amend 23ef6c1. Should rework tooltip to be in a consistent position in g.Windows[]
2021-12-09 11:50:38 +01:00
Rokas Kupstys b38af0f522 Popups: Fix popups being closed by newly appearing windows. (#4317)
* Popups/modals now remain open when new windows are created from within popup/modal begin stack.
* Modals are not closed when new window appears behind active modal.
Tested by "window_popup_interruptions"
2021-12-07 15:52:13 +01:00
ocornut 027a7ba3eb Clipper: use line size instead of cursor comparaison when range are large. (#3609, #3962 + https://github.com/ocornut/imgui_club/issues/20) 2021-12-06 17:17:43 +01:00
ocornut a76bc52da5 Window, Clipper: store initial precision loss and apply in clipper. (#3609, #3962 + https://github.com/ocornut/imgui_club/issues/20) 2021-12-06 16:19:47 +01:00
ocornut 23ef6c149e Reworked modal/ctrl+tab dimming system to be entirely processed at end of the frame (backported 1dc3af3 from docking) 2021-12-03 19:21:39 +01:00
ocornut da3a36eefd Backport from docking branch: minor stuff.
Fixed software mouse cursor being rendered multiple times if Render() is called more than once.
2021-12-03 19:11:58 +01:00
ocornut 78c6435dbb Inputs: (breaking wip) removed IsMouseTripleClicked() added recently (during 1.86 WIP), replaced with GetMouseClickedCount(). (#3229) 2021-12-03 12:38:58 +01:00
ocornut 66f0fb986c Inputtext, Nav: fixed using SetKeyboardFocusHere() on InputTextMultiline(). (#4761) 2021-11-29 16:25:45 +01:00
ocornut 65f4be1a10 InputText: Internals: moved "apply_new_text" application code to reduce noise in a future commit (will be for #4714) + removed unused fields.
The move would ideally be no-op. technically we now clear state->Flags before calling ResizeCallback but those are unrelated. The 2 unused fields were incorrectly added by 24ff25981.
2021-11-25 15:12:23 +01:00
Pascal Thomet 7cd3cfa58a Demo: Add IMGUI_DEMO_MARKER (currently unused, but usage by altering GImGuiDemoMarkerCallback) (#3689)
Various amends/renames. (Amend to fix a warning)
2021-11-10 13:09:50 +01:00
ocornut a9ea1ae854 Nav: fixing assert using Tab in a window without any tabbable element (#4449)
Amend 1a7526dc
2021-11-10 11:42:39 +01:00
ocornut bce1ba400f Clipper: add ForceDisplayRangeByIndices (#3841, #3578)
This partially reverts commit 6a7e2c74fb.
2021-11-08 17:20:30 +01:00
ocornut 1a7526dcd4 Nav, Tabbing: refactor tabbing system to support clipped items, scrolling, using nav queries. (#4449)
Not using counter/modulo anymore and special provisions to handle tab wrapping with ImGuiListClipper. Wrapping may be done better as a next-frame forwarded request.
Also one extra step toward #3949 #3985
2021-11-04 20:48:12 +01:00
ocornut f01a6d3e8f InputText, Nav: fixed repeated calls to SetKeyboardFocusHere() preventing to use InputText(). (#4682)
+ Stack Tool: favor inspecting HoveredID over ActiveID as the later is more likely to be locked.
2021-11-04 20:02:42 +01:00
ocornut 64daeddf6f Removed CalcListClipping() function. (#3841) 2021-11-04 14:14:16 +01:00
ocornut 6a7e2c74fb Clipper: remove ForceDisplayRangeByIndices/ForceDisplayRangeByPositions functions until we find a need for them, since #3841 is now solved automatically. 2021-11-04 14:05:14 +01:00
ocornut 93cccd27f6 Clipper: bunch of rework. (#3841, #1725)
- Focused/NavId now always included in display range.
- Any number of steps (while preserving zero-alloc policy).
- Non contiguous ranges for nav processing
- Moved new fields internally (+ moved StepNo away from sight so it doesn't get missused).
- Generally tweaks/refactors.
2021-11-04 14:05:14 +01:00
GamingMinds-DanielC cd1b5f7883 Clipper: enhanced ImGuiListClipper (#3841) 2021-11-04 13:56:37 +01:00
ocornut b409df34db Clipper: Fixed content height declaration slightly mismatching the one of when not using a clipper. 2021-11-03 17:00:40 +01:00
ocornut a67f7dce31 Nav: relative rectangle positions are now stored relative to CursorStartPos to be independent of scrolling. Will facilitate rework of clipper (#3841)
+ Extracted code into NavUpdateCreateWrappingRequest()
+ Fix for PVS in NavUpdate() assigning g.NavMousePosDirty twice.
2021-10-27 14:18:03 +02:00
ocornut 19c72cd52a Nav: fixed absolute mouse position (with NavEnableSetMousePos config flag) when using Home/End leads to scrolling. 2021-10-27 12:28:35 +02:00
ocornut 9c78fc928a Inputs: Mouse: Amend c8e3a01 for tracking multiple clicks, renaming. (#3229) 2021-10-25 14:30:20 +02:00
Chris Savoie 2318c764cf Inputs: Mouse: Add support for tracking multiple clicks more than just double (#3229) 2021-10-25 14:30:17 +02:00
Rokas Kupstys 39b99072fb ImVector: fix Clang warning (implicit conversion changes signedness: 'const ptrdiff_t' (aka 'const long long') to 'unsigned long long') 2021-10-22 14:52:26 +02:00
ocornut e3bd9434b1 1.86 WIP + internals: tweaks table temp data code. 2021-10-14 16:58:14 +02:00
Rokas Kupstys be03b8ff93 Misc: Fix build with MinGW when using IMGUI_API. 2021-10-12 16:43:28 +02:00
ocornut 55d35d8387 Version 1.85 2021-10-11 19:24:25 +02:00
ocornut 31d033c9d8 Nav: refactor SetKeyboardFocusHere() into using Nav facility. Fix it for clipped items. (#343, #4079, #2352, #432)
+ Removed references to counter used by previous implementation of SetKeyboardFocus functions (the TabStop ones will be removed after)
2021-10-06 18:42:11 +02:00
ocornut 2de96c4bd5 Stack Tool: Added Stack Tool (ShowStackToolWindow() function and available from Demo and Metrics window). (#4631) 2021-10-06 17:47:27 +02:00
Guus Waals 30db674147 Fix printf format warnings on mingw clang (#4626, #4183, #3592) 2021-10-06 12:00:50 +02:00
ocornut 164a86d3b0 Moved !IsActiveIdUsingKey(ImGuiKey_Tab) check to UpdateTabFocus(). Added asserts to IsItemHovered() and IsWindowHovered(). 2021-10-05 22:06:12 +02:00
ocornut 8f495e5543 Internal: added ScrollToItem() upcoming replacement to ScrollToBringRectIntoView() + ImGuiScrollFlags (WIP) (#3692, #3208, #2812, #4242, #2900) 2021-09-29 17:13:45 +02:00
ocornut fc4988ffb0 Added ImGuiFocusedFlags_NoPopupHierarchy and ImGuiHoveredFlags_NoPopupHierarchy (followup #4527) 2021-09-24 15:39:38 +02:00
ocornut bbb95a5e06 IO: modify io.AddFocusEvent() to tolerate in/out for multi-viewports. Amend 2f40be6. (merged from docking) (#3532) 2021-09-22 15:47:53 +02:00
Martin Ejdestig d7260104b1
Added comments about sliders clamping and ImGuiSliderFlags_AlwaysClamp (#4573) 2021-09-21 19:18:21 +02:00
Rokas Kupstys 30546bc0e7 ColorEdit: Fix multiple issues. (#4014)
* Change g.ColorEditLastColor type to ImU32 and store RGB color value.
  - Fixes inability to change hue when saturation is 0. (#4014)
  - Fixes edgecases where lossy color conversion prevent restoration of hue/saturation.
  - Fixes hue value jitter when modifying color using SV square.
* Fix hue resetting to 0 when it is set to 255 by explicitly restoring hue if it is 0 and previous value was 1.
* Further reduce hue jitter by restoring hue when color is modified using SV square.
2021-09-21 15:10:07 +02:00
ocornut 2cffcbdc64 InputText: fix Space key with nav enabled interfering with input text boxes (fix bd6c9e99). made it possible to activate InputText with tweak gamepad button (why not, now that we can cancel) (#4552, #2321) 2021-09-17 16:30:32 +02:00
ocornut d366694062 Disabled: Added assert guard for mismatching BeginDisabled()/EndDisabled() blocks. (#211) + Added asserts for missing PopItemFlag() calls. Added both to ErrorCheckEndFrameRecover (#1651) 2021-09-15 15:26:29 +02:00
ocornut 82754561e2 Nav: Fixed a few widgets from not setting reference keyboard/gamepad navigation ID when activated with mouse. 2021-09-13 15:17:54 +02:00
ocornut 17a7084b57 Menus: Fixed crash when navigating left inside a child window inside a sub-menu. (#4510). 2021-09-10 15:37:59 +02:00
ocornut 321b84f01f Internals: refactored IsWindowHovered()/IsWindowFocused() to make their logic more similar + change underlying value of ImGuiHoveredFlags_AllowWhenBlockedByPopup + comment out docking only flags. 2021-09-08 16:44:53 +02:00
ocornut bd6c9e99fc InputText: Allow cancelling/validating input with gamepad nav events.
Amend 158995f2 (#2321)
2021-09-06 18:47:12 +02:00
ocornut 3d9d3b49ae Internals: folded ImGuiItemAddFlags into ImGuiItemFlags. ImGuiItemAddFlags_Focusable > ImGuiItemFlags_Inputable. One step in the big nav/tab/focus rework.
Bonus simplified Selectable() handling of its custom disabled flag. (#211)
2021-09-01 14:46:08 +02:00
ocornut 4aea1c5adb IO: added io.WantCaptureMouseAllowPopupClose (#4480) + comments 2021-08-30 19:11:47 +02:00
ocornut 66102880a3 Updated links to Discussions 2021-08-30 17:06:51 +02:00
ocornut 333807b483 Windows: fixed background order of overlapping childs submitted sequentially. (#4493)
Amend 07704496
2021-08-30 13:08:41 +02:00
ocornut 780c1ee265 TextUnformatted: Accept null ranges including (NULL,NULL) without asserting. (#3615) 2021-08-24 19:30:02 +02:00
ocornut 4a7c21d330 Fonts: Fixed ImFontAtlas::ClearInputData() marking atlas as not built. (#4455, #3487) 2021-08-24 15:28:39 +02:00
ocornut e23bee353c Removed GetWindowContentRegionWidth() function 2021-08-23 16:15:16 +02:00
ocornut 0649f750b4 Version 1.85 WIP 2021-08-23 15:31:06 +02:00
ocornut d79ca9b0b6 Fixed nested BeginDisabled()/EndDisabled() calls. (#211, #4452, #4453, #4462) [Legulysse] 2021-08-23 14:57:54 +02:00
ocornut e6ffc04291 Moved ImDrawIdx declaration higher up in imgui.h (to ease work for dear_bindings)
Shuffled low-level data types declarations and tweaked comments
2021-08-23 12:00:16 +02:00
ocornut 32d4f6c5d9 Fix BeginDisabled(false), again, (#211, #4452, #4453) Version 1.84.1
(forced pushed since our earlier versioning didn't sort correctly in github web)
2021-08-20 23:59:46 +02:00
ocornut f969e68c10 Fix BeginDisabled(false), (#211, #4452) 2021-08-20 20:30:51 +02:00
ocornut d2ffbd9b86 Version 1.84
Fix PVS Studio false positive //-V1020
Fix missing #ifndef for IMGUI_IMPL_OPENGL_LOADER_CUSTOM path
2021-08-20 18:03:55 +02:00
ocornut df2319a854 Small optimizations to BeginDisabled() to allow frequent calls (#211)
Not intended for frequent calls but I suspect some people will do it either way...
Rough/indicative: measured 0.1 ms for 5000 calls in release, 0.5 ms in debug on my desktop windows.
2021-08-20 17:19:18 +02:00
ocornut c543d93af1 Expose BeginDisabled()/EndDisabled() in public API. Add to demo. (#211) 2021-08-20 16:34:43 +02:00
thedmd 2f40be638f IO, Backends: add io.AddFocusEvent(). Clear pressed keys after loosing input focus (#3532)
Amend/fix #2445, #2696, #3751, #4377
2021-08-17 20:10:45 +02:00
ocornut ff428f1d2f Nav: Fix not clearing NavWindowingToggleLayer properly (old code left it to true, relied on Alt release only). Removed unnecessary KeyMenu_ from NavInput. (#4439, #787) 2021-08-17 12:54:51 +02:00
ocornut 044fd0cd2d Backends: GLFW: Mouse position is correctly reported when the host platform window is hovered but not focused. (#3751, #4377, #2445) 2021-07-29 19:37:18 +02:00
ocornut e362c5af48 Internals: ColorEdit: renamed some internal masks to match our common coding style.
ImGuiColorEditFlags__DisplayMask > ImGuiColorEditFlags_DisplayMask_, ImGuiColorEditFlags__OptionsDefault > ImGuiColorEditFlags_DefaultOptions_, ImGuiColorEditFlags__DataTypeMask > ImGuiColorEditFlags_DataTypeMask_  etc.
2021-07-26 20:44:59 +02:00
ocornut b846969fe1 Removed unnecessary line in Begin() + commented out redirecting functions/enums names that were marked obsolete in 1.67 and 1.69 + readded commented obsoleted function. 2021-07-26 12:22:48 +02:00
ocornut 6b8a059fc9 Internals: moved LastItem data to a shared structure (instead of one per window)
(should be a no-op as we are restoring things in Begin/End. Toward faciliate backup/restore of LastItemData and favor pulling from here instead of CurrentItemFlags, toward #211)
2021-07-19 21:25:47 +02:00
ocornut 1ad153056a Internals: ItemAdd: set LastItemXXX fields before navigation calls + comments about io.IniFilename (#4294) 2021-07-19 21:24:15 +02:00
ocornut fb4bbeb033 Disabled: fixed IsItemHovered() if popped disabled state after item, or when using Selectable_Disabled. (#211) 2021-07-12 15:43:17 +02:00
Giovanni Funchal 6792e1a3e0 Backends: SDL2: Remove unnecessary ImGui_ImplSDL2_NewFrame() parameter. (#3244) 2021-06-30 15:04:40 +02:00
ocornut 23a15834fa Fonts: Fix calling ClearTexData() (clearing CPU side font data) triggering an assert in NewFrame(). (#3487) + Backends: added additional assert to facilitate detecting user understand they haven't initialized a backend. 2021-06-29 18:16:47 +02:00
ocornut b5a2bd1a5b Backends: amends to 1db1066 + merge minor bits from docking incl SetActiveIdUsingNavAndKeys().
No need to clear fields before deletion. DX12: renamed to match docking branch.
2021-06-29 15:25:19 +02:00
ocornut 0aeb978e61 Comments + adding spacing in headers because VS IDE parser display blocks so badly. Add helper in internal's ImGuiInputTextState. (#4275) 2021-06-28 11:58:37 +02:00
ocornut 9440974f66 Fonts: Add U+FFFD ("replacement character") to default asian glyphs ranges. Remove SetFallbackChar() (amend 0ffd99d31). (#4269) 2021-06-25 15:47:42 +02:00
ocornut 38165f420f Fonts: Prefer using U+FFFD character for fallback instead of '?'. Use U+FF0E dot character to construct an ellipsis if U+002E '.' is not available. (#4269) 2021-06-25 15:44:14 +02:00
ocornut 1965f38e9e ImGuiWindowFlags_UnsavedDocument/ImGuiTabItmeFlags_UnsavedDocument display a dot instead of a '*'. 2021-06-24 14:30:32 +02:00
ocornut f0c4d609a6 Default window focus scope not 0. Added ImGuiSelectableFlags_SelectOnNav with comments and caveats. (#1861, #4242,)
Focus scope default value: amend 7ee623d9 a5041c88 2ebe08be
2021-06-21 17:47:45 +02:00
ocornut 0cca0d1617 Internals/experimental: BeginComboPreview(), EndComboPreview(). (#4168, #1658)
(amended)
2021-06-15 15:27:28 +02:00
ocornut d0c6dd9baf ImVector: added clear_delete(), clear_destruct() helpers. 2021-06-09 16:57:47 +02:00
ocornut 61f4aec868 Added PushDisabled(), PopDisabled() currently only exposed in imgui_internal.h (#211) 2021-06-09 15:28:59 +02:00
ocornut 6ee398ac2b Tables: Added ImGuiTableColumnFlags_Disabled acting a master disable over (hidden from user/context menu). (#3935, #3740) 2021-06-07 15:18:20 +02:00
ocornut 689e387180 Tables: offset and shuffle flags (breaks ABI compatibility as often)
If you rely on ABI compatibility consider reworking how your backends are created, using cimgui metadata output. We will happily often break ABI compat.
2021-06-07 13:20:03 +02:00
ocornut 1b4323a1b4 Tables: Added ImGuiTableColumnFlags_NoHeaderLabel to request TableHeadersRow() to not submit label for a column. (#4206) 2021-06-07 09:11:53 +02:00
ocornut 94b680e830 Internals: fixed ImPool:: iteration, rename GetBufSize to GetMapSize. Amend c6c82b9f 2021-06-04 17:27:20 +02:00
ocornut c6c82b9f1d Internals: fixed iterating ImPool, fix after use of TableRemove() (was only used by TestEngine)
Merge metrics bits from 646c87359
2021-06-03 18:36:43 +02:00
ocornut a640d8a6d2 Fixed printf-style format checks on non-MinGW flavors. (#4183, #3592) 2021-05-31 13:03:50 +02:00
ocornut e31d13fa76 Version 1.84 WIP 2021-05-25 13:36:53 +02:00
ocornut 556689591c Backends: OpenGL3: Handle GL_CLIP_ORIGIN on <4.5 contexts if "GL_ARB_clip_control" extension is detected. (#4170, #3998)
Expecting this to somehow cause another issue but we will fix it when it comes.
2021-05-24 23:46:25 +02:00