ocornut
2d38bc99b3
Internals: renamed recently added ImGuiInputReadFlags to ImGuiInputFlags. (Amend 8b8a61b
)
2022-07-22 17:05:34 +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
a7a25ee19d
Tools: Item Picker: Mouse button can be changed by holding Ctrl+Shift. ( #2673 )
2022-07-07 14:18:08 +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
f9ccdba352
Nav: Fix regression 93f02ee
+ Internals: Remove ImGuiNavReadMode_Pressed, ImGuiNavReadMode_Released.
...
Toward using keys.
2022-07-06 17:03:50 +02:00
ocornut
93f02ee0c6
Nav: Fixed moving window with gamepad or keyboard when running at very high framerate + removed ImGuiNavDirSourceFlags_RawKeyboard.
2022-07-06 16:46:57 +02:00
ocornut
0b2da67912
Internals: clarified that GetInputTextState(0) can not return a pointer. Replaced a use of __APPLE__ with io.ConfigMacOSXBehaviors.
2022-07-05 14:40:09 +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
0afc6cd310
Internals: InputTextEx() renames for correctness. enter_pressed -> validated, is_validate_enter -> is_enter_pressed
2022-06-30 15:31:42 +02:00
ocornut
873e9d35ac
Internals: renamed TreeNodeBehaviorIsOpen() to TreeNodeUpdateNextOpen(). Added internal TreeNodeSetOpen(id). ( #5423 )
2022-06-28 16:11:31 +02:00
ocornut
24dfe6db8a
Version 1.89 WIP
2022-06-27 16:55:55 +02:00
ocornut
088ddef98a
Tables: extracted some code into TableBeginContextMenuPopup() for easier reuse for appending into context menu.
2022-06-27 16:51:08 +02:00
ocornut
9aae45eb4a
Version 1.88
...
(fix "Show Debug Log" checkbox in Metrics window)
2022-06-21 18:11:50 +02:00
ocornut
c4b9101759
TabBar: Tweak shrinking policy so that while resizing tabs that don't need shrinking keep their initial width more precisely.
...
Has been the case before but adding support for SetNextItemWidth() #5262 made this more noticeable.
2022-06-21 17:13:13 +02:00
ocornut
4b97296148
TabBar: TabItem() now reacts to SetNextItemWidth() and SetNextItemOpen(true). ( #5262 )
2022-06-21 17:13:12 +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
ocornut
dd28500835
Debug: Add more log. Reworked IMGUI_DEBUG_PRINT IMGUI_DEBUG_PRINTF. Added internal IsDragDropActive() helper.
...
DebugLog() output to TTY by default.
Amend 1d6e34f
.
2022-06-15 11:31:19 +02:00
ocornut
2ed9e21eba
Nav, Internals: wrap changes to g.NavWindow into a helper function to help track/log changes.
...
Amend 076d8fc
. Eventually we should REALLY clean up the SetNavWindow SetNavID SetFocusID FocusWindow fiasco.
2022-06-13 19:05:55 +02:00
ocornut
1d6e34f3f9
Debug: Added ShowDebugLogWindow().
...
Internal: renamed old IMGUI_DEBUG_LOG() to IMGUI_DEBUG_PRINT().
Amended once.
2022-06-13 19:05:55 +02:00
Rokas Kupstys
0b1bcfcc20
Menus: Separate menu sets by nav layer. ( #3496 , #4797 ) + Demo: Remove incorrect and useless suggestion to use PushID().
...
Fixes a common case where opening menu in one nav layer and hovering a menu in another nav layer would open that menu without a click.
2022-06-08 17:17:54 +02:00
ocornut
23a785aeb3
Internals: wrapped used of g.TempBuffer into ImFormatStringToTempBuffer/ImFormatStringToTempBufferV helpers.
...
This leaves us room for growing the buffer if needed, and gives us a resizable buffer available for other work.
2022-06-07 19:20:03 +02:00
ocornut
64d6c30562
InputText: Fixed an undo-state corruption issue when editing buffer before reactivating item. ( #4947 ) + Metrics: Added "InputText" section.
2022-06-07 15:34:21 +02:00
ocornut
7bf07d2526
Renamed CaptureMouseFromApp() and CaptureKeyboardFromApp() to SetNextFrameWantCaptureMouse() and SetNextFrameWantCaptureKeyboard(). Added demo. ( #5304 , #4831 , #4480 , #533 )
2022-05-23 11:22:46 +02:00
ocornut
9e0517a134
DrawList: Fixed divide-by-zero or glitches with Radius/Rounding values close to zero. ( #5249 , #5293 , #3491 )
...
Amend 8ed34af6f8
2022-05-13 17:19:51 +02:00
ocornut
9779cc2fe2
Internals: shallow changes to simplify diff of upcoming commits. Should have no side-effect.
2022-05-06 14:20:01 +02:00
ocornut
6d27fecce1
Debug: added DebugTextEncoding() to help diagnose between text encoding issues and font loading issues. Simplified code + extracted DebugNodeFontGlyph().
...
Helper to diagnose issues such as #4866 , #3558 , #3436 , #2233 , #1880 , #1780 , #905 , #832 , #762 , #726 , #609 , #565 , #307 )
2022-05-03 19:23:54 +02:00
ocornut
3e5dde9a26
Tables: Fixed incorrect auto-fit of parent windows when using non-resizable weighted columns. ( #5276 )
2022-05-02 16:45:27 +02:00
ocornut
314c7bd12f
Internals: renamed ImGuiInputReadMode to ImGuiNavReadMode (internals) to avoid ambiguity with upcoming flags. + minor tweak
2022-04-28 17:29:47 +02:00
ocornut
5b29d14783
Layout: Fixed mixing up SameLine() and SetCursorPos() together. SameLine() is a stateful.
...
+ minor unrelatedcomments.
2022-04-22 17:48:06 +02:00
ocornut
28b2089ee4
Internals: moved ItemSize() variant to inline + comment. + Tidying up todo list ( #5191 )
2022-04-13 21:48:21 +02:00
ocornut
6d15a506fa
Internals: removed GetIDNoKeepAlive() now that it is the same as GetID(). ( #5181 )
...
Amend 9038678
2022-04-12 14:49:21 +02:00
ocornut
2c03aac6d3
Renamed ImGuiKeyModFlags to ImGuiModFlags (Breaking but technically never advertised type)
2022-04-05 15:45:00 +02:00
ocornut
c521883be4
Sliders, Drags: Fixed manual input when using hexadecimal display format string. ( #5165 , #3133 )
...
InputScalar: Fixed manual input when using %03d style width in display format string.
(amended once)
2022-04-04 18:42:04 +02:00
ocornut
508c9aaf60
Sliders, Drags: Fixed using hexadecimal display format strings (pretty much never worked). ( #5165 , #3133 )
...
Ditched unnecessary code. When transitioning from float in 3e8087458
we added an unnecessary path there, which evolved in c5fb92955
.
2022-04-04 14:43:30 +02:00
ocornut
f5c5926fb9
Internals: remove obsolete variants of RenderArrow(), RenderBullet(), ImHash() + misc comments.
2022-03-29 15:43:47 +02:00
ocornut
2747a8ca40
Turned ImVec2 to const ref to RenderChar(), RenderText(), ColorButton(), PushClipRect(). for consistency. Comments about polygon filling winding order.
2022-03-29 12:13:31 +02:00
ocornut
3587ee492b
Viewports: store Viewport field in ImGuiWindow to facilitate using code accross branches + fix PVS warnings.
2022-03-25 15:40:20 +01:00
ocornut
16ddc1698d
Fixed creating multiple-context (regression in 28ba54a
). ( #5135 )
2022-03-24 11:01:46 +01:00
ocornut
28ba54a32a
Internals: add AddSettingsHandler(), RemoveSettingsHandler().
2022-03-14 10:23:30 +07:00
ocornut
fd06ed833b
Misc: tweaks + fix warnings on backends withtout -wno-memaccess ( #4995 , #5104 )
2022-03-13 17:57:32 +07:00
ocornut
0f14933577
Tables: Fixed incorrect border height used for logic when resizing one of several synchronized instance of a same table ID, when instances have a different height. ( #3955 , #3565 )
2022-03-01 18:47:03 +01:00
ocornut
2dfa71fad5
Inputs: Fixed IsMouseClicked() repeat mode rate being half of keyboard repeat rate. Using KeyModAlt. Removed KeyModsPrev.
2022-02-16 20:08:58 +01:00
ocornut
5854da10e6
Declare other structures as constexpr ( #4995 ) + rename ImGuiInputEventType_Char to ImGuiInputEventType_Text for consistency with event structure.
2022-02-11 12:29:55 +01:00
ocornut
aa79d0cd2f
Stack Tool: Added option to copy item path to clipboard. ( #4631 )
2022-02-08 16:36:54 +01:00
ocornut
88de982071
Version 1.88 WIP
2022-02-08 14:45:26 +01:00
ocornut
97b1abd6dd
Internals: rework RenderMouseCursor() signature so we can use it in docking branch more naturally.
2022-02-08 12:22:46 +01:00
ocornut
c71a50deb5
Version 1.87
2022-02-07 18:16:54 +01:00
ocornut
6f73dbea80
TestEngine: submit window data to item system.
2022-02-01 15:20:32 +01:00
ocornut
35e197f413
TestEngine: fixed InvisibleButton() and ArrowButton() not calling the info macro.
2022-02-01 11:52:38 +01:00
ocornut
64d910ad37
Removed IMGUI_API from inline templated classes. ( #4962 )
2022-01-29 18:10:36 +01:00
ocornut
49e38a5b32
Revert moving ImGuiKeyModFlags to internal.h (amendc906c65)
2022-01-28 15:53:09 +01:00
ocornut
c906c65cac
(BREAKING) Replaced AddKeyModsEvent() added by 790132a
in favor of unified key enum system. Backends: update most. ( #4921 , #4858 )
...
Sorry this is an unusual breaking but since we are WIP it is a good time to make a correction.
2022-01-27 17:46:48 +01:00
ocornut
8555335935
Shallow alignment of ImGuiKey stuff + moving some in internals. Internals: add offset to ImBitArray<>, simpify ActiveIdUsingKeyInputMask.
2022-01-25 18:11:34 +01:00
ocornut
cff0342454
Internals: moved lines into a Inputs section.
2022-01-21 17:49:04 +01:00
ocornut
62d6be3747
IO: Removed ImGuiInputSource from public api for now, unnecessary. ( #4858 , #787 )
2022-01-20 17:39:25 +01:00
ocornut
f33bb99821
IO: added AddKeyAnalogEvent() and support for ImGuiKey_GamepadXXXX. ( #4858 , #787 )
2022-01-20 17:24:52 +01:00
ocornut
26d04c948f
Tables: Fixed positioning of Sort icon on right-most column with some settings (not resizable + no borders). ( #4918 ).
2022-01-19 18:03:36 +01:00
ocornut
97b1ffcb3b
IO: Reorder enums, compact a little in header. Removed const from internal GetKeyData().
2022-01-19 15:42:27 +01:00
ocornut
91ae56af45
Removed support for legacy arithmetic operators (+*/) when inputing text into a slider/drag. ( #4917 , #3184 )
2022-01-19 15:10:42 +01:00
ocornut
90a6961638
IO: apply same flooring as UpdateMouseInputs() in dupe event processing. ( #4858 ) + provision for test engine.
2022-01-17 18:10:51 +01:00
ocornut
7374b96f5c
IO: Added input queue. ( #4858 , #2787 , #1992 , #3383 , #2525 , #1320 )
2022-01-17 17:36:55 +01:00
ocornut
eb823655af
Removed support for pre-C++11 compilers. We'll stop supporting VS2010. ( #4537 )
...
Build all
2022-01-17 11:54:11 +01:00
ocornut
290c51735e
Fixed warning in ImFloorSigned(). ( #4889 )
2022-01-12 14:18:34 +01:00
ocornut
956e03009a
Backends: OSX: Build fIx. Made GetKeyName() input tolerant. Internals: added GetNavInputName().
2022-01-11 18:48:16 +01:00
ocornut
bf08c13e9b
Inputs: Extra Keys / AddKeyEvent(): bidirectional mapping, basic CI, simplify backends, asserts on misuses, tested backward compat. ( #2625 , #4858 , #2787 )
...
(edit: simplified backends merged into previous commits to make history clearer)
2022-01-10 15:09:56 +01:00
thedmd
3b66929301
Inputs: Extra Keys / AddKeyEvent(): Added ImGuiKey values, io.AddKeyEvent(), GetKeyName(), IMGUI_DISABLE_OBSOLETE_KEYIO. Obsoleted GetKeyIndex(), io.KeyMap[], io.KeysDown[]. ( #2625 , #4858 , #2787 )
2022-01-10 15:09:56 +01:00
ocornut
2706c9d66e
Platform IME: reworked internals to simplify adding new features.
2022-01-05 13:47:20 +01:00
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
980deb4c9e
Add missing include guard to avoid declaring ImFontAtlasGetBuilderForStbTruetype() function.
...
https://github.com/cimgui/cimgui/issues/193
https://github.com/imgui-rs/imgui-rs/pull/582
2021-12-26 19:51:10 +01:00
ocornut
512c54bbc0
Version 1.86
2021-12-22 15:31:13 +01:00
ocornut
1c4066cd9e
Internals: UpdateWindowInFocusOrderList: amend a528398
to fix docking. ( #3496 , #4797 )
2021-12-15 14:27:56 +01:00
ocornut
11638fdf7d
Menus: reuse more menu windows when stacked over popups.
...
This is actually mostly aimed at ensuring the _ChildWindow flag on menu window doesn't vary as this would cause issues with our current g.WindowsFocusOrder[] scheme
2021-12-13 19:35:16 +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
027a7ba3eb
Clipper: use line size instead of cursor comparaison when range are large. ( #3609 , #3962 + https://github.com/ocornut/imgui_club/issues/20 )
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
23ef6c149e
Reworked modal/ctrl+tab dimming system to be entirely processed at end of the frame (backported 1dc3af3
from docking)
2021-12-03 19:21:39 +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
f087a5b856
Metrics: Added a node showing windows in submission order and showing the Begin() stack.
2021-11-30 16:04:19 +01:00
ocornut
9d704d99d3
Internals: wrapped ImQsort() in an inline function + added a define guard.
2021-11-30 12:59:00 +01:00
averne
cb5c73f64a
Fix: IM_DEBUG_BREAK macro on ARM GCC ( #4767 )
2021-11-29 00:05:57 +01:00
ocornut
65f4be1a10
InputText: Internals: moved "apply_new_text" application code to reduce noise in a future commit (will be for #4714 ) + removed unused fields.
...
The move would ideally be no-op. technically we now clear state->Flags before calling ResizeCallback but those are unrelated. The 2 unused fields were incorrectly added by 24ff25981
.
2021-11-25 15:12:23 +01:00
Rokas Kupstys
4d9a3b19d5
Internals: Implement a continuable IM_DEBUG_BREAK on GCC for common archs. ( #2673 )
2021-11-22 12:35:07 +01:00
ocornut
f8a806ad9f
Tooltips, Internal: (Breaking) swapped parameter order to accomodate for future tooltip api rework.
2021-11-10 17:53:58 +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
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
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
a67f7dce31
Nav: relative rectangle positions are now stored relative to CursorStartPos to be independent of scrolling. Will facilitate rework of clipper ( #3841 )
...
+ Extracted code into NavUpdateCreateWrappingRequest()
+ Fix for PVS in NavUpdate() assigning g.NavMousePosDirty twice.
2021-10-27 14:18:03 +02:00
ocornut
8361ed1f54
Nav: wrap abs<>rel rectangle conversions before we attempt to switch the reference point from window->Pos to window->DC.CursorStartPos. This commit should have no effect.
...
Current point makes rectangle invalid right after a scroll, for interactive actions it's rarely a problem but e.g. clipper will want to use g.NavID rect rel while scrolling. (#3841 )
2021-10-27 12:28:45 +02:00
ocornut
e3bd9434b1
1.86 WIP + internals: tweaks table temp data code.
2021-10-14 16:58:14 +02:00
Rokas Kupstys
be03b8ff93
Misc: Fix build with MinGW when using IMGUI_API.
2021-10-12 16:43:28 +02:00
ocornut
55d35d8387
Version 1.85
2021-10-11 19:24:25 +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
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
2de96c4bd5
Stack Tool: Added Stack Tool (ShowStackToolWindow() function and available from Demo and Metrics window). ( #4631 )
2021-10-06 17:47:27 +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
fc4988ffb0
Added ImGuiFocusedFlags_NoPopupHierarchy and ImGuiHoveredFlags_NoPopupHierarchy (followup #4527 )
2021-09-24 15:39:38 +02:00
ocornut
24a77824f2
Added ClosePopupsExceptModals() helper, unused for now (aimed at user being able to close popups on app focus loss, not necessarily a suitable default)
2021-09-22 15:50:40 +02:00
Rokas Kupstys
30546bc0e7
ColorEdit: Fix multiple issues. ( #4014 )
...
* Change g.ColorEditLastColor type to ImU32 and store RGB color value.
- Fixes inability to change hue when saturation is 0. (#4014 )
- Fixes edgecases where lossy color conversion prevent restoration of hue/saturation.
- Fixes hue value jitter when modifying color using SV square.
* Fix hue resetting to 0 when it is set to 255 by explicitly restoring hue if it is 0 and previous value was 1.
* Further reduce hue jitter by restoring hue when color is modified using SV square.
2021-09-21 15:10:07 +02:00
ocornut
3973de7933
Internals: removed last parameter to IsClippedEx() + fix PVS studio warnings.
2021-09-16 18:07:17 +02:00
ocornut
2d0a6a4969
Misc: moved StacSizeOnBegin out of window instance into window stack data.
2021-09-15 15:36:03 +02:00
ocornut
66cd21db88
Misc: extracted ErrorCheckEndWindowRecover() out of ErrorCheckEndFrameRecover(). ( #1651 )
2021-09-15 15:26:29 +02:00
ocornut
d366694062
Disabled: Added assert guard for mismatching BeginDisabled()/EndDisabled() blocks. ( #211 ) + Added asserts for missing PopItemFlag() calls. Added both to ErrorCheckEndFrameRecover ( #1651 )
2021-09-15 15:26:29 +02:00
ocornut
d9b427cce0
Nav: clarified/renamed NavInputId as NavAcivateInputId, added flags shared by both.
...
(this commit should have no visible side effect but is designed to introduce the followup commit refactoring SetKeyboardFocusHere into using a Nav request)
2021-09-07 18:10:31 +02:00
ocornut
ade4c15eea
Nav: Tidying up, renaming + update AnyRequest flag in NavMoveRequestSubmit().
2021-09-03 16:35:41 +02:00
ocornut
5ee40c8d34
Nav: always disable highlight if nav is disabled, fix for IMGUI_DEBUG_NAV_SCORING, minor renaming.
2021-09-02 12:05:32 +02:00
ocornut
3d9d3b49ae
Internals: folded ImGuiItemAddFlags into ImGuiItemFlags. ImGuiItemAddFlags_Focusable > ImGuiItemFlags_Inputable. One step in the big nav/tab/focus rework.
...
Bonus simplified Selectable() handling of its custom disabled flag. (#211 )
2021-09-01 14:46:08 +02:00
ocornut
73a5e82e04
Nav: removed parameters from NavScoreItem(), NavProcessItem(), NavApplyItemToResult(): made little sense / misleading because pulling from other current state anyway.
...
Will readd in a more thorough manner is actually needed.
2021-09-01 14:13:40 +02:00
ocornut
a735a8c084
Nav: storing NavRect in LastItemData. Fix race condition where framed items (Rect != NavRect) calling SetFocusID() would store the wrong NavRectRel until next frame
...
(haven't dugged in the possible side-effects of that race condition)
2021-09-01 12:12:51 +02:00
ocornut
ee351d3548
Nav: move code into NavMoveRequestSubmit(). NavApplyItemToResult() takes absolute rect., comments
2021-09-01 12:06:15 +02:00
ocornut
7b913db1ce
Nav: split NavMoveRequest into NavMoveSubmitted + NavMoveScoringItems to allow operation to defer a move request and provide result immediately + fix regular scoring needlesly running during init + some renaming.
2021-08-31 18:19:52 +02:00
ocornut
7c4ffe490d
Menus: added internal's BeginMenuEx() matching MenuItemEx() with icon parameter. (amend f8fae022
)
2021-08-30 19:54:42 +02:00
ocornut
ccfb20095e
Nav: small refactor of forwarding, clarified that MoveDir only set when RequestActive, removed one indent level in NavUpdatePageUpPageDown().
2021-08-27 20:48:01 +02:00
ocornut
4351febe9f
Nav: moved enums/struct declarations in imgui_internal.h
2021-08-27 18:01:38 +02:00
ocornut
20a1edef89
Nav: made EndMenuBar() use NavMoveRequestForward() for consistency. Moved forward clearing to NavMoveRequestApplyResult(). Improved/fixed comments.
2021-08-27 17:21:10 +02:00
ocornut
84890a3074
Nav: simplify wrap requests code (may soon be useable for tabbing)
2021-08-27 12:31:11 +02:00
ocornut
51d841dcf3
Fix warnings and remove IM_RETURN ( #4470 )
...
Amend f24abbc4
2021-08-24 14:37:11 +02:00
ocornut
0649f750b4
Version 1.85 WIP
2021-08-23 15:31:06 +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
f24abbc47d
Fix various warnings ( #4442 )
2021-08-18 12:38:24 +02:00
ocornut
3d4d1b8553
Allow imgui_internal.h to be included before imgui.h
...
(practically speaking it allows me to use StructLayout without hassle)
2021-07-26 21:01:32 +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
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
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
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
cc40ae2101
PushDisabled(): added bool + clarify support for stacked disabled ( #211 )
2021-07-08 19:21:59 +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
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
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
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
98876b4dc2
Added IMGUI_DISABLE_SSE ( #4250 , #4091 )
2021-06-21 14:52:01 +02:00
ocornut
7c44d067e8
Tables: Fix invalid data in TableGetSortSpecs() when SpecsDirty flag is unset. ( #4233 )
...
Amend 4ce6bd8cf
, but with usage of ImPool<> bug existed even before 4ce6bd8c
. Would only materialize if user called (ableGetSortSpecs and used data without checking SpecsDirty.
2021-06-17 15:18:11 +02:00
ocornut
dc676236f0
Minor optimization, removing do/while(0) patterns in some cases as they translate to runtime
...
(e.g. translate to xor + test + jne in VS x84, unnecessary)
2021-06-15 17:05:25 +02:00
ocornut
0cca0d1617
Internals/experimental: BeginComboPreview(), EndComboPreview(). ( #4168 , #1658 )
...
(amended)
2021-06-15 15:27:28 +02:00
ocornut
61f4aec868
Added PushDisabled(), PopDisabled() currently only exposed in imgui_internal.h ( #211 )
2021-06-09 15:28:59 +02:00
ocornut
6ee398ac2b
Tables: Added ImGuiTableColumnFlags_Disabled acting a master disable over (hidden from user/context menu). ( #3935 , #3740 )
2021-06-07 15:18:20 +02:00
ocornut
2887a6e07d
Tables: made TableUpdateBorders() use IsVisibleX flag. comments.
2021-06-07 10:27:11 +02:00
ocornut
94b680e830
Internals: fixed ImPool:: iteration, rename GetBufSize to GetMapSize. Amend c6c82b9f
2021-06-04 17:27:20 +02:00
ocornut
c6c82b9f1d
Internals: fixed iterating ImPool, fix after use of TableRemove() (was only used by TestEngine)
...
Merge metrics bits from 646c87359
2021-06-03 18:36:43 +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
04fd5072fb
Fix warnings with VS2019 in C++20 mode ( #4173 )
2021-05-25 18:43:52 +02:00
ocornut
c2bf4abfa1
Internals: Added ImTextCharToUtf8() helper. Added "out_" markers in more UTF-8 functions. Metrics: Fonts: Fixed display of EllipsisChar by feeding proper utf-8.
2021-05-25 13:37:27 +02:00
ocornut
3a941f95e9
Metrics, Demo: moved font details display to metrics code. ( #4171 )
2021-05-25 13:37:27 +02:00
ocornut
e31d13fa76
Version 1.84 WIP
2021-05-25 13:36:53 +02:00
ocornut
ad5d1a8429
Version 1.83
2021-05-24 17:39:25 +02:00
ocornut
c708299ca9
Docs: Improvements to description of using colored glyphes/emojis. ( #4169 , #3369 ) + Add Fonts to Metrics. Removed IMGUI_HAS_TABLE markers.
2021-05-24 13:07:26 +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
41030cbfe2
Tweak computation of io.Framerate so it is less biased toward high-values in the first 120 frames. ( #4138 )
2021-05-16 20:37:38 +02:00
ocornut
4ce6bd8cff
Tables: sharing splitter and sort buffers between tables, reducing memory footprints. ( #3740 )
...
+ GC pass on that data.
2021-05-07 20:49:52 +02:00
ocornut
32c453ae53
Tables: sharing transient buffers between tables, reducing memory footprints. ( #3740 )
2021-05-07 20:49:52 +02:00
Bartosz Taudul
4c9f0cec27
Add and use SSE-enabled ImRsqrt() in place of 1.0f / ImSqrt(). ( #4091 )
...
Squashed 3 commits.
2021-05-06 17:27:19 +02:00
ocornut
84545dbe6f
Disabling some of MSVC most aggressive Debug runtime checks for some simple/low-level functions
...
(e.g. ImVec2, ImVector) leading to a 10-20% increase of performances with MSVC "default" Debug settings.
2021-05-06 13:04:35 +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
788e91aece
Fixes for MSVC static analyzers (wider range of versions). ( #3938 , #4073 ) + warning fix ( #4089 ) + comments.
2021-04-30 18:21:07 +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
daf97832f1
Internals: Nav: renaming.
2021-04-23 18:39:08 +02:00
ocornut
936f53229d
Internals: maintaining focus order inside windows + only storing root windows in WindowsFocusOrder[] array. (toward #2304 )
2021-04-16 19:28:24 +02:00
thedmd
690a90bd35
Make PathArcTo accept counter-clockwise angles ( #4030 , #3491 )
2021-04-15 16:09:38 +02:00
ocornut
7c9c5dbe9a
Internals: Added ImFloorSigned() + use our own ImFloorSigned() for stb_truetype, compared as matching output for variety of font data. ( #2884 )
2021-04-15 14:27:45 +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
3c7177c6a7
Internals: storing WindowsHoverPadding in context for external access. + Docs update binaries
2021-03-31 16:06:36 +02:00
ocornut
45c45d2506
Internals: shallow tidying up of the old resize border structure. Make them match the ImGuiDir order. Split GetWindowResizeID() into GetWindowResizeCornerID() and GetWindowResizeBorderID().
2021-03-30 16:44:47 +02: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
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
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
aa5431fde2
Tables: Expose TableSetColumnEnabled() in public api. ( #3935 )
2021-03-24 14:36:01 +01:00
Rokas Kupstys
0c5b0c8b97
Internals: Add a way to request window to not process any interactions for specified number of frames.
2021-03-18 14:19:23 +01:00
ocornut
a1a39c632a
Version 1.83 WIP
2021-03-16 14:45:30 +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
Rokas Kupstys
c2d6d26139
ImDrawList: upgraded AddRect(), AddRectFilled(), PathRect() to use general ImDrawFlags instead of ImDrawCornersFlags
2021-03-11 16:03:32 +01:00
thedmd
e45847d99a
Add version of PathArcTo() and PathArcToFast() with adaptive rendering quality. ( #3491 )
2021-03-11 11:23:55 +01:00
ocornut
6ba1334903
Nav: internals: renaming ImGuiInputSource so it is not specific to nav. Comments.
2021-03-10 16:36:39 +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
954b06afe2
Drag and Drop: can use BeginDragDropSource() for other than the left mouse button ( #1637 , #3885 )
...
As long as the item has an ID (for ID-less items will add new functionalities later.
Amend 2c3c5125
2021-03-08 15:50:53 +01:00
ocornut
fdebb2e093
Internals: removed HoveredRootWindow, tweak IsWindowHovered().
2021-03-05 15:56:59 +01:00
ocornut
ee643b2ad9
IsItemHovered(): fixed return value false positive when used after EndChild(), EndGroup() or widgets using either... ( #3851 , #1370 )
...
...when the hovered location is located within a child window, e.g. InputTextMultiline().
This is intended to have no side effects, but brace yourself for the possible comeback..
This essentially makes IsItemHovered() not accept hover from child windows, but EndChild/EndGroup are forwarded.
More or less should fix/revert c76f014292
which was a revert of 344d48be3
2021-03-04 19:59:59 +01:00
ocornut
d8c88bd943
Tables: Fixed unaligned accesses when using TableSetBgColor(ImGuiTableBgTarget_CellBg). ( #3872 )
...
ImSpanAllocator: Support for alignment.
2021-03-04 09:52:03 +01:00
ocornut
23ab4978e4
ImFontAtlas: Added 'bool TexPixelsUseColors' output to help backend decide of underlying texture format. ( #3369 , #3844 )
2021-03-02 15:04:34 +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
fb15d8c858
Improve on automatic circle segment count calculation. ( #3808 ) Amends
2021-02-17 14:22:31 +01:00
thedmd
f107693d9b
Improve on automatic circle segment count calculation. ( #3808 )
2021-02-17 12:55:39 +01:00
ocornut
b47aa46d81
Tables: TableSetupColumn() user id uses ImGuiID as intended (typedef ImU32). internals: added GetCurrentTable(), LeftMostEnabledColumn. Demo/docs tweaks.
2021-02-17 12:18:22 +01:00
ocornut
30b7545841
Version 1.82 WIP
2021-02-15 18:10:14 +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