예제 #1
0
파일: UIButton.cs 프로젝트: anaanook/aedit3
 public UIButton(Vector2 _position, Vector2 _size, UIButtonDef _def)
 {
     Setup(_def.type, _position, _size, _def.tex, _def.srcRect, _def.pressedOffset, _def.cornerSize, _def.pal);
 }
예제 #2
0
파일: UIButton.cs 프로젝트: anaanook/aedit3
 /**
  * This one is for labelled buttons
  */
 public UIButton(Vector2 _position, String _label, Vector2 _padding, BitmapFont _font, UIButtonDef _def)
 {
     Setup(_def.type, _position, _font.GetSize(_label) + _padding * 2, _def.tex, _def.srcRect, _def.pressedOffset, _def.cornerSize, _def.pal);
     label         = new UILabel(_label, _padding + new Vector2(0, -2), _font, Color.White);
     labelPosition = label.position;
     labelPadding  = _padding;
     AddChild(label);
 }