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

@ -2127,7 +2127,9 @@ public sealed class GameWindow : IDisposable
SetRetailUiLocked),
Combat: new AcDream.App.UI.CombatRuntimeBindings(
Combat,
_combatAttackController),
_combatAttackController,
() => _persistedGameplay,
SetRetailCombatGameplay),
Toolbar: new AcDream.App.UI.ToolbarRuntimeBindings(
Objects,
() => Shortcuts,
@ -11379,6 +11381,22 @@ public sealed class GameWindow : IDisposable
}
}
private void SetRetailCombatGameplay(
AcDream.UI.Abstractions.Panels.Settings.GameplaySettings gameplay)
{
_persistedGameplay = gameplay;
_settingsVm?.SetGameplay(gameplay);
try
{
_settingsStore?.SaveGameplay(gameplay);
}
catch (Exception ex)
{
Console.WriteLine($"settings: combat option save failed: {ex.Message}");
}
}
private void OnUiDragReleasedOutside(object payload, int x, int y)
{
if (payload is AcDream.App.UI.ItemDragPayload itemPayload)
@ -11997,6 +12015,9 @@ public sealed class GameWindow : IDisposable
if (_selection.SelectedObjectId is { } selected && IsLiveCreatureTarget(selected))
return selected;
if (!_persistedGameplay.AutoTarget)
return null;
return SelectClosestCombatTarget(showToast: false);
}