Adam Kewley
7180e9ac66
Remove redundant GetMainViewport decl in imgui.h ( #3801 , #3800 )
2021-02-11 10:03:14 +01:00
ocornut
239d09804d
Merge branch 'master' into docking
...
# Conflicts:
# docs/CHANGELOG.txt
2021-02-10 21:28:16 +01:00
ocornut
4df57136e9
Version 1.81
2021-02-10 21:16:58 +01:00
ocornut
ee59d7a266
Merge branch 'features/viewport_in_master' into docking (WIP need adding code for new ImGuiViewportFlags values)
...
# Conflicts:
# imgui.cpp
# imgui.h
# imgui_demo.cpp
# imgui_internal.h
# imgui_widgets.cpp
2021-02-10 16:34:17 +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
2a5eaf239f
Misc tweaks - mostly toward minimizing diff in upcoming backport merge of a few viewport structures in master
2021-02-10 14:28:04 +01:00
ocornut
7a516a266d
Merge remote-tracking branch 'origin/master' into docking
...
# Conflicts:
# backends/imgui_impl_dx12.cpp
# backends/imgui_impl_dx9.cpp
# imgui.cpp
# imgui.h
2021-02-09 13:17:24 +01:00
ocornut
73ccb7e4b8
Viewports: (Breaking) turned GetWorkPos(), GetWorkSize() into straight fields -> WorkPos, WorkSize before exposing in master branch.
2021-02-09 13:15:01 +01:00
ocornut
1a3af8cb4c
Viewports: trying to treat GetMainViewport() as const. Reducing unnecessary casts of ImGuiViewportP*
...
Metrics: readded root Drawlists node in metrics to match master.
The (void*) casts are implying const-casst but currently left GetMainViewport() as returning non-const.
2021-02-09 13:15:01 +01:00
ocornut
862bfc53d3
Viewports: Moved in own section of imgui.h ahead of merging a small part of viewport interface to master.
2021-02-09 11:47:55 +01:00
ocornut
56f7bdae99
ImDrawList: Clarified PathArcTo() need for a_min <= a_max with an assert. Fixed PathArcToFast() handling of a_min > a_max.
2021-02-08 16:37:51 +01:00
ocornut
fa55b0cb60
Viewports: (breaking) removed ImGuiPlatformIO::MainViewport which is now pretty much unused and duplicate (and misleading as we will evolve the concept)
...
Use GetMainViewport() if stuck.
2021-02-05 16:14:47 +01:00
ocornut
b898281e3c
Demo: Added 'Examples->Fullscreen Window' demo. ( #3789 ) + repack and zero-clear ImDrawData.
2021-02-05 15:44:10 +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
freddii
90a518c501
Fixed typos ( #3782 )
2021-02-03 12:37:32 +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
9d576a96a5
Tables: added internal TableSetColumnEnabled() helper. Comments.
2021-02-02 09:23:40 +01:00
ocornut
24be26e00e
imgui_freetype: Add support for colored glyphs. Font: add support for untinted glyphs ( #3369 )
...
Amend 9499afd
with missing static inline.
2021-02-01 16:32:26 +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
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
Louis Schnellbach
9417acc20f
Fonts: if IMGUI_ENABLE_FREETYPE, use library by default for font rasterization
...
Also renamed IMGUI_DISABLE_STB_TRUETYPE to IMGUI_ENABLE_STB_TRUETYPE
2021-01-26 17:23:11 +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
5178c3ce21
Tables: added ImGuiTableFlags_NoHostExtendX instead of using outer_size.x == 0.0f. Changed default outer_size to (0.0f, 0.0f). ( #3605 )
2021-01-21 16:20:31 +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
ae0d2dd614
Tables: rework submission of content size and ideal content size to outer window (now using IdealMaxPos introduced in 6af92b0
).
...
See Tests suite "table_reported_size_outer".
2021-01-20 11:38: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
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
00b35c081e
Tables: (breaking) removed ImGuiTableColumnFlags_WidthAuto which now can be expressed as _Fixed + _NoResize. WidthRequest gets updated when RequestOutputMaskByIndex is set rather than Visible.
2021-01-13 18:42:02 +01:00
ocornut
002ba1a69f
Tables: comments, tweak. CollapsingHeader: comments. ( #3715 )
2021-01-13 10:07:59 +01:00
ocornut
36535514d5
Backends: DX12: Fix warning ( #3706 ). Disable obsolete Tables enums, leave them commented out. Using _MSVC_LANG to enable offsetof() and static_assert() on VS2015.3+
2021-01-11 10:54:52 +01:00
ocornut
70703da782
Merge branch 'master' into docking
2021-01-08 18:55:16 +01:00
ocornut
e18abe3619
Tables: (Breaking) Added ImGuiTableFlags_SizingFixedSame, ImGuiTableFlags_SizingStretchProp. Removed ImGuiTableFlags_SameWidths.
...
Simplified some code and clariffied that currently non-resizable = always revert to default (while waiting to untangle Fixed vs Auto and programmatic override not going through TableSetupColumn)
Whereas ImGuiTableFlags_SameWidths has some unusual handling of mixed Fixed/Stretch columns, we know treat them separately.
2021-01-08 18:40:52 +01:00
ocornut
414f82254b
Tables: (Breaking) rename ImGuiTableFlags_SizingPolicyFixed > ImGuiTableFlags_SizingFixedFit, ImGuiTableFlags_SizingPolicyStretch > ImGuiTableFlags_SizingStretchSame in prevision for new policies.
2021-01-08 18:10:55 +01:00
ocornut
8b5f3798e0
Tables: Moved demo chunks. Made right-most non-resizable same-width column hidden to alleviate the issue where they are off by 1 pixel.
2021-01-07 17:11:18 +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
thedmd
94a432275b
ImDrawList: Internals: Add ability to scale anti-alias fringe. This enable users to keep geometry sharp while scaling vertex buffer content.
2021-01-05 16:34:11 +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
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
eb88fee052
Tables: internal tidying up, calculate WidthAuto in first loop of layout + TableSetupColumn() with unspecified stretch weight leaves it at -1.0f (unset) rather than overrding default. Amend 3b3503e
.
...
Both changes are intended to have no side-effects. Committed separately from upcoming commit for easier future bissecting.
Small demo fix.
2020-12-25 16:30:44 +01:00
ocornut
3573195112
Tables: (breaking) rename ImGuiTableFlags_ColumnsWidthStretch > ImGuiTableFlags_SizingPolicyStretch, ImGuiTableFlags_ColumnsWidthFixed > ImGuiTableFlags_SizingPolicyFixed in prevision for other policies.
2020-12-24 18:32:27 +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
3fbb928c9f
Tables: explicit/custom width in TableSetupColumn() is reapplied when table or column becomes not resizable. Comments.
2020-12-23 12:14:55 +01:00
ocornut
956435768f
Tables: (breaking) renamed ImGuiTableColumnFlags_WidthAutoResize to _WidthAuto., default to WidthFixed policy when host window has auto-resize.
...
Fix edge case with TableSetColumnWidth on small windows (amend 972ca816
)
2020-12-23 11:39:15 +01:00