v1.0.2.0: Restore Hotbar Layout, fix config right-click menu, hotbar fallback
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -226,7 +226,7 @@ namespace HSUI.Config.Tree
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawExportResetContextMenu(selectionNode, selectionNode.Name);
|
DrawExportResetContextMenu(selectionNode, selectionNode.Name + "_section");
|
||||||
}
|
}
|
||||||
|
|
||||||
// changelog button
|
// changelog button
|
||||||
|
|||||||
+1
-1
@@ -43,7 +43,7 @@ namespace HSUI.Config.Tree
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_nodeToReset = ImGuiHelper.DrawExportResetContextMenu(node, allowExport, allowReset);
|
_nodeToReset = ImGuiHelper.DrawExportResetContextMenu(node, allowExport, allowReset, name);
|
||||||
_nodeToResetName = name;
|
_nodeToResetName = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ namespace HSUI.Config.Tree
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawExportResetContextMenu(subSectionNode, subSectionNode.Name);
|
DrawExportResetContextMenu(subSectionNode, Name + "_" + subSectionNode.Name + "_tab");
|
||||||
|
|
||||||
ImGui.BeginChild("subconfig value", new Vector2(0, 0), true);
|
ImGui.BeginChild("subconfig value", new Vector2(0, 0), true);
|
||||||
didReset |= subSectionNode.Draw(ref changed);
|
didReset |= subSectionNode.Draw(ref changed);
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ namespace HSUI.Config.Tree
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawExportResetContextMenu(subSectionNode, subSectionNode.Name);
|
DrawExportResetContextMenu(subSectionNode, Name + "_" + subSectionNode.Name + "_nested");
|
||||||
|
|
||||||
ImGui.BeginChild("subconfig" + Depth + " value", new Vector2(0, ImGui.GetWindowHeight()));
|
ImGui.BeginChild("subconfig" + Depth + " value", new Vector2(0, ImGui.GetWindowHeight()));
|
||||||
didReset |= subSectionNode.Draw(ref changed);
|
didReset |= subSectionNode.Draw(ref changed);
|
||||||
|
|||||||
+3
-3
@@ -9,9 +9,9 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<AssemblyName>HSUI</AssemblyName>
|
<AssemblyName>HSUI</AssemblyName>
|
||||||
<AssemblyVersion>1.0.1.0</AssemblyVersion>
|
<AssemblyVersion>1.0.2.0</AssemblyVersion>
|
||||||
<FileVersion>1.0.1.0</FileVersion>
|
<FileVersion>1.0.2.0</FileVersion>
|
||||||
<InformationalVersion>1.0.1.0</InformationalVersion>
|
<InformationalVersion>1.0.2.0</InformationalVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"Author": "Knack117",
|
"Author": "Knack117",
|
||||||
"Name": "HSUI",
|
"Name": "HSUI",
|
||||||
"InternalName": "HSUI",
|
"InternalName": "HSUI",
|
||||||
"AssemblyVersion": "1.0.1.0",
|
"AssemblyVersion": "1.0.2.0",
|
||||||
"Description": "HSUI provides a highly configurable HUD replacement for FFXIV, recreated from DelvUI using KamiToolKit, FFXIVClientStructs, and Dalamud. Features unit frames, castbars, job gauges, nameplates, party frames, status effects, enemy list, configurable hotbars with drag-and-drop, and profiles.",
|
"Description": "HSUI provides a highly configurable HUD replacement for FFXIV, recreated from DelvUI using KamiToolKit, FFXIVClientStructs, and Dalamud. Features unit frames, castbars, job gauges, nameplates, party frames, status effects, enemy list, configurable hotbars with drag-and-drop, and profiles.",
|
||||||
"ApplicableVersion": "any",
|
"ApplicableVersion": "any",
|
||||||
"RepoUrl": "https://github.com/Knack117/HSUI",
|
"RepoUrl": "https://github.com/Knack117/HSUI",
|
||||||
|
|||||||
@@ -47,11 +47,12 @@ namespace HSUI.Helpers
|
|||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Node? DrawExportResetContextMenu(Node node, bool canExport, bool canReset)
|
public static Node? DrawExportResetContextMenu(Node node, bool canExport, bool canReset, string? uniqueId = null)
|
||||||
{
|
{
|
||||||
Node? nodeToReset = null;
|
Node? nodeToReset = null;
|
||||||
|
string popupId = string.IsNullOrEmpty(uniqueId) ? "ResetContextMenu" : "ResetContextMenu_" + uniqueId;
|
||||||
|
|
||||||
if (ImGui.BeginPopupContextItem("ResetContextMenu"))
|
if (ImGui.BeginPopupContextItem(popupId))
|
||||||
{
|
{
|
||||||
if (canExport && ImGui.Selectable("Export"))
|
if (canExport && ImGui.Selectable("Export"))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using HSUI.Config;
|
using HSUI.Config;
|
||||||
using HSUI.Config.Attributes;
|
using HSUI.Config.Attributes;
|
||||||
using HSUI.Enums;
|
using HSUI.Enums;
|
||||||
|
using HSUI.Helpers;
|
||||||
using HSUI.Interface;
|
using HSUI.Interface;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using Dalamud.Bindings.ImGui;
|
using Dalamud.Bindings.ImGui;
|
||||||
@@ -83,7 +84,7 @@ namespace HSUI.Interface.GeneralElements
|
|||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static void ApplyDefaults(HotbarBarConfig config, int hotbarIndex)
|
public static void ApplyDefaults(HotbarBarConfig config, int hotbarIndex)
|
||||||
{
|
{
|
||||||
var viewport = ImGui.GetMainViewport().Size;
|
var viewport = ImGui.GetMainViewport().Size;
|
||||||
float yOffset = 60 + (hotbarIndex - 1) * 50;
|
float yOffset = 60 + (hotbarIndex - 1) * 50;
|
||||||
@@ -106,7 +107,62 @@ namespace HSUI.Interface.GeneralElements
|
|||||||
[NestedConfig("Drag & Drop Options", 5, separator = true, collapseWith = null)]
|
[NestedConfig("Drag & Drop Options", 5, separator = true, collapseWith = null)]
|
||||||
public HotbarsGeneralOptionsConfig GeneralOptions = new();
|
public HotbarsGeneralOptionsConfig GeneralOptions = new();
|
||||||
|
|
||||||
|
[ManualDraw]
|
||||||
|
public bool DrawRestoreHotbarsButton(ref bool changed)
|
||||||
|
{
|
||||||
|
ImGuiHelper.DrawSeparator(2, 1);
|
||||||
|
if (ImGui.Button("Restore Hotbar Layout", new Vector2(200, 24)))
|
||||||
|
{
|
||||||
|
RestoreAllHotbarsToDefaults();
|
||||||
|
changed = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (ImGui.IsItemHovered())
|
||||||
|
ImGui.SetTooltip("Reset positions and re-enable all hotbars. Use if your hotbars disappeared after an update.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public new static HotbarsConfig DefaultConfig() => new HotbarsConfig();
|
public new static HotbarsConfig DefaultConfig() => new HotbarsConfig();
|
||||||
|
|
||||||
|
private static void RestoreAllHotbarsToDefaults()
|
||||||
|
{
|
||||||
|
var cfg = ConfigurationManager.Instance;
|
||||||
|
if (cfg == null) return;
|
||||||
|
var bars = new (HotbarBarConfig config, int index)[]
|
||||||
|
{
|
||||||
|
(cfg.GetConfigObject<Hotbar1BarConfig>(), 1),
|
||||||
|
(cfg.GetConfigObject<Hotbar2BarConfig>(), 2),
|
||||||
|
(cfg.GetConfigObject<Hotbar3BarConfig>(), 3),
|
||||||
|
(cfg.GetConfigObject<Hotbar4BarConfig>(), 4),
|
||||||
|
(cfg.GetConfigObject<Hotbar5BarConfig>(), 5),
|
||||||
|
(cfg.GetConfigObject<Hotbar6BarConfig>(), 6),
|
||||||
|
(cfg.GetConfigObject<Hotbar7BarConfig>(), 7),
|
||||||
|
(cfg.GetConfigObject<Hotbar8BarConfig>(), 8),
|
||||||
|
(cfg.GetConfigObject<Hotbar9BarConfig>(), 9),
|
||||||
|
(cfg.GetConfigObject<Hotbar10BarConfig>(), 10)
|
||||||
|
};
|
||||||
|
foreach (var (bar, idx) in bars)
|
||||||
|
{
|
||||||
|
if (bar == null) continue;
|
||||||
|
bar.Enabled = true;
|
||||||
|
HotbarBarConfig.ApplyDefaults(bar, idx);
|
||||||
|
}
|
||||||
|
var vis = cfg.GetConfigObject<HotbarsVisibilityConfig>();
|
||||||
|
if (vis != null)
|
||||||
|
{
|
||||||
|
var defaults = new VisibilityConfig();
|
||||||
|
vis.HotbarConfig1.CopyFrom(defaults);
|
||||||
|
vis.HotbarConfig2.CopyFrom(defaults);
|
||||||
|
vis.HotbarConfig3.CopyFrom(defaults);
|
||||||
|
vis.HotbarConfig4.CopyFrom(defaults);
|
||||||
|
vis.HotbarConfig5.CopyFrom(defaults);
|
||||||
|
vis.HotbarConfig6.CopyFrom(defaults);
|
||||||
|
vis.HotbarConfig7.CopyFrom(defaults);
|
||||||
|
vis.HotbarConfig8.CopyFrom(defaults);
|
||||||
|
vis.HotbarConfig9.CopyFrom(defaults);
|
||||||
|
vis.HotbarConfig10.CopyFrom(defaults);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum ComboHighlightLineStyle
|
public enum ComboHighlightLineStyle
|
||||||
|
|||||||
@@ -263,6 +263,30 @@ namespace HSUI.Interface
|
|||||||
SetGameHudElementsHidden(hashesToHide.ToArray(), false);
|
SetGameHudElementsHidden(hashesToHide.ToArray(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static bool AnyHotbarEnabled()
|
||||||
|
{
|
||||||
|
var cfg = ConfigurationManager.Instance;
|
||||||
|
if (cfg == null) return true;
|
||||||
|
var bars = new HotbarBarConfig?[]
|
||||||
|
{
|
||||||
|
cfg.GetConfigObject<Hotbar1BarConfig>(),
|
||||||
|
cfg.GetConfigObject<Hotbar2BarConfig>(),
|
||||||
|
cfg.GetConfigObject<Hotbar3BarConfig>(),
|
||||||
|
cfg.GetConfigObject<Hotbar4BarConfig>(),
|
||||||
|
cfg.GetConfigObject<Hotbar5BarConfig>(),
|
||||||
|
cfg.GetConfigObject<Hotbar6BarConfig>(),
|
||||||
|
cfg.GetConfigObject<Hotbar7BarConfig>(),
|
||||||
|
cfg.GetConfigObject<Hotbar8BarConfig>(),
|
||||||
|
cfg.GetConfigObject<Hotbar9BarConfig>(),
|
||||||
|
cfg.GetConfigObject<Hotbar10BarConfig>()
|
||||||
|
};
|
||||||
|
foreach (var bar in bars)
|
||||||
|
{
|
||||||
|
if (bar?.Enabled == true) return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>Visibility (ByteValue2) of game HUD elements before we hid them. Restored on disable/unload.</summary>
|
/// <summary>Visibility (ByteValue2) of game HUD elements before we hid them. Restored on disable/unload.</summary>
|
||||||
private readonly Dictionary<uint, byte> _gameHudVisibilityBeforeHide = new();
|
private readonly Dictionary<uint, byte> _gameHudVisibilityBeforeHide = new();
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
# 1.0.2.0
|
||||||
|
- **Hotbars**: Restore Hotbar Layout button (Hotbars → General) to recover hotbars after updates. Game hotbars shown as fallback when all HSUI hotbars disabled.
|
||||||
|
- **Config**: Fixed right-click Export/Reset context menu so it works on all sections and tabs (not just Unit Frames).
|
||||||
|
|
||||||
# 1.0.1.0
|
# 1.0.1.0
|
||||||
- **Combo highlight**: Configurable color, glow, line style (solid/dashed/dotted), and border thickness.
|
- **Combo highlight**: Configurable color, glow, line style (solid/dashed/dotted), and border thickness.
|
||||||
- **Tooltips**: Font selection, scaling slider, improved text wrap and cramping.
|
- **Tooltips**: Font selection, scaling slider, improved text wrap and cramping.
|
||||||
|
|||||||
+5
-5
@@ -4,9 +4,9 @@
|
|||||||
"Name": "HSUI",
|
"Name": "HSUI",
|
||||||
"Punchline": "A modern HUD replacement built for customization.",
|
"Punchline": "A modern HUD replacement built for customization.",
|
||||||
"Description": "HSUI provides a highly configurable HUD replacement for FFXIV, recreated from DelvUI using KamiToolKit, FFXIVClientStructs, and Dalamud. Features unit frames, castbars, job gauges, nameplates, party frames, status effects, enemy list, configurable hotbars with drag-and-drop, and profiles.",
|
"Description": "HSUI provides a highly configurable HUD replacement for FFXIV, recreated from DelvUI using KamiToolKit, FFXIVClientStructs, and Dalamud. Features unit frames, castbars, job gauges, nameplates, party frames, status effects, enemy list, configurable hotbars with drag-and-drop, and profiles.",
|
||||||
"Changelog": "Combo highlight config (color, glow, line style). Tooltip font/scale. Nameplate quest icons, jitter fix. Hotbar keybind/empty slot fix.",
|
"Changelog": "Restore Hotbar Layout button. Fixed config right-click Export/Reset for all sections. Hotbar fallback when all disabled.",
|
||||||
"InternalName": "HSUI",
|
"InternalName": "HSUI",
|
||||||
"AssemblyVersion": "1.0.1.0",
|
"AssemblyVersion": "1.0.2.0",
|
||||||
"RepoUrl": "https://github.com/Knack117/HSUI",
|
"RepoUrl": "https://github.com/Knack117/HSUI",
|
||||||
"ApplicableVersion": "any",
|
"ApplicableVersion": "any",
|
||||||
"Tags": ["UI", "HUD", "Unit Frames", "Nameplates", "Party Frames", "Hotbars"],
|
"Tags": ["UI", "HUD", "Unit Frames", "Nameplates", "Party Frames", "Hotbars"],
|
||||||
@@ -14,10 +14,10 @@
|
|||||||
"DalamudApiLevel": 14,
|
"DalamudApiLevel": 14,
|
||||||
"IconUrl": "https://raw.githubusercontent.com/Knack117/HSUI/main/Media/Images/icon.png",
|
"IconUrl": "https://raw.githubusercontent.com/Knack117/HSUI/main/Media/Images/icon.png",
|
||||||
"ImageUrls": [],
|
"ImageUrls": [],
|
||||||
"DownloadLinkInstall": "https://github.com/Knack117/HSUI/releases/download/v1.0.1.0/latest.zip",
|
"DownloadLinkInstall": "https://github.com/Knack117/HSUI/releases/download/v1.0.2.0/latest.zip",
|
||||||
"IsHide": false,
|
"IsHide": false,
|
||||||
"IsTestingExclusive": false,
|
"IsTestingExclusive": false,
|
||||||
"DownloadLinkTesting": "https://github.com/Knack117/HSUI/releases/download/v1.0.1.0/latest.zip",
|
"DownloadLinkTesting": "https://github.com/Knack117/HSUI/releases/download/v1.0.2.0/latest.zip",
|
||||||
"DownloadLinkUpdate": "https://github.com/Knack117/HSUI/releases/download/v1.0.1.0/latest.zip"
|
"DownloadLinkUpdate": "https://github.com/Knack117/HSUI/releases/download/v1.0.2.0/latest.zip"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user