Initial release: HSUI v1.0.0.0 - HUD replacement with configurable hotbars
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
using Dalamud.Interface.Windowing;
|
||||
using HSUI.Interface.GeneralElements;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using System.Numerics;
|
||||
|
||||
namespace HSUI.Config.Windows
|
||||
{
|
||||
public class GridWindow : Window
|
||||
{
|
||||
private bool _popColors = false;
|
||||
public GridWindow(string name) : base(name)
|
||||
{
|
||||
Flags = ImGuiWindowFlags.NoScrollbar | ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoScrollWithMouse;
|
||||
Size = new Vector2(300, 200);
|
||||
}
|
||||
|
||||
public override void OnClose()
|
||||
{
|
||||
ConfigurationManager.Instance.LockHUD = true;
|
||||
}
|
||||
|
||||
public override void PreDraw()
|
||||
{
|
||||
if (ConfigurationManager.Instance.OverrideDalamudStyle)
|
||||
{
|
||||
ImGui.PushStyleColor(ImGuiCol.WindowBg, new Vector4(10f / 255f, 10f / 255f, 10f / 255f, 0.95f));
|
||||
_popColors = true;
|
||||
}
|
||||
|
||||
ImGui.SetNextWindowFocus();
|
||||
}
|
||||
|
||||
public override void Draw()
|
||||
{
|
||||
var configManager = ConfigurationManager.Instance;
|
||||
var node = configManager.GetConfigPageNode<GridConfig>();
|
||||
if (node == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ImGui.PushItemWidth(150);
|
||||
bool changed = false;
|
||||
node.Draw(ref changed);
|
||||
}
|
||||
|
||||
public override void PostDraw()
|
||||
{
|
||||
if (_popColors)
|
||||
{
|
||||
ImGui.PopStyleColor();
|
||||
_popColors = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user