ocornut
528104a89b
Menus: adjust closing logic to accomodate for varying font size and dpi + remove seemingly redundant use of g.NavActivateId where pressed was enough.
3 years ago
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 )
3 years ago
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)
3 years ago
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.
3 years ago
Filippo Crocchini
eb6c16d3dd
PlotHistogram: Fixed zero-line position when manually specifying min<0 and max>0. ( #4349 )
...
+ amended demo tweaks by ocornut
3 years ago
ocornut
7c4ffe490d
Menus: added internal's BeginMenuEx() matching MenuItemEx() with icon parameter. (amend f8fae022
)
3 years ago
ocornut
ccfb20095e
Nav: small refactor of forwarding, clarified that MoveDir only set when RequestActive, removed one indent level in NavUpdatePageUpPageDown().
3 years ago
ocornut
20a1edef89
Nav: made EndMenuBar() use NavMoveRequestForward() for consistency. Moved forward clearing to NavMoveRequestApplyResult(). Improved/fixed comments.
3 years ago
ocornut
780c1ee265
TextUnformatted: Accept null ranges including (NULL,NULL) without asserting. ( #3615 )
3 years ago
ocornut
0608887fb5
InputTextMultiline: Fixed label size not being included into window contents rect unless the whole widget is clipped.
3 years ago
ocornut
0649f750b4
Version 1.85 WIP
3 years ago
ocornut
d2ffbd9b86
Version 1.84
...
Fix PVS Studio false positive //-V1020
Fix missing #ifndef for IMGUI_IMPL_OPENGL_LOADER_CUSTOM path
3 years ago
ocornut
c543d93af1
Expose BeginDisabled()/EndDisabled() in public API. Add to demo. ( #211 )
3 years ago
ocornut
161b74e871
Fix tabbing in/out of an InputTextMultiline(), broken by 6b8a059
.
3 years ago
Oliver 'kfsone' Smith
7e9e1ff1c2
InputText: Fix named filtering flags disabling newline or tabs in multiline inputs ( #4409 , #4410 )
3 years ago
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.
4 years ago
ocornut
90bf996e1a
Internals: widgets always read back from g.LastItemData.InFlags (so we can now modify per-item disable state more easily). ( #211 )
4 years ago
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 )
4 years ago
ocornut
1ad153056a
Internals: ItemAdd: set LastItemXXX fields before navigation calls + comments about io.IniFilename ( #4294 )
4 years ago
ocornut
17ec4f1f6f
TestEngine, MenuItem: call IMGUI_TEST_ENGINE_ITEM_INFO() at the right stack level. (amend f8fae02
)
4 years ago
ocornut
246ad6c03c
Disabled: items more consistently release active id if the active item got disabled. ( #211 ) (amend 2952525
)
4 years ago
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
4 years ago
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.
4 years ago
ocornut
29525255f3
Disabled items more consistently release active id if the active item got disabled. ( #211 )
4 years ago
ocornut
ba1c8464ef
Internals: Removed ImGuiButtonFlags_Disabled (which had inconsistent behavior) in favor of ImGuiItemFlags_Disabled. Selectable()'s ImGuiSelectableFlags_Disabled now uses the later. ( #211 )
4 years ago
ocornut
f6682404e1
InputInt/InputFloat: When used with Steps values and _ReadOnly flag, the step button look disabled. ( #211 )
4 years ago
ocornut
97638bf977
BeginMenu: remove unnecessary call to ItemHoverable() which is already done by the Selectable() call.
...
Amend 88d7b3de
4 years ago
ocornut
4a100f7f11
Nav: Disabled items are not candidate for default focus. ( #211 , #787 ) + simplify handling of ImGuiButtonFlags_PressedOnDragDropHold path.
4 years ago
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 )
4 years ago
ocornut
696d3e056e
Internals: Menus: Naming offset field + fix spacing/offset computation to handle more offsets.
4 years ago
ocornut
3512f2c2c2
Internals: Menus: minor tidying up + renaming in ImGuiMenuColumns + removing extraneous offset field which is always zero + using smaller types.
...
sizeof() 36 -> 20
4 years ago
ocornut
20d415e939
FIx static analysers warnings and disable false positives.
4 years ago
ocornut
1965f38e9e
ImGuiWindowFlags_UnsavedDocument/ImGuiTabItmeFlags_UnsavedDocument display a dot instead of a '*'.
4 years ago
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
4 years ago
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 )
4 years ago
Rokas Kupstys
d5828cd988
SplitterBehavior: fix using IsItemHovered() after SplitterBehavior()
4 years ago
ocornut
0cca0d1617
Internals/experimental: BeginComboPreview(), EndComboPreview(). ( #4168 , #1658 )
...
(amended)
4 years ago
ocornut
060b6ee7d1
Internals: Combo: Extracted into a BeginComboPopup() function. ( #4168 )
...
Renamed frame_bb > bb locally.
4 years ago
ocornut
5b4bc985ad
Nav, Combo: removed unnecessary window->LastNavIds[] assignment in combo code. + minor renaming.
4 years ago
ocornut
79e18896fe
TabBar: Fixed using more than 32 KB-worth of tab names. ( #4176 )
4 years ago
ocornut
e31d13fa76
Version 1.84 WIP
4 years ago
ocornut
ad5d1a8429
Version 1.83
4 years ago
ocornut
029c83c73e
Combos: Changed the combo popup to use a different id to also using a context menu with the default item id. ( #4167 )
4 years ago
ocornut
5d77b6f274
Docs: update links, sponsors
4 years ago
ocornut
45f5ed52c1
Menus: made MenuItem() in a menu bar reflect the 'selected' argument with a highlight. ( #4128 )
4 years ago
ocornut
e7e170c534
InputText: Internal renaming to use our own types to clarify code a little bit.
4 years ago
ocornut
26a1bbfe1e
InputText: Fixed CTRL+Arrow or OSX double-click leaking the presence of spaces when ImGuiInputTextFlags_Password is used. ( #4155 , #4156 ) [@michael-swan]
4 years ago
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.
4 years ago
ocornut
9b90639577
Internals: ItemFlags is a shared resource as advertised. Fix Begin/PushItemFlags/End sequence (mostly for consistency)
4 years ago
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)
4 years ago
ocornut
89162a04f4
Fixes for PVS Studio and MSVC static analyzers. Using a macro to suppress single-use MSVC false positives. ( #3938 , #4073 )
4 years ago
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.
4 years ago
ocornut
2dec7b3301
InputText: Align caret/cursor to pixel coordinates. ( #4080 )
4 years ago
ocornut
daf97832f1
Internals: Nav: renaming.
4 years ago
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 )
4 years ago
Doug Binks
f08566b4d7
InputText: Do not filter private unicode codepoints (e.g. icons) when pasted from clipboard. ( #4005 )
4 years ago
Chris Ohk
eab3ae473c
Fix warning message C4100 ( #3974 )
...
- warning C4100: 'fmt_out_size': unreferenced formal parameter
4 years ago
ocornut
1dcd3a45cc
ColorEdit4: Alpha default to 255 (instead of 0) when omitted in hex input. ( #3973 )
...
Courtesy of @squadack
4 years ago
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)
4 years ago
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.
4 years ago
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().
4 years ago
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
4 years ago
ocornut
a1a39c632a
Version 1.83 WIP
4 years ago
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 )
4 years ago
ocornut
35b1148efb
Version 1.82
4 years ago
ocornut
352f64697c
Internals: rename legagy tab focus fields to TabFocusXXXX for clarity + removed one unnecessary FocusWindow() call.
4 years ago
ocornut
d94644261d
Drags, Sliders: Support ImGuiSliderFlags_Logarithmic flag with integers. Because why not? ( #3786 )
...
Renamed is_decimal to is_floating_point.
4 years ago
ocornut
287bd9b984
InputText: renamed ImGuiInputTextFlags_AlwaysInsertMode to ImGuiInputTextFlags_AlwaysOverwrite. ( #2863 )
4 years ago
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.
4 years ago
Rokas Kupstys
c2d6d26139
ImDrawList: upgraded AddRect(), AddRectFilled(), PathRect() to use general ImDrawFlags instead of ImDrawCornersFlags
4 years ago
C.Even
a3ebd160cb
Fix unused variable warning in ImGui::EndListBox() ( #3897 )
4 years ago
ocornut
6ba1334903
Nav: internals: renaming ImGuiInputSource so it is not specific to nav. Comments.
4 years ago
Rokas Kupstys
01a2bac7d5
DrawList: Replace "bool close" in drawing functions with flags.
4 years ago
ocornut
a64e0eb3a4
Nav: merged SetNavID() and SetNavIDWithRectRel() to improve sanity, moved flags overwrite off them. ( #787 )
4 years ago
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 )
4 years ago
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.
4 years ago
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.
4 years ago
ocornut
fdebb2e093
Internals: removed HoveredRootWindow, tweak IsWindowHovered().
4 years ago
ocornut
3776ba565f
Internals: TabBar: minor tweaks and renaming.
4 years ago
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 )
4 years ago
ocornut
0ecdf8167c
DragScalar: Fixed crash when using DragScalar() directly with ImGuiSliderFlags_AlwaysClamp + only one of either p_min or p_max set. ( #3824 ) [@harry75369]
4 years ago
ocornut
30b7545841
Version 1.82 WIP
4 years ago
ocornut
4df57136e9
Version 1.81
4 years ago
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.
4 years ago
ocornut
03d74a293d
ListBox: renamed ListBoxHeader>BeginListBox, ListBoxFooter>EndListBox. Added demo bits.
4 years ago
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.
4 years ago
ocornut
e5cbf60def
ListBox: tweaked default height calculation. simplifying code internally (rework passing of full rect). Should have no visible side-effects + misc comments.
4 years ago
freddii
90a518c501
Fixed typos ( #3782 )
4 years ago
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.
4 years ago
ocornut
a3f0393351
Menus: Fixed an issue with child-menu auto-sizing (issue introduced by 6af92b0
) ( #3779 )
4 years ago
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.
4 years ago
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
4 years ago
Erwin Coumans
4dec436161
SliderInt: Fixed click/drag when v_min==v_max from setting the value to zero. ( #3774 )
4 years ago
ocornut
2ed47e5822
Version 1.81 WIP
4 years ago
ocornut
58075c4414
Version 1.80
4 years ago
ocornut
6737037743
Tab Bar: fix 0ea4408
( #3414 )
4 years ago
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.
4 years ago
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 )
4 years ago
ocornut
0ea4408fd4
Tab Bar: Requested ideal content size (for auto-fit) doesn't affect horizontal scrolling. Followup to afa01d8. ( #3414 )
...
+ minor Table rename
4 years ago
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
4 years ago