mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-02 18:14:32 +00:00
Demo: added basic Fonts section under main demo (same as Metrics one) for visibility.
This commit is contained in:
@@ -82,6 +82,7 @@ Index of this file:
|
||||
// [SECTION] DemoWindowWidgetsDisableBlocks()
|
||||
// [SECTION] DemoWindowWidgetsDragAndDrop()
|
||||
// [SECTION] DemoWindowWidgetsDragsAndSliders()
|
||||
// [SECTION] DemoWindowWidgetsFonts()
|
||||
// [SECTION] DemoWindowWidgetsImages()
|
||||
// [SECTION] DemoWindowWidgetsListBoxes()
|
||||
// [SECTION] DemoWindowWidgetsMultiComponents()
|
||||
@@ -1719,6 +1720,24 @@ static void DemoWindowWidgetsDragsAndSliders()
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// [SECTION] DemoWindowWidgetsFonts()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Forward declare ShowFontAtlas() which isn't worth putting in public API yet
|
||||
namespace ImGui { IMGUI_API void ShowFontAtlas(ImFontAtlas* atlas); }
|
||||
|
||||
static void DemoWindowWidgetsFonts()
|
||||
{
|
||||
IMGUI_DEMO_MARKER("Widgets/Fonts");
|
||||
if (ImGui::TreeNode("Fonts"))
|
||||
{
|
||||
ImFontAtlas* atlas = ImGui::GetIO().Fonts;
|
||||
ImGui::ShowFontAtlas(atlas);
|
||||
ImGui::TreePop();
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// [SECTION] DemoWindowWidgetsImages()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -4182,6 +4201,7 @@ static void DemoWindowWidgets(ImGuiDemoWindowData* demo_data)
|
||||
|
||||
DemoWindowWidgetsDragAndDrop();
|
||||
DemoWindowWidgetsDragsAndSliders();
|
||||
DemoWindowWidgetsFonts();
|
||||
DemoWindowWidgetsImages();
|
||||
DemoWindowWidgetsListBoxes();
|
||||
DemoWindowWidgetsMultiComponents();
|
||||
|
||||
Reference in New Issue
Block a user