Пример #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 Options()
        {
            MainWindow.BackgroundImage = Content.Graphics.Instance.Images.background.bg_menuless;

            lbl_options = new Label("Options");
            lbl_options.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.TITLE;
            lbl_options.Position = new Vector2(50, 50);
            MainWindow.add(lbl_options);

            lbl_volume = new Label("Music Volume:");
            lbl_volume.Position = new Vector2(260, 180);
            MainWindow.add(lbl_volume);

            lbl_soundEffects = new Label("Sound Effects:");
            lbl_soundEffects.Position = new Vector2(260, 240);
            MainWindow.add(lbl_soundEffects);

            sel_volume = new Select();
            sel_volume.Position = new Vector2(402, 180);
            for (int i = 0; i <= 10; i++)
                sel_volume.add(i.ToString());
            sel_volume.selectionChanged = volumeChange;
            sel_volume.Selection = (int)MediaPlayer.Volume * 10;
            MainWindow.add(sel_volume);

            sel_soundEffects = new Select();
            sel_soundEffects.Position = new Vector2(400, 240);
            sel_soundEffects.add("On");
            sel_soundEffects.add("Off");
            sel_soundEffects.selectionChanged = sfxChange;
            MainWindow.add(sel_soundEffects);

            lnk_goBack = new Link("Go Back");
            lnk_goBack.Position = new Vector2(325, 300);
            lnk_goBack.selected = goBack;
            MainWindow.add(lnk_goBack);
        }