ocornut
b6586bb06d
TestEngine: update IMGUI_TEST_ENGINE_ITEM_ADD() hooks to support passing item in flags.
2023-03-06 18:10:04 +01:00
ocornut
bfce7750b1
Simpified code in GetKeyData() and used ImGuiKey_KeysData_OFFSET for consistency. Rework demo, Comments. Moved ImGuiKey_KeysData_OFFSET to internal.h ( #4921 , #6191 )
2023-02-24 13:05:32 +01:00
ocornut
e9743d85dd
Drag and Drop: Clear state on EndDragDropTarget() with delivery + fixed handling of overlapping targets when smaller one is submitted before and can accept the same data type. ( #6183 , #5817 )
2023-02-21 21:23:54 +01:00
ocornut
a1b8457cb5
Moved the optional "courtesy maths operators" (#define IMGUI_DEFINE_MATH_OPERATORS) implementation from imgui_internal.h in imgui.h. ( #6164 , #6137 , #5966 , #2832 )
2023-02-15 19:23:12 +01:00
ocornut
204cb4d226
Version 1.89.4 WIP
2023-02-15 15:35:56 +01:00
ocornut
458a109031
Version 1.89.3
2023-02-14 16:00:18 +01:00
ocornut
092b6825ac
Fonts: Assert that in each GlyphRanges[] pairs first is <= second.
2023-02-14 15:00:12 +01:00
ocornut
99c0bd65df
Added SeparatorText() widget. ( #1643 )
2023-02-10 12:16:41 +01:00
ocornut
f799a293c8
Tables: Solved an ID conflict issue with multiple-instances of a same table. Storing instance id for convenience. ( #6140 )
...
TableGetColumnResizeID() are still using an incorrect table, but having only one-level left tends to cancel things out.
2023-02-03 20:03:03 +01:00
ocornut
3617a96372
Backends, Inputs: Made horizontal scroll wheel and horizontal scroll direction consistent accross backends/os. ( #4019 , #6096 , #1463 )
...
Documented assumptions.
2023-02-01 21:29:08 +01:00
ocornut
867bdbecb3
Text: fixed issue in RenderText() leading to IM_ASSERT_PARANOID() triggering if enabled. ( #6132 , #5720 , #5919 )
...
Amend 3482d4ec
, bd96f6e
2023-01-31 14:41:16 +01:00
ocornut
5741cbae45
Internals: ImFileOpen: fixed misleading use of ImWchar (would allocate more when ImWchar=ImWchar32) + update version for previous changes namely tab bar ones.
2023-01-25 20:34:48 +01:00
ocornut
91667430a8
Tables: increase table columns limit from 64 to 512 using bit array allocated in contiguous memory +. ( #6094 , #5305 , #4876 , #3572 )
2023-01-21 00:41:54 +01:00
ocornut
3482d4eccf
Text: Fixed layouting of wrapped-text block skipping successive empty lines. ( #5720 , #5919 )
...
Regression in the bd96f6e
fix
2023-01-19 15:59:39 +01:00
ocornut
1297a2be52
Text: Tweaked rendering of three-dots "..." ellipsis variant. Baking more data. ( #2775 , #4269 )
...
Ideally we're bake a single glyph but it's currently difficult to setup in our font building process.
2023-01-11 16:37:47 +01:00
ocornut
482ac70a0b
Version 1.89.3 WIP
2023-01-11 15:52:30 +01:00
ocornut
d7c8516a4b
Version 1.89.2
2023-01-05 15:49:29 +01:00
ocornut
e06bbe05e1
Revert most/part of "Shortcut: added Shortcut() function and ImGuiInputFlags in public API + Demo." ( #456 , #2637 )
...
This reverts commit 0949acb6e6
.
# Conflicts:
# imgui.h
2023-01-05 15:21:48 +01:00
ocornut
57a5b73a4c
InputText: fixed cursor navigation when pressing Up Arrow on the last character of a multiline buffer which doesn't end with a carriage return. ( #6000 )
...
Simplify stb_textedit_find_charpos(). Leaving that to simmer for a while before attempting an upstream PR.
2023-01-04 17:58:07 +01:00
ocornut
4b39c1f654
Docs: adding Tests badge + more references to Test Engine.
2023-01-03 20:26:26 +01:00
ocornut
59b63defe5
Misc shallow merge/sync from docking designed to faciliate cross-merging between docking and string_view.
2022-12-08 21:14:39 +01:00
ocornut
0949acb6e6
Shortcut: added Shortcut() function and ImGuiInputFlags in public API + Demo. ( #456 , #2637 )
2022-12-08 18:54:41 +01:00
ocornut
1dae7df26f
Misc: added GetItemID() in public API.
2022-12-08 18:45:04 +01:00
ocornut
48215231f9
Demo: moved WantCapture overrides items + various comments related to ImGuiKey, ImGuiMod
2022-12-08 18:30:48 +01:00
ocornut
fd0b3734d3
Tables, Nav, Scrolling: fixed scrolling functions and focus tracking with frozen rows and columns. ( #5143 , #4868 , #3692 )
2022-12-06 21:07:50 +01:00
ocornut
0e2a167bdb
Fonts: added a 'void* UserData' field in ImFontAtlas, as a convenience for use by applications using multiple font atlases.
...
+ fixed mislocated Changelog entries added recently.
2022-12-01 20:10:37 +01:00
ocornut
87caf27ac4
Inputs, Scrolling: better selection of scrolling window when hovering nested windows and backend/OS is emitting dual-axis wheeling inputs. ( #3795 , #4559 )
2022-11-30 17:49:59 +01:00
ocornut
1a497c2499
Inputs, IO: reworked ImGuiMod_Shortcut to redirect to Ctrl/Super at runtime instead of compile-time. ( #5923 , #456 )
2022-11-29 19:07:50 +01:00
ocornut
bd96f6eac4
Text: Fixed layouting of wrapped-text block when the last source line is above the clipping region. Regression added in 1.89. ( #5720 , #5919 )
...
+ Update version marker
2022-11-28 14:59:13 +01:00
ocornut
6af38b1a43
Fixed version string for consistency ( #5918 )
2022-11-28 14:42:30 +01:00
ocornut
a8df192df0
Version 1.89.1
2022-11-24 21:24:33 +01:00
ocornut
27c58c3946
Scrolling, Focus, Combo: fixed SetKeyboardFocusHere()/SetItemDefaultFocus()/ScrollToRectEx() during an appearing form not centering item. ( #5902 , #2812 , #4242 , #2900 )
...
Amend 44f801186
and 8f495e554
2022-11-24 20:57:41 +01:00
ocornut
3a685749cb
ColorEdit: fixed label overlapping when using style.ColorButtonPosition == ImGuiDir_Left. ( #5912 )
...
Amend 54fb051e5
+ Internals: added IsKeyboardKey(), IsMouseKey() helpers.
2022-11-23 15:00:50 +01:00
ocornut
5bb2874940
Version 1.89.1 WIP
2022-11-16 17:55:27 +01:00
ocornut
d60985df7f
Inputs: fix moving a window or drag and dropping from capture mods. ( #5888 , #4921 , #456 )
...
Amend change of SetActiveIdUsingAllKeyboardKeys() in 4448d97
which seemingly accidentally reverted the change intended by fd408c97
2022-11-16 17:41:24 +01:00
ocornut
83cee9e091
InputText: replaced some uses of SetKeyOwner() + IsKeyPressed() with Shortcut()
...
Which makes it easier to hook/disable those keys from outside if needed.
2022-11-16 17:09:14 +01:00
ocornut
81160fee56
Version 1.89
...
+ fix warning from a582d92
2022-11-15 15:20:36 +01:00
ocornut
7380b9816e
Scrolling: Exposed SetNextWindowScroll() in public API. ( #1526 )
2022-11-09 17:03:07 +01:00
ocornut
cda26635cd
Inputs: refacotr/extract CalcRoutingScore() out of SetShortcutRouting(), easier to follow with early returns.
...
+ clarified comments about GetMouseCursor() #5739
2022-11-09 16:35:50 +01:00
ocornut
7ff2d3353c
Inputs: added wip/experiment routing system: Shortcut(), RoutingFocused policy, SetShortcutRouting(). ( #456 , #2637 , #3724 )
...
- InputText() uses Shortcut().
2022-11-08 20:37:58 +01:00
ocornut
4448d975d1
Inputs: added wip/internal Input Owner system. ( #456 , #2637 , #2620 , #2891 , #3370 , #4828 , #5108 , #5242 , #5641 )
...
- Added SetKeyOwner(), SetItemKeyOwner(), TestKeyOwner().
- Added new IsKeyXXX IsMouseXXX functions with ImGuID owner_id and flags.
- Obsoleted SetItemUsingMouseWheel(). (#2891 )
- Removed IsKeyPresseedEx() which was a recent internal addition 2022-07-08 deemed to be temporary exactly for this.
- Added ImGuiButtonFlags_NoSetKeyOwner, ImGuiButtonFlags_NoTestKeyOwner
- Added ImGuiSelectableFlags_NoSetKeyOwner.
- Added ImGuiInputFlags_LockThisFrame, ImGuiInputFlags_LockUntilRelease for for SetKeyOwner(), SetItemKeyOwner().
- Added ImGuiInputFlags_CondXXX values for SetItemKeyOwner().
2022-11-08 18:47:36 +01:00
ocornut
9f66a3a9ed
Internals: rework FocusScope system, current scope doesn't need to be in window + child doesn't inherit.
...
Intended as part of work for input routing + blind menu processing shortcuts. Some of this commit will be stripped by next commit.
Intent was to sort windows along with focus scope to build a hierarchy, but for our needs we'd need a persistant one, so scrapping the idea. Not squashing this with next commit to keep a bit of history for future references.
2022-11-04 12:19:20 +01:00
ocornut
6e9dfe1de1
Window: Auto-fit size takes account of work rectangle (menu bars eating from viewport). ( #5843 )
2022-11-02 12:36:22 +01:00
ocornut
a61bbdc239
Commented out redirecting OpenPopupContextItem() which was briefly the name of OpenPopupOnItemClick() from 1.77 to 1.79.
2022-10-26 22:22:53 +02:00
ocornut
9a35bfea39
Internals: added temporary ImGuiItemStatusFlags_Visible (used internally - please do not use).
...
Used by BeginMenu() as I'm experimenting with blind menus honoring shortcuts.
Extra comments about KeyMap and ImGuiKeys
2022-10-21 14:57:10 +02:00
ocornut
e3fa56ae05
BeginMenu(): Menus: Fixed a one-frame issue where SetNextWindowXXX data are not consumed by a BeginMenu().
...
+ Shallow tweaks to reduce diff of future branches. Removing early return also facilitate some changes.
2022-10-19 14:12:04 +02:00
ocornut
5ac94ad898
Window: Fixed an issue where uncollapsed a window would show a scrollbar for a frame.
...
Amend / fix regression from 6e8e2c0
2022-10-18 16:43:38 +02:00
ocornut
81176737f8
Menus: Fixed using IsItemHovered()/IsItemClicked() on BeginMenu(). ( #5775 )
2022-10-14 17:39:04 +02:00
ocornut
3920b1c764
Removed commented out old flags from when Tables was a branch.
...
ImGuiTableFlags_ColumnsWidthFixed, ImGuiTableFlags_ColumnsWidthStretch,
ImGuiTableFlags_SizingPolicyFixed, ImGuiTableFlags_SizingPolicyStretch
ImGuiTableColumnFlags_WidthAuto
2022-10-14 16:36:41 +02:00
ocornut
b15347cb7d
Tables: activating an ID (e.g. clicking button inside) column doesn't prevent columns output flags from having ImGuiTableColumnFlags_IsHovered set. ( #2957 )
2022-10-13 15:15:42 +02:00
ocornut
3e8d198133
Removed runtime patching of obsolete/invalid "%f"/"%.0f" types of format strings for DragInt()/SliderInt().
2022-10-12 23:09:09 +02:00
ocornut
f2a522d70d
ImDrawList: Not using alloca() anymore, lift single polygon size limits. ( #5704 , #1811 )
2022-09-30 15:58:55 +02:00
ocornut
cc5058e5d7
IO: Filter duplicate input events during the AddXXX() calls. ( #5599 , #4921 )
2022-09-29 22:01:11 +02:00
ocornut
bd2355a047
Menus, Nav: Fixed using left/right navigation when appending to an existing menu (multiple BeginMenu() call with same names). ( #1207 )
2022-09-29 19:25:26 +02:00
ocornut
3532ed1621
Menus, Nav: Fixed keyboard/gamepad navigation occasionally erroneously landing on menu-item in parent when the parent is not a popup. ( #5730 )
...
Replace BeginMenu/MenuItem swapping g.NavWindow with a more adequate ImGuiItemFlags_NoWindowHoverableCheck.
Expecting more subtle issues to stem from this.
Note that NoWindowHoverableCheck is not supported by IsItemHovered() but then IsItemHovered() on BeginMenu() never worked: fix should be easy in BeginMenu() + add test is IsItemHovered(), will do later
2022-09-29 18:44:19 +02:00
Andrew D. Zonenberg
e74a50f525
Added GetGlyphRangesGreek() helper for Greek & Coptic glyph range. ( #5676 , #5727 )
2022-09-28 17:46:20 +02:00
ocornut
d17627b9c6
InputText: leave state->Flags uncleared for the purpose of backends emitting an on-screen keyboard for passwords. ( #5724 )
2022-09-28 17:38:41 +02:00
ocornut
4d4889bf1b
Refactor CalcWordWrapPositionA() to take on the responsability of minimum character display. Add CalcWordWrapNextLineStartA(), simplify caller code.
...
Should be no-op but incrementing IMGUI_VERSION_NUM just in case.
Preparing for #5720
2022-09-28 14:57:15 +02:00
ocornut
12c0246890
Removed support for 1.42-era IMGUI_DISABLE_INCLUDE_IMCONFIG_H / IMGUI_INCLUDE_IMCONFIG_H. ( #255 )
2022-09-28 12:08:21 +02:00
ocornut
a725db17b7
Comments for flags discoverability + add to debug log ( #3795 , #4559 )
2022-09-27 20:08:40 +02:00
ocornut
83a0030c0a
Added ImGuiMod_Shortcut which is ImGuiMod_Super on Mac and ImGuiMod_Ctrl otherwise. ( #456 )
2022-09-26 10:43:26 +02:00
ocornut
fd408c9790
Renamed and merged keyboard modifiers key enums and flags into a same set:. ImGuiKey_ModXXX -> ImGuiMod_XXX and ImGuiModFlags_XXX -> ImGuiMod_XXX. ( #4921 , #456 )
...
Changed signature of GetKeyChordName() to use ImGuiKeyChord.
Additionally SetActiveIdUsingAllKeyboardKeys() doesn't set ImGuiKey_ModXXX but we never need/use those and the system will be changed in upcoming commits.
2022-09-26 10:43:26 +02:00
ocornut
f359dca0dc
Misc input related changes to facilitate upcoming merges.
2022-09-22 19:00:30 +02:00
ocornut
85f327d8d3
InputText: added ImGuiInputTextFlags_EscapeClearsAll ( #5688 )
2022-09-21 16:23:44 +02:00
ocornut
4b522e145c
Experiment: ImGuiKey is now a typed enum, allowing ImGuiKey_XXX symbols to be named in debuggers. ( #4921 , #4537 )
...
May affect binding generators.
2022-09-20 12:42:29 +02:00
ocornut
1dd964f87d
Popups & Modals: Fix (amended) somehow undocumented Popup+Child behavior (useful for e.g. #718 , #4461 and probably other things)
...
(broken by 1c4066cd
)
2022-09-16 23:27:16 +02:00
ocornut
440f257688
Popups & Modals: fixed nested Begin() being erroneously input-inhibited. (useful for e.g. #718 , #4461 and probably other things)
2022-09-16 22:08:11 +02:00
ocornut
472f8013bd
Moved version number higher up in imgui.h to increase visibility
...
- This allow using version number in imconfig
- This technically makes the #ifdef IMGUI_VERSION check valid in case of using IMGUI_DISABLE
- This makes available IMGUI_VERSION/IMGUI_VERSION_NUM with IMGUI_DISABLE - bit of a harmless leak
2022-09-16 22:07:33 +02:00
tocic
6c3c9cea7f
Fix typos in source comments ( #5675 )
2022-09-13 11:09:34 +02:00
ocornut
513c1ba996
Removed the bizarre legacy default argument for 'TreePush(const void* ptr = NULL)' ( #1057 )
...
Followup to e605f2179
2022-09-12 16:00:19 +02:00
ocornut
52d9ee0dc2
Tabs: Fixed ShrinkWidths() redistribution of remainder leading to infinite bug (second fix). ( #5652 , #5262 )
...
Amend b137f31
2022-09-09 20:01:59 +02:00
ocornut
b137f31b8c
Tabs: Fixed ShrinkWidths() redistribution of remainder leading to infinite bug + over redistribution. ( #5652 )
...
Amend c4b91017
2022-09-07 12:22:49 +02:00
Constantine Tarasenkov
b87e58fab3
ImGui::InputText: added support for shift+click style selection. ( #5619 )
...
(Amend, force-push: sorry wrong edit by omar)
2022-09-05 18:27:58 +02:00
ocornut
9e1ccf8fab
Commented out redirecting functions/enums names that were marked obsolete in 1.77 and 1.78 (June 2020): ( #3361 )
...
- DragScalar(), DragScalarN(), DragFloat(), DragFloat2(), DragFloat3(), DragFloat4() with signature ending with (..., float power = 1.0f)
- SliderScalar(), SliderScalarN(), SliderFloat(), SliderFloat2(), SliderFloat3(), SliderFloat4() with signatures ending with (..., float power = 1.0f)
- BeginPopupContextWindow(const char*, ImGuiMouseButton, bool)
2022-09-05 14:38:00 +02:00
ocornut
edcd5b113e
Obsoleted using SetCursorPos()/SetCursorScreenPos() to extend parent window/cell boundaries. ( #5548 )
...
This incorrect pattern has been mentioned or suggested in: #4510 , #3355 , #1760 , #1490 , #4152 , #150
2022-09-02 16:37:35 +02:00
Rokas Kupstys
b3ea01d86f
Menus: Fix sub-menu inhibition stopping working in some cases. (Amend WIP) ( #2517 , #5614 , noticed in #5546 )
...
Amend bda2cde6
Fixes the case where following menu hover sequence results in incorrect RestoreNavWindow (previously SourceWindow) pointing to opened sub-menu:
1. Hover "Menu -> Options" - Open ##Menu_01 window
2. Hover "Menu -> Colors" - SourceWindow incorrectly points to ##Menu_01 window
2022-09-01 17:02:46 +02:00
ocornut
a502ceb075
Added commented out older obsolete names (1.42 to 1.52)
2022-09-01 12:22:39 +02:00
ocornut
2569c64740
Demo: Improved "Constrained-resizing window" example, more clearly showcase aspect-ratio. ( #5627 , #5618 )
2022-09-01 11:13:39 +02:00
ocornut
747c9a7adf
IsKeyPressed(), IsMouseClicked(), GetKeyPressedAmount(): add a (normally unnecessary) test for ->Down next to ->DownDuration tests, facilitating the use of key eating mechanism.
...
Consider removing when we add support for input ownership.
2022-08-31 19:15:13 +02:00
ocornut
e13913ed57
IsItemHovered: Added ImGuiHoveredFlags_DelayNormal, ImGuiHoveredFlags_DelayShort, ImGuiHoveredFlags_NoSharedDelay. ( #1485 )
...
IsItemHovered() can't have a non-zero default, but higher-level tooltip helpers may enable a different default later.
2022-08-24 21:32:13 +02:00
ocornut
b3b3a07133
Nav: Fixed regression in e99c4fc
preventing CTR+Tab to work without NavEnableKeyboard ( #5504 , #4023 );
2022-08-24 14:45:11 +02:00
Geoffrey McRae
2c1262b436
ImVector: fix undefined behaviour during copy operator if source vector is null. ( #5608 )
2022-08-24 10:57:14 +02:00
ocornut
5b0510c5b7
TestEngine: facilitate aiming at InputScalar() using wildcards + removed unnecessary IDStack.size hack (require TestEngine latest)
2022-08-20 22:55:51 +02:00
Vlad Serebrennikov
c911901b5e
Fix ImGuiIO docs and default values ( #5540 )
2022-08-03 22:46:31 +02:00
ocornut
0a4ddd7246
Fix being unable to mouse wheel while dragging a payload (fix 1480bc5
, #4921 , #2891 )
2022-08-03 22:02:00 +02:00
ocornut
4a2ae06ca4
Changed signature of ImageButton() function: Added 'const char* str_id' parameter + removed 'int frame_padding = -1' parameter. ( #5533 , #4471 , #2464 , #1390 ).
...
Also removed frame_padding parameter from ImageButtonEx(), amend e0ec69d8
.
2022-08-03 21:04:33 +02:00
Rokas Kupstys
0e95cf0dec
Fix appending to windows causing a child window to be inserted to g.WindowsFocusOrder which eventually causes a crash. ( #5515 , #3496 , #4797 )
...
Amend a528398
2022-08-03 14:44:05 +02:00
ocornut
6ab5fd1da9
Tables,Columns: fixed a layout issue where SameLine() prior to a row change would set the next row in such state where subsequent SameLine() would move back to previous row.
2022-07-18 17:40:52 +02:00
ocornut
1480bc5d4e
Added ImGuiKey_MouseXXX aliases. ( #4921 ) Reworked SetItemUsingMouseWheel() to use this for ActiveId. ( #2891 )
...
The rework of SetItemUsingMouseWheel() is half-complete since there's a HoveredIdUsingMouseWheel component. This will however be totally cleaned when we transtion to InputOwner system.
2022-07-08 18:32:25 +02:00
ocornut
105bb3ef8a
Legacy: clear g.ActiveIdUsingNavInputMask when active id is clear + Internals: added helpers GetKeyChordName(), ImGuiModFlags_All.
...
Amend 8b8a61b
2022-07-08 17:51:46 +02:00
ocornut
8b8a61bdf9
Removed io.NavInputs[] and ImGuiNavInput enum. Kept inline redirection code. ( #4921 , #4858 , #787 , #1599 , #323 )
2022-07-08 16:02:07 +02:00
ocornut
92d0924b82
Fixed build with IMGUI_DISABLE_OBSOLETE_KEYIO + made all examples comments refer to StyleColorsLight().
2022-07-06 20:58:20 +02:00
ocornut
4711b9b05a
Add trailing commas to enum (to simplify the diff/patch of further additions) ( #4537 )
...
Possible since we are now C++11 + fix warning in GetNavInputAmount().
2022-07-06 20:39:39 +02:00
ocornut
90ef327882
Reordered keys representing directions to follow a consistent L/R/U/D order everywhere. ( #2625 , #4921 , #3724 )
...
Amended to avoid static analysis false positive.
2022-07-06 17:48:01 +02:00
ocornut
467a1cd4a5
Misc: io.Framerate moving average now converge in 60 frames instead of 120. ( #5236 , #4138 )
2022-07-01 17:09:58 +02:00
ocornut
609b935a8c
InputText: added experimental io.ConfigInputTextEnterKeepActive feature to make pressing Enter keep the input active and select all text.
2022-06-30 15:47:54 +02:00
ocornut
24dfe6db8a
Version 1.89 WIP
2022-06-27 16:55:55 +02:00
ocornut
9aae45eb4a
Version 1.88
...
(fix "Show Debug Log" checkbox in Metrics window)
2022-06-21 18:11:50 +02:00
ocornut
d3fd2630b7
Sliders: An initial click within the knob/grab doesn't shift its position. ( #1946 , #5328 ) + Adjust default GrabMinSize.
2022-06-20 18:13:10 +02:00
Rokas Kupstys
37a07858a9
Nav: Fixed inability to cancel nav in modal popups. ( #5400 )
2022-06-17 14:58:26 +02:00