ocornut
4540177ce7
Nav: clear activeid on menu toggle (so pressing Alt leaving an InputText will steal ActiveID. Previously wouldn't not, but ButtonBehavior() hover logic would not show Menu layer item as hovered when ActiveId != 0). ( #787 )
...
(Adjacent to #370 )
2021-04-23 18:50:46 +02:00
ocornut
e61e8aea9c
Nav: clear navid in NavInitWindow() when window is marked with ImGuiWindowFlags_NoNavInputs. ( #787 )
...
(no expected side-effects, maybe consistency, but those NavLastIds[] values would likely have been 0 already)
2021-04-23 18:50:46 +02:00
ocornut
daf97832f1
Internals: Nav: renaming.
2021-04-23 18:39:08 +02:00
ocornut
bfc4a3347a
Nav: Fixed using SetItemDefaultFocus() on windows with _NavFlattened flag + tools in metrics.
2021-04-22 16:21:29 +02:00
ocornut
33cdbe97b8
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui_internal.h
2021-04-19 20:05:59 +02:00
ocornut
936f53229d
Internals: maintaining focus order inside windows + only storing root windows in WindowsFocusOrder[] array. (toward #2304 )
2021-04-16 19:28:24 +02:00
ocornut
34d4bc620d
Merge remote-tracking branch 'origin/master' into docking
...
# Conflicts:
# backends/imgui_impl_opengl3.cpp
2021-04-15 19:57:52 +02:00
ocornut
5fed6bdc72
Demo: Improved popups demo and comments.
2021-04-15 15:58:12 +02:00
ocornut
b957300260
Documentation tweaks ( #4042 )
2021-04-14 15:46:55 +02:00
ocornut
e5efa01920
Docking: Fix window menu button. Broken by 3f16a52
( #4043 )
...
Worked on single-frame click.
2021-04-14 14:35:11 +02:00
ocornut
3f16a524c8
Docking: move NavWindow to SelectedTabId application lower to leave a chance for in-between code to alter focus. + store per-node window menu button id to simplify usage.
2021-04-13 18:45:08 +02:00
ocornut
646c873598
Docking: Fixed reappearing docked windows with no close button showing a tab with extraneous space for one frame.
2021-04-13 16:12:14 +02:00
ocornut
e87dd0e65d
Docking: Fixed multiple simultaneously reappearing window from appearing undocked in their initial frame.
2021-04-12 19:47:37 +02:00
ocornut
539de4387b
Docking: Fixed restoring of tab order within a dockspace or a split node.
...
(tests in "docking_tab_order")
2021-04-12 16:51:05 +02:00
ocornut
d6a5cc7934
Metrics: hotfix (fix 6ba13349
+ f08566b4
, #4005 )
2021-04-07 17:57:14 +02:00
ocornut
92b7b1f72b
Scrolling: Fix mouse wheel axis swap when using SHIFT on macOS (system already does it). ( #4010 )
2021-04-06 17:51:21 +02:00
ocornut
00d570e280
Added OpenPopup() ImGuiID overload ( #3993 , #331 )
2021-04-01 17:18:18 +02:00
ocornut
65cd14502c
Fix popup positioning, broken by 84e6fe4
. ( #3991 , #3982 )
2021-03-31 19:10:12 +02:00
ocornut
f0fc822837
Fix popup positioning, broken by 84e6fe4
. ( #3991 , #3982 )
2021-03-31 19:09:08 +02:00
ocornut
6ddcdbe3e8
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui_widgets.cpp
2021-03-31 16:41:17 +02:00
ocornut
3c7177c6a7
Internals: storing WindowsHoverPadding in context for external access. + Docs update binaries
2021-03-31 16:06:36 +02:00
ocornut
45c45d2506
Internals: shallow tidying up of the old resize border structure. Make them match the ImGuiDir order. Split GetWindowResizeID() into GetWindowResizeCornerID() and GetWindowResizeBorderID().
2021-03-30 16:44:47 +02:00
ocornut
3ed07a8f0b
Docking: removed io.ConfigDockingWithShift option. ( #2109 )
2021-03-30 15:00:16 +02:00
ocornut
84e6fe4fc7
Fix IsWindowAppearing() from returning true twice in most cases. ( #3982 , #1497 , #1061 )
2021-03-29 19:45:55 +02:00
ocornut
5991851eb9
Docking: DockSpace() returns its node ID + adding branch changelog.
2021-03-26 18:40:19 +01:00
ocornut
b305953bd1
Viewports: Hotfix for crash in monitor array access, caused by 4b9bc4902
. ( #3967 )
2021-03-25 17:13:25 +01:00
ocornut
e7577d570e
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_dx9.cpp
# backends/imgui_impl_sdl.cpp
# backends/imgui_impl_win32.cpp
# imgui.cpp
# imgui_internal.h
# imgui_widgets.cpp
2021-03-25 16:57:01 +01:00
ocornut
a58271c079
Internals: extracted a more reusable BeginViewportSideBar() out of BeginMainMenuBar(). ( #3966 , #3518 )
...
Complement ca34c81c
in docking branch which removed assumption that we can't tell size ahead of Begin().
2021-03-25 16:20:42 +01:00
ocornut
ca34c81ce9
BeginMainMenuBar(): remove expectation that we don't know menu bar height ahead, allowing up to generalize placement in any direction (will be done in master)
...
Amend 75de34e281
2021-03-25 15:21:23 +01:00
ocornut
aa5431fde2
Tables: Expose TableSetColumnEnabled() in public api. ( #3935 )
2021-03-24 14:36:01 +01:00
ocornut
59da01901e
Scrolling: Fix scroll tracking with e.g. SetScrollHereX/Y() when WindowPadding < ItemSpacing. Fix scroll snapping on edge of scroll region when both scrollbars are enabled.
...
CalcNextScrollFromScrollTargetAndClamp() fixed snapping edge calculation missing ScrollbarSizes.y
2021-03-19 16:58:23 +01:00
ocornut
412d6f7efe
Fixes zealous MSVC static analyzers warnings ( #3938 )
...
Other unfixed as I'm not happy with caving to false positives of every analyzers.
2021-03-18 16:10:25 +01:00
Rokas Kupstys
0c5b0c8b97
Internals: Add a way to request window to not process any interactions for specified number of frames.
2021-03-18 14:19:23 +01:00
Rokas Kupstys
b17bfdd6f4
Docking: Add support for split_outer in DockContextCalcDropPosForDocking().
...
Misc: Add FIXME regarding behavior of some window fields.
2021-03-18 12:21:47 +01:00
ocornut
81e0b18e38
Merge branch 'master' into docking
2021-03-16 16:10:29 +01:00
ocornut
b202fa9063
Docking: undocking nodes/windows covering most of the monitor max their size down to 90% to ease further manipulations.
...
Kind of a welcome hack.
2021-03-16 16:01:12 +01:00
ocornut
a1a39c632a
Version 1.83 WIP
2021-03-16 14:45:30 +01:00
ocornut
2231e1a369
Docking: Dockspace() never draws a background. ( #3924 )
2021-03-16 14:30:36 +01:00
ANF-Studios
ebe6ac5fb5
Improvements to minor mistakes in documentation comments ( #3923 )
2021-03-16 12:44:16 +01:00
ocornut
256594575d
Merge branch 'master' into docking
...
# Conflicts:
# docs/CHANGELOG.txt
# imgui.cpp
2021-03-15 20:38:34 +01:00
ocornut
35b1148efb
Version 1.82
2021-03-15 20:26:48 +01:00
ocornut
352f64697c
Internals: rename legagy tab focus fields to TabFocusXXXX for clarity + removed one unnecessary FocusWindow() call.
2021-03-15 20:10:08 +01:00
CheckmateAt7
cfe83c4b44
Removed deprecated flag stopping compilation ( #3902 )
2021-03-12 18:02:46 +01:00
ocornut
0157502eab
ImDrawFlags: rework/revert c2d6d26
+ 39432bf
in a way that is closer to old version and back to opt-in but with default 0 = all corners.
2021-03-12 16:33:29 +01:00
ocornut
033dfd9d35
ImDrawFlags: rework/revert c2d6d26
+ 39432bf
in a way that is closer to old version and back to opt-in but with default 0 = all corners.
2021-03-12 16:31:46 +01:00
ocornut
f1bf642e8f
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui.h
# misc/debuggers/imgui.natvis
2021-03-11 16:32:14 +01:00
ocornut
39432bfd9c
Amend 0c93238a ImDrawList: upgraded AddRect(), AddRectFilled(), PathRect() to use general ImDrawFlags instead of ImDrawCornersFlags
2021-03-11 16:03:45 +01:00
Rokas Kupstys
c2d6d26139
ImDrawList: upgraded AddRect(), AddRectFilled(), PathRect() to use general ImDrawFlags instead of ImDrawCornersFlags
2021-03-11 16:03:32 +01:00
ocornut
8b9fedba28
Moved Obsolete function block lower in the file + obsoleted old SetScrollHere (->SetScrollHereY)
2021-03-11 12:16:52 +01:00
ocornut
8ed34af6f8
ImDrawList: clarified that PathArcTo()/PathArcToFast() cannot take radius < 0.0f. ( #3491 ) + changed poor-man ceiling in _CalcCircleAutoSegmentCount() to use 0.999999f to reduce gaps
...
Previously it sorts of accidentally worked but would lead to counter-clockwise paths which and have an effect on anti-aliasing.
2021-03-11 10:51:20 +01:00
ocornut
4b9bc49020
Viewports, Internals: added GetViewportPlatformMonitor() will a safety net to keep code portable + simplified handling of disconnected monitor in Begin().
2021-03-10 17:10:07 +01:00
ocornut
6ba1334903
Nav: internals: renaming ImGuiInputSource so it is not specific to nav. Comments.
2021-03-10 16:36:39 +01:00
Rokas Kupstys
01a2bac7d5
DrawList: Replace "bool close" in drawing functions with flags.
2021-03-10 12:57:01 +01:00
ocornut
a64e0eb3a4
Nav: merged SetNavID() and SetNavIDWithRectRel() to improve sanity, moved flags overwrite off them. ( #787 )
2021-03-09 17:21:01 +01:00
ocornut
1c9cc7c117
Nav: tweaks so docking can use same code. NavRestoreLayer restore nav id but Menu key typicallys clears it for menu layer (+ less relying on _ChildWindow flag).
2021-03-09 16:57:13 +01:00
ocornut
4bb5a36f90
Nav: do not clear per-window NavId when window reappears. Process NavInit regardless of current highllight state. Consistently set g.NavLayer in SetNavID(). ( #787 )
2021-03-09 12:39:18 +01:00
ocornut
954b06afe2
Drag and Drop: can use BeginDragDropSource() for other than the left mouse button ( #1637 , #3885 )
...
As long as the item has an ID (for ID-less items will add new functionalities later.
Amend 2c3c5125
2021-03-08 15:50:53 +01:00
ocornut
d5a4d53000
Viewports, Backend: SDL: Fix missing ImGuiBackendFlags_HasSetMousePos flag in docking branch (ok in master), GLFW: Fix application of WantSetMousePos. ( #1542 , #787 )
...
Shows how little this feature is used with nav (was designed for small devices and frankly may be dropped) - but the backend support itself we will make use of for other features.
2021-03-05 17:22:22 +01:00
ocornut
705f082674
Internals: rename RootWindow->RootWindowDockTree, RootWindowDockStop->RootWindow.
...
Why? So by default RootWindow matches user expectation on both branches, and RootWindowDockTree is more intentful.
(Actually should reduce diff between master<>docking)
2021-03-05 16:24:29 +01:00
ocornut
80533ea5e1
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui_widgets.cpp
2021-03-05 16:04:15 +01:00
ocornut
fdebb2e093
Internals: removed HoveredRootWindow, tweak IsWindowHovered().
2021-03-05 15:56:59 +01:00
ocornut
ee643b2ad9
IsItemHovered(): fixed return value false positive when used after EndChild(), EndGroup() or widgets using either... ( #3851 , #1370 )
...
...when the hovered location is located within a child window, e.g. InputTextMultiline().
This is intended to have no side effects, but brace yourself for the possible comeback..
This essentially makes IsItemHovered() not accept hover from child windows, but EndChild/EndGroup are forwarded.
More or less should fix/revert c76f014292
which was a revert of 344d48be3
2021-03-04 19:59:59 +01:00
ocornut
3e6dfd3c1a
ImDrawList: AddImageRounded() compare texid from cmdheader as with other functions. + Made the ImGuiMemAllocFunc / ImGuiMemFreeFunc consistent with our other typedefs ( #3836 )
2021-03-04 14:29:01 +01:00
ocornut
6aee4bcdc5
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_dx9.cpp
# backends/imgui_impl_win32.cpp
# docs/CHANGELOG.txt
# imgui.cpp
2021-03-02 18:27:07 +01:00
ocornut
25679a411e
Window, Nav: Fixed crash when calling SetWindowFocus(NULL) as the time a new window appears. ( #3865 )
2021-03-02 18:23:08 +01:00
ocornut
b794ecc079
Internals: Docking: some renaming.
2021-03-02 12:12:38 +01:00
Rokas Kupstys
839ecce571
Internals: Add a way to request window to not process any interactions for specified number of frames.
2021-02-25 15:12:53 +01:00
ocornut
760c394707
Added links to Discussions. Closed Discord, yeah! ( #2748 )
2021-02-25 00:47:37 +01:00
ocornut
6f4b9c65ae
Added commentary about DLL boundaries. Added GetAllocatorFunctions(). Tidying up. ( #3836 )
2021-02-24 19:38:39 +01:00
ocornut
edf135c18d
Win32+MinGW: Re-enabled IME functions by default even under MinGW. ( #2590 , #738 )
2021-02-22 14:39:44 +01:00
David Maas
ece854564a
Log/Capture: Added LogTextV, a va_list variant of LogText. ( #3828 )
2021-02-22 11:58:51 +01:00
ocornut
3ec14186cb
Viewports: Fix setting of ImGuiViewportFlags_NoRendererClear. ( #3213 )
2021-02-18 14:11:14 +01:00
ocornut
ffa863a3ba
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_dx10.cpp
# backends/imgui_impl_dx11.cpp
# backends/imgui_impl_dx12.cpp
# backends/imgui_impl_dx9.cpp
# backends/imgui_impl_opengl3.cpp
# backends/imgui_impl_win32.cpp
# docs/CHANGELOG.txt
# examples/example_glfw_vulkan/main.cpp
# examples/example_sdl_vulkan/main.cpp
# imgui.cpp
2021-02-18 11:41:27 +01:00
ocornut
fb15d8c858
Improve on automatic circle segment count calculation. ( #3808 ) Amends
2021-02-17 14:22:31 +01:00
thedmd
f107693d9b
Improve on automatic circle segment count calculation. ( #3808 )
2021-02-17 12:55:39 +01:00
ocornut
30b7545841
Version 1.82 WIP
2021-02-15 18:10:14 +01:00
ocornut
3d75f438bc
Docking: Made close button enable logic consistent on dockspace. When no docked window have a close button or it is disabled on the node, the space is given to tabs.
...
Clarified close_button_is_visible vs close_button_is_enabled behavior in DockNodeUpdateTabBar().. (#3633 , #3521 )
Reduced alpha of disabled close button a little bit further.
Removed 'EnableCloseButton' which was actually unused (can't be infered early, need ->VisibleWindow anyway, which is not == ->ActiveWindow)
2021-02-12 21:17:31 +01:00
ocornut
61b19489f1
Made a change to CalcWindowSizeAfterConstraint() which MSVC optimizer seems to trip on. (read on)
...
We seldomly modify a local ImVec2 passed as parameter. This should be perfectly legal but libigl stumbled on a what may be a MSVC optimizer bug?
Only seven function in the codebase modify as 'ImVec2 parameter' but this is the only static one (and fairly small that is) which may tempt optimizer to perform optimizations over caller-callee boundaries?
While we can't explain it fully yet and I assume it may haunt us back someday. Might also be chain reaction from some unobvious UB but can't see it right now...
Link: https://github.com/libigl/libigl/issues/1669
2021-02-12 16:34:22 +01:00
ocornut
239d09804d
Merge branch 'master' into docking
...
# Conflicts:
# docs/CHANGELOG.txt
2021-02-10 21:28:16 +01:00
ocornut
4df57136e9
Version 1.81
2021-02-10 21:16:58 +01:00
ocornut
04f7ea818d
Viewports: Setting the new (currently dummy) flags on viewports. ( #3789 , #1542 , #3680 , #3350 , #3012 , #2471 )
...
Amend the merging of f14042ca78
(merge ee59d7a266
)
2021-02-10 16:42:22 +01:00
ocornut
ee59d7a266
Merge branch 'features/viewport_in_master' into docking (WIP need adding code for new ImGuiViewportFlags values)
...
# Conflicts:
# imgui.cpp
# imgui.h
# imgui_demo.cpp
# imgui_internal.h
# imgui_widgets.cpp
2021-02-10 16:34:17 +01:00
ocornut
f14042ca78
Viewports Added ImGui::GetMainViewport() as a way to get the bounds and work area of the host display. ( #3789 , #1542 )
...
Viewports: Backport a few constructs from 'docking' branch.
Viewports: Added ImGuiViewportFlags_IsPlatformWindow, ImGuiViewportFlags_IsPlatformMonitor, ImGuiViewportFlags_OwnedByApp (none of them were in docking branch yet). ImGuiViewportFlags_IsPlatformMonitor is merely there to convey future intent, not yet used.
Reduce uses of io.DisplaySize.
MainMenuBar: Backport work area handling code from 'docking' branch.
Metrics: Backported "Viewports" debug visualizer from 'docking' branch.
Demo: Rework 'Examples->Fullscreen Window'.
Demo: 'Simple Overlay' demo now moves under main menu-bar (if any) using GetMainViewport()'s work area.
2021-02-10 16:09:53 +01:00
ocornut
3607c42bec
Viewports: Fix issue inferring viewport z-order when new popups gets created. ( #3734 ) + Metrics updates.
...
Revert 6bc52667
Showing inferred order and missing flags in metrics.
2021-02-10 14:31:23 +01:00
ocornut
2a5eaf239f
Misc tweaks - mostly toward minimizing diff in upcoming backport merge of a few viewport structures in master
2021-02-10 14:28:04 +01:00
ocornut
7a516a266d
Merge remote-tracking branch 'origin/master' into docking
...
# Conflicts:
# backends/imgui_impl_dx12.cpp
# backends/imgui_impl_dx9.cpp
# imgui.cpp
# imgui.h
2021-02-09 13:17:24 +01:00
ocornut
73ccb7e4b8
Viewports: (Breaking) turned GetWorkPos(), GetWorkSize() into straight fields -> WorkPos, WorkSize before exposing in master branch.
2021-02-09 13:15:01 +01:00
ocornut
1a3af8cb4c
Viewports: trying to treat GetMainViewport() as const. Reducing unnecessary casts of ImGuiViewportP*
...
Metrics: readded root Drawlists node in metrics to match master.
The (void*) casts are implying const-casst but currently left GetMainViewport() as returning non-const.
2021-02-09 13:15:01 +01:00
ocornut
fa55b0cb60
Viewports: (breaking) removed ImGuiPlatformIO::MainViewport which is now pretty much unused and duplicate (and misleading as we will evolve the concept)
...
Use GetMainViewport() if stuck.
2021-02-05 16:14:47 +01:00
ocornut
58a0a7058c
Backends: Using SetTexID() consistently instead of assigning to ->TexID. May make the later obsolete eventually.
2021-02-03 18:30:26 +01:00
ocornut
03d74a293d
ListBox: renamed ListBoxHeader>BeginListBox, ListBoxFooter>EndListBox. Added demo bits.
2021-02-03 16:33:22 +01:00
ocornut
e5cbf60def
ListBox: tweaked default height calculation. simplifying code internally (rework passing of full rect). Should have no visible side-effects + misc comments.
2021-02-03 14:54:56 +01:00
ocornut
22d9a61b33
Docking: fix gap in hit test hold when using ImGuiDockNodeFlags_PassthruCentralNode touching the edge of a viewport. ( #3733 )
2021-02-02 15:16:46 +01:00
ocornut
a3f0393351
Menus: Fixed an issue with child-menu auto-sizing (issue introduced by 6af92b0
) ( #3779 )
2021-02-02 13:06:51 +01:00
ocornut
929563c3a7
Log/Capture: Fixes for handling \n in strings. Improve the look of various widgets. Added LogSetNextTextDecoration helper. Fixup/amend dbaf74d75
.
...
For now removed LogRenderedTextNewLine() - it is eventually desirable but currently carries too much ambiguities, so reverted until we have a better system and test suite.
2021-02-02 12:29:58 +01:00
Louis Schnellbach
dbaf74d758
Log/Capture: Fix various new line/spacing issue by using same render text position when there are both RenderText and LogRenderedText call in widget code.
...
Also Buttons are now enclosed in bracket
2021-02-02 09:38:57 +01:00
GamingMinds-DanielC
84e8802891
Docking: on node split, update memorized DockId for currently closed windows ( #3716 )
...
Amended by @ocornut with same fix in DockBuilderRemoveNodeChildNodes().
2021-02-01 17:56:20 +01:00
ocornut
4622fa4b66
Fonts: Fixed CalcTextSize() width rounding so it behaves more like a ceil. ( #3776 )
...
his is in order for text wrapping to have enough space when provided width precisely calculated with CalcTextSize().x. Amend 7b0bf230
.
Note that the rounding of either positions and widths are technically undesirable (e.g. #3437 , #791 ) but variety of code is currently on it so we are first fixing current behavior before we'll eventually change it.
2021-02-01 12:49:18 +01:00
ocornut
577e7cb493
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_win32.cpp
# docs/CHANGELOG.txt
# imgui.cpp
2021-01-28 21:02:13 +01:00
ocornut
9499afdf5e
imgui_freetype: clarify breaking changes, and add BuildFontAtlas() to be consistent with planned obsolescence. Rename mislabelled internal helper. Demo: clarify labels in nested table demo. ( #3765 )
2021-01-28 20:53:53 +01:00