preferences fixes and dropdown styles

This commit is contained in:
ntr committed 2022-04-01 14:08:47 +11:00
1 parent 464d39321e
commit 70ab364c08
9 files changed
+1792 -2164

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
using System.IO;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[ExecuteAlways]
public class Preferences : MonoBehaviour {
ThemeSelector themeSelector;
public PreferenceData data;
void Awake() {
string path = Path.Combine(Application.persistentDataPath, "preferences.json");
data = new PreferenceData(path).Load();
// Debug.Log($"ThemeIndex {data.themeIndex}");
}
public void SetThemeIndex(int i) {
data.themeIndex = i;
data.Save();
}
}