File tree Expand file tree Collapse file tree 3 files changed +34
-2
lines changed
Expand file tree Collapse file tree 3 files changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -493,6 +493,8 @@ public static void setText(string[] lines)
493493 public void reloadFile ( )
494494 {
495495 allEntries = readFromFile ( FILE_PATH ) ;
496+ Configuration . PluginConfig . Instance . SelectionType = selection_type ;
497+ Configuration . PluginConfig . Instance . SelectedEntry = choice ;
496498 }
497499
498500 /// <summary>
@@ -550,6 +552,8 @@ public void restoreDefaultConfig()
550552 [ OnExit ]
551553 public void OnApplicationQuit ( )
552554 {
555+ Configuration . PluginConfig . Instance . SelectionType = selection_type ;
556+ Configuration . PluginConfig . Instance . SelectedEntry = choice ;
553557 SceneManager . activeSceneChanged -= SceneManagerOnActiveSceneChanged ;
554558 SceneManager . sceneLoaded -= SceneManager_sceneLoaded ;
555559 }
Original file line number Diff line number Diff line change @@ -91,6 +91,35 @@ public void SetupList()
9191
9292 }
9393 textListData . tableView . ReloadData ( ) ;
94+
95+ switch ( Configuration . PluginConfig . Instance . SelectionType )
96+ {
97+ case 0 :
98+ textListData . tableView . SelectCellWithIdx ( 0 ) ;
99+ break ;
100+ case 1 :
101+ textListData . tableView . SelectCellWithIdx ( 1 ) ;
102+ break ;
103+ case 2 :
104+ textListData . tableView . SelectCellWithIdx ( Configuration . PluginConfig . Instance . SelectedEntry + 2 ) ;
105+ break ;
106+ }
107+ }
108+
109+ public void SelectCorrectCell ( int selType , int choice )
110+ {
111+ switch ( selType )
112+ {
113+ case 0 :
114+ textListData . tableView . SelectCellWithIdx ( 0 ) ;
115+ break ;
116+ case 1 :
117+ textListData . tableView . SelectCellWithIdx ( 1 ) ;
118+ break ;
119+ case 2 :
120+ textListData . tableView . SelectCellWithIdx ( choice + 2 ) ;
121+ break ;
122+ }
94123 }
95124 }
96125}
Original file line number Diff line number Diff line change 88 "gameVersion" : " 1.13.2" ,
99 "dependsOn" : {
1010 "BSIPA" : " ^4.0.5" ,
11- "BeatSaberMarkupLanguage" : " ^1.4.5" ,
12- "HMUI" : " ^0"
11+ "BeatSaberMarkupLanguage" : " ^1.4.5"
1312 },
1413 "features" : []
1514}
You can’t perform that action at this time.
0 commit comments