1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-13 18:50:58 +01:00
Commit Graph

645 Commits

Author SHA1 Message Date
ocornut
1ebb913827 Version 1.89.5 2023-04-13 16:17:49 +02:00
ocornut
c98bad042d ColorEdit, RadioButton, Windows: Using adaptative tesselation for preview circles. 2023-03-21 17:48:09 +01:00
ocornut
24a44b9abe Version 1.89.5 WIP 2023-03-15 12:25:20 +01:00
ocornut
f3f6295d53 Version 1.89.4
Commented out obsolete enums/functions names: ImGuiSliderFlags_ClampOnInput, ImGuiInputTextFlags_AlwaysInsertMode, ImDrawList::AddBezierCurve(), ImDrawList::PathBezierCurveTo()()
2023-03-14 16:36:19 +01:00
ocornut
a1b8457cb5 Moved the optional "courtesy maths operators" (#define IMGUI_DEFINE_MATH_OPERATORS) implementation from imgui_internal.h in imgui.h. (#6164, #6137, #5966, #2832) 2023-02-15 19:23:12 +01:00
ocornut
204cb4d226 Version 1.89.4 WIP 2023-02-15 15:35:56 +01:00
ocornut
458a109031 Version 1.89.3 2023-02-14 16:00:18 +01:00
ocornut
092b6825ac Fonts: Assert that in each GlyphRanges[] pairs first is <= second. 2023-02-14 15:00:12 +01:00
ocornut
e816bc6723 Merge misc changes from docking branch to reduce small drift.
In particular:
- imgui.cpp : move UpdateInputEvents() higher in NewFrame() to match docking + update RenderMouseCursor() to match.
- imgui_draw.cpp: ImDrawList::_ResetForNewFrame() change from c807192ab
- Backends: SDL2. Add MouseWindowID + change SDL_CaptureMouse() test to match docking branch. Not strictly necessary but aimed at reducing drift because we go on and fork this file.
+ moved responsability of checking valid names to TabBarGetTabName() to simplify both branches.
2023-02-07 13:22:23 +01:00
ocornut
867bdbecb3 Text: fixed issue in RenderText() leading to IM_ASSERT_PARANOID() triggering if enabled. (#6132, #5720, #5919)
Amend 3482d4ec, bd96f6e
2023-01-31 14:41:16 +01:00
ocornut
739a79b1e9 ImDrawList: Added missing early-out in AddPolyline() and AddConvexPolyFilled() when color alpha is zero. Window: Avoid rendering shapes for hidden resize grips. 2023-01-24 17:30:50 +01:00
ocornut
3482d4eccf Text: Fixed layouting of wrapped-text block skipping successive empty lines. (#5720, #5919)
Regression in the bd96f6e fix
2023-01-19 15:59:39 +01:00
ocornut
0359f6e94f Internals: ImDrawList: shallow tweaks to RenderText(). 2023-01-18 16:47:34 +01:00
ocornut
ccf94e2e6e Strip seemingly unecessary tests, as UTF-8 decoder can not return null since 9cca1b2e9 2023-01-12 12:46:06 +01:00
ocornut
1297a2be52 Text: Tweaked rendering of three-dots "..." ellipsis variant. Baking more data. (#2775, #4269)
Ideally we're bake a single glyph but it's currently difficult to setup in our font building process.
2023-01-11 16:37:47 +01:00
ocornut
482ac70a0b Version 1.89.3 WIP 2023-01-11 15:52:30 +01:00
vaiorabbit
a218d3a824
Update information in ImFontAtlas::GetGlyphRangesJapanese (#6066)
Co-authored-by: vaiorabbit <vaiorabbit>
2023-01-09 11:39:28 +01:00
ocornut
d7c8516a4b Version 1.89.2 2023-01-05 15:49:29 +01:00
ocornut
844e0ae688 Fixes/amend 9825f7f + amend Changelog (#4857, #5937) 2022-12-01 20:19:26 +01:00
ocornut
9825f7fa87 Fixed cases where CTRL+Tab or Modal can occasionally lead to the creation of ImDrawCmd with zero triangles. (#4857, #5937)
Amend b0a6cd6
2022-12-01 18:40:36 +01:00
ocornut
bd96f6eac4 Text: Fixed layouting of wrapped-text block when the last source line is above the clipping region. Regression added in 1.89. (#5720, #5919)
+ Update version marker
2022-11-28 14:59:13 +01:00
ocornut
a8df192df0 Version 1.89.1 2022-11-24 21:24:33 +01:00
ocornut
5bb2874940 Version 1.89.1 WIP 2022-11-16 17:55:27 +01:00
ocornut
81160fee56 Version 1.89
+ fix warning from a582d92
2022-11-15 15:20:36 +01:00
ocornut
3920b1c764 Removed commented out old flags from when Tables was a branch.
ImGuiTableFlags_ColumnsWidthFixed, ImGuiTableFlags_ColumnsWidthStretch,
ImGuiTableFlags_SizingPolicyFixed, ImGuiTableFlags_SizingPolicyStretch
ImGuiTableColumnFlags_WidthAuto
2022-10-14 16:36:41 +02:00
ocornut
f2a522d70d ImDrawList: Not using alloca() anymore, lift single polygon size limits. (#5704, #1811) 2022-09-30 15:58:55 +02:00
Andrew D. Zonenberg
e74a50f525 Added GetGlyphRangesGreek() helper for Greek & Coptic glyph range. (#5676, #5727) 2022-09-28 17:46:20 +02:00
ocornut
e0330c1696 Fonts, Text: Fixed wrapped-text not doing a fast-forward on lines above the clipping region. (#5720)
which would result in an abnormal number of vertices created.
2022-09-28 14:58:41 +02:00
ocornut
4d4889bf1b Refactor CalcWordWrapPositionA() to take on the responsability of minimum character display. Add CalcWordWrapNextLineStartA(), simplify caller code.
Should be no-op but incrementing IMGUI_VERSION_NUM just in case.
Preparing for #5720
2022-09-28 14:57:15 +02:00
ocornut
56c3eaed20 ImDrawList: asserting on incorrect value for CurveTessellationTol (#5713) 2022-09-27 14:24:21 +02:00
ocornut
2736af6b61 Minor optimization of ImFontAtlasBuildMultiplyRectAlpha8() + README tweaks. 2022-09-19 16:59:46 +02:00
ocornut
24dfe6db8a Version 1.89 WIP 2022-06-27 16:55:55 +02:00
ocornut
9aae45eb4a Version 1.88
(fix "Show Debug Log" checkbox in Metrics window)
2022-06-21 18:11:50 +02:00
thedmd
507a87354b DrawList: Circles disappear when using a radius < 0.5f (#3491)
Amend 051ce0765e
2022-05-13 17:22:35 +02:00
ocornut
9e0517a134 DrawList: Fixed divide-by-zero or glitches with Radius/Rounding values close to zero. (#5249, #5293, #3491)
Amend 8ed34af6f8
2022-05-13 17:19:51 +02:00
ocornut
2747a8ca40 Turned ImVec2 to const ref to RenderChar(), RenderText(), ColorButton(), PushClipRect(). for consistency. Comments about polygon filling winding order. 2022-03-29 12:13:31 +02:00
cfillion
7d7bf993bb ImDrawList: Fix texture-based anti-aliasing with RGBA textures (#5132, #3245)
When using an Alpha8 font texture, GetTexDataAsRGBA32 converts 0x00 to transparent white.
When using a RGBA32 font texture, ImFontAtlasBuildRenderLinesTexData was writing transparent black.
2022-03-23 16:00:39 +01:00
ocornut
fd06ed833b Misc: tweaks + fix warnings on backends withtout -wno-memaccess (#4995, #5104) 2022-03-13 17:57:32 +07:00
ocornut
279db55840 Updated stb_rect_pack.h from 1.00 to 1.01. (#5075)
(our STBRP__CDECL change was merged)
2022-03-13 13:23:00 +07:00
jakubtomsu
3deb92c2c5 Add IMGUI_STB_SPRINTF_FILENAME to support custom stb_printf.h include path (#5068, #2954) 2022-03-13 12:52:30 +07:00
thedmd
4691fa0ed5 ImDrawList: PthArcTo: Add small tolerance when comparing angles (#4993) 2022-02-08 17:37:45 +01:00
ocornut
88de982071 Version 1.88 WIP 2022-02-08 14:45:26 +01:00
ocornut
97b1abd6dd Internals: rework RenderMouseCursor() signature so we can use it in docking branch more naturally. 2022-02-08 12:22:46 +01:00
ocornut
c71a50deb5 Version 1.87 2022-02-07 18:16:54 +01:00
Clownacy
422902dbda Correct typos (#4954, #4955), use IM_STATIC_ASSERT now that old pre-C++11 macro has been obsoleted. 2022-01-31 11:58:33 +01:00
ocornut
075f4ac661 Don't merge ImDrawCmd which have had their IdxOffset changed to not be sequential. Fixed CTRL+Tab into an empty window causing artefacts on the highlight rectangle due to bad reordering on ImDrawCmd.
This is bit of a weird edge case adding weight to ImDrawCmd merging, if we could rework the mess in RenderDimmedBackgroundBehindWindow() we may be able to undo some of that.
2022-01-26 15:53:18 +01:00
Jonathan Hoffstadt
83d22f4e48 Tables, ImDrawListSplitter: Fixed erroneously stripping trailing ImDrawList::AddCallback().(#4843, #4844) 2021-12-30 22:03:52 +01:00
ocornut
89a28209e8 Version 1.87 WIP + Backends: OpenGL3: Fixed a buffer overflow in imgui_impl_opengl3_loader.h init, added in 1.86 (#4468, #4830) 2021-12-26 20:02:02 +01:00
ocornut
512c54bbc0 Version 1.86 2021-12-22 15:31:13 +01:00
ocornut
d7350668d1 Fix OSX warnings + Examples/Apple+GL2 calls super reshape. (#4759, #1873) 2021-12-13 12:31:15 +01:00
SlavicPotato
f71ee5203e Fix infinite loop in ImFontGlyphRangesBuilder::AddRanges if the user passes upper range = UINT16_MAX without IMGUI_USE_WCHAR32. (#4802) 2021-12-13 11:35:59 +01:00
ocornut
270d4d0855 Nav, Docking: Fix crash on dimming docked window and DockSpaceOverViewport() with PassthruCentralNode.
(amend 1dc3af3, 23ef6c1, 657073a)

# Conflicts:
#	imgui.cpp
2021-12-08 17:07:07 +01:00
ocornut
5b1a70aa2d Fixed RenderRectFilledWithHole() (used by docking) + added dummy EndFrameDrawDimmedBackgrounds() stub in master.
The round corner flag change in 033dfd9d forgot to default to _None.
2021-12-01 15:26:34 +01:00
ocornut
3fde445b91 Misc: Added missing ImGuiMouseCursor_NotAllowed cursor for software rendering (when io.MouseDrawCursor is enabled). (#4713) 2021-11-15 16:19:33 +01:00
ocornut
e3bd9434b1 1.86 WIP + internals: tweaks table temp data code. 2021-10-14 16:58:14 +02:00
ocornut
55d35d8387 Version 1.85 2021-10-11 19:24:25 +02:00
ocornut
4a7c21d330 Fonts: Fixed ImFontAtlas::ClearInputData() marking atlas as not built. (#4455, #3487) 2021-08-24 15:28:39 +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
thedmd
cb00972b87 ImDrawList: Fix AddCircle{Filled} with 12 segment case (#4419, #4421) 2021-08-19 17:06:40 +02:00
ocornut
327a5d8253 Fix warning + apply trailing whitespaces in stb_ libs (as applied on nothings/stb on 2020/02/02, facilitating further diffs) 2021-07-05 17:52:44 +02:00
ocornut
23a15834fa Fonts: Fix calling ClearTexData() (clearing CPU side font data) triggering an assert in NewFrame(). (#3487) + Backends: added additional assert to facilitate detecting user understand they haven't initialized a backend. 2021-06-29 18:16:47 +02:00
ocornut
b5a2bd1a5b Backends: amends to 1db1066 + merge minor bits from docking incl SetActiveIdUsingNavAndKeys().
No need to clear fields before deletion. DX12: renamed to match docking branch.
2021-06-29 15:25:19 +02:00
ocornut
95db098477 ImFontAtlas: move implicit AddFontDefault call to Build() function + remove unnecessary asserts in backend. 2021-06-25 17:27:17 +02:00
ocornut
9440974f66 Fonts: Add U+FFFD ("replacement character") to default asian glyphs ranges. Remove SetFallbackChar() (amend 0ffd99d31). (#4269) 2021-06-25 15:47:42 +02:00
ocornut
38165f420f Fonts: Prefer using U+FFFD character for fallback instead of '?'. Use U+FF0E dot character to construct an ellipsis if U+002E '.' is not available. (#4269) 2021-06-25 15:44:14 +02:00
ocornut
e534c56485 Fonts: Functions with a 'float size_pixels' parameter can accept zero if it is set in ImFontSize::SizePixels. 2021-06-24 17:15:14 +02:00
ocornut
dc676236f0 Minor optimization, removing do/while(0) patterns in some cases as they translate to runtime
(e.g. translate to xor + test + jne in VS x84, unnecessary)
2021-06-15 17:05:25 +02:00
ocornut
0cca0d1617 Internals/experimental: BeginComboPreview(), EndComboPreview(). (#4168, #1658)
(amended)
2021-06-15 15:27:28 +02:00
ocornut
d0c6dd9baf ImVector: added clear_delete(), clear_destruct() helpers. 2021-06-09 16:57:47 +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
Bartosz Taudul
4c9f0cec27 Add and use SSE-enabled ImRsqrt() in place of 1.0f / ImSqrt(). (#4091)
Squashed 3 commits.
2021-05-06 17:27:19 +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
Nick Lange
04e98fbe6b
Remove const qualifier on ImTextureID local (#4060)
When defining ImTextureID to a type such as Texture*, the const-qualifier here stops us from using the texture ID. const Texture* is not valid to be pushed as a texture ID anymore.
2021-04-26 10:15:55 +02:00
ocornut
25fbff2156 ImDrawList: Revert alteration of normal scaling threshold, for now prioritize preserving property of limiting extents. (#4053, #3366, #2964, #2868, #2518, #2183)
Amend fdda8b8
2021-04-19 14:58:54 +02:00
ocornut
fdda8b8c12 ImDrawList: Fixed/improved thickness of thick strokes with sharp angles. (#4053, #3366, #2964, #2868, #2518, #2183) 2021-04-19 14:03:21 +02:00
thedmd
690a90bd35 Make PathArcTo accept counter-clockwise angles (#4030, #3491) 2021-04-15 16:09:38 +02:00
ocornut
7c9c5dbe9a Internals: Added ImFloorSigned() + use our own ImFloorSigned() for stb_truetype, compared as matching output for variety of font data. (#2884) 2021-04-15 14:27:45 +02:00
ocornut
b957300260 Documentation tweaks (#4042) 2021-04-14 15:46:55 +02:00
ocornut
a1a39c632a Version 1.83 WIP 2021-03-16 14:45:30 +01:00
ocornut
35b1148efb Version 1.82 2021-03-15 20:26:48 +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
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
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
3e6dfd3c1a ImDrawList: AddImageRounded() compare texid from cmdheader as with other functions. + Made the ImGuiMemAllocFunc / ImGuiMemFreeFunc consistent with our other typedefs (#3836) 2021-03-04 14:29:01 +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
fb15d8c858 Improve on automatic circle segment count calculation. (#3808) Amends 2021-02-17 14:22:31 +01:00
thedmd
f107693d9b Improve on automatic circle segment count calculation. (#3808) 2021-02-17 12:55:39 +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
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
03038df1cc ImDrawList: fix divide by zero (for which result was unused but triggering on some archs/setup) added by f144c67676 (#3738) 2021-02-08 14:03:24 +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
Petr Shurgalin
24aa6654df imgui_freetype: add support for colored glyphs with ImGuiFreeTypeBuilderFlags_LoadColor (#3369)
(squashed 4 commits)
2021-02-01 16:32:23 +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