private static void LightGroup(LightManager lightManager, string typeName, LightSettings.LightType type) { GUILayout.BeginHorizontal(); { Label(typeName, "", true); GUILayout.FlexibleSpace(); if (Graphics.Instance.IsStudio()) { if (GUILayout.Button("+")) { Singleton <Studio.Studio> .Instance.AddLight((int)type); lightManager.Light(); } } //add custom directional lights in maker else if (KKAPI.GameMode.Maker == KKAPI.KoikatuAPI.GetCurrentGameMode() && LightSettings.LightType.Directional == type) { if (GUILayout.Button("+")) { customLightIndex += 1; GameObject lightGameObject = new GameObject("Directional Light " + customLightIndex); Light lightComp = lightGameObject.AddComponent <Light>(); lightGameObject.GetComponent <Light>().type = LightType.Directional; lightManager.Light(); } } } GUILayout.EndHorizontal(); }
private static void LightOverviewModule(LightManager lightManager, LightObject l) { if (null == l || null == l.light) { lightManager.Light(); return; } GUILayout.BeginHorizontal(); GUILayout.Space(5); if (ToggleButton(l.light.name, ReferenceEquals(l, lightManager.SelectedLight), true)) { lightManager.SelectedLight = l; } GUILayout.FlexibleSpace(); l.enabled = ToggleButton(l.enabled ? " ON" : "OFF", l.enabled, true); GUILayout.EndHorizontal(); }
private static void LightOverviewModule(LightManager lightManager, Light l) { if (l == null) { lightManager.Light(); return; } GUILayout.BeginHorizontal(); GUILayout.Space(5); if (GUILayout.Toggle(ReferenceEquals(l, selectedLight), l.name))//, GUIStyles.toolbarbutton)) { selectedLight = l; } GUILayout.FlexibleSpace(); l.enabled = GUILayout.Toggle(l.enabled, l.enabled ? " ON" : "OFF");//, GUIStyles.toolbarbutton); //l.enabled = !GUILayout.Toggle(!l.enabled, "OFF", GUIStyles.toolbarbutton); GUILayout.EndHorizontal(); }