Commit graph

6067 commits

Author SHA1 Message Date
ocornut
72ee77b919 WIP - Fonts: encode additional data in ImFontAtlasRectId to detect invalid id + added Rects debug browser. 2025-04-14 16:00:04 +02:00
ocornut
cea1b17f2e WIP - Fonts: changing loader/backend or loader flags may be done without losing custom rects. Sharing more code. 2025-04-10 17:34:04 +02:00
ocornut
cc3614279d WIP - Fonts: GC Compact All exposed in Metrics->Memory Allocations includes compacting texture data. 2025-04-10 17:34:04 +02:00
ocornut
3273162de9 WIP - (Breaking) Fonts: PushFont() default to preserve current font size. 2025-04-10 17:34:03 +02:00
ocornut
d4a3c9afb6 WIP - Fonts: Tools: added option to hide font preview text. Move code. 2025-04-10 17:34:03 +02:00
ocornut
3c708dbe5a WIP - Fonts: removed size rounding in AddFont() which breaks relative sizing of merged fonts (8502) 2025-04-10 17:34:03 +02:00
ocornut
a2b87540c1 WIP - Fonts: comments, tweaks, minor amends.
Comments, tweaks
2025-04-10 17:34:03 +02:00
ocornut
fc4139d223 WIP - Fonts: Fixed PopFont() recovery.
(To squash into "Added PushFontSize(), PopFontSize() api."
2025-04-10 17:34:02 +02:00
ocornut
ef4482f417 WIP - Fonts: fixed crashing password fields. 2025-04-10 17:34:02 +02:00
ocornut
7535ea81e8 WIP - Fonts: rename ImFontAtlasBuildClearTexture() to ImFontAtlasBuildClear() 2025-04-10 17:34:02 +02:00
ocornut
662117b8f7 WIP - Fonts: change uses of ImFontAtlasRect to ImTextureRect for simplicity. 2025-04-10 17:34:02 +02:00
ocornut
049d83b4db WIP - Added UI to edit FreeType loader flags. Added ImFontAtlasBuildReloadAll() / ImFontAtlasBuildReloadFont() 2025-04-10 17:34:01 +02:00
ocornut
d409f488c5 WIP - In ShowFontAtlas() preserve open-state for latest texture. Improve debug display. 2025-04-10 17:34:01 +02:00
ocornut
282559d77a WIP - ImFontConfig::GlyphExcludeRanges is owner and copied. 2025-04-10 17:34:01 +02:00
ocornut
d467bcb1ba WIP - Fixed various small warnings / build issues. 2025-04-10 17:34:01 +02:00
ocornut
6dc7f66895 WIP - Detect when using a texture that's about to be destroyed. 2025-04-10 17:34:01 +02:00
ocornut
449a0762f8 WIP - Demo: Add a "Fonts" section for visibility. 2025-04-10 17:34:01 +02:00
ocornut
ead3b7300c WIP - Added ImTextureData::UsedRect. 2025-04-10 17:34:01 +02:00
ocornut
1cd281142e WIP - Tidying up font scale logic. 2025-04-10 17:34:00 +02:00
ocornut
36538440c5 WIP - Exposed CompactCache(). Hide ClearCache(). 2025-04-10 17:34:00 +02:00
ocornut
b5eb6a7b56 WIP - PushFontSize() with -1 uses sources[0]'s size for now (backward compat design) 2025-04-10 17:33:59 +02:00
ocornut
bb8686a394 WIP - Allow PushFont/NewFrame/PopFont idioms to function. 2025-04-10 17:33:59 +02:00
ocornut
3d750d2429 WIP - Baked system, v12: support GlyphOffset / GlyphMinAdvanceX / GlyphMaxAdvanceX by scaling from ref value.
Overwriting cfg->PixelSnapH = true; in imgui_freetype is weird.
2025-04-10 17:33:59 +02:00
ocornut
4ca8254b7b WIP - Added PushFontSize(), PopFontSize() api. Added font_size param to PushFont() as well. 2025-04-10 17:33:59 +02:00
ocornut
b9b8efc8bc WIP - Clarify ClearTexData() as not supported with dynamic atlases. 2025-04-10 17:33:59 +02:00
ocornut
fcae19c28e WIP - Baked system, with auto-bind, v10. 2025-04-10 17:33:59 +02:00
ocornut
293cda9849 WIP - Added a bit of user facing tooling. 2025-04-10 17:33:58 +02:00
ocornut
fdfbd4f280 WIP - Fixed/improved support for legacy backend. SetTexID() writes into our ImTextureData to keep the indirection, clear TexIsBuilt.
The idea is that a legacy backend can somehow add a if (!atlas->IsBuilt()) ImGui_ImplXXXXX_CreateFontsTexture() call _after_ Render() and some features are supported.
2025-04-10 17:33:58 +02:00
ocornut
90d5ac7343 WIP - Comments, remove ImFontAtlas facing BuildGrowTexture(), BuildCompactTexture(). Make IsBuilt() obsolete. 2025-04-10 17:33:58 +02:00
ocornut
9619e44780 WIP - Basic heuristic to repack instead of growing. Moved rects count/surface to internals. 2025-04-10 17:33:58 +02:00
ocornut
773604a666 WIP - Rasterizing ellipsis character from dot as one glyph + avoid preloading if it not needed. 2025-04-10 17:33:57 +02:00
ocornut
c10b8741af WIP - Fixed support for multiple contexts. 2025-04-10 17:33:57 +02:00
ocornut
40b79f211b WIP - Added ImFontAtlas::RemoveFont(), fixed various leaks. 2025-04-10 17:33:57 +02:00
ocornut
6aa7afed63 WIP - Marked ImFontAtlas::Build() as obsolete 2025-04-10 17:33:57 +02:00
ocornut
ac8550be13 WIP - Adding a RefCount to textures so backend can avoid destroying them on shutdown if atlas is shared. 2025-04-10 17:33:56 +02:00
ocornut
adb0cff6c8 WIP - Single Textures[] array allows backend to not have to care about atlases. 2025-04-10 17:33:56 +02:00
ocornut
c9f18fda65 WIP - (squash) Rename FontBackend -> FontLoader 2025-04-10 17:33:55 +02:00
ocornut
d87fcdd8fa WIP - Main code for ImGuiBackendFlags_RendererHasTextures feature. 2025-04-10 17:33:55 +02:00
ocornut
3068ec1cce WIP (Breaking) added ImTextureRef struct.
Softly breaking. May require support from language binding generator.
Rebased and reworked completely on 2025/03/19.
2025-04-10 17:33:55 +02:00
ocornut
f4d9359095 Merge branch 'master' into docking
Some checks failed
build / Android (push) Has been cancelled
build / Windows (push) Has been cancelled
build / Linux (push) Has been cancelled
build / MacOS (push) Has been cancelled
build / iOS (push) Has been cancelled
build / Emscripten (push) Has been cancelled
2025-04-10 17:26:11 +02:00
ocornut
9943137d1e TreeNode: fixed non-opened clipped child node not moving Y2 marker. (#2920) 2025-04-10 17:25:06 +02:00
ocornut
06c2c9f456 Merge branch 'master' into docking
Some checks are pending
build / Windows (push) Waiting to run
build / Linux (push) Waiting to run
build / MacOS (push) Waiting to run
build / iOS (push) Waiting to run
build / Emscripten (push) Waiting to run
build / Android (push) Waiting to run
# Conflicts:
#	backends/imgui_impl_sdl2.cpp
#	backends/imgui_impl_sdl3.cpp
2025-04-09 19:08:45 +02:00
ocornut
789de09dda TreeNode: extracted TreeNodeDrawLineToChildNode() for usage by custom widgets (#2920) 2025-04-09 12:04:09 +02:00
ocornut
47d1ab192a Merge branch 'master' into docking
Some checks are pending
build / Windows (push) Waiting to run
build / Linux (push) Waiting to run
build / MacOS (push) Waiting to run
build / iOS (push) Waiting to run
build / Emscripten (push) Waiting to run
build / Android (push) Waiting to run
# Conflicts:
#	backends/imgui_impl_vulkan.cpp
#	imgui_widgets.cpp
2025-04-08 19:59:38 +02:00
ocornut
e5b218e6d1 TreeNode: added ImGuiTreeNodeFlags_DrawTreeXXX flags. (#2920)
# Conflicts:
#	docs/CHANGELOG.txt
2025-04-08 19:58:59 +02:00
ocornut
df5690d91a Merge branch 'master' into docking
Some checks are pending
build / Linux (push) Waiting to run
build / Emscripten (push) Waiting to run
build / Windows (push) Waiting to run
build / MacOS (push) Waiting to run
build / iOS (push) Waiting to run
build / Android (push) Waiting to run
# Conflicts:
#	backends/imgui_impl_osx.mm
#	backends/imgui_impl_sdl2.cpp
#	backends/imgui_impl_sdl3.cpp
#	imgui.cpp
2025-03-30 16:42:28 +02:00
ocornut
a26fcf58cc Nav: fixed assertion when holding gamepad FaceLeft/West button + pressing a keyboard key. (#8525)
Some checks are pending
build / Windows (push) Waiting to run
build / Linux (push) Waiting to run
build / MacOS (push) Waiting to run
build / iOS (push) Waiting to run
build / Emscripten (push) Waiting to run
build / Android (push) Waiting to run
2025-03-30 16:40:39 +02:00
ocornut
8bbdfefe05 Nav: added bool ConfigNavWindowingWithGamepad to disable windowing with gamepad. (#8525, #4828, #3255, #5641) 2025-03-30 15:05:27 +02:00
ocornut
187acb8609 Nav: polling gamepad for ImGuiKey_NavGamepadMenu use routing-friendly Shortcut() so Ctrl+Tab equivalent may be hijacked. (#8525, #4828, #3255, #5641) 2025-03-30 14:46:58 +02:00
ocornut
dbd9ae287a Windows: fixed SetNextWindowCollapsed()/SetWindowCollapsed() breaking codepath that preserve last contents size when collapsed. (#7691) 2025-03-23 12:57:14 +01:00