window mode and botany wip
This commit is contained in:
1 parent
f0aa6495c7
commit
0f9576a67b
68 files changed
+8224
-1311
No files matched your search
@@ -0,0 +1,28 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine;
|
||||
|
||||
[RequireComponent(typeof(Dropdown))]
|
||||
public class ThemeSelector : MonoBehaviour {
|
||||
public Gradient[] themeList;
|
||||
public static Gradient theme;
|
||||
public Preferences preferences;
|
||||
|
||||
[SerializeField, ColorUsage(showAlpha: true, hdr: true)]
|
||||
private Color hdrColor;
|
||||
|
||||
void Start() {
|
||||
gameObject.GetComponent<Dropdown>().value = preferences.data.themeIndex;
|
||||
theme = themeList[preferences.data.themeIndex];
|
||||
}
|
||||
|
||||
public void SelectTheme(Dropdown d) {
|
||||
theme = themeList[d.value];
|
||||
preferences.SetThemeIndex(d.value);
|
||||
}
|
||||
|
||||
public Gradient CurrentTheme() {
|
||||
return theme;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user