示例#1
0
 public ToggleButton(Game game, Rectangle bounds, string text, clicked c)
     : base(game, bounds, text, c)
 {
     OnLoad(null);
     del      = c;
     Selected = false;
 }
示例#2
0
 public ToggleButton(Game game, Rectangle bounds, string text, clicked c)
     : base(game, bounds, text, c)
 {
     OnLoad(null);
     del = c;
     Selected = false;
 }
示例#3
0
 public Button(Game game, Rectangle bounds, string text, clicked c, bool stretch, bool custom, Color col)
     : this(game, bounds, text, c)
 {
     if (stretchable = stretch) //rofl n1 matt
     {
         end1    = new Rect(new Rectangle(bounds.X, bounds.Y, 65, bounds.Height), Skin.skindict["buttonLeft"]);
         end2    = new Rect(new Rectangle(bounds.X + bounds.Width - 63, bounds.Y, 66, bounds.Height), Skin.skindict["buttonRight"]);
         texture = new Rect(new Rectangle(bounds.X + 65, bounds.Y, bounds.Width - 128, bounds.Height), Skin.skindict["buttonMid"]);
         TextTexture.Location = new Point((bounds.X + bounds.Width / 2) - ((int)Pulse.Text.getStringSize(text, textTexture.textFont).Width / 2), bounds.Y + (bounds.Height / 2) - 20);
     }
     customcol   = custom;
     this.custom = col;
 }
示例#4
0
文件: Button.cs 项目: Zhangerr/pulse
 public Button(Game game, Rectangle bounds, string text, clicked c, bool stretch, bool custom, Color col)
     : this(game, bounds, text, c)
 {
     if (stretchable = stretch) //rofl n1 matt
     {
         end1 = new Rect(new Rectangle(bounds.X, bounds.Y, 65, bounds.Height), Skin.skindict["buttonLeft"]);
         end2 = new Rect(new Rectangle(bounds.X + bounds.Width - 63, bounds.Y, 66, bounds.Height), Skin.skindict["buttonRight"]);
         texture = new Rect(new Rectangle(bounds.X + 65, bounds.Y, bounds.Width - 128, bounds.Height), Skin.skindict["buttonMid"]);
         TextTexture.Location = new Point((bounds.X + bounds.Width / 2) - ((int)Pulse.Text.getStringSize(text, textTexture.textFont).Width / 2), bounds.Y + (bounds.Height / 2) - 20);
     }
     customcol = custom;
     this.custom = col;
 }
示例#5
0
 public Button(Game game, Rectangle bounds, string text, clicked c, string customTexture)
     : this(game, bounds, text, c)
 {
     customTexturePath = customTexture;
     texture           = new Rect(bounds, customTexturePath);
 }
示例#6
0
 public Button(Game game, Rectangle bounds, string text, clicked c)
     : base(game, bounds, text)
 {
     OnLoad(null);
     del = c;
 }
示例#7
0
文件: Button.cs 项目: Zhangerr/pulse
 public Button(Game game, Rectangle bounds, string text, clicked c, string customTexture)
     : this(game, bounds, text, c)
 {
     customTexturePath = customTexture;
     texture = new Rect(bounds, customTexturePath);
 }
示例#8
0
文件: Button.cs 项目: Zhangerr/pulse
 public Button(Game game, Rectangle bounds, string text, clicked c)
     : base(game, bounds, text)
 {
     OnLoad(null);
     del = c;
 }