Commit Graph

664 Commits

Author SHA1 Message Date
ocornut
6e4770ea5c Examples: Vulkan: Rebuild swapchain on VK_SUBOPTIMAL_KHR. (#3881)
Ref https://vulkan-tutorial.com/Drawing_a_triangle/Swap_chain_recreation#page_Suboptimal-or-out-of-date-swap-chain
2021-03-18 18:12:52 +01:00
ocornut
61a0908713 Tables comments + Backends: DirectX9: calling IDirect3DStateBlock9::Capture() after CreateStateBlock() which appears to workaround/fix state restoring issues. . (#3857) 2021-03-18 18:04:52 +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
Elias Daler
64aab8480a DragScalar: Add default value for v_speed argument in DragScalar(), DragScalarN(). (#3922) 2021-03-16 12:54:49 +01:00
ANF-Studios
ebe6ac5fb5 Improvements to minor mistakes in documentation comments (#3923) 2021-03-16 12:44:16 +01:00
ocornut
35b1148efb Version 1.82 2021-03-15 20:26:48 +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
Rokas Kupstys
1bc6f82091 Misc: added imgui.gdb and imgui.natstepfilter debugger helpers for gdb and msvc. 2021-03-12 17:03:16 +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
ocornut
fdc2324d9a Moved 'misc/natvis/imgui.natvis' to 'misc/debuggers/imgui.natvis' 2021-03-11 16:21:46 +01:00
ocornut
39432bfd9c Amend 0c93238a ImDrawList: upgraded AddRect(), AddRectFilled(), PathRect() to use general ImDrawFlags instead of ImDrawCornersFlags 2021-03-11 16:03:45 +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
ocornut
8b9fedba28 Moved Obsolete function block lower in the file + obsoleted old SetScrollHere (->SetScrollHereY) 2021-03-11 12:16:52 +01:00
thedmd
e45847d99a Add version of PathArcTo() and PathArcToFast() with adaptive rendering quality. (#3491) 2021-03-11 11:23:55 +01:00
ocornut
8ed34af6f8 ImDrawList: clarified that PathArcTo()/PathArcToFast() cannot take radius < 0.0f. (#3491) + changed poor-man ceiling in _CalcCircleAutoSegmentCount() to use 0.999999f to reduce gaps
Previously it sorts of accidentally worked but would lead to counter-clockwise paths which and have an effect on anti-aliasing.
2021-03-11 10:51:20 +01:00
Rokas Kupstys
01a2bac7d5 DrawList: Replace "bool close" in drawing functions with flags. 2021-03-10 12:57: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
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
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
TAiGA
f5bc5e8630 Freetype: Enable FreeType bitmap glyphs. (#3879) 2021-03-05 14:25:27 +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
8dd692c29c Android: Amend backend and examples with minor consistency tweaks. (#3446) 2021-03-04 11:07:03 +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
25679a411e Window, Nav: Fixed crash when calling SetWindowFocus(NULL) as the time a new window appears. (#3865) 2021-03-02 18:23:08 +01:00
ocornut
4537d98d46 Backends: DX9: Fix to support colored glyphs, using newly introduced 'TexPixelsUseColors' info. (#3369, #3844) 2021-03-02 15:04:34 +01:00
Xiliusha
eb57484935 Backends: DX9: add missing IMGUI_USE_BGRA_PACKED_COLOR support. Remove dinput.h headers. (#3844) 2021-03-02 15:04:34 +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
760c394707 Added links to Discussions. Closed Discord, yeah! (#2748) 2021-02-25 00:47:37 +01:00
ocornut
6f4b9c65ae Added commentary about DLL boundaries. Added GetAllocatorFunctions(). Tidying up. (#3836) 2021-02-24 19:38:39 +01:00
ocornut
edf135c18d Win32+MinGW: Re-enabled IME functions by default even under MinGW. (#2590, #738) 2021-02-22 14:39:44 +01:00
David Maas
ece854564a
Log/Capture: Added LogTextV, a va_list variant of LogText. (#3828) 2021-02-22 11:58:51 +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
c154629152 Backends: Win32: Added ImGui_ImplWin32_EnableAlphaCompositing() helper. (#2766, #3447)
Pragma linking with dwmapi.lib (Vista-era, ~9 kb). MinGW users will need to link with -ldwmapi.
2021-02-18 16:04:11 +01:00
ocornut
6a161b8789 Examples: Reworked setup of clear color to be compatible with transparent values. (#2693, #2764, #2766, #2873, #3447, #3813, #3816) 2021-02-18 11:38:41 +01:00
ocornut
bda12e5fdd Backends: Rework blending equation to preserve alpha in output buffer accross all backends. (#2693, #2764, #2766, #2873, #3447, #3813, #3816)
Some of the viewport ideas from #2766 are not in there yet (e.g. Vulkan: setting compositeAlpha based on cap.supportedCompositeAlpha)
2021-02-18 11:38:41 +01:00
ocornut
27a5bdb916 Backends: Win32: Fixed ImGui_ImplWin32_EnableDpiAwareness() attempting to get SetProcessDpiAwareness from shcore.dll on Windows 8 whereas it is only supported on Windows 8.1.
+ Added other helpers for reference (unused currently, other features will want them)
2021-02-17 19:41:41 +01:00
ocornut
fb15d8c858 Improve on automatic circle segment count calculation. (#3808) Amends 2021-02-17 14:22:31 +01:00
Rokas Kupstys
9576dfd5e7 CI: Use workflow_run to trigger scheduled builds and static analysis.
Scheduled builds now are triggered by a dummy "scheduled" workflow that is invoked by the timer. This gives forks an ability to disable scheduled builds while maintaining ability to perform CI builds in forked repository. Similarly static analysis is invoked on completion of "build" workflow, ensuring analysis is performed with every build. Also should build workflow triggers change, we do not need to replicate same changes in static analysis workflow file.
2021-02-16 14:39:16 +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
647a308ad3 Backends: GLFW: Add ImGui_ImplGlfw_InitForOther() instead of ImGui_ImplGlfw_InitForWebGPU() so it can be used for e.g. DX11. (#3632)
Amend dff0044
2021-02-10 17:27:33 +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
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
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
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