Commit Graph

1387 Commits

Author SHA1 Message Date
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
15b4a064f9 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_win32.cpp
#	examples/example_marmalade/main.cpp
#	imgui.cpp
#	imgui.h
2021-12-22 16:02:04 +01:00
ocornut
512c54bbc0 Version 1.86 2021-12-22 15:31:13 +01:00
ocornut
612b787b0d Menus: fixed top-level menu from not consistently using style.PopupRounding. (#4788)
+ Stack tool default size.
2021-12-21 15:05:10 +01:00
Sean Ridenour
4bad852a78 Backends: SDL_Renderer: Handle change to SDL_RenderGeometryRaw() function signature in SDL 2.0.19 (#4819) 2021-12-21 14:32:41 +01:00
ocornut
0636f9adac InputText: fixed Shift+Delete from not cutting into clipboard. (#4818, #1541) 2021-12-20 19:45:58 +01:00
ocornut
d9bc1e44af Backends: Marmalade: Removed obsolete Marmalade backend (imgui_impl_marmalade.cpp) + example. (#368, #375) 2021-12-20 19:29:41 +01:00
thedmd
0cdc4a9565 Backends: Win32: Store left/right variants of Ctrl/Shift/Alt mods in KeysDown[] array. (#2625)
Technically not much required yet but will be by extra-keys work. fix miscleared GLFW field for consistency (no effect)
2021-12-16 18:16:35 +01:00
ocornut
cd36acc88b Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_opengl3.cpp
#	backends/imgui_impl_osx.h
#	backends/imgui_impl_osx.mm
#	imgui.cpp
2021-12-15 12:10:03 +01:00
ocornut
389982eb5a Backends: OpenGL3: Using buffer orphaning + glBufferSubData(), seems to fix leaks with multi-viewports with some Intel HD drivers.. (#4468, #4504, #2981, #3381) 2021-12-15 11:50:00 +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
Stuart Carnie
1b6b8602c1 Backends: OSX: Fix keyboard support. Handle scroll cancel. Don't set mouse cursor shape unconditionally. (#4759, #4253, #1873)
Note the original FIXME: refered to GLFWs Cocoa implementation, which is largely what this commit provides.
2021-12-13 11:56:43 +01:00
SlavicPotato
f71ee5203e Fix infinite loop in ImFontGlyphRangesBuilder::AddRanges if the user passes upper range = UINT16_MAX without IMGUI_USE_WCHAR32. (#4802) 2021-12-13 11:35:59 +01:00
Stuart Carnie
b720f1f03c Backends: OSX: Add Game Controller support. (#4759) 2021-12-13 11:25:59 +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
747f7fdbba Docking: prevent docking any window created above a popup/modal. (#4317) 2021-12-09 16:47:11 +01:00
ocornut
f605351307 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)
2021-12-09 15:38:44 +01:00
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)
2021-12-09 15:35:02 +01:00
ocornut
a8e1dde357 Fix static analyser, update readme. 2021-12-09 15:17:58 +01:00
ocornut
e31d116d37 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_opengl2.cpp
#	imgui.cpp
#	imgui_internal.h
2021-12-09 11:52:23 +01:00
ocornut
bdd2a94315 InputTextMultiline: fixed vertical tracking with large values of FramePadding.y. (#3781, #4794) 2021-12-09 11:30:42 +01:00
ocornut
072caa4a90 InputText: fixed incorrect padding when FrameBorder > 0. (#4794, #3781) 2021-12-09 11:25:58 +01:00
ocornut
a19815dc6b Backends: Allegro5: Fixed mishandling of the ImDrawCmd::IdxOffset field. (#4790) 2021-12-08 16:34:57 +01:00
ocornut
c80e8b964c Backends: OpenGL2, Marmalade: Fixed mishandling of the ImDrawCmd::IdxOffset field. (#4790) 2021-12-08 16:26:52 +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
c1b70e0391 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
2021-12-06 19:17:03 +01:00
ocornut
926addbfe2 Clipper: fixed invalid state when number of frozen table row is smaller than ItemCount.
+ Bonus rather unorthodox coding style.
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
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.
2021-12-06 12:09:38 +01:00
ocornut
aa41f16589 Separator: fixed cover all columns while called inside a table. (#4787, #205) 2021-12-05 18:47:28 +01:00
ocornut
06e4f4e370 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_sdlrenderer.cpp
#	backends/imgui_impl_sdlrenderer.h
#	imgui.cpp
#	imgui.h
2021-12-03 19:24:42 +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
b16f738d04 Docking: docked windows honor ImGuiCol_WindowBg. Host window in charge of rendering seams. (#2700, #2539 + Docked windows honor display their border properly. (#2522)
Plus: better support for transparent one in nodes
Side effects: DockContextBindNodeToWindow doesn't alter node->IsVisible.
Side effects: ImDrawList:: _ResetForNewFrame() needs to merge, sane (in case of
(Amended, force-pushed)
2021-12-03 14:46:34 +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
Rokas Kupstys
5c388c39f4 Backends: SDL_Renderer: Added support for large meshes (64k+ vertices) with 16-bit indices, enable 'ImGuiBackendFlags_RendererHasVtxOffset' in this backend. (#3926) 2021-12-03 12:28:03 +01:00
ocornut
8733ca49b0 Docking: Fixed single-frame node pos/size inconsistencies when window stop or start being submitted.
Fix 718e15c7d while preserving its intended property. Tested by "docking_window_appearing_layout". (#2109)
2021-12-02 18:46:42 +01:00
ocornut
6afcfe3442 Docking: Fixed incorrectly rounded tab bars for dock node that are not at the top of their dock tree. 2021-12-01 18:27:05 +01:00
ocornut
848d21b6b5 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_sdlrenderer.cpp
#	backends/imgui_impl_sdlrenderer.h
#	imgui.cpp
#	imgui_widgets.cpp
2021-12-01 15:37:40 +01:00
ocornut
1ab3007752 Viewports: Fixed CTRL+TAB highlight outline on docked windows not always fitting in host viewport + moved EndFrameDrawDimmedBackgrounds() call + removed duplicate code in Begin() already in EndFrameDrawDimmedBackgrounds() 2021-12-01 14:42:58 +01:00
ocornut
440824d431 Backends: Fixed early out on empty clip rect. In particular, DX12 backend would warn about it (others not so much). (#4775, #4464)
Amend/fix 2b0bd40b
2021-11-30 21:48:29 +01:00
ocornut
f087a5b856 Metrics: Added a node showing windows in submission order and showing the Begin() stack. 2021-11-30 16:04:19 +01:00
ocornut
66f0fb986c Inputtext, Nav: fixed using SetKeyboardFocusHere() on InputTextMultiline(). (#4761) 2021-11-29 16:25:45 +01:00
ocornut
5ccb66794b Backends: WebGPU: Passing explicit buffer sizes as validation layers appears to not do what the in-flux specs says. (#4766 2021-11-29 12:18:25 +01:00
ocornut
5ac25e7c7a InputText: fixed ReadOnly flag preventing callbacks from receiving the text buffer. (#4762) 2021-11-25 15:12:08 +01:00
ocornut
719d931304 Docking: Fixed a bug undocking windows docked into a non-visible or _KeepAliveOnly dockspace. (#4757) 2021-11-24 17:49:21 +01:00
ocornut
b50b22d787 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.
2021-11-16 16:14:21 +01:00
ocornut
2080d12bd9 Viewports: Made it possible to explicitly assign ImGuiWindowClass::ParentViewportId to 0. (#3152, #2871) 2021-11-16 01:10:10 +01:00
ocornut
3fde445b91 Misc: Added missing ImGuiMouseCursor_NotAllowed cursor for software rendering (when io.MouseDrawCursor is enabled). (#4713) 2021-11-15 16:19:33 +01:00
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.
2021-11-10 19:17:01 +01:00
ocornut
dc8c3618e8 Merge branch 'master' into docking
# Conflicts:
#	imgui_demo.cpp
2021-11-10 15:26:03 +01:00
ocornut
e790fc0e79 Nav: prevent child from clipping items when using _NavFlattened and parent has a pending nav request. (#787) 2021-11-10 12:00:50 +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
8ce23b3ccd Nav: Ctrl+tabbing to cycle through windows is now enabled regardless of _NavEnableKeyboard. (#4023, #767) 2021-11-08 17:41:36 +01:00
ocornut
bce1ba400f Clipper: add ForceDisplayRangeByIndices (#3841, #3578)
This partially reverts commit 6a7e2c74fb.
2021-11-08 17:20:30 +01:00
ocornut
ebac375791 Docs: added info about Freetype, editing sponsors. 2021-11-08 16:22:00 +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
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
c1d2793580 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
2021-11-04 15:26:01 +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
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
0b4edf4e94 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_vulkan.cpp
#	imgui.cpp
2021-11-03 11:51:37 +01:00
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.
2021-11-02 17:04:35 +01:00
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. 2021-11-02 17:04:34 +01:00
omar
eb654f1bad
Typo 2021-11-02 12:57:05 +01:00
Pokechu22
b1a68d899c
Fix misplaced backtick in FAQ.md (#4669) 2021-11-02 12:51:22 +01: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
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)
2021-10-27 12:03:14 +02:00
ocornut
0f2898ea88 Demo: Tree selection demo use !IsItemToggledOpen() (#1896) + update FAQ (#4366) 2021-10-25 18:38:56 +02:00
ocornut
126a6f894f InputText: made double-click select word, triple-line select line. Word delimitation logic differs slightly from the one used by CTRL+arrows. (#2244) 2021-10-25 16:34:56 +02:00
ocornut
9c78fc928a Inputs: Mouse: Amend c8e3a01 for tracking multiple clicks, renaming. (#3229) 2021-10-25 14:30:20 +02:00
ocornut
bac748fa95 Backends: Made it possible to shutdown default Platform Backends before the Renderer backends. (#4656) 2021-10-15 17:16:26 +02:00
ocornut
19c3773cc0 Backends: Vulkan: Call vkCmdSetScissor() with a full-viewport at end of render. (#4644) 2021-10-15 12:11:11 +02:00
ocornut
05877c14df Fixed nested BeginDisabled()/EndDisabled() bug in Docking branch due to bad merge. (#4655, #4452, #4453, #4462) 2021-10-15 11:51:01 +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
ocornut
29653273c1 Docking: reinstate io.ConfigDockingWithShift option. (#4643)
This more or less reverts commit 3ed07a8f0b.
2021-10-13 16:47:29 +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
75c54e6384 Nav: Fixed vertical scoring offset when wrapping on Y in a decorated window. 2021-10-11 14:40:47 +02:00
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
2021-10-11 11:48:39 +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
ec6ca06898 InputText: Fixed selection rectangle appearing one frame late when selecting all. 2021-10-08 13:00:55 +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
fbe78b1a3a Stack Tool: Docs (#4631) + also prevent Metrics window from displaying twice. 2021-10-06 18:22:40 +02:00
ocornut
1780579403 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
2021-10-06 17:57:11 +02:00
Basil Fierz
25332fa5ac Backends: Emscripten: Update the webgpu API to be compatible with chrome 4633 (#4512) 2021-10-06 17:51:00 +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
677fe33990 Backends: DX12: use dxgiformat.h to fix using forward declared DXGI_FORMAT (#4594) 2021-09-30 11:53:20 +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
ca097c2c68 Docking: Fixed IsItemHovered() and functions depending on it (e.g. BeginPopupContextItem()) when called after Begin() on a docked window (#3851)
Fix ee643b2a
2021-09-22 14:07:18 +02:00
ocornut
fba756176d Backends: SDL_Renderer: Amend 1d2d246, various tweaks, fixes, sync to latest. (#3926) 2021-09-21 19:29:48 +02:00
Sylvain
62b17f928e Backends: SDL_Renderer: Added renderer backend for SDL 2.0.17+ (#3926)
(Squashed 20 commits)
2021-09-21 19:29:48 +02:00
Rokas Kupstys
15fe7ba31f ColorPicker: Fix not being able to pick exactly (1.0f, 1.0f, 1.0f) color by dragging toward the edges of the SV square. (#3517)
Old code attempted to mitigate hue/saturation resetting for colors where these components are undefined. Since we now explicitly back up and restore these components this workaround is no longer necessary.
2021-09-21 15:10:07 +02:00