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 Core() { instance = this; AddChild (pageContainer = new FContainer ()); AddChild (topEffectManager = new EffectManager (true)); audioManager = new AudioManager (); FXPlayer.manager = audioManager.fxManager; MusicPlayer.manager = audioManager.musicManager; FXPlayer.Preload (); playerManager = new PlayerManager (); playerManager.Setup (); Engine engine = new Engine(); engine.Initialize(); ShowPage (engine); Engine.Scene = new MainScene(); ListenForUpdate (Update); }