Passes chart detail on open and config.
This commit is contained in:
@@ -60,10 +60,10 @@ namespace Cryville.Crtr.Browsing {
|
||||
}
|
||||
}
|
||||
public void OnPlay() {
|
||||
Master.Open(_id);
|
||||
Master.Open(_id, _data);
|
||||
}
|
||||
public void OnConfig() {
|
||||
Master.OpenConfig(_id);
|
||||
Master.OpenConfig(_id, _data);
|
||||
}
|
||||
}
|
||||
}
|
@@ -64,8 +64,8 @@ namespace Cryville.Crtr.Browsing {
|
||||
_units[_slideDest + 1].SlideToRight();
|
||||
}
|
||||
|
||||
public void Open(int id) {
|
||||
SetDataSettings(id);
|
||||
public void Open(int id, ChartDetail detail) {
|
||||
SetDataSettings(id, detail);
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
SceneManager.LoadScene("Play", LoadSceneMode.Additive);
|
||||
#else
|
||||
@@ -74,8 +74,8 @@ namespace Cryville.Crtr.Browsing {
|
||||
GameObject.Find("/Master").GetComponent<Master>().HideMenu();
|
||||
}
|
||||
|
||||
public void OpenConfig(int id) {
|
||||
SetDataSettings(id);
|
||||
public void OpenConfig(int id, ChartDetail detail) {
|
||||
SetDataSettings(id, detail);
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
SceneManager.LoadScene("Config", LoadSceneMode.Additive);
|
||||
#else
|
||||
@@ -84,9 +84,9 @@ namespace Cryville.Crtr.Browsing {
|
||||
GameObject.Find("/Master").GetComponent<Master>().HideMenu();
|
||||
}
|
||||
|
||||
void SetDataSettings(int id) {
|
||||
Settings.Default.LoadRuleset = "key/.umgr";
|
||||
Settings.Default.LoadSkin = "key/0/.umgs";
|
||||
void SetDataSettings(int id, ChartDetail detail) {
|
||||
Settings.Default.LoadRuleset = detail.Meta.ruleset + "/.umgr";
|
||||
Settings.Default.LoadSkin = detail.Meta.ruleset + "/Old KeyUI/.umgs";
|
||||
Settings.Default.LoadChart = MainBrowser.ResourceManager.GetItemPath(id);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user