internal void Open(WUIValue wUIValue) { Stack(); _components.wUIValue = wUIValue; Color color = wUIValue is WUIColorValue ? ((WUIColorValue)wUIValue).color : ((WUIGradientValue)wUIValue).color; _components.initialColorDisplayImage.color = color; SetColor(color); PopulateSavedColors(); }
internal void DisplayValues(Module module) { SandboxValue[] sandboxValues = module.sandboxValuesById.Values.ToArray(); foreach (SandboxValue sandboxValue in sandboxValues) { if (sandboxValue.hideInInspector) { continue; } WUIValue wUIValue = CreateValue <WUIValue>(sandboxValue); wUIValue.Bind(sandboxValue); } }
internal T CreateValue <T>(SandboxValue sandboxValue) where T : WUIValue { if (sandboxValue.header != null && sandboxValue.header != string.Empty) { _components.values.Add(CreateHeader(sandboxValue.header)); } WUIValue prefab = GetValuePrefab(sandboxValue.wuiValueType); GameObject gameObject = Instantiate(prefab.gameObject, _components.valueContainer, false); T instance = gameObject.GetComponent <T>(); instance.wUIMenu = this; _components.values.Add(instance); if (sandboxValue.spaceAfter > 0) { _components.values.Add(CreateSpacer(sandboxValue.spaceAfter)); } return(instance); }
internal void Edit(WUIValue wUIValue) { baseComponents.colorMenu.Open(wUIValue); }