mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Updated ImGui.
This commit is contained in:
16
3rdparty/dear-imgui/imgui.h
vendored
16
3rdparty/dear-imgui/imgui.h
vendored
@@ -2082,26 +2082,26 @@ struct ImFontAtlas
|
||||
// ImFontAtlas automatically loads a default embedded font for you when you call GetTexDataAsAlpha8() or GetTexDataAsRGBA32().
|
||||
struct ImFont
|
||||
{
|
||||
// Members: Hot ~24/32 bytes (for CalcTextSize)
|
||||
ImVector<float> IndexAdvanceX; // 12/16 // out // // Sparse. Glyphs->AdvanceX in a directly indexable way (cache-friendly for CalcTextSize functions which only this this info, and are often bottleneck in large UI).
|
||||
float FontSize; // 4 // in // <user set> // Height of characters, set during loading (don't change after loading)
|
||||
// Members: Hot ~20/24 bytes (for CalcTextSize)
|
||||
ImVector<float> IndexAdvanceX; // 12-16 // out // // Sparse. Glyphs->AdvanceX in a directly indexable way (cache-friendly for CalcTextSize functions which only this this info, and are often bottleneck in large UI).
|
||||
float FallbackAdvanceX; // 4 // out // = FallbackGlyph->AdvanceX
|
||||
ImWchar FallbackChar; // 2 // in // = '?' // Replacement glyph if one isn't found. Only set via SetFallbackChar()
|
||||
float FontSize; // 4 // in // // Height of characters/line, set during loading (don't change after loading)
|
||||
|
||||
// Members: Hot ~36/48 bytes (for CalcTextSize + render loop)
|
||||
ImVector<ImWchar> IndexLookup; // 12-16 // out // // Sparse. Index glyphs by Unicode code-point.
|
||||
ImVector<ImFontGlyph> Glyphs; // 12-16 // out // // All glyphs.
|
||||
ImVec2 DisplayOffset; // 8 // in // = (0,0) // Offset font rendering by xx pixels
|
||||
const ImFontGlyph* FallbackGlyph; // 4-8 // out // = FindGlyph(FontFallbackChar)
|
||||
ImVec2 DisplayOffset; // 8 // in // = (0,0) // Offset font rendering by xx pixels
|
||||
|
||||
// Members: Cold ~28/40 bytes
|
||||
// Members: Cold ~32/40 bytes
|
||||
ImFontAtlas* ContainerAtlas; // 4-8 // out // // What we has been loaded into
|
||||
const ImFontConfig* ConfigData; // 4-8 // in // // Pointer within ContainerAtlas->ConfigData
|
||||
short ConfigDataCount; // 2 // in // ~ 1 // Number of ImFontConfig involved in creating this font. Bigger than 1 when merging multiple font sources into one ImFont.
|
||||
bool DirtyLookupTables; // 1 // out //
|
||||
ImWchar FallbackChar; // 2 // in // = '?' // Replacement glyph if one isn't found. Only set via SetFallbackChar()
|
||||
float Scale; // 4 // in // = 1.f // Base font scale, multiplied by the per-window font scale which you can adjust with SetWindowFontScale()
|
||||
float Ascent, Descent; // 8 // out // // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize]
|
||||
float Ascent, Descent; // 4+4 // out // // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize]
|
||||
int MetricsTotalSurface;// 4 // out // // Total surface in pixels to get an idea of the font rasterization/texture cost (not exact, we approximate the cost of padding between glyphs)
|
||||
bool DirtyLookupTables; // 1 // out //
|
||||
|
||||
// Methods
|
||||
IMGUI_API ImFont();
|
||||
|
||||
4
3rdparty/dear-imgui/imgui_widgets.cpp
vendored
4
3rdparty/dear-imgui/imgui_widgets.cpp
vendored
@@ -730,7 +730,7 @@ void ImGui::Scrollbar(ImGuiLayoutType direction)
|
||||
const bool horizontal = (direction == ImGuiLayoutType_Horizontal);
|
||||
const ImGuiStyle& style = g.Style;
|
||||
const ImGuiID id = GetScrollbarID(direction);
|
||||
|
||||
|
||||
// Render background
|
||||
bool other_scrollbar = (horizontal ? window->ScrollbarY : window->ScrollbarX);
|
||||
float other_scrollbar_size_w = other_scrollbar ? style.ScrollbarSize : 0.0f;
|
||||
@@ -2631,6 +2631,8 @@ int ImParseFormatPrecision(const char* fmt, int default_precision)
|
||||
// FIXME: Facilitate using this in variety of other situations.
|
||||
bool ImGui::InputScalarAsWidgetReplacement(const ImRect& bb, ImGuiID id, const char* label, ImGuiDataType data_type, void* data_ptr, const char* format)
|
||||
{
|
||||
IM_UNUSED(id);
|
||||
|
||||
ImGuiContext& g = *GImGui;
|
||||
|
||||
// On the first frame, g.ScalarAsInputTextId == 0, then on subsequent frames it becomes == id.
|
||||
|
||||
Reference in New Issue
Block a user