예제 #1
0
        public Menu(GameObject parent)
            : base(parent)
        {
            GuiElement backGround = new GuiElement(this);
            backGround.setMaterial("hud\\background.xmf");

            cursor = new GuiElement(this);
            cursor.setSizePix(new Vector2(100, 100));
            cursor.setMaterial("hud\\cursor.xmf");

            ButtonList bList = new ButtonList(backGround);
            bList.setSizePix(new Vector2(200, 700));
            bList.Position = new Vector2(-0.85f, 0f);

            Button button = new Button(bList);
            button.setSizePix(new Vector2(200, 100));
            button.setMaterial("hud\\resume_button.xmf");
            button.HandlerClick = Resume;

            Button button2 = new Button(bList);
            button2.setSizePix(new Vector2(200, 100));
            button2.setMaterial("hud\\exit_button.xmf");
            button2.HandlerClick = Exit;

            Button button3 = new Button(bList);
            button3.setSizePix(new Vector2(200, 100));
            //button3.setMaterial("hud\\resume_button.xmf");

            Button button4 = new Button(bList);
            button4.setSizePix(new Vector2(200, 100));
            //button4.setMaterial("hud\\resume_button.xmf");

            Button button5 = new Button(bList);
            button5.setSizePix(new Vector2(200, 100));
            //button5.setMaterial("hud\\resume_button.xmf");
        }
예제 #2
0
 public static void Resume(Button caller)
 {
     caller.gameWindow.enterGame();
 }
예제 #3
0
 public static void Exit(Button caller)
 {
     caller.gameWindow.exitGame();
 }