Commit Graph

1726 Commits

Author SHA1 Message Date
ocornut
dc8c3618e8 Merge branch 'master' into docking
# Conflicts:
#	imgui_demo.cpp
2021-11-10 15:26:03 +01:00
ocornut
eb02dcf87f Nav: enable move/resize window with keyboard in Ctrl+Tabbing windowing menu even without _NavEnableKeyboard. (#4023, #787). 2021-11-08 18:42:07 +01:00
ocornut
b17dffffb3 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
2021-11-04 20:52:54 +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
c1d2793580 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
2021-11-04 15:26:01 +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
ocornut
0b4edf4e94 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_vulkan.cpp
#	imgui.cpp
2021-11-03 11:51:37 +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
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)
2021-10-27 12:28:45 +02:00
ocornut
9b59455184 Merge branch 'master' into docking
# Conflicts:
#	imgui.h
2021-10-15 11:49:30 +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
1b215ecb01 Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	imgui.cpp
2021-10-11 19:25:50 +02:00
ocornut
55d35d8387 Version 1.85 2021-10-11 19:24:25 +02:00
ocornut
44f801186f SetItemDefaultFocus() use ScrollToRectEx(), don't tab when Alt is held either, TabItemEx() uses ItemAdd's extra_flags, misc comments. 2021-10-08 15:24:54 +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
1780579403 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
2021-10-06 17:57: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
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
835a5344b0 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_win32.cpp
#	imgui.cpp
#	imgui.h
#	imgui_demo.cpp
#	imgui_internal.h
2021-09-24 15:49:28 +02:00
ocornut
65ad63de84 Added ImGuiFocusedFlags_NoPopupHierarchy and ImGuiHoveredFlags_NoPopupHierarchy (followup #4527)
IsWindowFocused: fix flag usage (amend 6b1e094c) was technically harmless because of light typing.
2021-09-24 15:41:30 +02:00
ocornut
fc4988ffb0 Added ImGuiFocusedFlags_NoPopupHierarchy and ImGuiHoveredFlags_NoPopupHierarchy (followup #4527) 2021-09-24 15:39:38 +02:00
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) 2021-09-22 15:50:40 +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
3973de7933 Internals: removed last parameter to IsClippedEx() + fix PVS studio warnings. 2021-09-16 18:07:17 +02:00
ocornut
2d0a6a4969 Misc: moved StacSizeOnBegin out of window instance into window stack data. 2021-09-15 15:36:03 +02:00
ocornut
66cd21db88 Misc: extracted ErrorCheckEndWindowRecover() out of ErrorCheckEndFrameRecover(). (#1651) 2021-09-15 15:26:29 +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
e7cc534367 Docking: Improved resizing system so that non-central zone are better at keeping their fixed size. 2021-09-14 17:57:47 +02:00
ocornut
29828d0469 Docking: floating node with a central node hides properly when nothing is docked + rename. 2021-09-14 17:56:09 +02:00
ocornut
6b1e094cfb Fixed _ChildWindows from leaking docking hierarchy. Added ImGuiFocusedFlags_DockHierarchy and ImGuiHoveredFlags_DockHierarchy. 2021-09-08 19:10:25 +02:00
ocornut
fa9fc05ac6 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
2021-09-07 18:20:12 +02:00
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)
2021-09-07 18:10:31 +02:00
ocornut
ade4c15eea Nav: Tidying up, renaming + update AnyRequest flag in NavMoveRequestSubmit(). 2021-09-03 16:35:41 +02:00
ocornut
5ee40c8d34 Nav: always disable highlight if nav is disabled, fix for IMGUI_DEBUG_NAV_SCORING, minor renaming. 2021-09-02 12:05:32 +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
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.
2021-09-01 14:13:40 +02:00
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)
2021-09-01 12:12:51 +02:00
ocornut
ee351d3548 Nav: move code into NavMoveRequestSubmit(). NavApplyItemToResult() takes absolute rect., comments 2021-09-01 12:06:15 +02:00
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. 2021-08-31 18:19:52 +02:00
ocornut
dedb381c51 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_opengl3.cpp
#	examples/imgui_examples.sln
#	imgui.cpp
#	imgui.h
2021-08-30 20:01:16 +02:00
ocornut
7c4ffe490d Menus: added internal's BeginMenuEx() matching MenuItemEx() with icon parameter. (amend f8fae022) 2021-08-30 19:54:42 +02:00
ocornut
ccfb20095e Nav: small refactor of forwarding, clarified that MoveDir only set when RequestActive, removed one indent level in NavUpdatePageUpPageDown(). 2021-08-27 20:48:01 +02:00
ocornut
4351febe9f Nav: moved enums/struct declarations in imgui_internal.h 2021-08-27 18:01:38 +02:00
ocornut
20a1edef89 Nav: made EndMenuBar() use NavMoveRequestForward() for consistency. Moved forward clearing to NavMoveRequestApplyResult(). Improved/fixed comments. 2021-08-27 17:21:10 +02:00
ocornut
84890a3074 Nav: simplify wrap requests code (may soon be useable for tabbing) 2021-08-27 12:31:11 +02:00
ocornut
51d841dcf3 Fix warnings and remove IM_RETURN (#4470)
Amend f24abbc4
2021-08-24 14:37:11 +02:00
ocornut
0649f750b4 Version 1.85 WIP 2021-08-23 15:31:06 +02:00
ocornut
5a7d18a441 Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
2021-08-20 18:15:25 +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