This commit is contained in:
Branimir Karadžić
2016-05-28 17:14:19 -07:00
parent dda0de635e
commit 58156ea4e8
6 changed files with 60 additions and 20 deletions

View File

@@ -280,19 +280,6 @@ namespace ImGui
SetCursorPosY(GetCursorPosY() + GetTextLineHeightWithSpacing() );
}
struct Font
{
enum Enum
{
Regular,
Mono,
Count
};
};
void PushFont(Font::Enum _font);
} // namespace ImGui
#endif // IMGUI_H_HEADER_GUARD

View File

@@ -453,8 +453,8 @@ struct OcornutImguiContext
config.MergeMode = false;
// config.MergeGlyphCenterV = true;
m_font[ImGui::Font::Regular] = io.Fonts->AddFontFromMemoryTTF( (void*)s_robotoRegularTtf, sizeof(s_robotoRegularTtf), _fontSize, &config);
m_font[ImGui::Font::Mono ] = io.Fonts->AddFontFromMemoryTTF( (void*)s_robotoMonoRegularTtf, sizeof(s_robotoMonoRegularTtf), _fontSize, &config);
m_font[ImGui::Font::Regular] = io.Fonts->AddFontFromMemoryTTF( (void*)s_robotoRegularTtf, sizeof(s_robotoRegularTtf), _fontSize, &config);
m_font[ImGui::Font::Mono ] = io.Fonts->AddFontFromMemoryTTF( (void*)s_robotoMonoRegularTtf, sizeof(s_robotoMonoRegularTtf), _fontSize-3.0f, &config);
config.MergeMode = true;
config.DstFont = m_font[ImGui::Font::Regular];
@@ -660,9 +660,24 @@ struct OcornutImguiContext
#endif // 0
#if 0
extern void ShowExampleAppCustomNodeGraph(bool* opened);
bool opened = true;
ShowExampleAppCustomNodeGraph(&opened);
{
static ImGui::MemoryEditor me;
bool open = true;
if (ImGui::Begin("HexII", &open))
{
me.Draw(s_iconsKenneyTtf, sizeof(s_iconsKenneyTtf) );
ImGui::End();
}
}
#endif // 0
#if 0
{
extern void ShowExampleAppCustomNodeGraph(bool* opened);
bool opened = true;
ShowExampleAppCustomNodeGraph(&opened);
}
#endif // 0
}