public NodeControllerBookmarks(GameUI myGameUI, int myDepth)
            : base(myGameUI, myDepth)
        {
            VectorInt vi = myGameUI.GameCoords.PositionWayPoints.TopLeft;
            b1 = new NodeUIButton(myGameUI, myDepth + 1, vi, "$Graphics/Tiles/Clean/WayPointButton1.png", "WP1");
            b1.ImageBack = null;
            b1.ToolTip = "Bookmark #1";
            b1.OnClick += new EventHandler<NotificationEvent>(OnButtonClick);
            b1.OnMouseOver += new EventHandler<NotificationEvent>(OnButtonMouseOver);
            myGameUI.Add(b1);

            vi = vi.Add(0, 40);
            b2 = new NodeUIButton(myGameUI, myDepth +2, vi, "$Graphics/Tiles/Clean/WayPointButton2.png", "WP2");
            b2.ImageBack = null;
            b2.ToolTip = "Bookmark #2";
            b2.OnClick += new EventHandler<NotificationEvent>(OnButtonClick);
            b2.OnMouseOver += new EventHandler<NotificationEvent>(OnButtonMouseOver);
            myGameUI.Add(b2);

            vi = vi.Add(0, 40);
            b3 = new NodeUIButton(myGameUI, myDepth + 3, vi, "$Graphics/Tiles/Clean/WayPointButton3.png", "WP3");
            b3.ImageBack = null;
            b3.ToolTip = "Bookmark #3";
            b3.OnClick += new EventHandler<NotificationEvent>(OnButtonClick);
            b3.OnMouseOver += new EventHandler<NotificationEvent>(OnButtonMouseOver);
            myGameUI.Add(b3);

            vi = vi.Add(0, 40);
            b4 = new NodeUIButton(myGameUI, myDepth + 4, vi, "$Graphics/Tiles/Clean/WayPointButton4.png", "WP4");
            b4.ImageBack = null;
            b4.ToolTip = "Bookmark #4";
            b4.OnClick += new EventHandler<NotificationEvent>(OnButtonClick);
            b4.OnMouseOver += new EventHandler<NotificationEvent>(OnButtonMouseOver);
            myGameUI.Add(b4);

            vi = vi.Add(0, 40);
            b5 = new NodeUIButton(myGameUI, myDepth + 5, vi, "$Graphics/Tiles/Clean/WayPointButton5.png", "WP5");
            b5.ImageBack = null;
            b5.ToolTip = "Bookmark #5";
            b5.OnClick += new EventHandler<NotificationEvent>(OnButtonClick);
            b5.OnMouseOver += new EventHandler<NotificationEvent>(OnButtonMouseOver);
            myGameUI.Add(b5);

            brushBookmarkOn = null;
            brushBookmarkOff = new SolidBrush(Color.FromArgb(120, Color.Black));

            staticImageRender = new StaticImage(ResourceFactory.Singleton.GetInstance("Default.Tiles"), new VectorInt(16, 16));
        }
        public NodeTitle(GameUI myGameUI, int myDepth)
            : base(myGameUI, 
                myDepth, 
                myGameUI.Puzzle.Details.Name,
                new Font("Lucida Console", 17f),
                new SolidBrush(Color.Yellow),
                new SolidBrush(Color.DarkOrange),
                new VectorInt(myGameUI.GameCoords.WindowRegion.TopMiddle.Add(-50, 3)))
        {
            secondLine = new NodeEffectText(myGameUI, myDepth - 1, "Sokoban rocks!", CurrentAbsolute.Add(0, 30));
            secondLine.Brush = new SolidBrush(secondLineColour);
            secondLine.Font = new Font("Arial", 11f);
            secondLine.IsVisible = false;

            currentLine = 0;
            lines = GetTextLines().ToArray();

            myGameUI.Add(secondLine);

            chain = new ActionChain();
            chain.Add(new ActionMethod(SelectNextMessage));
            chain.Add(new ActionCounter(20, 250, 4, new ActionDelegate(SetAlpha))); // FadeIn
            chain.Add(new ActionCounter(0, 50)); // wait
            chain.Add(new ActionCounter(250, 0, -7, new ActionDelegate(SetAlpha))); // FadeOut
            chain.Add(new ActionRetartChain(chain));

            chain.Init();
        }
        public NodeControllerCommands(GameUI myGameUI, int myDepth)
            : base(myGameUI, myDepth)
        {
            RectangleInt panel = myGameUI.GameCoords.PositionMovementCommands;
            VectorInt locCommands = myGameUI.GameCoords.PositionMovementCommands.TopLeft;

            NodeUIButton buttonUp = new NodeUIButton(myGameUI, myDepth + 1, locCommands.Add(22, 2), ResourceID.GameButtonUp, "Up");
            buttonUp.CurrentCentre = panel.TopMiddle;
            buttonUp.ToolTip = "Move Up";
            buttonUp.OnClick += new EventHandler<NotificationEvent>(Button_OnClick);
            myGameUI.Add(buttonUp);

            NodeUIButton buttonDown = new NodeUIButton(myGameUI, myDepth + 2, locCommands.Add(22, 42), ResourceID.GameButtonDown, "Down");
            buttonDown.CurrentCentre = panel.BottomMiddle;
            buttonDown.ToolTip = "Move Down";
            buttonDown.OnClick += new EventHandler<NotificationEvent>(Button_OnClick);
            myGameUI.Add(buttonDown);

            NodeUIButton buttonLeft = new NodeUIButton(myGameUI, myDepth + 3, locCommands.Add(2, 22), ResourceID.GameButtonLeft, "Left");
            buttonLeft.CurrentCentre = panel.MiddleLeft;
            buttonLeft.ToolTip = "Move Left";
            buttonLeft.OnClick += new EventHandler<NotificationEvent>(Button_OnClick);
            myGameUI.Add(buttonLeft);

            NodeUIButton buttonRight = new NodeUIButton(myGameUI, myDepth + 4, locCommands.Add(42, 22), ResourceID.GameButtonRight, "Right");
            buttonRight.CurrentCentre = panel.MiddleRight;
            buttonRight.ToolTip = "Move Right";
            buttonRight.OnClick += new EventHandler<NotificationEvent>(Button_OnClick);
            myGameUI.Add(buttonRight);

            NodeUIButton buttonUndo = new NodeUIButton(myGameUI, myDepth + 6, locCommands.Add(22, 22), ResourceID.GameButtonUndo, "Undo");
            buttonUndo.CurrentCentre = panel.Center;
            buttonUndo.ToolTip = "Undo last move";
            buttonUndo.OnClick += new EventHandler<NotificationEvent>(Button_OnClick);
            myGameUI.Add(buttonUndo);

            RectangleInt panelGen = myGameUI.GameCoords.PositionGeneralCommands;

            NodeUIButton buttonRestart = new NodeUIButton(myGameUI, myDepth + 7, locCommands.Add(42, 42), ResourceID.GameButtonRestart, "Restart");
            buttonRestart.CurrentCentre = panelGen.MiddleLeft;
            buttonRestart.ToolTip = "Restart puzzle";
            buttonRestart.OnClick += new EventHandler<NotificationEvent>(Button_OnClick);
            myGameUI.Add(buttonRestart);

            NodeUIButton buttonExit = new NodeUIButton(myGameUI, myDepth + 8, locCommands.Add(42, 2), ResourceID.GameButtonCancel, "Exit");
            buttonExit.CurrentCentre = panelGen.Center;
            buttonExit.ToolTip = "Give up and exit";
            buttonExit.OnClick += new EventHandler<NotificationEvent>(Button_OnClick);
            myGameUI.Add(buttonExit);

            NodeUIButton buttonHelp = new NodeUIButton(myGameUI, myDepth + 5, locCommands.Add(2, 42), ResourceID.GameButtonHelp, "Help");
            buttonHelp.CurrentCentre = panelGen.MiddleRight;
            buttonHelp.ToolTip = "Get a hint";
            buttonHelp.OnClick += new EventHandler<NotificationEvent>(Button_OnClick);
            myGameUI.Add(buttonHelp);
        }
        public NodePuzzleWin(GameUI myGameUI, int myDepth, VectorInt pos)
            : base(myGameUI, myDepth)
        {
            CurrentAbsolute = pos;
            chain = new ActionChain();
            chain.Add(new ActionCounter(0, 100, 2, ReSizeText));

            chain.Init();

            winner = new NodeEffectText(myGameUI, myDepth+1, "Congratz!!!", new Font("Arial", 10f), font, fontBK, pos);
            myGameUI.Add(winner);
        }
 protected override void AddComponentsToUI()
 {
     GameUI.Add(new Background(Game));
 }
        public NodeControllerStatus(GameUI myGameUI, int myDepth)
            : base(myGameUI, myDepth)
        {
            VectorInt locStatus = myGameUI.GameCoords.PositionStatus;

            labelMoves = new NodeEffectText(myGameUI, myDepth + 1, "Moves", locStatus);
            valueMoves = new NodeEffectText(myGameUI, myDepth + 1, "", locStatus.Add(0, 20));
            valueMoves.Brush = new SolidBrush(Color.LightBlue);
            myGameUI.Add(labelMoves);
            myGameUI.Add(valueMoves);

            labelPushes = new NodeEffectText(myGameUI, myDepth + 1, "Pushes", locStatus.Add(0, 40));
            valuePushes = new NodeEffectText(myGameUI, myDepth + 1, "", locStatus.Add(0, 60));
            valuePushes.Brush = new SolidBrush(Color.LightBlue);
            myGameUI.Add(labelPushes);
            myGameUI.Add(valuePushes);

            labelComplete = new NodeEffectText(myGameUI, myDepth + 1, "Complete", locStatus.Add(0, 80));
            valueComplete = new NodeEffectText(myGameUI, myDepth + 1, "", locStatus.Add(0, 100));
            valueComplete.Brush = new SolidBrush(Color.LightBlue);
            myGameUI.Add(labelComplete);
            myGameUI.Add(valueComplete);

            labelUndo = new NodeEffectText(myGameUI, myDepth + 1, "Undo", locStatus.Add(0, 120));
            valueUndo = new NodeEffectText(myGameUI, myDepth + 1, "", locStatus.Add(0, 140));
            valueUndo.Brush = new SolidBrush(Color.LightBlue);
            myGameUI.Add(labelUndo);
            myGameUI.Add(valueUndo);

            labelRestart = new NodeEffectText(myGameUI, myDepth + 1, "Restart", locStatus.Add(0, 160));
            valueRestart = new NodeEffectText(myGameUI, myDepth + 1, "", locStatus.Add(0, 180));
            valueRestart.Brush = new SolidBrush(Color.LightBlue);
            myGameUI.Add(labelRestart);
            myGameUI.Add(valueRestart);

            labelTime = new NodeEffectText(myGameUI, myDepth + 1, "Time", locStatus.Add(0, 200));
            valueTime = new NodeEffectText(myGameUI, myDepth + 1, "", locStatus.Add(0, 220));
            valueTime.Brush = new SolidBrush(Color.LightBlue);
            myGameUI.Add(labelTime);
            myGameUI.Add(valueTime);
        }