Added embedded fonts.
This commit is contained in:
@@ -78,6 +78,7 @@ target_include_directories(
|
|||||||
|
|
||||||
target_sources(AnimTestbed PRIVATE
|
target_sources(AnimTestbed PRIVATE
|
||||||
src/main.cc
|
src/main.cc
|
||||||
|
src/embedded_fonts.h
|
||||||
src/SkinnedMeshRenderer.cc
|
src/SkinnedMeshRenderer.cc
|
||||||
src/AnimGraph/AnimGraphEditor.cc
|
src/AnimGraph/AnimGraphEditor.cc
|
||||||
src/AnimGraph/AnimGraphEditor.h
|
src/AnimGraph/AnimGraphEditor.h
|
||||||
|
|||||||
+10441
File diff suppressed because it is too large
Load Diff
+15
-1
@@ -25,6 +25,7 @@
|
|||||||
#include "SkinnedMesh.h"
|
#include "SkinnedMesh.h"
|
||||||
#include "SkinnedMeshRenderer.h"
|
#include "SkinnedMeshRenderer.h"
|
||||||
#include "SkinnedMeshResource.h"
|
#include "SkinnedMeshResource.h"
|
||||||
|
#include "embedded_fonts.h"
|
||||||
#include "src/AnimGraph/AnimGraphEditor.h"
|
#include "src/AnimGraph/AnimGraphEditor.h"
|
||||||
|
|
||||||
const int Width = 1024;
|
const int Width = 1024;
|
||||||
@@ -573,7 +574,20 @@ int main() {
|
|||||||
ImGuiIO& io = ImGui::GetIO();
|
ImGuiIO& io = ImGui::GetIO();
|
||||||
io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;
|
io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;
|
||||||
io.IniFilename = "ATPImgui.ini";
|
io.IniFilename = "ATPImgui.ini";
|
||||||
io.Fonts->AddFontDefault();
|
|
||||||
|
//io.Fonts->AddFontDefault();
|
||||||
|
ImFontConfig font_config;
|
||||||
|
font_config.OversampleH = 4;
|
||||||
|
font_config.OversampleV = 4;
|
||||||
|
font_config.GlyphExtraSpacing.x = 1.0f;
|
||||||
|
io.Fonts->AddFontFromMemoryCompressedTTF(
|
||||||
|
// roboto_medium_ttf_compressed_data,
|
||||||
|
// roboto_medium_ttf_compressed_size,
|
||||||
|
droid_sans_ttf_compressed_data,
|
||||||
|
droid_sans_ttf_compressed_size,
|
||||||
|
14,
|
||||||
|
&font_config);
|
||||||
|
|
||||||
io.KeyMap[ImGuiKey_Tab] = GLFW_KEY_TAB;
|
io.KeyMap[ImGuiKey_Tab] = GLFW_KEY_TAB;
|
||||||
io.KeyMap[ImGuiKey_LeftArrow] = GLFW_KEY_LEFT;
|
io.KeyMap[ImGuiKey_LeftArrow] = GLFW_KEY_LEFT;
|
||||||
io.KeyMap[ImGuiKey_RightArrow] = GLFW_KEY_RIGHT;
|
io.KeyMap[ImGuiKey_RightArrow] = GLFW_KEY_RIGHT;
|
||||||
|
|||||||
Reference in New Issue
Block a user