mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-04 04:22:53 +08:00
Add RuntimeProvider method for setting Selectable.colors
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user