Implement use skin action.

This commit is contained in:
2023-12-25 14:26:27 +08:00
parent a532a9f4c1
commit 85bbe43827
9 changed files with 108 additions and 17 deletions

View File

@@ -33,6 +33,7 @@ namespace Cryville.Crtr.Browsing.UI {
Actions.Changed += OnActionsChanged;
Actions.Register(new PlayChartAction());
Actions.Register(new OpenConfigAction());
Actions.Register(new UseSkinAction());
OnTabClicked(AddPathedBrowserTab("Local Charts", new LegacyChartResourceManager(Settings.Default.GameDataPath)));
AddPathedBrowserTab("Local Skins", new LegacySkinResourceManager(Settings.Default.GameDataPath));
@@ -67,6 +68,9 @@ namespace Cryville.Crtr.Browsing.UI {
OnTabClicked(tab);
return tab.GetHashCode();
}
public bool HasTab(int id) {
return _tabMap.ContainsKey(id);
}
public bool TryOpenTab(int id) {
BrowserTab tab;
if (_tabMap.TryGetValue(id, out tab)) {