1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-14 11:07:48 +01:00
Commit Graph

746 Commits

Author SHA1 Message Date
ocornut
7b8bc864e9 Menus: Fixed vertical alignments of MenuItem() calls within a menu bar. (broken by f8fae022). (#4538) 2021-09-14 11:09:39 +02:00
ocornut
82754561e2 Nav: Fixed a few widgets from not setting reference keyboard/gamepad navigation ID when activated with mouse. 2021-09-13 15:17:54 +02:00
ocornut
17a7084b57 Menus: Fixed crash when navigating left inside a child window inside a sub-menu. (#4510). 2021-09-10 15:37:59 +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
bd6c9e99fc InputText: Allow cancelling/validating input with gamepad nav events.
Amend 158995f2 (#2321)
2021-09-06 18:47:12 +02:00
ocornut
0a154b30ad Nav, ButtonBehavior: reworked old code which ended up 1) calling SetActiveId repeately and 2) misleadingly set g.NavActivateId (amend af38749e) 2021-09-03 17:27:27 +02:00
ocornut
ade4c15eea Nav: Tidying up, renaming + update AnyRequest flag in NavMoveRequestSubmit(). 2021-09-03 16:35:41 +02:00
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. 2021-09-03 16:35:27 +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
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
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
Filippo Crocchini
eb6c16d3dd PlotHistogram: Fixed zero-line position when manually specifying min<0 and max>0. (#4349)
+ amended demo tweaks by ocornut
2021-08-31 13:14:43 +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
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
780c1ee265 TextUnformatted: Accept null ranges including (NULL,NULL) without asserting. (#3615) 2021-08-24 19:30:02 +02:00
ocornut
0608887fb5 InputTextMultiline: Fixed label size not being included into window contents rect unless the whole widget is clipped. 2021-08-23 17:07:46 +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
c543d93af1 Expose BeginDisabled()/EndDisabled() in public API. Add to demo. (#211) 2021-08-20 16:34:43 +02:00
ocornut
161b74e871 Fix tabbing in/out of an InputTextMultiline(), broken by 6b8a059. 2021-08-17 20:46:39 +02:00
Oliver 'kfsone' Smith
7e9e1ff1c2 InputText: Fix named filtering flags disabling newline or tabs in multiline inputs (#4409, #4410) 2021-08-17 16:10:11 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
fdebb2e093 Internals: removed HoveredRootWindow, tweak IsWindowHovered(). 2021-03-05 15:56:59 +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
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
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
2ed47e5822 Version 1.81 WIP 2021-01-25 16:30:44 +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
ocornut
b0db741770 Demo tweaks. Moved Tabs to Widgets section. Added to Tables demo. Increased version following 00b35c08. 2021-01-14 11:59:33 +01:00
ocornut
002ba1a69f Tables: comments, tweak. CollapsingHeader: comments. (#3715) 2021-01-13 10:07:59 +01:00
ocornut
9bcf77eb81 Fixed using IsItemEdited() after Combo() not matching the return value from Combo(). (#2034) + fix some PVS warnings, fix typo, blanks.
Amend e28b1078
2021-01-04 19:15:20 +01:00
ocornut
1c1d3b7ab5 Added 64-bit variants of CheckboxFlags() in imgui_internal.h. Improve assert on mismatched ListBoxFooter() call. Fix FAQ index. (#3687) 2021-01-03 15:45:56 +01:00
ocornut
b015ea93fd Style tweaks, disabled default window rounding by default, reduced size of resize grip, made less prominent, increased WindowBg alpha in classic style.
TestEngine: Fixed Checkbox() not reporting its checkable state when clipped.
2020-12-24 18:31:51 +01:00
ocornut
1fb26d18c4 Tables: fixed seemingly unnecessarily copy of ImGuiTableColumnFlags_NoDirectResize_ which broken resizing from W3| in a F1 W3 F2 setup. Header only allow overlap on hover, not when active (amend f2df804f)
Otherwise TableUpdateBorders() tends to override mouse cursor.
2020-12-16 15:43:51 +01:00
ocornut
7aed4b152b Tables: improve index, file structure tweaks. 2020-12-04 19:15:26 +01:00
ocornut
5ef7b831c2 Tables: removed ImGuiTableSortSpecs::ColumnsMask because it needlessly exposes our 64-columns limitation which we'd eventually would like to lift
+ shuffle declarations in internals
2020-12-04 19:15:26 +01:00
ocornut
82cf41d804 Tables: tooltip on clipped TableHeader() (amended) 2020-12-04 19:15:25 +01:00
ocornut
507db499e4 Tables: work on background draw channel handling (amend "create a separate background draw channel") + Selectable disable spacing when spanning. 2020-12-04 19:15:25 +01:00
omar
8e97cdf8e8 Tables: Fix for calling TableSetBgColor(ImGuiTableBgTarget_CellBg) multiple times on the same cell. 2020-12-04 19:15:23 +01:00
omar
8da7d3c3e5 Tables: Initial commit. [Squashed 123+5 commits from tables_wip/] 2020-12-04 19:15:19 +01:00
ocornut
818e1a4eb4 Tables: Moving legacy Columns code 2020-12-04 19:15:19 +01:00
ocornut
ae3e2406ec Misc tweaks/fixes (see details).
Combo: ultra minor fix for popup positioning policy mismatch depending on ImGuiComboFlags_PopupAlignLeft flag.
Made ImHashXXX functions return ImGuiID.
IsWindowNavFocusable use !WasActive.. it worked because it was only called in NewFrame()->NavUpdate() before the transition loop + EndFrame() only.
Fix unused variable warning.
2020-11-30 12:47:14 +01:00
ocornut
d4f08d893e InputText: Fixed swiching from single to multi-line while preserving same ID. 2020-11-19 18:30:14 +01:00
ocornut
c0ac4fb788 Columns/Internals: (Breaking): Renamed data structures. (#125, #513, #913, #1204, #1444, #2142, #2707) 2020-11-18 23:42:44 +01:00
ocornut
72de6f3360 Columns/Internals: (Breaking) renamed ImGuiColumnsFlags_* to ImGuiOldColumnFlags_*. (#125, #513, #913, #1204, #1444, #2142, #2707)
Affected: ImGuiColumnsFlags_None, ImGuiColumnsFlags_NoBorder, ImGuiColumnsFlags_NoResize, ImGuiColumnsFlags_NoPreserveWidths, ImGuiColumnsFlags_NoForceWithinWindow, ImGuiColumnsFlags_GrowParentContentsSize. Added redirection enums. Did not add redirection type.
2020-11-18 23:02:14 +01:00
ocornut
6e94013a3d Made ItemFlagsStack and GroupStack shared stacks. 2020-11-13 16:33:33 +01:00
ocornut
a138855d56 Hotfix for PushFocusScope() being utterly wrong (until we split the stacks), Added asserts on PopID to help catch bugs, Added GC trigger. 2020-11-12 22:59:05 +01:00
ocornut
61825c7735 Tab Bar: Fixed minor/unlikely bug skipping over a button when scrolling left with arrows + InputText: minor optimization. 2020-11-11 12:04:35 +01:00
顾起威
2785ac0ee3 InputText: Fixed updating cursor/selection position when a callback alters the buffer in a way where the byte count is unchanged but the decoded character count changes. (#3587) 2020-11-11 11:36:53 +01:00
ocornut
5789e69a62 Checkbox: Added CheckboxFlags() helper with int* type. Demo: removed extraneous casts. 2020-11-05 21:32:05 +01:00
ocornut
5f97809cab Misc tidying up (zero-clear structures, more unused default in ClipRetFullscreen, NavApplyItemToResult() coding style fix)
Zero-clearing more structures
Remove arbitrary default ClipRetFullscreen value in ImDrawListSharedData.
Nav extracted NavApplyItemToResult() function.
Coding style fixes in OSX Backends.
2020-11-05 13:24:27 +01:00
ocornut
046057cebb Selectable: Avoid pushing span-column background if clipped. 2020-11-04 20:11:34 +01:00
ocornut
044ed22379 Metrics: Fixed mishandling of ImDrawCmd::VtxOffset in wireframe mesh renderer + omitting trailing empty ImDrawCmd in count + relying on IdxOffset value. 2020-10-30 22:56:29 +01:00
ocornut
e6b99a420b Tab Bar: Do not display a tooltip if the name already fits over a given tab. (#3521) 2020-10-19 15:01:24 +02:00
ocornut
fbe74ed50c Tab Bar: zero clear more structures. 2020-10-19 12:10:31 +02:00
ocornut
8c9b3c9013 Tab Bar: Fixed using more than 128 tabs in a tab bar.
Using ImS16 consistently + some better packing to avoid struct growing size.
2020-10-19 12:01:15 +02:00
ocornut
748bd1ba9c Tab Bar: Restore cursor position in EndTabBar() when amending (amend f2f32602) + made LastTabItemIdx consistent ImS8 as other tab storage relies on same type 2020-10-19 11:49:37 +02:00
ocornut
d015004f45 Rename colored>color in comments where possible (#3528) 2020-10-15 20:05:35 +02:00
ocornut
f2f326024c Tab Bar: Made it possible to append to an existing tab bar by calling BeginTabBar()/EndTabBar() again. 2020-10-14 18:34:33 +02:00
ocornut
124c2608f1 Docs: Renamed all occurences of "binding" and "back-end" to "backend" in comments and documentations, for consistency. 2020-10-12 17:54:52 +02:00
ocornut
041ef01b33 Removed redirecting functions/enums names that were marked obsolete in 1.61: InputFloat, InputFloat2, InputFloat3, InputFloat4 with int decimal_precision parameter. (#648, #712) 2020-10-12 15:09:21 +02:00
ocornut
04de5ef819 Version 1.80 WIP 2020-10-12 13:04:34 +02:00
ocornut
e5cb04b132 Version 1.79
+ Update readme and mission statement.
Removed "Minimize screen reel-estate usage", removed details on memory consumption (still very valid, just too much noise in a mission statement)
2020-10-08 16:01:59 +02:00
ocornut
03b1e643b4 Docs: Funding link, Tweaks, Gallery links. 2020-10-08 10:47:10 +02:00
ocornut
12d9505534 CheckboxFlags: Display mixed-value/tristate marker when passed flags that have multiple bits set and stored value matches neither zero neither the full set. 2020-10-07 15:13:04 +02:00
ocornut
4fd43a8b64 Internals: removed NavLayerCurrentMask (redundant, add extra shift in ItemAdd(). 2020-10-05 14:52:18 +02:00
ocornut
5f336ce8f8 Tab Bar: Fixed buffer underflow in TabBarLayout, introduced by 4a57a982b (#3501, #3291)
+ Link to CI actions added in 3be352f
2020-10-01 13:31:53 +02:00
ocornut
52c0b1a340 ImGuiListClipper: internal rework and tidying up to facilitate supporting frozen rows in tables + stop promoting using constructors parameters. 2020-09-28 17:25:34 +02:00
ocornut
324e0310ad Renamed ImGuiSliderFlags_ClampOnInput to ImGuiSliderFlags_AlwaysClamp. (#1829, #3209, #946, #413) 2020-09-25 13:34:31 +02:00
ocornut
fbabf651f4 Style: Renamed style.TabMinWidthForUnselectedCloseButton to style.TabMinWidthForCloseButton. Fixed README links. 2020-09-25 13:22:28 +02:00
ocornut
1ec464eb9a Tab Bar: Further simplification of section/clip rect handling. (#3291) 2020-09-22 16:43:40 +02:00
ocornut
6b76781c66 Tab Bar: Tidying up. Rework ShrinkWidths to allow marking tabs as not shrinkable (unused yet) + don't unnecessarily move data within ShrinkWidthBuffer. (#3291) 2020-09-22 16:43:39 +02:00
Louis Schnellbach
99f69eb185 Tab Bar: Moved up TabBarScrollingButtons function call. (#3291) 2020-09-22 16:43:39 +02:00
ocornut
205874f5b1 Tab Bar: Fix reorderable tab bars. Fix misleading use of tab_max_width in TabBarLayout(). Misc amends, shortening. (#3291) 2020-09-22 16:43:39 +02:00
Louis Schnellbach
3422cb1308 Tab Bar: Various fixes. Tried to reduce code complexity. (#3291) 2020-09-22 16:43:39 +02:00
ocornut
5e5f25e2dd Tab Bar: Rename named sections members into array. Various tidying up. (#3291) 2020-09-22 16:43:39 +02:00
Louis Schnellbach
7ac16c02cc Tab Bar: Fix multiple width and position computation issue. (#3291) 2020-09-22 16:43:38 +02:00
ocornut
f23c39c395 Tab Bar: Fixed handling of scrolling policy with leading/trailing tabs. + warning fixes + bunch of renaming. (#3291)
Demo tweaks.
2020-09-22 16:43:38 +02:00
Louis Schnellbach
4a57a982be Tab Bar: Added TabItemButton(), ImGuiTabItemFlags_Leading, ImGuiTabItemFlags_Trailing + demo. (#3291)
(squashed various commits by 2 authors)
2020-09-22 16:43:38 +02:00
ocornut
29836412e1 Internals, CollapsingHeader, TabItem: Standardized using a #CLOSE id prefix for TabItem and ColllapsingHeader (same as window) 2020-09-22 15:49:47 +02:00
ocornut
27d0c3afa9 Tab Bar: Fixed a small bug where scrolling buttons (with ImGuiTabBarFlags_FittingPolicyScroll) would generate an unnecessary extra draw call. 2020-09-21 20:00:25 +02:00
ocornut
afc1099fb5 Tab Bar: Fixed a small bug where closing a tab that is not selected would leave a tab hole for a frame. 2020-09-21 18:52:20 +02:00
ocornut
a58a727781 Renamed OpenPopupContextItem() back to OpenPopupOnItemClick(), reverting 99ab5210 2020-09-21 14:45:35 +02:00
Louis Schnellbach
ec945f44b5 InputText: Added support for Page Up/Down in InputTextMultiline. (#3430)
+ fix stb_textedit.h to build with C language (amend fbf70070)
2020-09-18 14:15:17 +02:00
ocornut
c206a19373 Removed ImFont::DisplayOffset in favor of ImFontConfig::GlyphOffset. (#1619)
+ Fonts: AddFontDefault() adjust its vertical offset based on floor(size/13) instead of always +1.
2020-09-17 16:45:21 +02:00
ocornut
645a6e0342 Bypass unnecessary formatting when using the TextColored()/TextWrapped()/TextDisabled() helpers with a "%s" format string. (#3466) 2020-09-16 18:36:42 +02:00
Bartosz Szreder
d2939ce0a1 Columns: Make sure the ClipRect is valid. (#3475) 2020-09-16 16:52:57 +02:00
omar
206d78a524 InputText: Fixed minor glitch when erasing trailing lines in InputTextMultiline(). Fixed cursor being partially covered after using Ctrl+End key.
Removed unncessary one-empty-line-worth-of-scrolling.
2020-09-08 11:42:13 +02:00
omar
36af398056 Sliders: Fixed using ImGuiSliderFlags_ClampOnInput with reverse sliders. (#3432, #3449) 2020-09-07 19:52:11 +02:00
Rokas Kupstys
b2039aac67 Slider: Fixed to reach maximum value with inverted integer min/max ranges, both with signed and unsigned types. Added reverse Sliders to Demo. (#3432, #3449) 2020-09-07 17:57:23 +02:00
ocornut
751d153ca9 InputText: Fixed callback's helper DeleteChars() function when cursor is inside the deleted block. (#3454). 2020-09-03 19:09:57 +02:00
ocornut
ce230fc370 Internals: TabBar renaming and shuffling stuff around.
+ sneaking a readme change
2020-08-31 17:49:18 +02:00
ocornut
13f718337a Internals: Added support for overriding locale decimal point, undocumented. (#2278) + Misc doc update.
Doc: Mention IMGUI_VERSION_NUM in recent api breaking changes + textwrap some demo code.
2020-08-28 18:38:31 +02:00
ocornut
093afd4f7f Internals: Added Name to ImGuiDataTypeInfo + minor misc comments in BeginGroup(). 2020-08-26 21:00:43 +02:00
Louis Schnellbach
8c80d533d9 Tab Bar: Fixed a small bug where toggling a tab bar from Reorderable to not Reorderable would leave tabs reordered in the tab list popup. 2020-08-26 16:36:57 +02:00
ocornut
32be6c064b InputText: Fixed using ImGuiInputTextFlags_Password with InputTextMultiline(). (#3427, #3428) 2020-08-25 20:08:24 +02:00
ocornut
5919a6fa89 Tab Bar: Keep tab item close button visible while dragging a tab (independent of hovering state).
Improve 08108cf
2020-08-25 19:28:29 +02:00
ocornut
08108cf9ee Tab Bar: Hide tab item close button while dragging a tab. 2020-08-25 16:48:31 +02:00
omar
2e50d0706b Selectable: Tweaks. Added internal ImGuiSelectableFlags_NoPadWithHalfSpacing. 2020-08-24 16:31:00 +02:00
ocornut
7b0570d6ba Revert "Drags, Sliders: internal ReadOnly flag gets forwarded properly to temp InputText()."
This reverts commit 640d1f60ce140e4c2bf858ac2f2e8a96d432e6a4.
2020-08-21 20:15:07 +02:00
ocornut
fdf952108d Drags, Sliders: internal ReadOnly flag gets forwarded properly to temp InputText(). 2020-08-21 19:17:44 +02:00
ocornut
9b50e691ed TreeNode: Made clicking on arrow toggle toggle the open state on the Mouse Down event. Amend 05420ea2c. 2020-08-20 22:38:00 +02:00
ocornut
9262609eaf Version 1.79 WIP 2020-08-20 16:46:44 +02:00
ocornut
05a25e5f36 BeginMenuBar: Fixed minor bug where CursorPosMax gets pushed to CursorPos prior to calling BeginMenuBar(), so e.g. calling the function at the end of a window would often add +ItemSpacing.y to scrolling range. 2020-08-20 16:24:54 +02:00
ocornut
fc9ccad6b9 InputText: Add ImGuiInputTextFlags_CallbackEdit, selection helpers in ImGuiInputTextCallbackData(). Add simple InputText() callbacks demo. 2020-08-20 11:25:39 +02:00
ocornut
4c201994d4 DragFloat, DragScalar: Fixed ImGuiSliderFlags_ClampOnInput not being honored in the special case where v_min == v_max. (#3361) 2020-08-20 11:21:15 +02:00
ocornut
95c99aaa4b Version 1.78 2020-08-18 17:50:45 +02:00
ocornut
c6b01e8e1d Drag, Sliders: Merged ImGuiDragFlags back into ImGuiSliderFlags. (#3361, #1823, #1316, #642, #1829, #3209)
Technically API breaking (but ImGuiDragFlags were pushed on master 16 hours ago)
2020-08-18 17:02:58 +02:00
omar
f32663b33c Drags, Sliders: Removed locking behavior with min > max (added in 1.73) 2020-08-17 22:10:42 +02:00
omar
7f8f0096d8 Internals: Renamed SliderCalcRatioFromValueT() -> ScaleRatioFromValueT(), SliderCalcValueFromRatioT() -> ScaleValueFromRatioT().
Replaced drag/slider flags with a single bool is_logarithmic in those functions.
2020-08-17 22:10:42 +02:00
omar
fb0f2ebd41 Drags, Sliders: Tweaks. 2020-08-17 22:10:42 +02:00
Ben Carter
fa279a6aa0 Drags, Sliders: Added deadzone to make selecting 0.0 on linear sliders easier, slider navigation delta accumulation. (#3361, #1823, #1316, #642) 2020-08-17 22:10:42 +02:00
omar
f75b29e7be Drags, Sliders: Added ImGuiDragFlags_NoInput/ImGuiSliderFlags_NoInput to disable turning widget into a text input with CTRL+Click or Nav Enter. 2020-08-17 22:10:42 +02:00
omar
8018623c5b Drags, Sliders: Added ImGuiDragFlags_NoRoundToFormat / ImGuiSliderFlags_NoRoundToFormat flags (#642) 2020-08-17 22:10:41 +02:00
omar
170d02bd99 Drags, Sliders: Added ImGuiDragFlags_ClampOnInput/ImGuiSliderFlags_ClampOnInput flags to force clamping value when using CTRL+Click to type in a value manually. (#1829, #3209) 2020-08-17 22:10:41 +02:00
omar
7607aea018 Drags, Sliders: Removed power features. Old entry points will pass-through if power=1.0f, otherwise assert + safe fallback. Remove 3 redirection functions (#3361, #1823, #1316, #642) 2020-08-17 22:10:41 +02:00
omar
43c099f31e Drags, Sliders: Logarithmic: Moved flags to internals, allowing 1.0f to pass by. (#3361, #1823, #1316, #642) 2020-08-17 22:10:41 +02:00
omar
152dae9e2a Drags, Sliders: Logarithmic: Split back flags into drag/slider flags. Moved to an obsolete section. (#3361, #1823, #1316, #642) 2020-08-17 22:10:40 +02:00
Ben Carter
9f98b4e7f2 Drags, Sliders: Logarithmic: Added logarithmic mode support to drag widgets, extended API to add flags to drag/sliders (#3361, #1823, #1316, #642) 2020-08-17 22:10:40 +02:00
Ben Carter
a252a287bf Drags, Sliders: Logarithmic: WIP experiments with trying to make logarithmic sliders sensible (#3361, #1823, #1316, #642) 2020-08-17 22:10:40 +02:00
ocornut
46d75202b8 Tab Bar: Allow calling SetTabItemClosed() after a tab has been submitted (will process next frame).
+ larger combo height on TabBarTabListPopupButton()
2020-08-17 12:57:47 +02:00