Пример #1
0
 public virtual void ConfigureGUI(GUIConfigurationStyles styles)
 {
     Visible = GUILayout.Toggle(Visible, "Enabled", styles.Toggle);
     if (!DraggableWindowsEnabled)
     {
         GUILayout.Label("X", styles.SmallLabel);
         X = (int)GUILayout.HorizontalSlider(X, -3840.0f, 3840.0f, styles.HorizontalSlider, styles.HorizontalSliderThumb);
         if (int.TryParse(GUILayout.TextField(X.ToString(), styles.TextField), out int x))
         {
             X = x;
         }
     }
     else
     {
         GUILayout.Label($"X - {X.ToString()}", styles.SmallLabel);
     }
     if (!DraggableWindowsEnabled)
     {
         GUILayout.Label("Y", styles.SmallLabel);
         Y = (int)GUILayout.HorizontalSlider(Y, -2160, 2160.0f, styles.HorizontalSlider, styles.HorizontalSliderThumb);
         if (int.TryParse(GUILayout.TextField(Y.ToString(), styles.TextField), out int y))
         {
             Y = y;
         }
     }
     else
     {
         GUILayout.Label($"Y - {Y.ToString()}", styles.SmallLabel);
     }
     GUILayout.Label("Size", styles.SmallLabel);
     Size = (int)GUILayout.HorizontalSlider(Size, 0.0f, 500.0f, styles.HorizontalSlider, styles.HorizontalSliderThumb);
     if (int.TryParse(GUILayout.TextField(Size.ToString(), styles.TextField), out int size))
     {
         Size = size;
     }
     if (GUILayout.Button($"Alignment: {Alignment.ToString()}", styles.Button))
     {
         Alignment = (TextAnchor)((int)(Alignment + 1) % 9);
     }
     Bold   = GUILayout.Toggle(Bold, "Bold", styles.Toggle);
     Italic = GUILayout.Toggle(Italic, "Italic", styles.Toggle);
 }
Пример #2
0
        public void ConfigureGUI(GUIConfigurationStyles styles)
        {
            var color = ARGBToColor(ARGB);

            GUILayout.Label($"R = {(int)(color.r * 255.0f)}, G = {(int)(color.g * 255.0f)}, B = {(int)(color.b * 255.0f)}, A = {(int)(color.a * 255.0f)}", new GUIStyle(styles.SmallLabel)
            {
                normal = new GUIStyleState {
                    textColor = new Color(color.r, color.g, color.b),
                },
                fontStyle = FontStyle.Bold
            });
            GUILayout.Label("Red", styles.SmallLabel);
            color.r = GUILayout.HorizontalSlider(color.r, 0.0f, 1.0f, styles.HorizontalSlider, styles.HorizontalSliderThumb);
            GUILayout.Label("Green", styles.SmallLabel);
            color.g = GUILayout.HorizontalSlider(color.g, 0.0f, 1.0f, styles.HorizontalSlider, styles.HorizontalSliderThumb);
            GUILayout.Label("Blue", styles.SmallLabel);
            color.b = GUILayout.HorizontalSlider(color.b, 0.0f, 1.0f, styles.HorizontalSlider, styles.HorizontalSliderThumb);
            GUILayout.Label("Alpha", styles.SmallLabel);
            color.a = GUILayout.HorizontalSlider(color.a, 0.0f, 1.0f, styles.HorizontalSlider, styles.HorizontalSliderThumb);
            ARGB    = ColorToARGB(color);
        }
Пример #3
0
 public void ConfigureGUI(GUIConfigurationStyles styles)
 {
     if (WaitingForKey)
     {
         foreach (KeyCode key in Enum.GetValues(typeof(KeyCode)))
         {
             if (Input.GetKeyDown(key))
             {
                 if (key != KeyCode.Escape)
                 {
                     Key     = key;
                     JustSet = true;
                 }
                 WaitingForKey = false;
                 break;
             }
         }
     }
     WaitingForKey |= GUILayout.Button(WaitingForKey ? "Press key to bind or ESC to cancel" : $"Keybind: {Key.ToString()}", styles.Button);
     Shift          = GUILayout.Toggle(Shift, "Shift", styles.Toggle);
     Ctrl           = GUILayout.Toggle(Ctrl, "Ctrl", styles.Toggle);
     Alt            = GUILayout.Toggle(Alt, "Alt", styles.Toggle);
 }
 public override void ConfigureGUI(GUIConfigurationStyles styles)
 {
     GUILayout.Label("Format:", styles.SmallLabel);
     Format = GUILayout.TextField(Format, styles.TextField);
     base.ConfigureGUI(styles);
 }
 public override void ConfigureGUI(GUIConfigurationStyles styles)
 {
     base.ConfigureGUI(styles);
     Color.ConfigureGUI(styles);
 }