Tooltip: game-style formatting with section labels, tail alignment, and config options

- Add TooltipSegment and colored formatting (section labels green, status names yellow)
- Sections: Additional Effect, Duration, Maximum Charges, Blood Gauge Cost, Combo, role labels
- Tail text (e.g. 'Cannot be executed while bound.', parenthetical notes) now left-aligned on own line
- Section values (e.g. '2', '50', '30m') stay on same line as labels
- Config: Use Game-style formatting, Section/Status/Secondary colors
- Config: Tooltip Max Width, Line Spacing, Font Scale, Icon Scale, Height Buffer slider
- ActionBarsHud: pass formatted segments to ShowTooltipOnCursor when game-style enabled

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jorg
2026-02-21 20:50:07 -06:00
parent c5b8e48072
commit 925c3af558
2 changed files with 343 additions and 21 deletions
+6 -2
View File
@@ -370,7 +370,9 @@ namespace HSUI.Interface.GeneralElements
if (!string.IsNullOrEmpty(title) || !string.IsNullOrEmpty(text))
{
string body = string.IsNullOrEmpty(text) ? title : text;
TooltipsHelper.Instance.ShowTooltipOnCursor(body, title, slot.ActionId, "", slot.IconId > 0 ? slot.IconId : null, Helpers.TooltipIdKind.Action);
var tooltipConfig = ConfigurationManager.Instance?.GetConfigObject<HSUI.Helpers.TooltipsConfig>();
var formatted = tooltipConfig != null ? TooltipsHelper.BuildFormattedActionTooltipBody(body, tooltipConfig) : null;
TooltipsHelper.Instance.ShowTooltipOnCursor(body, title, slot.ActionId, "", slot.IconId > 0 ? slot.IconId : null, Helpers.TooltipIdKind.Action, formatted);
if (IsTooltipDebugEnabled())
Plugin.Logger.Information($"[HSUI Tooltip DBG] ActionBar tooltip (main overlay): slot={i} title='{title}'");
}
@@ -429,7 +431,9 @@ namespace HSUI.Interface.GeneralElements
if (!string.IsNullOrEmpty(title) || !string.IsNullOrEmpty(text))
{
string body = string.IsNullOrEmpty(text) ? title : text;
TooltipsHelper.Instance.ShowTooltipOnCursor(body, title, slot.ActionId, "", slot.IconId > 0 ? slot.IconId : null, Helpers.TooltipIdKind.Action);
var tooltipConfig = ConfigurationManager.Instance?.GetConfigObject<HSUI.Helpers.TooltipsConfig>();
var formatted = tooltipConfig != null ? TooltipsHelper.BuildFormattedActionTooltipBody(body, tooltipConfig) : null;
TooltipsHelper.Instance.ShowTooltipOnCursor(body, title, slot.ActionId, "", slot.IconId > 0 ? slot.IconId : null, Helpers.TooltipIdKind.Action, formatted);
if (IsTooltipDebugEnabled())
Plugin.Logger.Information($"[HSUI Tooltip DBG] ActionBar tooltip (overlay): slot={i} title='{title}'");
}