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
a15c42d5bd
Nav: moved RenderNavHighlight() calls of TreeNode and Selectable out of if (hovered || selected) tests. Should make no difference as NavId currently returns hovered. ( #1861 , #4242 )
2021-06-21 17:38:56 +02:00
Rokas Kupstys
d5828cd988
SplitterBehavior: fix using IsItemHovered() after SplitterBehavior()
2021-06-16 15:42:42 +02:00
ocornut
0cca0d1617
Internals/experimental: BeginComboPreview(), EndComboPreview(). ( #4168 , #1658 )
...
(amended)
2021-06-15 15:27:28 +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
16abfa5eb6
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui_internal.h
# imgui_widgets.cpp
2021-06-04 17:28:45 +02:00
ocornut
060b6ee7d1
Internals: Combo: Extracted into a BeginComboPopup() function. ( #4168 )
...
Renamed frame_bb > bb locally.
2021-05-28 17:45:07 +02:00
ocornut
5b4bc985ad
Nav, Combo: removed unnecessary window->LastNavIds[] assignment in combo code. + minor renaming.
2021-05-28 17:27:52 +02:00
ocornut
79e18896fe
TabBar: Fixed using more than 32 KB-worth of tab names. ( #4176 )
2021-05-27 12:01:00 +02:00
ocornut
1ad1429c6d
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_opengl3.cpp
# docs/CHANGELOG.txt
2021-05-25 18:45:54 +02:00
ocornut
e31d13fa76
Version 1.84 WIP
2021-05-25 13:36:53 +02:00
ocornut
1b435ae3e0
Merge branch 'master' into docking
...
# Conflicts:
# docs/CHANGELOG.txt
2021-05-24 17:49:20 +02:00
ocornut
ad5d1a8429
Version 1.83
2021-05-24 17:39:25 +02:00
ocornut
029c83c73e
Combos: Changed the combo popup to use a different id to also using a context menu with the default item id. ( #4167 )
2021-05-24 15:09:39 +02:00
ocornut
5d77b6f274
Docs: update links, sponsors
2021-05-21 15:24:57 +02:00
ocornut
105d82d134
Docking: Docking node tab bar honors ItemInnerSpacing.x before first tab. Tweak rendering and alignment of dock node menu marker. ( #4130 )
...
+ Fix ~0 in EndFrameDrawDimmedBackgrounds() which is obsolete way of signifying "all round corners".
2021-05-20 18:14:16 +02:00
ocornut
45f5ed52c1
Menus: made MenuItem() in a menu bar reflect the 'selected' argument with a highlight. ( #4128 )
2021-05-20 15:00:36 +02:00
ocornut
86c2b609ef
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_opengl2.cpp
# backends/imgui_impl_opengl3.cpp
# imgui.cpp
2021-05-19 19:05:01 +02:00
ocornut
e7e170c534
InputText: Internal renaming to use our own types to clarify code a little bit.
2021-05-18 14:48:54 +02:00
ocornut
26a1bbfe1e
InputText: Fixed CTRL+Arrow or OSX double-click leaking the presence of spaces when ImGuiInputTextFlags_Password is used. ( #4155 , #4156 ) [@michael-swan]
2021-05-18 14:46:25 +02:00
ocornut
31290807dc
Merge branch 'master' into docking
...
+ fix warning fix for mingw+dx9
# Conflicts:
# backends/imgui_impl_dx9.cpp
# imgui.cpp
2021-04-30 22:52:46 +02:00
ocornut
393941ceea
Refactor focusable/tabbalbe item registration toward allowing to handle it prior to clipping (not yet the case) ( #343 , #4079 )
...
Now performed in ItemAdd(). It can't be trivially moved above clipping effectively because it would require us to scroll to be useful, meaning we'd be better off locking the bounding box a frame earlier. Still wip.
As-is this commit has no value for end-user, but it's a reengineering that moves us closer to the solution. + Internals: moved internal flags.
2021-04-30 22:40:02 +02:00
ocornut
9b90639577
Internals: ItemFlags is a shared resource as advertised. Fix Begin/PushItemFlags/End sequence (mostly for consistency)
2021-04-30 21:34:17 +02:00
ocornut
10a1c5b021
TestEngine: fixed wrong flags passed to ItemInfo queries. Was luckily/misleadingly not causing issues as the test-engine flags we tested were upper bits not colliding with the other type.
...
Moved those flags higher as well. (unrelated to the fix itself)
2021-04-30 19:32:41 +02:00
ocornut
89162a04f4
Fixes for PVS Studio and MSVC static analyzers. Using a macro to suppress single-use MSVC false positives. ( #3938 , #4073 )
2021-04-29 21:20:32 +02:00
ocornut
d28535f351
Fixes for Visual Studio 2019 static analyzers. ( #3938 , #4073 ) + two minor edge case were invalid scalar input (e.g. a sign only) would return buffer as modified.
2021-04-29 17:10:27 +02:00
ocornut
2dec7b3301
InputText: Align caret/cursor to pixel coordinates. ( #4080 )
2021-04-27 13:31:32 +02:00
ocornut
daf97832f1
Internals: Nav: renaming.
2021-04-23 18:39:08 +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
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
c283a1da5b
Fixed clipping of multi-line value text when label is single-line + Fixed vertical alignment of single-line value text when label is multi-line. ( #4004 )
2021-04-06 18:35:06 +02:00
Doug Binks
f08566b4d7
InputText: Do not filter private unicode codepoints (e.g. icons) when pasted from clipboard. ( #4005 )
2021-04-06 12:00:52 +02:00
ocornut
6ddcdbe3e8
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui_widgets.cpp
2021-03-31 16:41:17 +02:00
ocornut
9251eac585
Docking: fix undocking from tab-bar by moving mouse horizontally, amend 3ed07a8
+ d705192
.
...
Automation system may drag e.g. right-most tab far left (and vice-versa) and one frame and our current logic would fail at it.
2021-03-30 19:01:37 +02:00
ocornut
3ed07a8f0b
Docking: removed io.ConfigDockingWithShift option. ( #2109 )
2021-03-30 15:00:16 +02:00
ocornut
0e0a783b8c
Docking: fix undocking from tab-bar by moving mouse horizontally, broken by d705192
.
2021-03-30 14:52:10 +02:00
Chris Ohk
eab3ae473c
Fix warning message C4100 ( #3974 )
...
- warning C4100: 'fmt_out_size': unreferenced formal parameter
2021-03-27 17:11:57 +01:00
ocornut
1dcd3a45cc
ColorEdit4: Alpha default to 255 (instead of 0) when omitted in hex input. ( #3973 )
...
Courtesy of @squadack
2021-03-26 11:34:07 +01:00
ocornut
b79b1cb9c0
TabBar: Amend previous commit. Fix tab reordering when tab bar has scrolling.
...
Some tidying up with helpers + honor 16-bit offsets as with other tab bar features (unlikely single reorder can reach that but consistent)
2021-03-25 19:17:30 +01:00
ocornut
688e06490e
TabBar: Amend previous commit. Fix tab reordering when tab bar has scrolling.
...
Some tidying up with helpers + honor 16-bit offsets as with other tab bar features (unlikely single reorder can reach that but consistent)
2021-03-25 19:16:24 +01:00
Rokas Kupstys
d7051928d9
TabBar: Use mouse position instead of hardcoded +1/-1 offset when reordering tabs.
...
Fixes tab reordering in test engine when using fast mode.
# Conflicts:
# imgui_widgets.cpp
2021-03-25 19:15:36 +01:00
Rokas Kupstys
475c0fcc39
TabBar: Use mouse position instead of hardcoded +1/-1 offset when reordering tabs.
...
Fixes tab reordering in test engine when using fast mode.
2021-03-25 19:12:49 +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
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
81e0b18e38
Merge branch 'master' into docking
2021-03-16 16:10:29 +01:00
ocornut
a1a39c632a
Version 1.83 WIP
2021-03-16 14:45:30 +01:00
ocornut
4bf646e4b0
Drags, Sliders, Inputs: Specifying a NULL format to Float functions default them to "%.3f" to be consistent with the compile-time default. ( #3922 )
2021-03-16 12:59:35 +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
ocornut
d94644261d
Drags, Sliders: Support ImGuiSliderFlags_Logarithmic flag with integers. Because why not? ( #3786 )
...
Renamed is_decimal to is_floating_point.
2021-03-15 12:21:37 +01:00
ocornut
287bd9b984
InputText: renamed ImGuiInputTextFlags_AlwaysInsertMode to ImGuiInputTextFlags_AlwaysOverwrite. ( #2863 )
2021-03-12 18:23:30 +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
Rokas Kupstys
c2d6d26139
ImDrawList: upgraded AddRect(), AddRectFilled(), PathRect() to use general ImDrawFlags instead of ImDrawCornersFlags
2021-03-11 16:03:32 +01:00
C.Even
a3ebd160cb
Fix unused variable warning in ImGui::EndListBox() ( #3897 )
2021-03-11 10:04:50 +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
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
e842b196df
Amend sanitization of format strings. Support ' without stb_printf. Simpler loops, will also be used for ImStrv branch. ( 8ee77f1
) ( #3604 )
...
Widgets: Sliders: Fix a bug where numbers after format specifier (eg. %d123) would cause RoundScalarWithFormatT() return incorrect value.
2021-03-05 18:27:35 +01:00
Rokas Kupstys
8ee77f1b65
Widgets: Sliders: Skip custom stb_sprintf.h format flags (', #, _) in RoundScalarWithFormatT() as they break ImAtof()/ImAtoi() and cause Drag*()/Slider*() widgets display incorrect values. ( #3604 )
...
Widgets: Sliders: Fix a bug where numbers after format specifier (eg. %d123) would cause RoundScalarWithFormatT() return incorrect value.
2021-03-05 18:06:54 +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
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
3776ba565f
Internals: TabBar: minor tweaks and renaming.
2021-02-24 19:40:15 +01:00
ocornut
a8f76c23a4
Window: Shrink close button hit-testing region when it covers an abnormally high portion of the window visible area (e.g. when window is collapsed and moved in a corner)to facilitate moving the window away. ( #3825 )
2021-02-18 17:23:10 +01:00
ocornut
0ecdf8167c
DragScalar: Fixed crash when using DragScalar() directly with ImGuiSliderFlags_AlwaysClamp + only one of either p_min or p_max set. ( #3824 ) [@harry75369]
2021-02-18 16:12:41 +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
30b7545841
Version 1.82 WIP
2021-02-15 18:10:14 +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
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
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
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
03d74a293d
ListBox: renamed ListBoxHeader>BeginListBox, ListBoxFooter>EndListBox. Added demo bits.
2021-02-03 16:33:22 +01:00
ocornut
6f6d4e0b70
ListBoxHeader: In version taking height in number of items, made vertical padding consistent regardless of if (items_count <= height_in_items) or not.
...
Demo: Tweaks.
2021-02-03 15:07:14 +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
freddii
90a518c501
Fixed typos ( #3782 )
2021-02-03 12:37:32 +01:00
ocornut
d1a9efdd8f
InputText: Fixed slightly off ScrollX tracking, noticeable with large values of FramePadding.x. Multiline: Fixed padding/cliprect not matching single-line version. ( #3781 )
...
Fixed FramePadding.y worth of vertical offset when aiming with mouse.
2021-02-02 16:30:57 +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
Erwin Coumans
4dec436161
SliderInt: Fixed click/drag when v_min==v_max from setting the value to zero. ( #3774 )
2021-02-01 17:34:16 +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
Sammy Fatnassi
376c88a864
Fixed some compile warnings with Clang on Windows ( #3754 )
2021-01-26 14:10:10 +01:00
ocornut
2ed47e5822
Version 1.81 WIP
2021-01-25 16:30:44 +01:00
ocornut
bb26751b94
Merge branch 'master' into docking
...
# Conflicts:
# docs/CHANGELOG.txt
# imgui.cpp
2021-01-21 20:38:42 +01:00
ocornut
58075c4414
Version 1.80
2021-01-21 20:36:18 +01:00
ocornut
6737037743
Tab Bar: fix 0ea4408
( #3414 )
2021-01-20 19:35:10 +01:00
ocornut
74b3b7cf58
Added experimental io.ConfigDragClickToInputText feature to enable turning DragXXX widgets into text input with a simple mouse click-release (without moving). ( #3737 )
...
+ Offset ImGuiTableColumnFlags values.
2021-01-20 19:18:03 +01:00
ocornut
dc0f3d982c
DragFloat, DragInt: very slightly increased mouse drag threshold + expressing it as a factor of default value + disabled experimental click-to-input on DragXXX functions. ( #3737 )
2021-01-20 18:36:21 +01:00
ocornut
0ea4408fd4
Tab Bar: Requested ideal content size (for auto-fit) doesn't affect horizontal scrolling. Followup to afa01d8. ( #3414 )
...
+ minor Table rename
2021-01-15 22:52:47 +01:00
ocornut
6af92b05bf
Internals: Layout: maintain two content sizes, optionally writing to IdealMaxPos to distinguish used from ideal size, later is used for auto-fit. Unused in this commit, should be no-op. ( #3414 )
...
# Conflicts:
# imgui.cpp
2021-01-15 22:52:42 +01:00