Commit Graph

850 Commits

Author SHA1 Message Date
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
e362c5af48 Internals: ColorEdit: renamed some internal masks to match our common coding style.
ImGuiColorEditFlags__DisplayMask > ImGuiColorEditFlags_DisplayMask_, ImGuiColorEditFlags__OptionsDefault > ImGuiColorEditFlags_DefaultOptions_, ImGuiColorEditFlags__DataTypeMask > ImGuiColorEditFlags_DataTypeMask_  etc.
2021-07-26 20:44:59 +02:00
ocornut
7bfc379a23 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2021-07-19 21:58:06 +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
17ec4f1f6f TestEngine, MenuItem: call IMGUI_TEST_ENGINE_ITEM_INFO() at the right stack level. (amend f8fae02) 2021-07-12 16:42:53 +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
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
cac869b333 Disabled: don't prevent Selectable() from being selected. (#211) + BeginMenu()/MenuItemEx() uses PushDisabled() the standard way.
ImGuiSelectableFlags_Disabled is now unused by the library and might be marked obsolete later.
2021-07-09 19:54:43 +02:00
ocornut
29525255f3 Disabled items more consistently release active id if the active item got disabled. (#211) 2021-07-09 19:54:41 +02:00
ocornut
ba1c8464ef Internals: Removed ImGuiButtonFlags_Disabled (which had inconsistent behavior) in favor of ImGuiItemFlags_Disabled. Selectable()'s ImGuiSelectableFlags_Disabled now uses the later. (#211) 2021-07-09 19:54:37 +02:00
ocornut
f6682404e1 InputInt/InputFloat: When used with Steps values and _ReadOnly flag, the step button look disabled. (#211) 2021-07-09 19:54:34 +02:00
ocornut
97638bf977 BeginMenu: remove unnecessary call to ItemHoverable() which is already done by the Selectable() call.
Amend 88d7b3de
2021-07-09 18:57:28 +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
f8fae02270 Menus: rework to allow for an icon column (not yet exposed, but usable via internals) + fix menus being affected by style.SelectableTextAlign (#126) 2021-07-08 15:05:02 +02:00
ocornut
696d3e056e Internals: Menus: Naming offset field + fix spacing/offset computation to handle more offsets. 2021-07-07 20:47:37 +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
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
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
20d415e939 FIx static analysers warnings and disable false positives. 2021-06-24 17:15:14 +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
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