mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-31 21:03:43 +01:00
feat: port Dalamud windows to WindowSystem
This commit is contained in:
parent
65fb949c61
commit
c21e7efab7
10 changed files with 252 additions and 247 deletions
|
|
@ -2,35 +2,32 @@ using System;
|
|||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Dalamud.Interface.Windowing;
|
||||
using Dalamud.Plugin;
|
||||
using ImGuiNET;
|
||||
using Lumina.Data.Parsing.Layer;
|
||||
|
||||
namespace Dalamud.Interface {
|
||||
class DalamudChangelogWindow : IDisposable {
|
||||
class DalamudChangelogWindow : Window {
|
||||
private readonly Dalamud dalamud;
|
||||
private string assemblyVersion = Util.AssemblyVersion;
|
||||
|
||||
private const bool WarrantsChangelog = true;
|
||||
public const bool WarrantsChangelog = true;
|
||||
private const string ChangeLog =
|
||||
@"* Various behind-the-scenes changes to improve stability
|
||||
* Faster startup times
|
||||
|
||||
If you note any issues or need help, please make sure to ask on our discord server.";
|
||||
|
||||
public DalamudChangelogWindow(Dalamud dalamud) {
|
||||
public DalamudChangelogWindow(Dalamud dalamud)
|
||||
: base("What's new in XIVLauncher?", ImGuiWindowFlags.AlwaysAutoResize | ImGuiWindowFlags.NoResize)
|
||||
{
|
||||
this.dalamud = dalamud;
|
||||
|
||||
this.Namespace = "DalamudChangelogWindow";
|
||||
}
|
||||
|
||||
public bool Draw() {
|
||||
var doDraw = true;
|
||||
|
||||
if (!WarrantsChangelog)
|
||||
return false;
|
||||
|
||||
ImGui.PushID("DalamudChangelogWindow");
|
||||
ImGui.Begin("What's new in XIVLauncher?", ref doDraw, ImGuiWindowFlags.AlwaysAutoResize | ImGuiWindowFlags.NoResize);
|
||||
|
||||
public override void Draw() {
|
||||
ImGui.Text($"The in-game addon has been updated to version D{this.assemblyVersion}.");
|
||||
|
||||
ImGui.Dummy(new Vector2(10, 10) * ImGui.GetIO().FontGlobalScale);
|
||||
|
|
@ -84,18 +81,10 @@ If you note any issues or need help, please make sure to ask on our discord serv
|
|||
ImGui.Dummy(new Vector2(20, 0) * ImGui.GetIO().FontGlobalScale);
|
||||
ImGui.SameLine();
|
||||
|
||||
if (ImGui.Button("Close")) {
|
||||
doDraw = false;
|
||||
if (ImGui.Button("Close"))
|
||||
{
|
||||
this.IsOpen = false;
|
||||
}
|
||||
|
||||
ImGui.End();
|
||||
ImGui.PopID();
|
||||
|
||||
return doDraw;
|
||||
}
|
||||
|
||||
public void Dispose() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue