You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
847 B
32 lines
847 B
2 years ago
|
//
|
||
|
// Created by cflin on 4/14/23.
|
||
|
//
|
||
|
|
||
|
#ifndef EXAMPLE_STATICMENU_H
|
||
|
#define EXAMPLE_STATICMENU_H
|
||
|
|
||
|
#include <igl/opengl/glfw/imgui/ImGuiMenu.h>
|
||
|
#include <igl/opengl/glfw/Viewer.h>
|
||
|
|
||
|
namespace ssim {
|
||
|
|
||
|
class StaticMenu : public igl::opengl::glfw::imgui::ImGuiMenu {
|
||
|
typedef igl::opengl::glfw::imgui::ImGuiMenu Super;
|
||
|
|
||
|
void init(igl::opengl::glfw::Viewer *_viewer, igl::opengl::glfw::imgui::ImGuiPlugin *_plugin) override {
|
||
|
viewer = _viewer;
|
||
|
plugin = _plugin;
|
||
|
// set font
|
||
|
ImGuiIO &io = ImGui::GetIO();
|
||
|
io.Fonts->Clear();
|
||
|
io.Fonts->AddFontFromFileTTF(
|
||
|
CMAKE_SOURCE_DIR "/src/viewer/Arial Unicode MS.TTF",
|
||
|
14.0f, nullptr, io.Fonts->GetGlyphRangesChineseFull());
|
||
|
}
|
||
|
|
||
|
};
|
||
|
|
||
|
} // ssim
|
||
|
|
||
|
#endif //EXAMPLE_STATICMENU_H
|