mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 05:04:15 +01:00
feat: show logo instead of ugly scaled text for testing
This commit is contained in:
parent
cc362d5fd7
commit
4ec3673954
1 changed files with 13 additions and 3 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
@ -24,6 +25,7 @@ using Dalamud.Utility;
|
||||||
using FFXIVClientStructs.FFXIV.Client.System.Framework;
|
using FFXIVClientStructs.FFXIV.Client.System.Framework;
|
||||||
using FFXIVClientStructs.FFXIV.Client.UI;
|
using FFXIVClientStructs.FFXIV.Client.UI;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
|
using ImGuiScene;
|
||||||
using PInvoke;
|
using PInvoke;
|
||||||
using Serilog.Events;
|
using Serilog.Events;
|
||||||
|
|
||||||
|
|
@ -61,6 +63,8 @@ namespace Dalamud.Interface.Internal
|
||||||
private bool isImGuiDrawDemoWindow = false;
|
private bool isImGuiDrawDemoWindow = false;
|
||||||
private bool isImGuiDrawMetricsWindow = false;
|
private bool isImGuiDrawMetricsWindow = false;
|
||||||
|
|
||||||
|
private readonly TextureWrap logoTexture;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="DalamudInterface"/> class.
|
/// Initializes a new instance of the <see cref="DalamudInterface"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -100,7 +104,12 @@ namespace Dalamud.Interface.Internal
|
||||||
|
|
||||||
ImGuiManagedAsserts.AssertsEnabled = configuration.AssertsEnabledAtStartup;
|
ImGuiManagedAsserts.AssertsEnabled = configuration.AssertsEnabledAtStartup;
|
||||||
|
|
||||||
Service<InterfaceManager>.Get().Draw += this.OnDraw;
|
var interfaceManager = Service<InterfaceManager>.Get();
|
||||||
|
interfaceManager.Draw += this.OnDraw;
|
||||||
|
var dalamud = Service<Dalamud>.Get();
|
||||||
|
|
||||||
|
this.logoTexture =
|
||||||
|
interfaceManager.LoadImage(Path.Combine(dalamud.AssetDirectory.FullName, "UIRes", "logo.png"))!;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -122,6 +131,8 @@ namespace Dalamud.Interface.Internal
|
||||||
{
|
{
|
||||||
Service<InterfaceManager>.Get().Draw -= this.OnDraw;
|
Service<InterfaceManager>.Get().Draw -= this.OnDraw;
|
||||||
|
|
||||||
|
this.logoTexture.Dispose();
|
||||||
|
|
||||||
this.WindowSystem.RemoveAllWindows();
|
this.WindowSystem.RemoveAllWindows();
|
||||||
|
|
||||||
this.creditsWindow.Dispose();
|
this.creditsWindow.Dispose();
|
||||||
|
|
@ -363,11 +374,10 @@ namespace Dalamud.Interface.Internal
|
||||||
|
|
||||||
if (config.DoDalamudTest)
|
if (config.DoDalamudTest)
|
||||||
{
|
{
|
||||||
ImGui.SetWindowFontScale(2.2f);
|
|
||||||
ImGuiHelpers.ScaledDummy(20);
|
ImGuiHelpers.ScaledDummy(20);
|
||||||
ImGuiHelpers.ScaledDummy(20);
|
ImGuiHelpers.ScaledDummy(20);
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
ImGui.TextColored(ImGuiColors.DPSRed, "Dalamud Staging");
|
ImGui.Image(this.logoTexture.ImGuiHandle, new Vector2(25, 25));
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.End();
|
ImGui.End();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue