mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Merge branch 'master' into docking
# Conflicts: # imgui.cpp
This commit is contained in:
commit
396b33d0d0
40 changed files with 826 additions and 305 deletions
19
imgui.cpp
19
imgui.cpp
|
|
@ -402,13 +402,15 @@ IMPLEMENTING SUPPORT for ImGuiBackendFlags_RendererHasTextures:
|
|||
- likewise io.MousePos and GetMousePos() will use OS coordinates.
|
||||
If you query mouse positions to interact with non-imgui coordinates you will need to offset them, e.g. subtract GetWindowViewport()->Pos.
|
||||
|
||||
- 2025/12/23 (1.92.6) - Fonts:AddFontDefault() now automatically selects an embedded font between the new scalable AddFontDefaultVector() and the classic pixel-clean AddFontDefaultBitmap().
|
||||
The default selection is based on (style.FontSizeBase * FontScaleMain * FontScaleDpi) reaching a small threshold. Prefer calling either based on your own logic. You can call AddFontDefaultBitmap() to ensure legacy behavior.
|
||||
- 2025/12/23 (1.92.6) - Fonts: removed ImFontConfig::PixelSnapV added in 1.92 which turns out is unnecessary (and misdocumented). Post-rescale GlyphOffset is always rounded.
|
||||
- 2025/12/17 (1.92.6) - Renamed helper macro IM_ARRAYSIZE() -> IM_COUNTOF(). Kept redirection/legacy name for now.
|
||||
- 2025/12/11 (1.92.6) - Hashing: handling of "###" operator to reset to seed within a string identifier doesn't include the "###" characters in the output hash anymore.
|
||||
- Before: GetID("Hello###World") == GetID("###World") != GetID("World");
|
||||
- Now: GetID("Hello###World") == GetID("###World") == GetID("World");
|
||||
- This has the property of facilitating concatenating and manipulating identifiers using "###", and will allow fixing other dangling issues.
|
||||
- This will invalidate hashes (stored in .ini data) for Tables and Windows!
|
||||
that are using the "###" operators. (#713, #1698)
|
||||
- This will invalidate hashes (stored in .ini data) for Tables and Windows that are using the "###" operators. (#713, #1698)
|
||||
- 2025/11/24 (1.92.6) - Fonts: Fixed handling of `ImFontConfig::FontDataOwnedByAtlas = false` which did erroneously make a copy of the font data, essentially defeating the purpose of this flag and wasting memory.
|
||||
(trivia: undetected since July 2015, this is perhaps the oldest bug in Dear ImGui history, albeit for a rarely used feature, see #9086)
|
||||
HOWEVER, fixing this bug is likely to surface bugs in user code using `FontDataOwnedByAtlas = false`.
|
||||
|
|
@ -1280,7 +1282,7 @@ IMPLEMENTING SUPPORT for ImGuiBackendFlags_RendererHasTextures:
|
|||
#define IMGUI_DEBUG_NAV_RECTS 0 // Display the reference navigation rectangle for each window
|
||||
|
||||
// Default font size if unspecified in both style.FontSizeBase and AddFontXXX() calls.
|
||||
static const float FONT_DEFAULT_SIZE = 20.0f;
|
||||
static const float FONT_DEFAULT_SIZE_BASE = 20.0f;
|
||||
|
||||
// When using Ctrl+Tab (or Gamepad Square+L/R) we delay the visual a little in order to reduce visual noise doing a fast switch.
|
||||
static const float NAV_WINDOWING_HIGHLIGHT_DELAY = 0.20f; // Time before the highlight and screen dimming starts fading in
|
||||
|
|
@ -6615,6 +6617,12 @@ ImVec2 ImGui::GetItemRectSize()
|
|||
return g.LastItemData.Rect.GetSize();
|
||||
}
|
||||
|
||||
ImGuiItemFlags ImGui::GetItemFlags()
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
return g.LastItemData.ItemFlags;
|
||||
}
|
||||
|
||||
// Prior to v1.90 2023/10/16, the BeginChild() function took a 'bool border = false' parameter instead of 'ImGuiChildFlags child_flags = 0'.
|
||||
// ImGuiChildFlags_Borders is defined as always == 1 in order to allow old code passing 'true'. Read comments in imgui.h for details!
|
||||
bool ImGui::BeginChild(const char* str_id, const ImVec2& size_arg, ImGuiChildFlags child_flags, ImGuiWindowFlags window_flags)
|
||||
|
|
@ -9521,7 +9529,7 @@ void ImGui::UpdateFontsNewFrame()
|
|||
// Apply default font size the first time
|
||||
ImFont* font = ImGui::GetDefaultFont();
|
||||
if (g.Style.FontSizeBase <= 0.0f)
|
||||
g.Style.FontSizeBase = (font->LegacySize > 0.0f ? font->LegacySize : FONT_DEFAULT_SIZE);
|
||||
g.Style.FontSizeBase = (font->LegacySize > 0.0f ? font->LegacySize : FONT_DEFAULT_SIZE_BASE);
|
||||
|
||||
// Set initial font
|
||||
g.Font = font;
|
||||
|
|
@ -23160,6 +23168,9 @@ void ImGui::DebugNodeFont(ImFont* font)
|
|||
{
|
||||
const ImFontLoader* loader = src->FontLoader ? src->FontLoader : atlas->FontLoader;
|
||||
Text("Loader: '%s'", loader->Name ? loader->Name : "N/A");
|
||||
|
||||
//if (DragFloat("ExtraSizeScale", &src->ExtraSizeScale, 0.01f, 0.10f, 2.0f))
|
||||
// ImFontAtlasFontRebuildOutput(atlas, font);
|
||||
#ifdef IMGUI_ENABLE_FREETYPE
|
||||
if (loader->Name != NULL && strcmp(loader->Name, "FreeType") == 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue