示例#1
0
        public Save()
        {
            MainWindow.BackgroundImage = Content.Graphics.Instance.Images.background.bg_bigMenu;

            di = false;

            dtxt = new DialogTxt(this);
            dtxt.complete = dtxtComplete;
            dtxt.InputEnabled = false;

            dyn = new DialogYN(this);
            dyn.complete = dynChose;
            dyn.InputEnabled = false;

            Label lbl_title = new Label("Save Game");
            lbl_title.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.TITLE;
            lbl_title.Position = new Vector2(100, 20);
            MainWindow.add(lbl_title);

            lbl_stat = new Label("");
            lbl_stat.Position = new Vector2(100, 50);
            lbl_stat.Color = Color.Green;
            lbl_stat.Visible = false;
            MainWindow.add(lbl_stat);

            lbl_d = new Label("D");
            lbl_d.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.CONTROL;
            lbl_d.Position = new Vector2(80, 440);
            MainWindow.add(lbl_d);

            lbl_del = new Label("Delete Save");
            lbl_del.Position = new Vector2(100, 440);
            MainWindow.add(lbl_del);

            lbl_enter = new Label("ENTER");
            lbl_enter.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.CONTROL;
            lbl_enter.Position = new Vector2(80, 470);
            MainWindow.add(lbl_enter);

            lbl_enterAction = new Label("Save Game");
            lbl_enterAction.Position = new Vector2(150, 470);
            MainWindow.add(lbl_enterAction);

            lbl_esc = new Label("ESC");
            lbl_esc.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.CONTROL;
            lbl_esc.Position = new Vector2(80, 500);
            MainWindow.add(lbl_esc);

            lbl_escAction = new Label("Go Back");
            lbl_escAction.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.NORM;
            lbl_escAction.Position = new Vector2(130, 500);
            MainWindow.add(lbl_escAction);

            m = new Menu(10);
            m.Position = new Vector2(10, 75);
            m.selectionChanged = selChange;
            list();
            MainWindow.add(m);
        }
示例#2
0
        public PauseMenu()
        {
            MainWindow.BackgroundImage = Content.Graphics.Instance.Images.background.bg_menuless;

            yn_exit = new DialogYN(this);
            yn_exit.complete = dialog_ret;
            yn_exit.InputEnabled = false;

            lbl_title = new Label("Pause menu");
            lbl_title.Position = new Vector2(50, 50);
            lbl_title.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.TITLE;

            lnk_resumeGame = new Link("Resume Game");
            lnk_resumeGame.Position = new Vector2(150, 125);
            lnk_resumeGame.selected = resumeGame;
            MainWindow.add(lnk_resumeGame);

            lnk_loadGame = new Link("Load Game");
            lnk_loadGame.Position = new Vector2(150, 175);
            lnk_loadGame.selected = loadGame;

            lnk_saveGame = new Link("Save Game");
            lnk_saveGame.Position = new Vector2(150, 225);
            lnk_saveGame.selected = saveGame;

            lnk_option = new Link("Option");
            lnk_option.Position = new Vector2(150, 275);
            lnk_option.selected = options;

            lnk_exit = new Link("Exit to Main Menu");
            lnk_exit.Position = new Vector2(150, 325);
            lnk_exit.selected = exit;

            MainWindow.add(lbl_title);
            MainWindow.add(lnk_loadGame);
            MainWindow.add(lnk_saveGame);
            MainWindow.add(lnk_option);
            MainWindow.add(lnk_exit);
        }
示例#3
0
        public WorldMap()
        {
            MainWindow.BackgroundImage = Content.Graphics.Instance.Images.background.bg_smallMenu;
            MainWindow.FocusArrowEnabled = false;

            foreach (Unit u in GameState.CurrentState.mainArmy.Units)
                u.Deployed = false;

            freemode = false;

            yn_battle = new DialogYN(this);
            yn_battle.complete = dialog_ret_battle;
            yn_battle.InputEnabled = false;

            map = new Map(Content.Instance.gen);
            map.ArrowEnabled = false;
            map.SelectionEnabled = false;
            map.Fog = GameState.CurrentState.gen;
            map.changeCurp = changeCurp;

            updateMap();

            map.focus(GameState.CurrentState.mainCharPos.X, GameState.CurrentState.mainCharPos.Y);
            MainWindow.add(map);

            lp = GameState.CurrentState.mainCharPos;

            lbl_day = new Label("Day #");
            lbl_day.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.BOLD;
            lbl_day.Position = new Vector2(50, 410);
            MainWindow.add(lbl_day);

            lbl_dayNum = new Label(GameState.CurrentState.turn.ToString());
            lbl_dayNum.Position = new Vector2(110, 410);
            MainWindow.add(lbl_dayNum);

            lbl_city = new Label("City");
            lbl_city.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.BOLD;
            lbl_city.Position = new Vector2(50, 440);
            lbl_city.Visible = false;
            MainWindow.add(lbl_city);

            lbl_cityName = new Label("");
            lbl_cityName.Position = new Vector2(100, 440);
            lbl_cityName.Visible = false;
            MainWindow.add(lbl_cityName);

            lbl_cities = new Label("Cities Owned");
            lbl_cities.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.BOLD;
            lbl_cities.Position = new Vector2(50, 470);
            MainWindow.add(lbl_cities);

            lbl_citiesNum = new Label(GameState.CurrentState.getCaptureNum("main").ToString());
            lbl_citiesNum.Position = new Vector2(180, 470);
            MainWindow.add(lbl_citiesNum);

            lbl_income = new Label("Income Per Turn");
            lbl_income.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.BOLD;
            lbl_income.Position = new Vector2(50, 500);
            MainWindow.add(lbl_income);

            lbl_incomeNum = new Label((Content.Instance.money_info.perRegion * GameState.CurrentState.getCaptureNum("main")).ToString());
            lbl_incomeNum.Position = new Vector2(200, 500);
            MainWindow.add(lbl_incomeNum);

            Label lbl_a = new Label("A");
            lbl_a.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.CONTROL;
            lbl_a.Position=new Vector2(400, 440);
            MainWindow.add(lbl_a);

            Label lbl_army = new Label("Army Screen");
            lbl_army.Position = new Vector2(430, 440);
            MainWindow.add(lbl_army);

            Label lbl_m = new Label("M");
            lbl_m.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.CONTROL;
            lbl_m.Position = new Vector2(400, 470);
            MainWindow.add(lbl_m);

            Label lbl_mode = new Label("View/Move mode");
            lbl_mode.Position = new Vector2(430, 470);
            MainWindow.add(lbl_mode);

            /*Label lbl_enter = new Label("ENTER");
            lbl_enter.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.CONTROL;
            lbl_enter.Position = new Vector2(400, 500);
            MainWindow.add(lbl_enter);

            Label lbl_reg = new Label("Enter Region");
            lbl_reg.Position = new Vector2(480, 500);
            MainWindow.add(lbl_reg);*/

            Point p = GameState.CurrentState.mainCharPos;
            changeCurp(this, new EventArgObject(new Point(p.X, p.Y)));

            GameState.CurrentState.mainArmy.undeployAll();

            ai = new AI();
            ai.set(map, Content.Instance.gen);
            ai.done = ai_done;
        }