public SimpleButton(string title, float width, float height, SimpleButtonColor color, bool isPressTap, string fontName) { _isPressTap = isPressTap; this.effectManager = Core.topEffectManager; _color = color; AddChild (button = new FSliceButton (width, height, _color.path, _color.path)); //button.SetPosition(0.25f,0.33f);//pixel perfect? AddChild (mainLabel = new DualLabel (fontName, title, Color.white, Colors.TEXT_SHADOW)); mainLabel.y = 2.5f; if (_isPressTap) { button.SignalPress += (b) => DoTap (); } else { button.SignalRelease += (b) => DoTap (); } _overHighlight = new FSliceSprite ("UI/ButtonHighlight", width, height, 12, 12, 12, 12); _overHighlight.alpha = 0.45f; ListenForUpdate (HandleUpdate); UpdateEnabled (); }
public SimpleButton(string title, float width, float height, SimpleButtonColor color, bool isPressTap) : this(title,width,height,color,isPressTap,Fonts.MEDIUM_BOLD) { }