Example #1
0
 public ButtonAttribute(string text = "", AColor color = AColor.None,
                        UnityEventCallState whenCanPress = UnityEventCallState.EditorAndRuntime,
                        UISize size = UISize.SoSmall)
     : base(color)
 {
     Height       = (int)size;
     Text         = text ?? throw new ArgumentNullException(nameof(text));
     WhenCanPress = whenCanPress;
 }
Example #2
0
 /// <summary>
 /// Grow / shrink element size.
 /// Note: doesn't change unit type, only value, so this can either grow percents or pixels, depends on what was previously set.
 /// </summary>
 /// <param name="width">Width to grow.</param>
 /// <param name="height">Height to grow.</param>
 public void Grow(int width, int height)
 {
     if (width != 0)
     {
         Size = new UISize(Size.Width + width, Size.WidthType, Size.Height, Size.HeightType);
     }
     if (height != 0)
     {
         Size = new UISize(Size.Width, Size.WidthType, Size.Height + height, Size.HeightType);
     }
 }
 //serve per settare la grandezza delle sprites
 public void setSpritesSize(UIPosition pos, UISize size)
 {
     for (int i = 0; i < spritesGroup.Length; i++)
     {
         if (spritesGroup[i].position != null && spritesGroup[i].position == pos)
         {
             spritesGroup[i].size = size;
             break;
         }
     }
 }
Example #4
0
 //per ora inutilizzata
 public void setSpriteSize(UIPosition pos, int index, UISize size)
 {
     /*
      * for (int i = 0; i < spritesGroup.Length; i++) {
      *      if (spritesGroup[i].position != null && spritesGroup[i].position == pos)
      *      {
      *              if (spritesGroup[i].sprites[index] != null)
      *              {
      *
      *
      *              }
      *
      *      }
      * }
      */
 }
 public FormaterAttribute(string label, string rgb, UISize size = UISize.Default, int fontSize = 0)
     : this(label, FontStyle.Normal, rgb :  rgb, size, fontSize)
 {
 }
 public FormaterAttribute(string label, FontStyle fontStyle, string rgb, UISize size = UISize.Default, int fontSize = 0)
     : this(label, fontStyle, ColorExtension.ParseClasic(rgb), fontSize, (int)size)
 {
 }
 public FormaterAttribute(string label, FontStyle fontStyle = FontStyle.Normal, AColor color = AColor.None, UISize size = UISize.Default, int fontSize = 0)
     : this(label, fontStyle, GetColorByName(color).color, fontSize, (int)size)//i see that repeating, it is only way
 {
     if (color == AColor.None)
     {
         CustomColor = false;
     }
 }
Example #8
0
 public ButtonAttribute(UISize size)
     : this("", AColor.None, UnityEventCallState.EditorAndRuntime, size)
 {
 }
Example #9
0
 public HelpBoxAttribute(string text, MessageType messageType = MessageType.Info, UISize size = UISize.Default)
     : this(text, messageType, (int)size)
 {
 }
 public SeparatorAttribute(string label, FontStyle fontStyle, string rgb, UISize size = UISize.Default, int fontSize = 0) : base(label, fontStyle, rgb, size, fontSize)
 {
 }
 public SeparatorAttribute(string label = "", FontStyle fontStyle = FontStyle.Normal, AColor color = AColor.None, UISize size = UISize.Default, int fontSize = 0) : base(label, fontStyle, color, size, fontSize)
 {
 }
Example #12
0
 public HelpBoxWhenAttribute(string property, string text, MessageType messageType, UISize size = UISize.Default)
     : this(property, Equaler.Equal, true, text, messageType, size)
 {
 }
Example #13
0
 public HelpBoxWhenAttribute(string property, Equaler equaler, object value, string text, MessageType messageType = MessageType.Info, UISize size = UISize.Default) : base(text, messageType, size)
 {
     SerializedProperty = property;
     Equaler            = equaler;
     Value = value;
 }
Example #14
0
 public CustomGuiAttribute(string label, string rgb, UISize size = UISize.Default, int fontSize = 0) : base(label, rgb, size, fontSize)
 {
 }
Example #15
0
 /// <summary>
 /// Initializes a new MenuButton class.
 /// </summary>
 /// <param name="assignedUIManager">The AssignedUIManager.</param>
 public MenuButton(UIManager assignedUIManager) : base(assignedUIManager)
 {
     Size  = new UISize(300, 30);
     _font = new Font("Segoe UI", 16, TypefaceStyle.Bold);
     Text  = "MenuButton1";
 }