ocornut
58a0a7058c
Backends: Using SetTexID() consistently instead of assigning to ->TexID. May make the later obsolete eventually.
2021-02-03 18:30:26 +01:00
ocornut
03d74a293d
ListBox: renamed ListBoxHeader>BeginListBox, ListBoxFooter>EndListBox. Added demo bits.
2021-02-03 16:33:22 +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
ocornut
22d9a61b33
Docking: fix gap in hit test hold when using ImGuiDockNodeFlags_PassthruCentralNode touching the edge of a viewport. ( #3733 )
2021-02-02 15:16:46 +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
GamingMinds-DanielC
84e8802891
Docking: on node split, update memorized DockId for currently closed windows ( #3716 )
...
Amended by @ocornut with same fix in DockBuilderRemoveNodeChildNodes().
2021-02-01 17:56:20 +01:00
ocornut
4622fa4b66
Fonts: Fixed CalcTextSize() width rounding so it behaves more like a ceil. ( #3776 )
...
his is in order for text wrapping to have enough space when provided width precisely calculated with CalcTextSize().x. Amend 7b0bf230
.
Note that the rounding of either positions and widths are technically undesirable (e.g. #3437 , #791 ) but variety of code is currently on it so we are first fixing current behavior before we'll eventually change it.
2021-02-01 12:49:18 +01:00
ocornut
577e7cb493
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_win32.cpp
# docs/CHANGELOG.txt
# imgui.cpp
2021-01-28 21:02:13 +01:00
ocornut
9499afdf5e
imgui_freetype: clarify breaking changes, and add BuildFontAtlas() to be consistent with planned obsolescence. Rename mislabelled internal helper. Demo: clarify labels in nested table demo. ( #3765 )
2021-01-28 20:53:53 +01:00
ocornut
e28b51786e
Tables: Fixed PopItemWidth() or multi-components items not restoring per-colum ItemWidth correctly. ( #3760 ) rework local stacks to facilitate modifying current value without altering the stack.
...
May consider doing the same for ItemFlags and moving to g.ItemFlags...
2021-01-27 12:35:57 +01:00
ocornut
3867c6c5f0
Fonts: (Breaking) Rename ImGuiFreeType:: flags to ImGuiFreeTypeBuilderFlags_XXX. Remove ImGuiFreeType::BuildFontAtlas() flags. Rename ImFontConfig::RasterizerFlags to FontBuilderFlags. Add ImFontBuilderIO (opaque). Amend 53d59f3 with a dozen of small fixes.
2021-01-26 17:25:09 +01:00
ocornut
6b32d0ebc7
Fixed minor title bar text clipping issue when FramePadding is small/zero and there are no close button in the window. ( #3731 )
2021-01-26 16:07:41 +01:00
Sammy Fatnassi
f3f2578e8f
Internals: Added context hook removal support ( #3580 , #3626 , #3753 )
2021-01-26 15:24:01 +01:00
Sammy Fatnassi
376c88a864
Fixed some compile warnings with Clang on Windows ( #3754 )
2021-01-26 14:10:10 +01:00
ocornut
2ed47e5822
Version 1.81 WIP
2021-01-25 16:30:44 +01:00
ocornut
f144c67676
ImDrawList: fixed AddCircle, AddCircleFilled buffer read overflow with (rad > 0.0f && rad < 1.0f && num_segments == 0). ( #3738 )
...
Amend 051ce076
. Maximum cached count becomes 63 instead of 64.
2021-01-25 14:59:09 +01:00
ocornut
bb26751b94
Merge branch 'master' into docking
...
# Conflicts:
# docs/CHANGELOG.txt
# imgui.cpp
2021-01-21 20:38:42 +01:00
ocornut
58075c4414
Version 1.80
2021-01-21 20:36:18 +01:00
ocornut
3b409d2b68
BeginChild: half-fixed child window name longer than 255 conflicting, merely raised the limit by using our shared large buffer. Comments.
2021-01-21 12:36:47 +01:00
ocornut
ebbb98d519
Docking: docked window honor tab and text colors by storing them. ( #2771 )
...
Later to lead into #2700 and #2539
Move tab submission block above in DockNodeUpdateTabBar(), not strictly necessary for this change as is, but useful if needing to apply override for TitleBg* as we'd need a value for node->VisibleWindow earlier than currently set.
2021-01-18 18:32:46 +01:00
ocornut
9e4956d86b
Docking: added comments. added experimental TabItemFlagsOverrideSet to ImGuiWindowClass.
...
(Could probably do something similar with TabBarFlagsOverrideSet+Clear for #2700 later.)
2021-01-18 18:32:46 +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
388ca563db
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_dx12.cpp
2021-01-15 19:20:42 +01:00
ocornut
626e3e2b3b
Tables: fix reported inner-width for scrolling tables off by a small padding amount + moved code.
...
Makes not much difference for inner-scrolling but makes a difference when reported to outer-window.
2021-01-15 12:40:40 +01:00
ocornut
3edfc042ff
Tables: Internals: Renaming, tweaks preparing ahead for trickier changes (should be all no-op).
2021-01-15 11:11:16 +01:00
ocornut
b11518d7d7
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_opengl2.cpp
# backends/imgui_impl_opengl3.cpp
# imgui.cpp
2021-01-05 16:46:38 +01:00
ocornut
0a5f399805
Tables: Fix hiding column right after the frozen line. Fix hovering/resising column delimiter scrolled under frozen columns. ( #3678 )
2021-01-03 15:45:56 +01:00
ocornut
fa963b9aaf
Inputs: Internal: added SetItemUsingMouseWheel() and mechanism to request mouse wheel for both HoveredId and ActiveId. ( #2891 )
...
Based on @kudaba PR.
2020-12-25 18:22:34 +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
7b53551032
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui.h
2020-12-22 17:17:49 +01:00
ocornut
1aa59f90d0
Minor API comments and tweaks, standardize index used in imgui.h. Tables: tweaked TableSetupColumn() assert to use IM_ASSERT_USER_ERROR().
2020-12-22 15:30:26 +01:00
ocornut
2e48c2da81
Removed redirecting functions/enums names that were marked obsolete in 1.63 (August 2018) + tables tweaks.
2020-12-21 19:42:37 +01:00
ocornut
4d8e839ddf
Renamed ImDrawList::AddBezierCurve() to ImDrawList::AddBezierCubic(), ImDrawList::PathBezierCurveTo() to ImDrawList::PathBezierCubicCurveTo(). ( #3127 , #3664 , #3665 )
...
Renamed corresponding internal functions as well.
2020-12-21 17:13:36 +01:00
nyorain
a640698123
Clipper: Fixed incorrect end-list positioning when using ImGuiListClipper with 1 item (bug in 1.79). ( #3663 )
2020-12-21 15:53:42 +01:00
ocornut
30468829c2
Tables: Internal: Maintain InnerRect to further clarify some code. Renamed Bg1 fields to Bg2 (used by Selectable) as the other handles Bg0+Bg1.
2020-12-18 14:32:51 +01:00
ocornut
f2df804fcc
Tables: four small fixes.
...
Fixed last item flags leaking to disabled column, affecting IsItemHovered(). (#3651 ).
Validate and fix invalid DisplayOrder data from ini file.
Allow TableHeaderRows() to function will missing TableSetupColumn() calls.
Made TableHeader() use AllowItemOverlap mode to allow submit subsequent item in same cell, since it covers the whole cell area.
2020-12-13 19:57:19 +01:00
ocornut
06e87014f2
Merge branch 'master' into docking
...
# Conflicts:
# imgui.h
# imgui_internal.h
2020-12-11 23:10:06 +01:00
ocornut
bff1836922
Internals: added facility to hide windows from render without interfering with the HiddenFramesCanSkipItems/HiddenFramesCannotSkipItems fields which have effects on layout. Compact some fields.
...
Ideally we'd have a simpler system but it's not easy to make the capture system change to hook at the right spot. Will rework.
2020-12-11 14:37:58 +01:00
ocornut
dd4ca70b0d
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_win32.cpp
# imgui.cpp
# imgui_demo.cpp
2020-12-04 19:22:15 +01:00
ocornut
7a61f3407b
Tables: support internal TableResetSettings(), clarify lifetime, fixed missing auto-fit on column unhidden after first run, fixed resize assert when changing column sizing policy to stretch mid-frame (before of -1.0f weight)
2020-12-04 19:15:27 +01:00
ocornut
e09454aec4
Tables: removed TableGetColumnIsVisible from public api, re-specced as TableGetColumnIsHidden() returning same flag as setter, clipper increase CurrentRow.
2020-12-04 19:15:26 +01:00
ocornut
bf197c74f6
Tables: storing WorkMaxX, made offset_x == MinX to be clearer, clip rect merge uses ClipRect.max.x directly, removed unused ShrinkWidth code, metrics.
2020-12-04 19:15:25 +01:00
ocornut
10db896813
Tables: store RawData in a simple void* pointer, rename ContentMinX > WorkMinX, misc tidying up.
...
Removed unnecessary casts when using CheckboxFlags().
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
ocornut
e5a5256971
Tables: Garbage collection to relieve draw splitter buffers + for test engine: compact settings, remove table.
2020-12-04 19:15:25 +01:00
ocornut
d3222086f0
Tables: Moved TableSetupScrollFreeze(), TableUpdateDrawChannels() lower in more adequate spots.
...
+ rename IsFreezeRowsPassed to IsUnfrozen.
2020-12-04 19:15:24 +01:00
ocornut
d9ca3939e1
Tables: Tidy up comments. Replaced some Columns by Tables in demo. Removed ImGuiTableFlags_Scroll (combining ScrollX/ScrollY) because each axis inccur different requirements/constraints.
2020-12-04 19:15:24 +01:00
ocornut
51abdd53e3
Tables: renamed somehow-duplicate ContentWidth members (implicitly == Max - Min), renamed StartX to ContentMinX for consistency.
2020-12-04 19:15:24 +01:00
ocornut
ac5b1648e6
Tables: Various internal renaming + merge StartXHeaders/StartXRows into StartX.
2020-12-04 19:15:24 +01:00
omar
25b5cc2f95
Tables: Fixes to support any number of frozen rows (over modifications to clipper code in master) + make clipper run eval after clipect update
2020-12-04 19:15:23 +01:00
omar
8ec05fc034
Tables: Fixed holding on table pointers accross resize/invalidation of the pool buffer.
2020-12-04 19:15:23 +01:00
ocornut
9372601322
Tables: Fixed stacked popups incorrectly accessing g.CurrentTable of parent-in-stack windows.
2020-12-04 19:15:23 +01:00
ocornut
af992d1321
Tables: Tweak settings functions to more prominently clarify the two levels of function.
2020-12-04 19:15:22 +01:00
omar
95c273618e
Tables: Allow hot-reload of settings (merge policy), tidying up settings code
2020-12-04 19:15:21 +01:00
omar
9f43aae226
Tables: Calculating ideal total width, some renaming, comments. Clarify that inner_width is unused with ScrollX=0. Clip many comments to 120 columns.
2020-12-04 19:15:21 +01:00
omar
b7ff85d9ad
Tables: Browse settings list in Metrics (outside of Table entry).
2020-12-04 19:15:21 +01:00
omar
164caa2db7
Tables: Support for multi-line columns name. Renaming of some fields from BackupXXX to HostXXX. Comments.
2020-12-04 19:15:20 +01:00
omar
325b4c69ba
Tables: Moved border colors to the Style (maybe temporarily?) instead of hardcoding them.
2020-12-04 19:15:19 +01:00
omar
883c236eda
Tables: Handle columns clipped due to host rect
...
Return false in user functions, set SkipItems in window, redirect to dummy draw channel.
2020-12-04 19:15:19 +01:00
omar
8da7d3c3e5
Tables: Initial commit. [Squashed 123+5 commits from tables_wip/]
2020-12-04 19:15:19 +01:00
omar
9c8671e7b0
Tables: Add empty file, skeleton.
2020-12-04 19:15:19 +01:00
ocornut
c1ffac2fee
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui_internal.h
2020-12-03 20:05:49 +01:00
ocornut
998d7303b1
Log/Capture: fix capture to work on clipped child windows.
...
+ Tweak ErrorCheckEndFrameRecover() to use local window pointer.
2020-12-03 15:14:32 +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
e0cae25c3c
Clarify usage of right-aligned items in Layout>Widgets Width. Tweaks FAQ, added missing syntax coloring.
2020-11-20 17:24:18 +01:00
ocornut
4da92b89ed
Viewports: fix incorrect whitening of popups above a modal if both use their own viewport + fix pvs warning.
2020-11-19 18:31:13 +01:00
ocornut
3dcbcd8bf0
Internals: added IsWindowAbove() for use for modal/viewport bugfix.
2020-11-19 18:31:10 +01:00
ocornut
97265602c4
Internals: added IsWindowAbove() for use for modal/viewport bugfix.
2020-11-19 16:59:21 +01:00
ocornut
cecf6b4209
Viewports: made standalone modals appear in taskbar + new window perform z-check before merging in main host viewport. ( #3511 , #1542 )
...
This should fix a good amount of "lost modal" problems, however it is still possible to loose a modal in a host viewport if secondary viewports are configured as children above the host.
2020-11-19 16:07:07 +01:00
ocornut
9712bff0bb
Internals: added experimental ErrorCheckEndFrameRecover() to unroll/end/pop. ( #1651 , #3600 )
2020-11-19 15:43:42 +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
b2a91dc390
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
2020-11-13 22:04:28 +01:00
ocornut
71cc636696
Metrics: Rebranded as "Dear ImGui Metrics/Debugger". Fix Show Window Rectangle. Fix Clang OSX warnings. Amend #3592 for Mingw only.
2020-11-13 21:30:19 +01:00
ocornut
e736039538
Nav: Fixed IsItemFocused() from returning false when Nav highlight is hidden because mouse has moved. ( #787 )
2020-11-13 21:10:03 +01:00
ocornut
8119759329
Internals: extracted stack checking code into a ImGuiStackSizes helper struct + added test for FocusScope
...
+ renamed g.ColorModifiers > g.ColorStack, g.StyleModifiers > g.StyleVarStack
2020-11-13 16:33:33 +01:00
ocornut
6e94013a3d
Made ItemFlagsStack and GroupStack shared stacks.
2020-11-13 16:33:33 +01:00
ocornut
12ba6f4606
Fix PushFocusScopeID() + using shared stack. Renamed GetFocusScopeID() to GetFocusedFocusScope() - the two existing functions name are very error prone.
2020-11-13 16:26:59 +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
13258f5957
Internals: zero-clearing ImGuiWindow / ImGuiWindowTempData for simplicity. (amend)
...
All the non-zero fields previously initialized in ImGuiWindowTempData() are in fact setup in Begin: FocusCounterRegular, FocusCounterTabStop, TextWrapPos, LayoutType, ParentLayoutType
2020-11-12 12:19:50 +01:00
ocornut
dcfb986fa8
Made EndFrame() assertion for key modifiers being unchanged during the frame more lenient. ( #3575 )
2020-11-11 18:17:33 +01:00
ocornut
ac08593b96
Merge branch 'master' into docking + tweak dock node padding + use CheckboxFlags with int
...
# Conflicts:
# imgui.cpp
# imgui_demo.cpp
# imgui_internal.h
2020-11-05 21:36:22 +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
2fa00656a4
Fix for IMGUI_DISABLE_METRICS_WINDOW
2020-11-03 15:46:29 +01:00
Rokas Kupstys
9cca1b2e97
Replace UTF-8 decoder with one based on branchless version by Christopher Wellons. (not branchless anymore tho)
...
Decoding performance increase ~30%
2020-11-03 14:43:08 +01:00
ocornut
3777fbbd81
Renamed io.ConfigWindowsMemoryCompactTimer to io.ConfigMemoryCompactTimer as the feature will apply to other data structures.
2020-11-03 14:43:08 +01:00
ocornut
e3ac52630a
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_opengl3.cpp
# imgui.cpp
2020-10-31 00:47:57 +01:00
ocornut
047d4c4500
Metrics: Extracted most functions.
...
+ avoid using full namesapce prefix
2020-10-30 23:48:58 +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
df35157397
Drag and Drop: Fix losing drop source ActiveID (and often source tooltip) when opening a TreeNode() or CollapsingHeader() while dragging. ( #1738 )
...
Amend 7b3d379
, 8241cd62
etc.
2020-10-26 14:40:44 +01:00
ocornut
b7530e5d04
Revert "Replace UTF-8 decoder with branchless version by Christopher Wellons." ( #3558 )
...
This reverts commit b3576dd354
.
2020-10-25 16:27:43 +01:00
Rokas Kupstys
b3576dd354
Replace UTF-8 decoder with branchless version by Christopher Wellons.
...
Decoding performance increase ranges from 30-40%.
Changes:
* Errors handling near the end of string changed. If input does not contain enough bytes, decoder returns `IM_UNICODE_CODEPOINT_INVALID`, consuming all remaining bytes while old decoder consumed only one byte.
Guarantees:
* At least one byte is consumed, if input had at least one byte available.
* Number of consumed bytes will never seek past end of string.
Requirements:
* `in_text` is a valid pointer.
* String pointed by `in_text` must be zero-terminated, or `in_text_end` is not NULL.
2020-10-23 13:10:37 +02:00
ocornut
455c21df71
Merge branch 'master' into docking + dockspace demo comments
...
# Conflicts:
# backends/imgui_impl_opengl3.cpp
# docs/CHANGELOG.txt
# imgui_internal.h
# imgui_widgets.cpp
2020-10-19 15:08:32 +02:00
Black Cat!
c9fafd5ea4
Drag and Drop: Fix drag and drop to tie same-size drop targets by choosen the later one. Fixes dragging into a full-window-sized dockspace inside a zero-padded window. ( #3519 , #2717 )
2020-10-15 20:20:35 +02:00
ocornut
d3a80d9f1b
Internals: Docking: More fixes to make DockNodeBeginAmendTabBar() viable (probably some issues left)
2020-10-15 15:02:05 +02:00
ocornut
b26f1530b7
Internals: Docking, Tab Bar: Add DockNodeBeginAmendTabBar() and work toward making hybrid dock node with windows tab bars somehow work (not done).
2020-10-15 12:18:20 +02:00
ocornut
042a3b01d2
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_dx10.cpp
# backends/imgui_impl_dx10.h
# backends/imgui_impl_vulkan.h
# backends/imgui_impl_win32.cpp
# docs/CHANGELOG.txt
# examples/README.txt
# examples/example_glfw_opengl2/main.cpp
# examples/example_glfw_opengl3/main.cpp
# examples/example_glfw_vulkan/main.cpp
# examples/example_sdl_directx11/main.cpp
# examples/example_sdl_opengl2/main.cpp
# examples/example_sdl_opengl3/main.cpp
# examples/example_sdl_vulkan/main.cpp
# examples/example_win32_directx10/main.cpp
# examples/example_win32_directx11/main.cpp
# examples/example_win32_directx12/main.cpp
# examples/example_win32_directx9/main.cpp
# imgui.cpp
# imgui.h
# imgui_demo.cpp
# imgui_internal.h
2020-10-14 14:44:03 +02:00
ocornut
b1a18d82e3
Moving backends code from examples/ to backends/ (step 6: update markdown documentation)
2020-10-14 14:42:00 +02:00