public PlaybackMultifunctionalButton(Vector2 pPosition)
        : base(pPosition)
    {
        _gotoPlanning = (Texture)Resources.Load("playback_gotoPlanning");
        D.isNull(_gotoPlanning, "Couldn't load gotoPlanning");
        _startPlayback = (Texture)Resources.Load("playback_startPlayback");
        D.isNull(_startPlayback, "Couldn't load startPlayback");
        _pausePlayback = (Texture)Resources.Load("playback_pausePlayback");
        D.isNull(_pausePlayback, "Couldn't load pausePlayback");
        _waitingForEnemy = (Texture)Resources.Load("playback_waitingForEnemy");
        D.isNull(_waitingForEnemy, "Couldn't load playback_waitingForEnemy");
        _gotoWinState = (Texture)Resources.Load("playback_gotoWinState");
        D.isNull(_gotoWinState, "Couldn't load playback_gotoWinState");
        _gotoLoseState = (Texture)Resources.Load("playback_gotoLoseState");
        D.isNull(_gotoLoseState, "Couldn't load playback_gotoLoseState");
        _placePawns = (Texture)Resources.Load("playback_PlacePawns");
        D.isNull(_placePawns, "Couldn't load playback_PlacePawns");
        _submitMoves = (Texture)Resources.Load("playback_SubmitMoves");
        D.isNull(_submitMoves, "Couldn't load playback_SubmitMoves");
        _tie = (Texture)Resources.Load("playback_gotoTieState");
        D.isNull(_tie, "Couldn't load playback_gotoTieState");

        _texture = _gotoPlanning;

        _blinker1 = new Container("playback_startPlaybackExtra1", new Vector2(87, -16));
        _blinker2 = new Container("playback_startPlaybackExtra2", new Vector2(87, -16));

        _blinker2.SetOnContainerPressedDelegate(OnBlinkerPressed);

        AddChild(_blinker1);
        AddChild(_blinker2);

        colorWhenDisabled = new Color(0.1f, 1.0f, 0.1f, 0.1f);
        customHitbox = new Rect(0, 50, 170, 100);
    }
 public WindowControllButtons()
     : base(Vector2.zero)
 {
     #if !UNITY_WEBPLAYER
     this.AddChild(_quit = new Container("quit", Vector2.one * 10f));
     this.AddChild(_fullscreen = new Container("fullscreen", Vector2.one * 10f + Vector2.right * 23f));
     this.AddChild(_windowed = new Container("windowed", Vector2.one * 10f + Vector2.right * 23f));
     _quit.SetOnContainerPressedDelegate(o => { Application.Quit(); });
     _fullscreen.SetOnContainerPressedDelegate(o => {
         Resolution r = Screen.resolutions[Screen.resolutions.Length - 1];
         Screen.SetResolution(r.width, r.height, true);
     });
     _windowed.SetOnContainerPressedDelegate(o => { Screen.SetResolution(1024, 768, false); });
     #endif
 }