update 14

This commit is contained in:
SuspiciousActivity committed 2026-01-21 14:24:25 +01:00
1 parent e0ddd32744
commit da592f9860
15 files changed
+261 -286

No files matched your search

+58
View File
@@ -0,0 +1,58 @@
using Dalamud.Bindings.ImGui;
using Dalamud.Interface.Windowing;
using System;
using System.Numerics;
namespace Waypoints;
public class MainWindow : Window, IDisposable
{
private string newName = string.Empty;
public MainWindow()
: base("Waypoints")
{
SizeConstraints = new WindowSizeConstraints
{
MinimumSize = new Vector2(375, 330),
MaximumSize = new Vector2(float.MaxValue, float.MaxValue)
};
}
public void Dispose() { }
public override void Draw()
{
ImGui.InputText("", ref newName, 128);
ImGui.SameLine();
if (ImGui.Button("Add Waypoint"))
{
if (newName.Length == 0)
{
return;
}
Plugin.Configuration.Waypoints.Add(newName, (Utils.CurrentTerritoryId(), Utils.CurrentMapId(), Utils.CurrentPosition() ?? Vector3.Zero));
Plugin.Configuration.Save();
Plugin.WotsitIpc.Update();
newName = string.Empty;
}
ImGui.Spacing();
ImGui.Text("Waypoints");
foreach (var kvp in Plugin.Configuration.Waypoints)
{
if (ImGui.Button(kvp.Key))
{
Utils.OpenMapAt(kvp.Value.Item1, kvp.Value.Item2, kvp.Value.Item3);
}
ImGui.SameLine();
if (ImGui.Button($"Delete##{kvp.Key}"))
{
Plugin.Configuration.Waypoints.Remove(kvp.Key);
Plugin.Configuration.Save();
Plugin.WotsitIpc.Update();
}
}
}
}