/// <inheritdoc/> protected override void DoGUI() { s_SelectedTab = Mathf.Clamp(RotorzEditorGUI.TabSelector(s_SelectedTab, this.tabContent), 0, this.tabs.Count - 1); GUILayout.Space(4); GUILayout.Label(this.tabs[s_SelectedTab].Description, EditorStyles.wordWrappedLabel); GUILayout.Space(5); EditorGUIUtility.labelWidth = 70; GUILayout.BeginHorizontal(); this.DrawFlagFields(0, 7); GUILayout.Space(5); this.DrawFlagFields(8, 15); GUILayout.EndHorizontal(); GUILayout.FlexibleSpace(); ExtraEditorGUI.Separator(marginTop: 0); this.OnGUI_Buttons(); GUILayout.Space(5); }
/// <inheritdoc/> protected override void DoGUI() { this.hasDrawnGUI = true; if (this.tileSystem == null) { return; } GUISkin skin = GUI.skin; GUILayout.Space(15f); ExtraEditorGUI.AbovePrefixLabel(TileLang.ParticularText("Property", "Prefab Output Path:")); GUILayout.BeginHorizontal(); { this.PrefabOutputPath = RotorzEditorGUI.RelativeAssetPathTextField(GUIContent.none, this.PrefabOutputPath, ".prefab"); if (GUILayout.Button("...", GUILayout.Width(40))) { GUIUtility.keyboardControl = 0; this.PrefabOutputPath = this.DoSelectPrefabPath( TileLang.ParticularText("Action", "Save Prefab Output"), TileLang.Text("Specify path for prefab output"), this.PrefabOutputPath ); } } GUILayout.EndHorizontal(); EditorGUILayout.Space(); ExtraEditorGUI.AbovePrefixLabel(TileLang.ParticularText("Property", "Data Output Path:")); GUILayout.BeginHorizontal(); { this.DataOutputPath = RotorzEditorGUI.RelativeAssetPathTextField(GUIContent.none, this.DataOutputPath, ".asset"); if (GUILayout.Button("...", GUILayout.Width(40))) { GUIUtility.keyboardControl = 0; this.DataOutputPath = this.DoSelectAssetPath( TileLang.ParticularText("Action", "Save Data Output"), TileLang.Text("Specify path for mesh output"), this.DataOutputPath ); } } GUILayout.EndHorizontal(); GUILayout.FlexibleSpace(); ExtraEditorGUI.Separator(marginBottom: 10); GUILayout.BeginHorizontal(); { GUILayout.FlexibleSpace(); this.OnGUI_Buttons(); GUILayout.Space(5f); } GUILayout.EndHorizontal(); GUILayout.Space(8f); }
private void DrawMiscTab() { this.DrawPreferredLanguageField(); ExtraEditorGUI.Separator(marginBottom: 10); ControlContent.TrailingTipsVisible = EditorGUILayout.ToggleLeft(TileLang.Text("Show detailed tips when available."), ControlContent.TrailingTipsVisible); RtsPreferences.DisableCustomCursors.Value = EditorGUILayout.ToggleLeft(TileLang.Text("Disable custom cursors."), RtsPreferences.DisableCustomCursors); RtsPreferences.AlwaysCenterUtilityWindows.Value = EditorGUILayout.ToggleLeft(TileLang.Text("Always center utility windows."), RtsPreferences.AlwaysCenterUtilityWindows); }
/// <inheritdoc/> protected override void DoGUI() { AutoInitCustomStyles(); // Make labels as short as possible to simplify layout within brush creators. EditorGUIUtility.labelWidth = 1f; GUILayout.BeginHorizontal(); { GUILayout.BeginVertical(GUILayout.Width(100f)); { GUILayout.Space(10f); this.DrawBrushCreatorTabs(); } GUILayout.EndVertical(); GUILayout.Space(-3f); GUILayout.BeginVertical(); { if (this.selectedBrushCreator != null) { this.scrolling = GUILayout.BeginScrollView(this.scrolling); this.DrawSelectedBrushCreator(); GUILayout.EndScrollView(); ExtraEditorGUI.Separator(marginTop: 0, marginBottom: 7); GUILayout.BeginHorizontal(); this.selectedBrushCreator.OnButtonGUI(); GUILayout.EndHorizontal(); GUILayout.Space(5f); } } GUILayout.EndVertical(); } GUILayout.EndHorizontal(); if (this.hintShouldFocusPrimaryNameControl && Event.current.type == EventType.Layout) { this.hintShouldFocusPrimaryNameControl = false; EditorGUI.FocusTextInControl(this.PrimaryAssetNameControlName); } }
private void DrawButtonStrip() { ExtraEditorGUI.Separator(marginTop: 0, thickness: 1); GUILayout.BeginHorizontal(); if (GUILayout.Button(TileLang.ParticularText("Action", "Use Defaults"), ExtraEditorStyles.Instance.BigButton)) { this.OnUseDefaults(); GUIUtility.ExitGUI(); } GUILayout.FlexibleSpace(); if (GUILayout.Button(TileLang.ParticularText("Action", "Close"), ExtraEditorStyles.Instance.BigButtonPadded)) { this.Close(); GUIUtility.ExitGUI(); } GUILayout.EndHorizontal(); GUILayout.Space(3); }
private void OnGUI_ButtonStrip() { ExtraEditorGUI.Separator(marginBottom: 10); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); if (GUILayout.Button(TileLang.ParticularText("Action", "Delete"), ExtraEditorStyles.Instance.BigButton)) { this.OnButtonDelete(); GUIUtility.ExitGUI(); } GUILayout.Space(3); if (GUILayout.Button(TileLang.ParticularText("Action", "Cancel"), ExtraEditorStyles.Instance.BigButton)) { this.Close(); GUIUtility.ExitGUI(); } GUILayout.Space(5); GUILayout.EndHorizontal(); GUILayout.Space(8); }