3963 Commits (6f73dbea8017cefbc6e26b894ec3274932ec0c76)

Author SHA1 Message Date
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).
3 years ago
ocornut a528398c77 Internals: support for varying _ChildWindow flag for menu windows. (#3496, #4797) 3 years ago
ocornut 11638fdf7d Menus: reuse more menu windows when stacked over popups.
This is actually mostly aimed at ensuring the _ChildWindow flag on menu window doesn't vary as this would cause issues with our current g.WindowsFocusOrder[] scheme
3 years ago
xndcn 8a9fe26866 Menus: fixed closing a menu by clicking on its menu-bar item when inside a popup. (#3496, #4797) 3 years ago
ocornut c801799218 Added an assertion for the common user mistake of using "" as an identifier at the root level of a window. (#1414, #2562, #2807, #4008, #4158, #4375, #4548, #4657, #4796)
#4158, #4375, #4548, #4657, #4796)
3 years ago
ocornut a8e1dde357 Fix static analyser, update readme. 3 years ago
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[]
3 years ago
ocornut 270d4d0855 Nav, Docking: Fix crash on dimming docked window and DockSpaceOverViewport() with PassthruCentralNode.
(amend 1dc3af3, 23ef6c1, 657073a)

# Conflicts:
#	imgui.cpp
3 years ago
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"
3 years ago
ocornut 657073a650 Nav, Docking: fix dimming crash with accessing zero-cmd ImDrawList (amend 1dc3af3, 23ef6c1)
# Conflicts:
#	imgui.cpp
3 years ago
ocornut 20e040c858 Clipper, Tables: remove table specific code path should now be ok (added assert). 3 years ago
ocornut 926addbfe2 Clipper: fixed invalid state when number of frozen table row is smaller than ItemCount.
+ Bonus rather unorthodox coding style.
3 years ago
ocornut 027a7ba3eb Clipper: use line size instead of cursor comparaison when range are large. (#3609, #3962 + https://github.com/ocornut/imgui_club/issues/20) 3 years ago
ocornut a76bc52da5 Window, Clipper: store initial precision loss and apply in clipper. (#3609, #3962 + https://github.com/ocornut/imgui_club/issues/20) 3 years ago
ocornut 6e141a9cae Internals: made ScrollbarEx() use ImS64 to facilitate use with larger ranges (not fully tested) + clipper tweaks (#3609, #3962 + https://github.com/ocornut/imgui_club/issues/20)
This does NOT fix all problems with large ranges and floating point precision, it merely attenuate them.
3 years ago
ocornut 23ef6c149e Reworked modal/ctrl+tab dimming system to be entirely processed at end of the frame (backported 1dc3af3 from docking) 3 years ago
ocornut da3a36eefd Backport from docking branch: minor stuff.
Fixed software mouse cursor being rendered multiple times if Render() is called more than once.
3 years ago
ocornut 78c6435dbb Inputs: (breaking wip) removed IsMouseTripleClicked() added recently (during 1.86 WIP), replaced with GetMouseClickedCount(). (#3229) 3 years ago
ocornut 5b1a70aa2d Fixed RenderRectFilledWithHole() (used by docking) + added dummy EndFrameDrawDimmedBackgrounds() stub in master.
The round corner flag change in 033dfd9d forgot to default to _None.
3 years ago
ocornut f087a5b856 Metrics: Added a node showing windows in submission order and showing the Begin() stack. 3 years ago
ocornut c5db276521 InputText, Nav: fixed tabbing through InputTextMultiline(). (#4761, #3092)
Messy... Broken by 66f0fb9. Added ImGuiItemFlags_NoTabStop to EndGroup() ahead of time (not strictly needed here).
3 years ago
ocornut 9d704d99d3 Internals: wrapped ImQsort() in an inline function + added a define guard. 3 years ago
ocornut 764f9e606d Fixed crash on right-click without modal, introduced by previous commit a3667f46, (#4729) 3 years ago
ocornut a3667f462a Fixed tooltip in own viewport over modal from being incorrectly dimmed. (#4729)
Normally we would aim to ensure that g.Windows[] gets maintained to reflect display layer but it is presently non trivial.
3 years ago
ocornut d80a9123b7 Internals: move chunks of IsItemHovered() so upcoming commit can be less noisy. This commit should be a no-op (check by comparing without white-space changes) 3 years ago
ocornut 2c29e391dd Drag and Drop: BeginDragDropSource() with ImGuiDragDropFlags_SourceAllowNullID doesn't lose tooltip when scrolling. (#143)
Reduced amount of self critical commentary since it'll appear like a hack for users but it isn't more a hack than many other things.
3 years ago
ocornut f8a806ad9f Tooltips, Internal: (Breaking) swapped parameter order to accomodate for future tooltip api rework. 3 years ago
ocornut cad790d43b Nav: fixed backwrap tabbing wrap on sibling child windows with _NavFlattened flag. (#4449)
Amend 1a7526dc
3 years ago
ocornut e790fc0e79 Nav: prevent child from clipping items when using _NavFlattened and parent has a pending nav request. (#787) 3 years ago
ocornut a9ea1ae854 Nav: fixing assert using Tab in a window without any tabbable element (#4449)
Amend 1a7526dc
3 years ago
ocornut eb02dcf87f Nav: enable move/resize window with keyboard in Ctrl+Tabbing windowing menu even without _NavEnableKeyboard. (#4023, #787). 3 years ago
ocornut 8ce23b3ccd Nav: Ctrl+tabbing to cycle through windows is now enabled regardless of _NavEnableKeyboard. (#4023, #767) 3 years ago
ocornut bce1ba400f Clipper: add ForceDisplayRangeByIndices (#3841, #3578)
This partially reverts commit 6a7e2c74fb.
3 years ago
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
3 years ago
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.
3 years ago
ocornut 32779c5b64 Clipper: hotfix (amend 93cccd2, was broken) (#3841, #1725) 3 years ago
ocornut 64daeddf6f Removed CalcListClipping() function. (#3841) 3 years ago
ocornut 6a7e2c74fb Clipper: remove ForceDisplayRangeByIndices/ForceDisplayRangeByPositions functions until we find a need for them, since #3841 is now solved automatically. 3 years ago
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.
3 years ago
GamingMinds-DanielC cd1b5f7883 Clipper: enhanced ImGuiListClipper (#3841) 3 years ago
ocornut b409df34db Clipper: Fixed content height declaration slightly mismatching the one of when not using a clipper. 3 years ago
ocornut 14466a6d19 Nav: Page/Home/End doesn't immediately restore highlight (before results comes) + pressing Esc to exit a child window re-enable the Nav highlight if it was disabled by mouse.
Also fix a move request fail restoring highlight from not moving mouse cursor.
Add NavRestoreHighlightAfterMove() helper a little bit of extra sanity.
3 years ago
ocornut 978598b174 Nav: pressing PageUp/PageDown/Home/End when in Menu layer automatically moves back to Main layer. + fixed resizing window from borders setting navigation to Menu layer. 3 years ago
ocornut d1eb7b5757 ScrollToItem: amend fully visible tests to take account of spacing used (fix nav in one axis scrolling back and forth between axises when space is tight by just < ItemSpacing*2) (#3692, #2812, #4242, #2900)
Amend 8f495e55
3 years ago
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.
3 years ago
ocornut 8d361c47fb Nav: rework NavEnableSetMousePos application so scrolling is applied more consistently in NavCalcPreferredRefPos() + moved at end of NavUpdate() after the last SetScroll have been done. 3 years ago
ocornut 8361ed1f54 Nav: wrap abs<>rel rectangle conversions before we attempt to switch the reference point from window->Pos to window->DC.CursorStartPos. This commit should have no effect.
Current point makes rectangle invalid right after a scroll, for interactive actions it's rarely a problem but e.g. clipper will want to use g.NavID rect rel while scrolling. (#3841)
3 years ago
ocornut 19c72cd52a Nav: fixed absolute mouse position (with NavEnableSetMousePos config flag) when using Home/End leads to scrolling. 3 years ago
ocornut c363b6df2b Modals: fixed issue hovering popups inside a child inside a modal. Fixed IsWindowFocused()/IsWindowHovered() issues with childs inside popups. (#4676)(#4676, #4527)
Amend/fix 6b1e094f, fc4988ffb (Sep 24)
3 years ago
ocornut 0f2898ea88 Demo: Tree selection demo use !IsItemToggledOpen() (#1896) + update FAQ (#4366) 3 years ago
ocornut 9c78fc928a Inputs: Mouse: Amend c8e3a01 for tracking multiple clicks, renaming. (#3229) 3 years ago
Chris Savoie 2318c764cf Inputs: Mouse: Add support for tracking multiple clicks more than just double (#3229) 3 years ago
ocornut e3bd9434b1 1.86 WIP + internals: tweaks table temp data code. 3 years ago
ocornut 55d35d8387 Version 1.85 3 years ago
ocornut 75c54e6384 Nav: Fixed vertical scoring offset when wrapping on Y in a decorated window. 3 years ago
ocornut ba5c105c01 Menus: Fixed an assertion happening in some situations when closing nested menus (broken in 1.83). (#4640)
Broken since 936f5322
Weirdly chain-reaction caused by the fact following #4640 repro, the SourceWindow assignment in OpenPopupEx() picks Menu_04 before its closure. Value of SourceWindow since bda2cde6 #2517
3 years ago
ocornut 44f801186f SetItemDefaultFocus() use ScrollToRectEx(), don't tab when Alt is held either, TabItemEx() uses ItemAdd's extra_flags, misc comments. 3 years ago
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)
3 years ago
ocornut fbe78b1a3a Stack Tool: Docs (#4631) + also prevent Metrics window from displaying twice. 3 years ago
ocornut 2de96c4bd5 Stack Tool: Added Stack Tool (ShowStackToolWindow() function and available from Demo and Metrics window). (#4631) 3 years ago
ocornut 164a86d3b0 Moved !IsActiveIdUsingKey(ImGuiKey_Tab) check to UpdateTabFocus(). Added asserts to IsItemHovered() and IsWindowHovered(). 3 years ago
ocornut 8f495e5543 Internal: added ScrollToItem() upcoming replacement to ScrollToBringRectIntoView() + ImGuiScrollFlags (WIP) (#3692, #3208, #2812, #4242, #2900) 3 years ago
ocornut fc4988ffb0 Added ImGuiFocusedFlags_NoPopupHierarchy and ImGuiHoveredFlags_NoPopupHierarchy (followup #4527) 3 years ago
ocornut 24a77824f2 Added ClosePopupsExceptModals() helper, unused for now (aimed at user being able to close popups on app focus loss, not necessarily a suitable default) 3 years ago
ocornut bbb95a5e06 IO: modify io.AddFocusEvent() to tolerate in/out for multi-viewports. Amend 2f40be6. (merged from docking) (#3532) 3 years ago
ocornut 15132217a3 Nav: Fixed an issue with losing focus on docked windows when pressing Alt while keyboard navigation is disabled. (#4547, #4439) 3 years ago
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) 3 years ago
ocornut 3973de7933 Internals: removed last parameter to IsClippedEx() + fix PVS studio warnings. 3 years ago
ocornut 2d0a6a4969 Misc: moved StacSizeOnBegin out of window instance into window stack data. 3 years ago
ocornut 66cd21db88 Misc: extracted ErrorCheckEndWindowRecover() out of ErrorCheckEndFrameRecover(). (#1651) 3 years ago
ocornut d366694062 Disabled: Added assert guard for mismatching BeginDisabled()/EndDisabled() blocks. (#211) + Added asserts for missing PopItemFlag() calls. Added both to ErrorCheckEndFrameRecover (#1651) 3 years ago
ocornut 321b84f01f Internals: refactored IsWindowHovered()/IsWindowFocused() to make their logic more similar + change underlying value of ImGuiHoveredFlags_AllowWhenBlockedByPopup + comment out docking only flags. 3 years ago
ocornut d9b427cce0 Nav: clarified/renamed NavInputId as NavAcivateInputId, added flags shared by both.
(this commit should have no visible side effect but is designed to introduce the followup commit refactoring SetKeyboardFocusHere into using a Nav request)
3 years ago
ocornut 607ad8c949 Drag and Drop: Fixed using BeginDragDropSource() within a Begin()/BeginChild() that returned false. (#4515) + BeginDragDropTarget()
Note how 79ae6d3b adedd a SkipItems test in BeginDragDropTargetCustom() only.
Catching this similar to work needed to neatly represent the error in #4375 #4158, #4008, #2562
3 years ago
ocornut ade4c15eea Nav: Tidying up, renaming + update AnyRequest flag in NavMoveRequestSubmit(). 3 years ago
ocornut 5ee40c8d34 Nav: always disable highlight if nav is disabled, fix for IMGUI_DEBUG_NAV_SCORING, minor renaming. 3 years ago
ocornut dff15acdb5 Nav: Fixed toggling menu layer with Alt exiting menu layer with Esc not moving mouse when NavEnableSetMousePos config flag is set. 3 years ago
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)
3 years ago
ocornut 73a5e82e04 Nav: removed parameters from NavScoreItem(), NavProcessItem(), NavApplyItemToResult(): made little sense / misleading because pulling from other current state anyway.
Will readd in a more thorough manner is actually needed.
3 years ago
ocornut a735a8c084 Nav: storing NavRect in LastItemData. Fix race condition where framed items (Rect != NavRect) calling SetFocusID() would store the wrong NavRectRel until next frame
(haven't dugged in the possible side-effects of that race condition)
3 years ago
ocornut ee351d3548 Nav: move code into NavMoveRequestSubmit(). NavApplyItemToResult() takes absolute rect., comments 3 years ago
ocornut 7b913db1ce Nav: split NavMoveRequest into NavMoveSubmitted + NavMoveScoringItems to allow operation to defer a move request and provide result immediately + fix regular scoring needlesly running during init + some renaming. 3 years ago
ocornut 4aea1c5adb IO: added io.WantCaptureMouseAllowPopupClose (#4480) + comments 3 years ago
ocornut 66102880a3 Updated links to Discussions 3 years ago
ocornut 333807b483 Windows: fixed background order of overlapping childs submitted sequentially. (#4493)
Amend 07704496
3 years ago
ocornut bb6a60b1ff Nav: extracted sections of NavUpdate() into a NavUpdateCreateMoveRequest() function. Only clearing results when a request is activated. 3 years ago
ocornut ccfb20095e Nav: small refactor of forwarding, clarified that MoveDir only set when RequestActive, removed one indent level in NavUpdatePageUpPageDown(). 3 years ago
ocornut 20a1edef89 Nav: made EndMenuBar() use NavMoveRequestForward() for consistency. Moved forward clearing to NavMoveRequestApplyResult(). Improved/fixed comments. 3 years ago
ocornut 84890a3074 Nav: simplify wrap requests code (may soon be useable for tabbing) 3 years ago
ocornut 4c31c98d22 Nav: extracted code out of NavUpdate() into NavUpdateCancelRequest() 3 years ago
ocornut e23bee353c Removed GetWindowContentRegionWidth() function 3 years ago
ocornut 0649f750b4 Version 1.85 WIP 3 years ago
ocornut d79ca9b0b6 Fixed nested BeginDisabled()/EndDisabled() calls. (#211, #4452, #4453, #4462) [Legulysse] 3 years ago
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)
3 years ago
ocornut f969e68c10 Fix BeginDisabled(false), (#211, #4452) 3 years ago
ocornut d2ffbd9b86 Version 1.84
Fix PVS Studio false positive //-V1020
Fix missing #ifndef for IMGUI_IMPL_OPENGL_LOADER_CUSTOM path
3 years ago
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.
3 years ago
ocornut c543d93af1 Expose BeginDisabled()/EndDisabled() in public API. Add to demo. (#211) 3 years ago
ocornut 7bbf8f2ab0 Drag and Drop: fix using AcceptDragDropPayload() with ImGuiDragDropFlags_AcceptNoPreviewTooltip.
Window was not properly hidden in that case.
3 years ago
ocornut cd39460925 IO: set io.KeyModsPrev in EndFrame() to tolerate backend writing to io.KeyMods without breaking. (#4439)
Amend ff428f1
3 years ago