much better bot and ocr

This commit is contained in:
Boki 2026-02-22 14:21:32 -05:00
parent bb8f50116a
commit 6257bcf122
25 changed files with 583 additions and 101 deletions

View file

@ -20,11 +20,14 @@ public partial class SettingsViewModel : ObservableObject
[ObservableProperty] private decimal? _betweenTradesDelayMs = 5000;
[ObservableProperty] private bool _headless = true;
[ObservableProperty] private bool _showHudDebug;
[ObservableProperty] private string _ocrEngine = "WinOCR";
[ObservableProperty] private bool _isSaved;
[ObservableProperty] private string _calibrationStatus = "";
[ObservableProperty] private string _stashCalibratedAt = "";
[ObservableProperty] private string _shopCalibratedAt = "";
public static string[] OcrEngineOptions { get; } = ["WinOCR", "OneOCR", "EasyOCR"];
public ObservableCollection<StashTabViewModel> StashTabs { get; } = [];
public ObservableCollection<StashTabViewModel> ShopTabs { get; } = [];
@ -46,6 +49,7 @@ public partial class SettingsViewModel : ObservableObject
BetweenTradesDelayMs = s.BetweenTradesDelayMs;
Headless = s.Headless;
ShowHudDebug = s.ShowHudDebug;
OcrEngine = s.OcrEngine;
}
private void LoadTabs()
@ -97,6 +101,7 @@ public partial class SettingsViewModel : ObservableObject
s.BetweenTradesDelayMs = (int)(BetweenTradesDelayMs ?? 5000);
s.Headless = Headless;
s.ShowHudDebug = ShowHudDebug;
s.OcrEngine = OcrEngine;
});
IsSaved = true;
@ -210,4 +215,5 @@ public partial class SettingsViewModel : ObservableObject
partial void OnBetweenTradesDelayMsChanged(decimal? value) => IsSaved = false;
partial void OnHeadlessChanged(bool value) => IsSaved = false;
partial void OnShowHudDebugChanged(bool value) => IsSaved = false;
partial void OnOcrEngineChanged(string value) => IsSaved = false;
}