public override void RegisterData(ImGuiView view) { FontAsset asset = GetFirstAssetOfType <FontAsset>(); asset.ImGuiID = view.Fonts.RegisterFromAssetTTF( ContentManagement.ContentManager.GetUVContent(), "FreeTypeFonts\\" + asset.ContentName, FontSize); }
public override void ImGuiUpdate(UltravioletTime time) { FontAsset asset = GetFirstAssetOfType <FontAsset>(); ImGui.SetNextWindowBgAlpha(0); ImGui.SetNextWindowPos(Entity.Transform.ToVector2()); if (ImGui.Begin(Text, ImGuiFlagsPresets.InvisibleWindow)) { ImGui.PushFont(asset.ImGuiID); ImGui.TextColored(Color, Text); ImGui.PopFont(); ImGui.End(); } }