mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-09 23:54:20 +00:00
Demo: added basic Fonts section under main demo (same as Metrics one) for visibility.
This commit is contained in:
parent
c5e2bb7cd1
commit
afd3a36f69
3 changed files with 41 additions and 4 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue