Пример #1
0
        public CharCre()
        {
            MainWindow.BackgroundImage = Content.Graphics.Instance.Images.background.bg_menuless;

            Label lbl_title = new Label("Character Creation");
            lbl_title.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.TITLE;
            lbl_title.Position = new Vector2(50, 50);
            MainWindow.add(lbl_title);

            pb_char = new PictureBox();
            pb_char.Image = Content.Graphics.Instance.Images.characters.fighter;
            pb_char.Position = new Vector2(350, 80);
            pb_char.Size = new Vector2(384, 384);
            MainWindow.add(pb_char);

            lbl_name = new Label("Name:");
            lbl_name.Position = new Vector2(110, 180);
            MainWindow.add(lbl_name);

            lbl_class = new Label("Class:");
            lbl_class.Position = new Vector2(120, 240);
            MainWindow.add(lbl_class);

            txt_name = new TextBox(10);
            txt_name.Position = new Vector2(180, 172);
            MainWindow.add(txt_name);

            sel_class = new Select();
            sel_class.Position = new Vector2(175, 240);
            sel_class.add("Fighter");
            sel_class.add("Caster");
            sel_class.add("Healer");
            sel_class.add("Archer");
            sel_class.add("Scout");
            sel_class.selectionChanged = selch;
            MainWindow.add(sel_class);

            Link lnk_con = new Link("Continue");
            lnk_con.Position = new Vector2(150, 300);
            lnk_con.selected = cont;
            MainWindow.add(lnk_con);

            lbl_err = new Label("Name cannot be empty");
            lbl_err.Position = new Vector2(100, 360);
            lbl_err.Color = Color.Red;
            lbl_err.Visible = false;
            MainWindow.add(lbl_err);

            GameState.CurrentState = new GameState();
        }
Пример #2
0
        public DialogTxt(Screen display)
            : base(display)
        {
            BackgroundImage = Content.Graphics.Instance.Images.background.bg_dialog;

            size = new Vector2(300, 150);
            pos = new Vector2(Game1.Instance.Window.ClientBounds.Width / 2 - size.X / 2, 100);

            lbl_text = new Label("");
            lbl_text.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.NORM;
            lbl_text.Position = new Vector2(pos.X + 50, pos.Y + 10);
            add(lbl_text);

            txt = new TextBox(15);
            txt.Position = new Vector2(pos.X + 50, pos.Y + 50);
            txt.HasFocus = true;
            add(txt);

            lnk_enter = new Link("Enter");
            lnk_enter.Position = new Vector2(pos.X + 50, pos.Y + 100);
            lnk_enter.selected = sel;
            add(lnk_enter);
        }
Пример #3
0
        public UnitCreation(Army a)
        {
            MainWindow.BackgroundImage = Content.Graphics.Instance.Images.background.bg_bigMenu;

            sel = 0;

            choosing = false;

            army = a;

            lbl_unitCre = new Label("Unit Creation");
            lbl_unitCre.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.TITLE;
            lbl_unitCre.Position = new Vector2(50, 30);
            MainWindow.add(lbl_unitCre);

            lbl_chooseLdr = new Label("Available Characters");
            lbl_chooseLdr.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.BOLD;
            lbl_chooseLdr.Position = new Vector2(400, 90);
            MainWindow.add(lbl_chooseLdr);

            txt_unitName = new TextBox(10);
            txt_unitName.Position = new Vector2(130, 150);
            MainWindow.add(txt_unitName);

            lnk_choose = new Link("Choose Leader");
            lnk_choose.Position = new Vector2(130, 210);
            lnk_choose.selected = choose;
            MainWindow.add(lnk_choose);

            lnk_create = new Link("Create Unit");
            lnk_create.Position = new Vector2(130, 270);
            lnk_create.selected = create;
            MainWindow.add(lnk_create);

            menu_leader = new Menu(10);
            menu_leader.Position = new Vector2(400, 90);
            foreach(Character c in army.Standby)
            {
                menu_leader.add(new Link(c.Name));
            }
            menu_leader.TabStop = false;
            MainWindow.add(menu_leader);

            lbl_err = new Label("You must name your new unit!");
            lbl_err.Position = new Vector2(90, 330);
            lbl_err.Color = Color.Red;
            lbl_err.Visible = false;
            MainWindow.add(lbl_err);

            lbl_v = new Label("V");
            lbl_v.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.CONTROL;
            lbl_v.Position = new Vector2(50, 440);
            lbl_v.Visible = false;
            MainWindow.add(lbl_v);

            lbl_vAction = new Label("View Character");
            lbl_vAction.Position = new Vector2(80, 440);
            lbl_vAction.Visible = false;
            MainWindow.add(lbl_vAction);

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

            lbl_enterAction = new Label("");
            lbl_enterAction.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.NORM;
            lbl_enterAction.Position = new Vector2(120, 470);
            lbl_enterAction.Visible = false;
            MainWindow.add(lbl_enterAction);

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

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