Пример #1
0
        public ASKboolBox(Game g)
            : base(g)
        {
            Name = "ASKboolBox";
            Location = new Point(0, 360);

            TextBox = new TextBox(g);
            TextBox.Location = new Point(16, 16);
            TextBox.OneByOne = true;

            BB1 = new ButtonBox(g);
            BB1.Location = new Point(300, 80);
            BB1.UpTextBox.Text = BB1.DownTextBox.Text = BB1.FocusTextBox.Text = BB1.WaitTextBox.Text = "是";
            BB1.FocusTextBox.FontColor = Color.Blue;
            BB1.OnButtonDown += new ButtonBoxEvent(BB1_OnButtonDown);

            BB2 = new ButtonBox(g);
            BB2.Location = new Point(400, 80);
            BB2.UpTextBox.Text = BB2.DownTextBox.Text = BB2.FocusTextBox.Text = BB2.WaitTextBox.Text = "否";
            BB2.FocusTextBox.FontColor = Color.Blue;
            BB2.OnButtonDown += new ButtonBoxEvent(BB2_OnButtonDown);

            ControlBoxes.Add(TextBox);
            ControlBoxes.Add(BB1);
            ControlBoxes.Add(BB2);
        }
Пример #2
0
 void drawButtonBox(ButtonBox bb, Point basepos)
 {
     basepos = Util.PointAddPoint(basepos, bb.Location);
     basepos = Util.PointAddPoint(basepos, ScreenOffsetPixelPoint);
     if (bb.ButtonBoxState == ButtonBoxState.Down)
     {
         drawTextureBox(bb.DownTextureBox, basepos);
         drawTextBox(bb.DownTextBox, basepos);
     }
     else if (bb.ButtonBoxState == ButtonBoxState.Focus)
     {
         drawTextureBox(bb.FocusTextureBox, basepos);
         drawTextBox(bb.FocusTextBox, basepos);
     }
     else if (bb.ButtonBoxState == ButtonBoxState.Up)
     {
         drawTextureBox(bb.UpTextureBox, basepos);
         drawTextBox(bb.UpTextBox, basepos);
     }
     else if (bb.ButtonBoxState == ButtonBoxState.Wait)
     {
         drawTextureBox(bb.WaitTextureBox, basepos);
         drawTextBox(bb.WaitTextBox, basepos);
     }
 }
Пример #3
0
        public MenuCHRASK(Game g)
            : base(g)
        {
            Name = "MenuCHRASK";
            Location = new Point(576, 48);
            BGTextureBox.Texture.Name = "bg_64x64";
            BGTextureBox.Size = new System.Drawing.Size(128, 128);

            BB1 = new ButtonBox(g);
            BB1.Location = new Point(48, 24);
            BB1.UpTextBox.Text = BB1.DownTextBox.Text = BB1.FocusTextBox.Text = BB1.WaitTextBox.Text = "装备";
            BB1.FocusTextBox.FontColor = Color.CornflowerBlue;
            BB1.OnButtonUp += new ButtonBoxEvent(BB1_OnButtonUp);

            BB2 = new ButtonBox(g);
            BB2.Location = new Point(48, 24);
            BB2.UpTextBox.Text = BB2.DownTextBox.Text = BB2.FocusTextBox.Text = BB2.WaitTextBox.Text = "卸下";
            BB2.FocusTextBox.FontColor = Color.CornflowerBlue;
            BB2.OnButtonUp += new ButtonBoxEvent(BB2_OnButtonUp);

            //ControlBoxes.Add(BB1);
            ControlBoxes.Add(BB2);
        }
Пример #4
0
        public MenuBattleCHR(Game g)
            : base(g)
        {
            Name = "MenuBattleCHR";
            Location = new Point(640 - 128, 480 - 128);
            BGTextureBox.Texture.Name = "bg_64x64";
            BGTextureBox.Size = new System.Drawing.Size(128, 128);

            BB1 = new ButtonBox(g);
            BB1.Location = new Point(20, 16);
            BB1.WaitTextBox.Text = "攻击";
            BB1.SameAsWait();
            BB1.OnButtonUp += new ButtonBoxEvent(BB1_OnButtonUp);

            BB2 = new ButtonBox(g);
            BB2.Location = new Point(20, 32);
            BB2.WaitTextBox.Text = "道具";
            BB2.SameAsWait();
            BB2.OnButtonUp += new ButtonBoxEvent(BB2_OnButtonUp);

            BB3 = new ButtonBox(g);
            BB3.Location = new Point(20, 48);
            BB3.WaitTextBox.Text = "装备";
            BB3.SameAsWait();
            BB3.OnButtonUp += new ButtonBoxEvent(BB3_OnButtonUp);

            BB4 = new ButtonBox(g);
            BB4.Location = new Point(20, 64);
            BB4.WaitTextBox.Text = "乘降";
            BB4.SameAsWait();
            BB4.OnButtonUp += new ButtonBoxEvent(BB4_OnButtonUp);

            BB5 = new ButtonBox(g);
            BB5.Location = new Point(20, 80);
            BB5.WaitTextBox.Text = "逃跑";
            BB5.SameAsWait();
            BB5.OnButtonUp += new ButtonBoxEvent(BB5_OnButtonUp);

            ControlBoxes.Add(BB1);
            ControlBoxes.Add(BB2);
            ControlBoxes.Add(BB3);
            ControlBoxes.Add(BB4);
            ControlBoxes.Add(BB5);
        }