mirror of
https://github.com/ocornut/imgui.git
synced 2025-10-26 12:27:30 +00:00
Merge miscellaneous small changes to reduce drift with texture update branch.
- ImGuiDebugLogFlags_EventFont is yet unused.
This commit is contained in:
19
imgui.h
19
imgui.h
@@ -2309,6 +2309,7 @@ struct ImGuiIO
|
||||
// (the imgui_impl_xxxx backend files are setting those up for you)
|
||||
//------------------------------------------------------------------
|
||||
|
||||
// Nowadays those would be stored in ImGuiPlatformIO but we are leaving them here for legacy reasons.
|
||||
// Optional: Platform/Renderer backend name (informational only! will be displayed in About Window) + User data for backend/wrappers to store their own stuff.
|
||||
const char* BackendPlatformName; // = NULL
|
||||
const char* BackendRendererName; // = NULL
|
||||
@@ -3064,10 +3065,11 @@ struct ImDrawList
|
||||
float _FringeScale; // [Internal] anti-alias fringe is scaled by this value, this helps to keep things sharp while zooming at vertex buffer content
|
||||
const char* _OwnerName; // Pointer to owner window's name for debugging
|
||||
|
||||
// If you want to create ImDrawList instances, pass them ImGui::GetDrawListSharedData() or create and use your own ImDrawListSharedData (so you can use ImDrawList without ImGui)
|
||||
ImDrawList(ImDrawListSharedData* shared_data) { memset(this, 0, sizeof(*this)); _Data = shared_data; }
|
||||
|
||||
~ImDrawList() { _ClearFreeMemory(); }
|
||||
// If you want to create ImDrawList instances, pass them ImGui::GetDrawListSharedData().
|
||||
// (advanced: you may create and use your own ImDrawListSharedData so you can use ImDrawList without ImGui, but that's more involved)
|
||||
IMGUI_API ImDrawList(ImDrawListSharedData* shared_data);
|
||||
IMGUI_API ~ImDrawList();
|
||||
|
||||
IMGUI_API void PushClipRect(const ImVec2& clip_rect_min, const ImVec2& clip_rect_max, bool intersect_with_current_clip_rect = false); // Render-level scissoring. This is passed down to your render function but not used for CPU-side coarse clipping. Prefer using higher-level ImGui::PushClipRect() to affect logic (hit-testing and widget culling)
|
||||
IMGUI_API void PushClipRectFullScreen();
|
||||
IMGUI_API void PopClipRect();
|
||||
@@ -3277,14 +3279,16 @@ struct ImFontGlyphRangesBuilder
|
||||
// See ImFontAtlas::AddCustomRectXXX functions.
|
||||
struct ImFontAtlasCustomRect
|
||||
{
|
||||
unsigned short Width, Height; // Input // Desired rectangle dimension
|
||||
unsigned short X, Y; // Output // Packed position in Atlas
|
||||
|
||||
// [Internal]
|
||||
unsigned short Width, Height; // Input // Desired rectangle dimension
|
||||
unsigned int GlyphID : 31; // Input // For custom font glyphs only (ID < 0x110000)
|
||||
unsigned int GlyphColored : 1; // Input // For custom font glyphs only: glyph is colored, removed tinting.
|
||||
float GlyphAdvanceX; // Input // For custom font glyphs only: glyph xadvance
|
||||
ImVec2 GlyphOffset; // Input // For custom font glyphs only: glyph display offset
|
||||
ImFont* Font; // Input // For custom font glyphs only: target font
|
||||
ImFontAtlasCustomRect() { Width = Height = 0; X = Y = 0xFFFF; GlyphID = 0; GlyphColored = 0; GlyphAdvanceX = 0.0f; GlyphOffset = ImVec2(0, 0); Font = NULL; }
|
||||
ImFontAtlasCustomRect() { X = Y = 0xFFFF; Width = Height = 0; GlyphID = 0; GlyphColored = 0; GlyphAdvanceX = 0.0f; GlyphOffset = ImVec2(0, 0); Font = NULL; }
|
||||
bool IsPacked() const { return X != 0xFFFF; }
|
||||
};
|
||||
|
||||
@@ -3431,8 +3435,9 @@ struct ImFont
|
||||
const ImFontGlyph* FallbackGlyph; // 4-8 // out // = FindGlyph(FontFallbackChar)
|
||||
|
||||
// Members: Cold ~32/40 bytes
|
||||
// Conceptually ConfigData[] is the list of font sources merged to create this font.
|
||||
ImFontAtlas* ContainerAtlas; // 4-8 // out // // What we has been loaded into
|
||||
const ImFontConfig* ConfigData; // 4-8 // in // // Pointer within ContainerAtlas->ConfigData
|
||||
const ImFontConfig* ConfigData; // 4-8 // in // // Pointer within ContainerAtlas->ConfigData to ConfigDataCount instances
|
||||
short ConfigDataCount; // 2 // in // ~ 1 // Number of ImFontConfig involved in creating this font. Bigger than 1 when merging multiple font sources into one ImFont.
|
||||
ImWchar FallbackChar; // 2 // out // = FFFD/'?' // Character used if a glyph isn't found.
|
||||
ImWchar EllipsisChar; // 2 // out // = '...'/'.'// Character used for ellipsis rendering.
|
||||
|
||||
Reference in New Issue
Block a user