additional settings changes

This commit is contained in:
2025-12-27 17:54:54 +01:00
parent e186db6fb0
commit 81a4bb4bc4
7 changed files with 133 additions and 74 deletions

View File

@@ -0,0 +1,65 @@
using System;
using System.Numerics;
using Dalamud.Bindings.ImGui;
using Dalamud.Game.Gui.ContextMenu;
using Dalamud.Interface.Windowing;
namespace HighRollerClassic.Windows;
public class GambaWindow : Window, IDisposable
{
private readonly Configuration configuration;
// todo remove state as the window will only be opened by us calling it with parameters window id
private readonly Player? player;
private readonly Plugin plugin;
private string name;
public GambaWindow(Plugin plugin, MenuTargetDefault target)
: base($"High Roller Classic###{target.TargetContentId}",
ImGuiWindowFlags.NoScrollbar | ImGuiWindowFlags.NoScrollWithMouse)
{
SizeConstraints = new WindowSizeConstraints
{
MinimumSize = new Vector2(375, 330),
MaximumSize = new Vector2(float.MaxValue, float.MaxValue)
};
this.plugin = plugin;
configuration = this.plugin.Configuration;
player = configuration.players.GetOrCreatePlayer(target);
name = target.TargetName;
}
public void Dispose() { }
public override void Draw()
{
// TODO check if local player is null and if it is do not load anything
if (!plugin.PlayerIsLoaded())
{
ImGui.Text("Player must be loaded in the world in order for the plugin to function");
return;
}
/* TODO check if all settings are set
roll settings
message/macro settings
*/
// todo if player is null, then allow user to set user by clicking on them manually
if (player == null)
{
ImGui.Text(
"No target selected, please open HRC by right clicking the player and choosing the 'High Roller Classic' option");
return;
}
ImGui.Text($"Player: {name}");
ImGui.Spacing();
ImGui.Text($"Bank balance: {player.Bank} gil");
}
}