public static void SetupFixButton() { if (fixButton == null) { fixButton = (parentGuiView.AddUIComponent(typeof(FixButton)) as FixButton); } }
public static void RemoveGui() { isGuiRunning = false; if (parentGuiView != null) { parentGuiView = null; UnityEngine.Object.Destroy(threeRoundButton); UnityEngine.Object.Destroy(oneRoundButton); UnityEngine.Object.Destroy(yRoadButton); UnityEngine.Object.Destroy(smoothButton); #if DEBUG UnityEngine.Object.Destroy(fixButton); #endif threeRoundButton = null; oneRoundButton = null; yRoadButton = null; smoothButton = null; #if DEBUG fixButton = null; #endif } }
public DialogWindow(String TextTitle, String TextForCheck = null, Boolean IsCheckButton = false) { InitializeComponent(); if (IsCheckButton) { TextBlock CheckText = new TextBlock(); CheckButton = new FixButton(); CheckText.Background = Brushes.Transparent; CheckText.FontSize = 15; CheckText.Text = TextForCheck; CheckButton.Height = 25; CheckButton.Margin = new Thickness(5, 0, 0, 0); WrapPanel UnionCheck = new WrapPanel(); UnionCheck.Children.Add(CheckText); UnionCheck.Children.Add(CheckButton); UnionCheck.Margin = new Thickness(0, 10, 0, 0); UnionCheck.VerticalAlignment = VerticalAlignment.Top; MainPanel.Children.Add(UnionCheck); } Title = TextTitle; ShowDialog(); }