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
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
ocornut
9c3359ef39
IO: modify io.AddFocusEvent() to tolerate in/out for multi-viewports. Amend 2f40be6
. ( #3532 )
2021-08-19 17:35:27 +02:00
ocornut
0b06c4b2b0
Merge branch 'master' into docking (will need further for io.AddFocusEvent)
...
# Conflicts:
# backends/imgui_impl_glfw.cpp
# backends/imgui_impl_opengl3.cpp
# backends/imgui_impl_sdl.cpp
# backends/imgui_impl_win32.cpp
# imgui.cpp
2021-08-19 17:25:12 +02:00
ocornut
7bbf8f2ab0
Drag and Drop: fix using AcceptDragDropPayload() with ImGuiDragDropFlags_AcceptNoPreviewTooltip.
...
Window was not properly hidden in that case.
2021-08-18 15:40:22 +02:00
ocornut
cd39460925
IO: set io.KeyModsPrev in EndFrame() to tolerate backend writing to io.KeyMods without breaking. ( #4439 )
...
Amend ff428f1
2021-08-17 20:33:27 +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
Rokas Kupstys
86afe966d3
Metrics: Fixed a crash when inspecting the individual draw command of a foreground drawlist.
2021-08-17 16:23:26 +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
8fa502ca42
Nav: Alt doesn't toggle menu layer if other modifiers are held. ( #4439 )
2021-08-17 12:23:54 +02:00
ocornut
f9b5168fb3
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_glfw.cpp
# backends/imgui_impl_sdl.cpp
# backends/imgui_impl_win32.cpp
# imgui.cpp
2021-08-02 16:00:50 +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
Rokas Kupstys
3e4c89051d
Popups: Fix OpenPopup() being called after BeginPopup() resulting in a failure to open a popup when focus is NULL. ( #4308 )
...
Story of removed line begins in commit b80cf0a. It's purpose was to close popups when they lost focus.
Later on few other changes were introduced:
* bcc49ff - closing popups with RMB without changing window focus
* af679a1 - closing popups in FocusWindow()
These two changes covered all the cases of popup closing which made deleted line obsolete. Conveniently, now all popup closing is handled from within UpdateMouseMovingWindowEndFrame() either by calling FocusWindow() or ClosePopupsOverWindow().
2021-07-26 11:43:39 +02:00
ocornut
7bfc379a23
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui_internal.h
2021-07-19 21:58:06 +02:00
ocornut
c881667c00
Fix - amend 1ad1530
(range-select branch need the NextItemData in NavProcessItem)
2021-07-19 21:45:44 +02:00
ocornut
90bf996e1a
Internals: widgets always read back from g.LastItemData.InFlags (so we can now modify per-item disable state more easily). ( #211 )
2021-07-19 21:26:34 +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
ocornut
246ad6c03c
Disabled: items more consistently release active id if the active item got disabled. ( #211 ) (amend 2952525
)
2021-07-12 15:39:47 +02:00
ocornut
638e1a721b
Disabled: fixed IsItemHovered() returning true on disabled item when navigated to. ( #211 )
2021-07-12 15:01:02 +02:00
ocornut
a11f36811f
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_glfw.cpp
# backends/imgui_impl_opengl3.cpp
# backends/imgui_impl_sdl.cpp
# backends/imgui_impl_vulkan.cpp
# backends/imgui_impl_win32.cpp
# imgui.cpp
# imgui_internal.h
2021-07-09 20:16:19 +02:00
Rokas Kupstys
5dd1e38b7a
Disabled: disabled items set HoveredId, allowing e.g. HoveredIdTimer to function. ( #211 , #3419 ) + Menus: fix hovering a disabled menu or menu item not closing other menus.
...
Rework of https://github.com/rokups/imgui/commit/c24b470
Note that the declared intent of that commit "Prevents window from being dragged if mouse hovers a disabled item." was already fullfilled by a876ad87
.
Changes in ButtonBehavior() not needed anymore since ImGuiButtonFlags_Disabled is gone
2021-07-09 19:54:46 +02:00
ocornut
4a100f7f11
Nav: Disabled items are not candidate for default focus. ( #211 , #787 ) + simplify handling of ImGuiButtonFlags_PressedOnDragDropHold path.
2021-07-09 18:57:23 +02:00
ocornut
cc40ae2101
PushDisabled(): added bool + clarify support for stacked disabled ( #211 )
2021-07-08 19:21:59 +02:00
ocornut
30d164eb26
Backends: Win32: IME functions are disabled by default for non-Visual Studio compilers (MinGW etc.) ( #2590 , #738 , #4185 , #4301 )
...
Enable with '#define IMGUI_ENABLE_WIN32_DEFAULT_IME_FUNCTIONS' for those compilers. Undo change from 1.82.
2021-07-08 14:23:31 +02:00
ocornut
3512f2c2c2
Internals: Menus: minor tidying up + renaming in ImGuiMenuColumns + removing extraneous offset field which is always zero + using smaller types.
...
sizeof() 36 -> 20
2021-07-07 20:16:55 +02:00
ocornut
eb6f4b1a6a
Docking: Fix crash when a dock node gets re-qualified as dockspace>floating>dockspace.. ( #3203 , #4295 )
...
Which tends to happen when incorrectly calling DockBuilderAddNode() without ImGuiDockNodeFlags_Dockspace and using it as a Dockspace on the next frame after the floating window hosting the node has been automatically created.
2021-07-07 18:22:55 +02:00
ocornut
cd4cc9ff0d
Docking: Fixed crash issues using DockBuilderRemoveNode() in some situations. ( #3111 , #3179 , #3203 , #4295 )
...
If the deleted root node isn't part of a dockspace with a central node, it won't be "protected" but removed when last window gets removed.
2021-07-07 16:39:39 +02:00
ocornut
9e8e5ac363
Docking: Added ImGuiDockNodeFlags_NoDockingOverEmpty. Breaking definition of ImGuiDockNodeFlags_NoDockingOverOther which now means "non empty node". ( #3492 , #2648 , #4292 )
2021-07-05 13:32:36 +02:00
ocornut
6136b3844b
Docking: Reworked node flags saving/inheritance... ( #4292 , #3834 , #3633 , #3521 , #3492 , #3335 , #2999 , #2648 )
...
..so that flags enforced by docked windows via the DockNodeFlagsOverrideSet mechanism are are not left in empty dockspace nodes once the windows gets undocked.
2021-07-05 13:31:34 +02:00
ocornut
0a8ab75e4b
Docking: removed DockNodeFlagsOverrideClear flags from ImGuiWindowClass. ( #2999 , #3521 , #3633 )
...
+ extraded bits of metrics into DebugNodeDockNodeFlags()
2021-07-05 12:58:33 +02:00
ocornut
4ddb6b46c3
Drag and Drop: drop target highlight doesn't try to bypass host clipping rectangle. ( #4281 , #3272 )
...
Revert 4b94738c
2021-06-30 16:12:52 +02:00
ocornut
0f7eb00f67
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:31:05 +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
682447306d
Merge branch 'features/backends_context' 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_glfw.cpp
# backends/imgui_impl_opengl2.cpp
# backends/imgui_impl_opengl3.cpp
# backends/imgui_impl_sdl.cpp
# backends/imgui_impl_vulkan.cpp
# backends/imgui_impl_win32.cpp
# examples/example_apple_opengl2/main.mm
2021-06-29 14:53:25 +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
95db098477
ImFontAtlas: move implicit AddFontDefault call to Build() function + remove unnecessary asserts in backend.
2021-06-25 17:27:17 +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
ac35b4bba2
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_opengl3.cpp
# imgui.cpp
# imgui.h
# imgui_demo.cpp
2021-06-24 18:21:19 +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
cce307a2be
Viewports: Fix popup/tooltip created without a parent window from being given a ParentViewportId value of the implicit/fallback window. ( #4236 , #2409 )
...
Amend 3ead9820
2021-06-17 16:22:14 +02:00
ocornut
afabb2f3d8
Viewport: extracted code out of Begin() into WindowSyncOwnedViewport() - no other change
2021-06-17 16:12:22 +02:00
ocornut
9b417b26d9
Metrics: Tentative fix for bad printf format.
...
Ref b53b8f58df
, a7a1b3b0a7
2021-06-14 18:24:45 +02:00
ocornut
db0338a1f2
Nav, Drag and Drop, Docking: fixed two issues leading nav result to conflict with moving a window. ( #4211 , #3025 )
2021-06-09 19:20:13 +02:00
ocornut
4161a67b38
ImVector: added clear_delete(), clear_destruct() helpers.
...
# Conflicts:
# imgui.cpp
2021-06-09 18:44:02 +02:00
ocornut
865b2ca6f9
Added PushDisabled(), PopDisabled() currently only exposed in imgui_internal.h ( #211 )
2021-06-09 18:43:03 +02:00