Add RuntimeProvider method for setting Selectable.colors

This commit is contained in:
Sinai
2021-04-10 18:25:13 +10:00
parent e0fd682c81
commit a5a07a0a23
15 changed files with 102 additions and 100 deletions

View File

@ -271,12 +271,10 @@ namespace UnityExplorer.UI.Main.CSConsole
mainGroup.childForceExpandHeight = false;
mainGroup.childForceExpandWidth = true;
ColorBlock btnColors = new ColorBlock();
RuntimeProvider.Instance.SetColorBlock(btnColors, new Color(0, 0, 0, 0), highlighted: new Color(0.2f, 0.2f, 0.2f, 1.0f));
for (int i = 0; i < MAX_LABELS; i++)
{
var btn = UIFactory.CreateButton(content, "AutoCompleteButton", "", null, btnColors);
var btn = UIFactory.CreateButton(content, "AutoCompleteButton", "", null);
RuntimeProvider.Instance.SetColorBlock(btn, new Color(0, 0, 0, 0), highlighted: new Color(0.2f, 0.2f, 0.2f, 1.0f));
var nav = btn.navigation;
nav.mode = Navigation.Mode.Vertical;