Combo highlight config, tooltips, nameplates, hotbars fixes
- Combo highlight: configurable color, glow, line style (solid/dashed/dotted), thickness - Tooltips: font selection, scaling slider, improved wrap/cramping handling - Nameplates: custom quest icons with config, position smoothing fix for jitter - Hotbars: hide keybinds on empty slots, combo highlight within icon bounds - HudHelper: restore default nameplates on plugin disable Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -177,10 +177,9 @@ namespace HSUI.Interface.GeneralElements
|
||||
drawList.AddRect(pos, pos + size, 0xFF88CCFF, 0, ImDrawFlags.None, 2);
|
||||
else if (isComboNext)
|
||||
{
|
||||
const uint gold = 0xFFFFD700;
|
||||
for (int g = 5; g >= 1; g--)
|
||||
drawList.AddRect(pos - new Vector2(g, g), pos + size + new Vector2(g, g), (uint)((byte)(70 * (6 - g)) << 24 | (gold & 0xFFFFFF)), 0, ImDrawFlags.None, 2f);
|
||||
drawList.AddRect(pos, pos + size, gold, 0, ImDrawFlags.None, 4f);
|
||||
var ch = Config.ComboHighlightConfig;
|
||||
DrawHelper.DrawComboHighlightRect(drawList, pos, pos + size,
|
||||
ch.Color.Base, ch.Thickness, ch.ShowGlow, ch.LineStyle);
|
||||
}
|
||||
|
||||
if (showCd && slot.CooldownPercent > 0 && _pendingSlotIconIndex != i)
|
||||
@@ -198,7 +197,7 @@ namespace HSUI.Interface.GeneralElements
|
||||
}
|
||||
}
|
||||
|
||||
if (Config.ShowSlotNumbers)
|
||||
if (Config.ShowSlotNumbers && !slot.IsEmpty)
|
||||
{
|
||||
string label = !string.IsNullOrWhiteSpace(slot.KeybindHint)
|
||||
? slot.KeybindHint
|
||||
|
||||
@@ -66,6 +66,9 @@ namespace HSUI.Interface.GeneralElements
|
||||
[Order(29)]
|
||||
public bool ShowComboHighlight = true;
|
||||
|
||||
[NestedConfig("Combo Highlight", 31)]
|
||||
public ComboHighlightConfig ComboHighlightConfig = new();
|
||||
|
||||
[Checkbox("Debug Drag & Drop")]
|
||||
[Order(30)]
|
||||
public bool DebugDragDrop = false;
|
||||
@@ -106,6 +109,35 @@ namespace HSUI.Interface.GeneralElements
|
||||
public new static HotbarsConfig DefaultConfig() => new HotbarsConfig();
|
||||
}
|
||||
|
||||
public enum ComboHighlightLineStyle
|
||||
{
|
||||
Solid = 0,
|
||||
Dashed = 1,
|
||||
Dotted = 2
|
||||
}
|
||||
|
||||
[Exportable(false)]
|
||||
public class ComboHighlightConfig : PluginConfigObject
|
||||
{
|
||||
[ColorEdit4("Color")]
|
||||
[Order(1)]
|
||||
public PluginConfigColor Color = PluginConfigColor.FromHex(0xFFFFD700);
|
||||
|
||||
[Checkbox("Show Glow")]
|
||||
[Order(2)]
|
||||
public bool ShowGlow = false;
|
||||
|
||||
[Combo("Line Style", new string[] { "Solid", "Dashed", "Dotted" })]
|
||||
[Order(3)]
|
||||
public int LineStyle = (int)ComboHighlightLineStyle.Solid;
|
||||
|
||||
[DragInt("Border Thickness", min = 1, max = 8)]
|
||||
[Order(4)]
|
||||
public int Thickness = 3;
|
||||
|
||||
public ComboHighlightConfig() { }
|
||||
}
|
||||
|
||||
public class HotbarsGeneralOptionsConfig : PluginConfigObject
|
||||
{
|
||||
[Checkbox("Enable drag and drop from game UI", help = "When enabled, you can drag actions, macros, and items from the Actions menu, Macro menu, and Inventory onto HSUI hotbars.")]
|
||||
|
||||
Reference in New Issue
Block a user