fix(combat): restore retail combat bar controls

Resolve authored StringInfo labels from local.dat, port gmCombatUI's runtime option captions and checkbox widgets, and bind horizontal scrollbar media by retail structural roles so the green power jewel is a thumb instead of a tiled track. Persist the three combat options and make Auto Target govern target acquisition.

Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-11 20:26:52 +02:00
parent 2215c76c7e
commit 927fa7881a
19 changed files with 24591 additions and 48 deletions

View file

@ -26,6 +26,7 @@ public sealed record GameplaySettings(
// CharacterOption (32-bit) subset — most-used gameplay toggles.
bool AutoTarget, // 0x2000 — combat: auto-acquire target on attack
bool AutoRepeatAttack, // 0x2 — combat: keep attacking after first hit
bool ViewCombatTarget, // 0x80 — keep the current combat target in view
bool ToggleRun, // 0x400 — run-mode is tap-once vs hold-to-run
bool AdvancedCombatUI, // 0x1000 — show extra combat tooltips/panels
bool ShowTooltips, // 0x100 — show item tooltips on hover
@ -46,6 +47,7 @@ public sealed record GameplaySettings(
public static GameplaySettings Default { get; } = new(
AutoTarget: true,
AutoRepeatAttack: true,
ViewCombatTarget: true,
ToggleRun: true,
AdvancedCombatUI: false,
ShowTooltips: true,

View file

@ -306,6 +306,10 @@ public sealed class SettingsPanel : IPanel
if (renderer.Checkbox("Auto-repeat attacks", ref autoRepeat))
_vm.SetGameplay(g with { AutoRepeatAttack = autoRepeat });
bool viewCombatTarget = g.ViewCombatTarget;
if (renderer.Checkbox("Keep combat target in view", ref viewCombatTarget))
_vm.SetGameplay(g with { ViewCombatTarget = viewCombatTarget });
bool toggleRun = g.ToggleRun;
if (renderer.Checkbox("Run mode is toggle (vs hold)", ref toggleRun))
_vm.SetGameplay(g with { ToggleRun = toggleRun });

View file

@ -150,6 +150,7 @@ public sealed class SettingsStore
return new GameplaySettings(
AutoTarget: ReadBool(gp, "autoTarget", d.AutoTarget),
AutoRepeatAttack: ReadBool(gp, "autoRepeatAttack", d.AutoRepeatAttack),
ViewCombatTarget: ReadBool(gp, "viewCombatTarget", d.ViewCombatTarget),
ToggleRun: ReadBool(gp, "toggleRun", d.ToggleRun),
AdvancedCombatUI: ReadBool(gp, "advancedCombatUI", d.AdvancedCombatUI),
ShowTooltips: ReadBool(gp, "showTooltips", d.ShowTooltips),
@ -483,6 +484,7 @@ public sealed class SettingsStore
["allowGive"] = g.AllowGive,
["autoRepeatAttack"] = g.AutoRepeatAttack,
["autoTarget"] = g.AutoTarget,
["viewCombatTarget"] = g.ViewCombatTarget,
["coordinatesOnRadar"] = g.CoordinatesOnRadar,
["lockUI"] = g.LockUI,
["showCloak"] = g.ShowCloak,