void EditorsScrollView() { for (int i = 0; i < editors.Length; i++) { if (IsNULL(editors)) { return; } if (propSearch) { if (SplitFilter(editors[i])) { continue; } } else { if (Filter(editors[i])) { continue; } } if (!IsVisible(editors[i])) { continue; } SUI.Vertical(() => DrawEditor(i)); } }
void DrawValues(int k, int v, string text, string name, Texture texture) { // Space SUI.Space(SUI.VerticalSpace); bool isSelected = selected.Contains(prefabs[k, v]); // Horizontal SUI.Horizontal(() => { texture = GetThumbnail(prefabs[k, v]); GUILayout.Box(texture, "Label", SUI.Width(SUI.LineHeight), SUI.Height(SUI.LineHeight)); text = string.Format("{0} - {1}", v, prefabs[k, v].name); if (isSelected) { RemoveButton(text, prefabs[k, v]); } else { AddButton(text, prefabs[k, v]); } }); }
public override void UpdateState() { base.UpdateState(); SUI.Update(); Vivid.Texture.Texture2D.UpdateLoading(); int hx, hy; return; #pragma warning disable CS0162 // Unreachable code detected if (tView.Graph != null) #pragma warning restore CS0162 // Unreachable code detected { var node = tView.Graph.Pick(10, 10); if (node != null) { hx = (int)node.X / 64; hy = (int)node.Y / 64; CurSetMap.HighlightTile(hx, hy); //CurSetMap.UpdateGraph(); #pragma warning disable CS7036 // There is no argument given that corresponds to the required formal parameter 'tw' of 'Map.UpdateGraph(int, int)' tView.Graph = CurSetMap.UpdateGraph(); #pragma warning restore CS7036 // There is no argument given that corresponds to the required formal parameter 'tw' of 'Map.UpdateGraph(int, int)' // tView.Graph.X = -32 + tView.W / 2; // tView.Graph.Y = -32 + tView.H / 2; } } }
void DrawToggle(int i, Editor value) { value.serializedObject.Update(); Component component = value.target as Component; bool isVisible = IsVisible(value); SUI.GUIChanged(() => { GUIContent content = SUI.Content(component); content.text = string.Format("{0} - {1}", i, component.GetType().Name); isVisible = SUI.Toggle(isVisible, content, "Radio", SUI.Height(SUI.LineHeight)); }, () => { SetVisible(value, isVisible); }); value.serializedObject.ApplyModifiedProperties(); editor.Repaint(); Repaint(); }
public override void DrawState() { base.DrawState(); GameHost.Render(); SUI.Render(); }
void DrawMenuGUIFields() { // Label GUILayout.Label("Main", "boldlabel"); // Active SUI.Field("Edit (ESC)", () => active = SUI.Toggle(active)); // Mode SUI.Field("Mode (C)", () => mode = (Mode)SUI.EnumField(mode, "label")); // Paint SUI.Field("Paint (B)", () => paint = (Paint)SUI.EnumField(paint, "label")); // Layer SUI.Field("Layer", () => layer = SUI.LayerField(layer, "label")); // Height SUI.Field("Height (+/-)", () => height = EditorGUILayout.FloatField(height)); // Size SUI.Field("Size", () => size = Vector3Int.RoundToInt(SUI.VectorCustom(size))); // Label GUILayout.Label("Snap", "boldlabel"); // Move SUI.Field("Move", () => move = SUI.VectorCustom(move)); // Rotate SUI.Field("Rotate", () => rotate = SUI.VectorCustom(rotate)); // Scale SUI.Field("Scale", () => scale = SUI.VectorCustom(scale)); }
public override void UpdateState() { base.UpdateState(); Texture2D.UpdateLoading(); GameHost.Update(); SUI.Update(); RainFX.Update(); }
void DrawEditors() { SplitFilter(); SearchPropertyLabel(); EditorGUIUtility.hierarchyMode = true; EditorGUIUtility.wideMode = true; editorsScroll = SUI.ScrollView(editorsScroll, EditorsScrollView, SUI.DontExpandHeight); }
public override void DrawState() { //return; base.DrawState(); SUI.Render(); FXGrid.Process(null); }
EditorExpanse DrawTitle(int i) { EditorExpanse expanse = new EditorExpanse(editors[i]); if (!SISettings.titles) { return(expanse); } expanse.IsExpanded = SUI.Title(expanse.IsExpanded, editors[i]); return(expanse); }
void DrawSelectedGUIContents() { if (selected.Count == 0) { GUILayout.Box(GUIContent.none, SUI.Width(imgWidth), SUI.Height(imgHeight)); } else { DrawSelectedPreview(); } }
void AddButton(string text, GameObject gameObject) { SUI.Button(text, "Label", () => { selected.Add(gameObject); view.Repaint(); Repaint(); }); }
void RemoveButton(string text, GameObject gameObject) { SUI.Button(text, "assetlabel", () => { selected.Remove(gameObject); view.Repaint(); Repaint(); }, SUI.ExpandWidth); }
void DrawToggles() { SUI.Horizontal(DrawTogglesHeader); SUI.Space(SUI.VerticalSpace); DrawSearchBar(); SUI.Label("Components"); toggleScroll = SUI.ScrollView(toggleScroll, EditorStyles.inspectorFullWidthMargins, DrawTogglesScroll); }
void DrawSelectedPreview() { for (int k = 0; k < prefabs.KeyCount; k++) { for (int v = 0; v < prefabs.Values[k].Count; v++) { if (selected.Contains(prefabs[k, v])) { GUILayout.Box(GetPreview(prefabs[k, v]), "label", SUI.Width(imgWidth), SUI.Height(imgHeight)); } } } }
void DrawObjectsGUI() { SUI.Label("Objects", titleSyle); SUI.Vertical(areaStyle, () => { DrawSearchBar(); SUI.Space(SUI.VerticalSpace); objsViewPos = SUI.ScrollView(objsViewPos, DrawKeylistAndValues, SUI.DontExpandHeight); }); }
void SearchPropertyLabel() { // E x i t if (splitFilter.Length <= 1) { return; } // Label SUI.Space(SUI.VerticalSpace); EditorGUILayout.BeginVertical(EditorStyles.inspectorFullWidthMargins); SUI.Label(string.Format("(Beta) Property Search: {0}", splitFilter[1]), "assetlabel"); EditorGUILayout.EndVertical(); }
public override void UpdateState() { base.UpdateState(); SUI.Update(); Texture2D.UpdateLoading(); if (powerSnd != null) { if (powerSnd.Playing == false) { Environment.Exit(0); } } }
// // Header // void DrawHeader() { if (!SISettings.DrawHeader) { SUI.Space(SUI.VerticalSpace * 2); return; } SUI.NoSpace(); editor.DrawHeader(); }
// // GUI // void MainGUI() { if (SISettings.toggles) { OnToggleGUI(); } else { DrawHeader(); DrawMaskField(); SUI.Space(SUI.VerticalSpace); DrawSearchBar(); DrawEditors(); } }
public override void UpdateState() { base.UpdateState(); //return; Texture2D.UpdateLoading(); SUI.Update(); Console.WriteLine("Testing!"); if (Vivid.Input.XIn.Start()) { while (Vivid.Input.XIn.Start()) { System.Threading.Thread.Sleep(50); } vid.Stop(); VividApp.PushState(new ScopeNineMenu()); } }
void DrawKeylistAndValues() { string text = ""; string name = ""; Texture2D texture = null; for (int k = 0; k < prefabs.KeyCount; k++) { SUI.Horizontal(() => { SUI.Toggle(isExpanded[k], GUIContent.none, "ol toggle", SUI.DontExpandWidth); isExpanded[k] = SUI.Toggle(isExpanded[k], prefabs.Keys[k], "exposablepopupmenu"); }); if (false == isExpanded[k]) { continue; } DrawKeys(k, text, name, texture); } }
public SUI_Element AddUI(SUI element, string name, int[] args = null, Node nn = null) { needUdate = true; SUI_Element result = null; Node n = null; if (nn == null) { n = Node.CreateChild(name); } else { n = nn.CreateChild(name); //nn.GetComponent<SUI_Element>().needUpdate = true; } switch (element) { default: result = n.CreateComponent <SUI_Element>(); break; case SUI.WINDOW: result = n.CreateComponent <SUI_Window>(); break; case SUI.NODE: result = n.CreateComponent <SUI_Node>(); break; } if (args != null) { result.SetArgs(args); } result.simpleUI = this; return(result); }
public override void UpdateState() { base.UpdateState(); Texture2D.UpdateLoading(); SUI.Update(); }
public extern static int EnumChildWindows(IntPtr hWndParent, SUI.Base.SUIWindow.EnumSMARTUIWindowsProc lpEnumFunc, int lParam);
public extern static int EnumWindows(SUI.Base.SUIWindow.EnumSMARTUIWindowsProc lpEnumFunc, int lParam);
void SearchBarLayout() { filter = GUILayout.TextField(filter, "ToolbarSeachTextField"); SUI.Button(GUIContent.none, "ToolbarSeachCancelButton", () => filter = ""); }
// // Searchbar // void DrawSearchBar() { SUI.Horizontal(EditorStyles.inspectorFullWidthMargins, SearchBarLayout); SUI.Space(SUI.VerticalSpace); }
// Vertical area void MaskFieldVertical() { SUI.Horizontal(EditorStyles.inspectorFullWidthMargins, MaskFieldLayout); }
public override void DrawState() { SUI.Render(); base.DrawState(); }
// Main void DrawMaskField() { SUI.GUIChanged(MaskFieldVertical, UpdateVisibility); }
public override void UpdateState() { SUI.Update(); base.UpdateState(); }