Exemplo n.º 1
0
 void TilesetViewer_Click(object sender, SdlDotNet.Widgets.MouseButtonEventArgs e)
 {
     //Point location = this.ScreenLocation;
     //Point relPoint = new Point(e.Position.X - location.X, e.Position.Y - location.Y);
     if (e.MouseEventArgs.Button == SdlDotNet.Input.MouseButton.PrimaryButton)
     {
         if (!DrawingSupport.PointInBounds(e.RelativePosition, vScroll.Bounds) && !DrawingSupport.PointInBounds(e.RelativePosition, hScroll.Bounds))
         {
             if (e.RelativePosition.X + (hScroll.Value * Constants.TILE_WIDTH) > activeTilesetSurf.Size.Width)
             {
                 selectedTile.X = (activeTilesetSurf.Size.Width / 32) - 1;
                 endTile.X      = selectedTile.X;
             }
             else
             {
                 selectedTile.X = (e.RelativePosition.X / 32) + hScroll.Value;
                 endTile.X      = selectedTile.X;
             }
             if (e.RelativePosition.Y + (vScroll.Value * Constants.TILE_HEIGHT) > activeTilesetSurf.Size.Height)
             {
                 selectedTile.Y = (activeTilesetSurf.Size.Height / 32) - 1;
                 endTile.Y      = selectedTile.Y;
             }
             else
             {
                 selectedTile.Y = (e.RelativePosition.Y / 32) + vScroll.Value;
                 endTile.Y      = selectedTile.Y;
             }
         }
         RequestRedraw();
     }
     else if (e.MouseEventArgs.Button == SdlDotNet.Input.MouseButton.SecondaryButton)
     {
         if (!DrawingSupport.PointInBounds(e.RelativePosition, vScroll.Bounds) && !DrawingSupport.PointInBounds(e.RelativePosition, hScroll.Bounds))
         {
             if (e.RelativePosition.X + (hScroll.Value * Constants.TILE_WIDTH) > activeTilesetSurf.Size.Width)
             {
                 endTile.X = (activeTilesetSurf.Size.Width / 32) - 1;
             }
             else
             {
                 endTile.X = (e.RelativePosition.X / 32) + hScroll.Value;
             }
             if (e.RelativePosition.Y + (vScroll.Value * Constants.TILE_HEIGHT) > activeTilesetSurf.Size.Height)
             {
                 endTile.Y = (activeTilesetSurf.Size.Height / 32) - 1;
             }
             else
             {
                 endTile.Y = (e.RelativePosition.Y / 32) + vScroll.Value;
             }
             if (DetermineTileNumber(endTile.X, endTile.Y) < DetermineTileNumber(selectedTile.X, selectedTile.Y))
             {
                 endTile = selectedTile;
             }
         }
         RequestRedraw();
     }
 }
Exemplo n.º 2
0
        public winHouseProperties()
            : base("winHouseProperties")
        {
            this.Windowed                     = true;
            this.ShowInWindowSwitcher         = false;
            this.TitleBar.Text                = "Music";
            this.TitleBar.Font                = Logic.Graphics.FontManager.LoadFont("tahoma", 12);
            this.TitleBar.CloseButton.Visible = true;
            this.AlwaysOnTop                  = true;
            this.BackColor                    = Color.White;
            //this.BorderStyle = SdlDotNet.Widgets.BorderStyle.FixedSingle;
            //this.BorderWidth = 1;
            //this.BorderColor = Color.Black;
            this.Size     = new Size(500, 230);
            this.Location = DrawingSupport.GetCenter(SdlDotNet.Graphics.Video.Screen.Size, this.Size);

            properties = Maps.MapHelper.ActiveMap.ExportToHouseClass();

            #region General

            lblMusic          = new Label("lblMusic");
            lblMusic.Font     = Logic.Graphics.FontManager.LoadFont("PMDCP", 22);
            lblMusic.AutoSize = true;
            lblMusic.Location = new Point(20, 10);
            lblMusic.Text     = "Music";

            cmbMusic          = new ComboBox("cmbMusic");
            cmbMusic.Size     = new System.Drawing.Size(375, 30);
            cmbMusic.Location = new Point(25, 50);

            btnPlay          = new Button("btnPlay");
            btnPlay.Font     = Logic.Graphics.FontManager.LoadFont("PMDCP", 18);
            btnPlay.Size     = new System.Drawing.Size(75, 30);
            btnPlay.Location = new Point(410, 20);
            Skins.SkinManager.LoadButtonGui(btnPlay);
            btnPlay.Text   = "Play";
            btnPlay.Click += new EventHandler <MouseButtonEventArgs>(btnPlay_Click);

            btnStop          = new Button("btnStop");
            btnStop.Font     = Logic.Graphics.FontManager.LoadFont("PMDCP", 18);
            btnStop.Size     = new System.Drawing.Size(75, 30);
            btnStop.Location = new Point(410, 50);
            Skins.SkinManager.LoadButtonGui(btnStop);
            btnStop.Text   = "Stop";
            btnStop.Click += new EventHandler <MouseButtonEventArgs>(btnStop_Click);

            lblYouTubeMusicID          = new Label("lblYouTubeMusicID");
            lblYouTubeMusicID.Font     = Logic.Graphics.FontManager.LoadFont("PMDCP", 22);
            lblYouTubeMusicID.AutoSize = true;
            lblYouTubeMusicID.Location = new Point(20, 90);
            lblYouTubeMusicID.Text     = "YouTube (Music) Video ID";

            txtYouTubeMusicID          = new TextBox("txtYouTubeMusicID");
            txtYouTubeMusicID.Size     = new System.Drawing.Size(375, 30);
            txtYouTubeMusicID.Location = new Point(25, 120);
            txtYouTubeMusicID.Text     = properties.YouTubeMusicID;

            btnOk          = new Button("btnOk");
            btnOk.Font     = Logic.Graphics.FontManager.LoadFont("PMDCP", 18);
            btnOk.Size     = new System.Drawing.Size(75, 30);
            btnOk.Location = new Point(20, 170);
            Skins.SkinManager.LoadButtonGui(btnOk);
            btnOk.Text   = "Ok";
            btnOk.Click += new EventHandler <MouseButtonEventArgs>(btnOk_Click);

            btnCancel          = new Button("btnCancel");
            btnCancel.Font     = Logic.Graphics.FontManager.LoadFont("PMDCP", 18);
            btnCancel.Size     = new System.Drawing.Size(75, 30);
            btnCancel.Location = new Point(95, 170);
            Skins.SkinManager.LoadButtonGui(btnCancel);
            btnCancel.Text   = "Cancel";
            btnCancel.Click += new EventHandler <MouseButtonEventArgs>(btnCancel_Click);

            #endregion

            this.AddWidget(lblMusic);
            this.AddWidget(cmbMusic);
            this.AddWidget(lblYouTubeMusicID);
            this.AddWidget(txtYouTubeMusicID);
            this.AddWidget(btnPlay);
            this.AddWidget(btnStop);
            this.AddWidget(btnOk);
            this.AddWidget(btnCancel);

            this.LoadComplete();

            LoadMusic();
        }
Exemplo n.º 3
0
        public winCredits()
            : base("WinCredits")
        {
            this.Windowed                     = true;
            this.ShowInWindowSwitcher         = false;
            this.TitleBar.Text                = "Credits";
            this.TitleBar.CloseButton.Visible = false;
            //this.BackgroundImage = Skins.SkinManager.LoadGui("Credits");
            //this.Size = this.BackgroundImage.Size;
            this.BackColor = Color.White;
            this.Size      = new Size(400, 400);
            this.Location  = DrawingSupport.GetCenter(SdlDotNet.Graphics.Video.Screen.Size, this.Size);

            lblTeam           = new Label("lblTeam");
            lblTeam.Font      = Graphics.FontManager.LoadFont("PMU", 30);
            lblTeam.AutoSize  = true;
            lblTeam.Location  = new Point(30, 20);
            lblTeam.Text      = "The Pokemon Journey Online Team!";
            lblTeam.BackColor = Color.GreenYellow;

            lblBack           = new Label("lblBack");
            lblBack.Font      = Graphics.FontManager.LoadFont("PMU", 20);
            lblBack.AutoSize  = true;
            lblBack.Location  = new Point(0, 330);
            lblBack.Text      = "Return to Login Screen";
            lblBack.BackColor = Color.Blue;
            lblBack.Click    += new EventHandler <MouseButtonEventArgs>(lblBack_Click);

            lblProgramming           = new Label("lblProgramming");
            lblProgramming.Font      = Graphics.FontManager.LoadFont("PMU", 25);
            lblProgramming.AutoSize  = true;
            lblProgramming.Location  = new Point(0, 80);
            lblProgramming.Text      = "Programming:";
            lblProgramming.BackColor = Color.Silver;

            lblPikablu           = new Label("lblPikablu");
            lblPikablu.Font      = Graphics.FontManager.LoadFont("PMU", 20);
            lblPikablu.AutoSize  = true;
            lblPikablu.Location  = new Point(120, 85);
            lblPikablu.Text      = "Pikablu";
            lblPikablu.BackColor = Color.Yellow;

            lblDarkmazer          = new Label("lblDarkmazer");
            lblDarkmazer.Font     = Graphics.FontManager.LoadFont("PMU", 20);
            lblDarkmazer.AutoSize = true;
            lblDarkmazer.Location = new Point(175, 85);
            lblDarkmazer.Text     = "Darkmazer";
            // TODO: Add Forecolors for the Credits.
            //lblDarkmazer.BackColor = Color.Black; -For the Darkness, as always.
            //lblDarkmazer.ForeColor = Color.White; -Even in the deepest of darkness, there's always light...

            lblSprinko           = new Label("lblSprinko");
            lblSprinko.Font      = Graphics.FontManager.LoadFont("PMU", 20);
            lblSprinko.AutoSize  = true;
            lblSprinko.Location  = new Point(250, 85);
            lblSprinko.Text      = "Sprinko";
            lblSprinko.BackColor = Color.LightBlue;

            lblRocket           = new Label("lblRocket");
            lblRocket.Font      = Graphics.FontManager.LoadFont("PMU", 20);
            lblRocket.AutoSize  = true;
            lblRocket.Location  = new Point(310, 85);
            lblRocket.Text      = "Rocket";
            lblRocket.BackColor = Color.Orange;

            lblGraphics           = new Label("lblGraphics");
            lblGraphics.Font      = Graphics.FontManager.LoadFont("PMU", 25);
            lblGraphics.AutoSize  = true;
            lblGraphics.Location  = new Point(0, 140);
            lblGraphics.Text      = "Graphics:";
            lblGraphics.BackColor = Color.Brown;

            lblSprinkoAgain           = new Label("lblSprinkoAgain");
            lblSprinkoAgain.Font      = Graphics.FontManager.LoadFont("PMU", 20);
            lblSprinkoAgain.AutoSize  = true;
            lblSprinkoAgain.Location  = new Point(90, 145);
            lblSprinkoAgain.Text      = "Sprinko";
            lblSprinkoAgain.BackColor = Color.SkyBlue;

            lblFlare          = new Label("lblFlare");
            lblFlare.Font     = Graphics.FontManager.LoadFont("PMU", 20);
            lblFlare.AutoSize = true;
            lblFlare.Location = new Point(130, 185);
            lblFlare.Text     = "Flare";
            //lblFlare.BackColor = Color.Black; -Shiny, shiny!
            //lblFlare.ForeColor = Color.Silver; -Isn't Silver shiny though? Doesn't it count?

            lblWolfLink           = new Label("lblWolfLink");
            lblWolfLink.Font      = Graphics.FontManager.LoadFont("PMU", 20);
            lblWolfLink.AutoSize  = true;
            lblWolfLink.Location  = new Point(160, 145);
            lblWolfLink.Text      = "Wolf Link";
            lblWolfLink.BackColor = Color.Tan;

            lblRhaenn           = new Label("lblRhaenn");
            lblRhaenn.Font      = Graphics.FontManager.LoadFont("PMU", 20);
            lblRhaenn.AutoSize  = true;
            lblRhaenn.Location  = new Point(200, 185);
            lblRhaenn.Text      = "Rhaenn";
            lblRhaenn.BackColor = Color.MediumBlue;

            lblHayarotle           = new Label("lblHayarotle");
            lblHayarotle.Font      = Graphics.FontManager.LoadFont("PMU", 20);
            lblHayarotle.AutoSize  = true;
            lblHayarotle.Location  = new Point(245, 145);
            lblHayarotle.Text      = "Hayarotle";
            lblHayarotle.BackColor = Color.Red;

            lblTerranariko           = new Label("lblTerranariko");
            lblTerranariko.Font      = Graphics.FontManager.LoadFont("PMU", 20);
            lblTerranariko.AutoSize  = true;
            lblTerranariko.Location  = new Point(270, 185);
            lblTerranariko.Text      = "Terranariko";
            lblTerranariko.BackColor = Color.Pink;

            lblKirk           = new Label("lblKirk");
            lblKirk.Font      = Graphics.FontManager.LoadFont("PMU", 20);
            lblKirk.AutoSize  = true;
            lblKirk.Location  = new Point(90, 225);
            lblKirk.Text      = "Kirk";
            lblKirk.BackColor = Color.Transparent;

            this.AddWidget(lblTeam);
            this.AddWidget(lblBack);
            this.AddWidget(lblProgramming);
            this.AddWidget(lblPikablu);
            this.AddWidget(lblSprinko);
            this.AddWidget(lblDarkmazer);
            this.AddWidget(lblRocket);
            this.AddWidget(lblGraphics);
            this.AddWidget(lblSprinkoAgain);
            this.AddWidget(lblFlare);
            this.AddWidget(lblWolfLink);
            this.AddWidget(lblHayarotle);
            this.AddWidget(lblRhaenn);
            this.AddWidget(lblTerranariko);
            this.AddWidget(lblKirk);
            this.LoadComplete();
        }
Exemplo n.º 4
0
        public winChangePassword()
            : base("winChangePassword")
        {
            this.Windowed                     = true;
            this.ShowInWindowSwitcher         = false;
            this.TitleBar.Text                = "Change Password";
            this.TitleBar.CloseButton.Visible = false;
            this.Size = new Size(280, 360);
            //this.BackgroundImage = Skins.SkinManager.LoadGui("Change Password");
            this.Location = new Point(DrawingSupport.GetCenter(SdlDotNet.Graphics.Video.Screen.Size, this.Size).X, 5);

            lblBack           = new Label("lblBack");
            lblBack.Font      = Graphics.FontManager.LoadFont("PMDCP", 24);
            lblBack.Text      = "Back to Account Settings";
            lblBack.Location  = new Point(45, 300);
            lblBack.AutoSize  = true;
            lblBack.ForeColor = Color.Black;
            lblBack.Click    += new EventHandler <MouseButtonEventArgs>(lblBack_Click);

            lblName           = new Label("lblName");
            lblName.Font      = Graphics.FontManager.LoadFont("PMDCP", 18);
            lblName.Location  = new Point(60, 57);
            lblName.AutoSize  = true;
            lblName.ForeColor = Color.Black;
            lblName.Text      = "Enter your Account Name";

            lblPassword           = new Label("lblPassword");
            lblPassword.Font      = Graphics.FontManager.LoadFont("PMDCP", 18);
            lblPassword.Location  = new Point(60, 103);
            lblPassword.AutoSize  = true;
            lblPassword.ForeColor = Color.Black;
            lblPassword.Text      = "Enter your current Password";

            lblNewPassword           = new Label("lblNewPassword");
            lblNewPassword.Font      = Graphics.FontManager.LoadFont("PMDCP", 18);
            lblNewPassword.Location  = new Point(60, 149);
            lblNewPassword.AutoSize  = true;
            lblNewPassword.ForeColor = Color.Black;
            lblNewPassword.Text      = "Enter your new Password";

            lblRetypePassword           = new Label("lblRetypePassword");
            lblRetypePassword.Font      = Graphics.FontManager.LoadFont("PMDCP", 18);
            lblRetypePassword.Location  = new Point(60, 195);
            lblRetypePassword.AutoSize  = true;
            lblRetypePassword.ForeColor = Color.Black;
            lblRetypePassword.Text      = "Reenter your new Password";

            lblChangePassword           = new Label("lblChangePassword");
            lblChangePassword.Font      = Graphics.FontManager.LoadFont("PMDCP", 18);
            lblChangePassword.Location  = new Point(70, 241);
            lblChangePassword.AutoSize  = true;
            lblChangePassword.ForeColor = Color.Black;
            lblChangePassword.Text      = "Change your Password!";
            lblChangePassword.Click    += new EventHandler <MouseButtonEventArgs>(lblChangePassword_Click);

            txtName          = new TextBox("txtName");
            txtName.Size     = new System.Drawing.Size(165, 16);
            txtName.Location = new Point(60, 78);

            txtPassword          = new TextBox("txtPassword");
            txtPassword.Size     = new System.Drawing.Size(165, 16);
            txtPassword.Location = new Point(60, 124);

            txtNewPassword          = new TextBox("txtNewPassword");
            txtNewPassword.Size     = new System.Drawing.Size(165, 16);
            txtNewPassword.Location = new Point(60, 170);

            txtRetypePassword          = new TextBox("txtRetypePassword");
            txtRetypePassword.Size     = new System.Drawing.Size(165, 16);
            txtRetypePassword.Location = new Point(60, 216);

            this.AddWidget(lblBack);
            this.AddWidget(lblName);
            this.AddWidget(lblPassword);
            this.AddWidget(lblNewPassword);
            this.AddWidget(lblRetypePassword);
            this.AddWidget(lblChangePassword);
            this.AddWidget(txtName);
            this.AddWidget(txtPassword);
            this.AddWidget(txtNewPassword);
            this.AddWidget(txtRetypePassword);

            this.LoadComplete();
        }
Exemplo n.º 5
0
        public winUpdater(GitHubUpdater updater, IReadOnlyList <GitHubUpdateResult> updateResult, Action postUpdateLoad)
            : base("winUpdater")
        {
            this.updater        = updater;
            this.updateResult   = updateResult;
            this.postUpdateLoad = postUpdateLoad;

            Windows.WindowSwitcher.UpdaterWindow = this;
            this.Windowed      = true;
            this.TitleBar.Text = "Updater";
            this.TitleBar.Font = Graphics.FontManager.LoadFont("tahoma", 10);

            this.Size               = new Size(400, 400);
            this.BackColor          = Color.White;
            this.Location           = DrawingSupport.GetCenter(WindowManager.ScreenSize, this.Size);
            lblUpdateFound          = new Label("lblUpdateFound");
            lblUpdateFound.Location = new Point(10, 300);
            lblUpdateFound.AutoSize = true;
            lblUpdateFound.Font     = Graphics.FontManager.LoadFont("tahoma", 12);
            lblUpdateFound.Text     = "An update has been found! Would you like to install this update?";

            packageScroller          = new PackageScroller("packageScroller");
            packageScroller.Location = new Point(0, 0);

            if (updateResult.Count > 0)
            {
                foreach (var package in updateResult)
                {
                    packageScroller.AddPackage(new PackageInfo()
                    {
                        Name        = package.PackageName,
                        PublishDate = package.PublishDate,
                        Size        = package.Size
                    });
                }
            }
            packageScroller.PackageButtonSelected += new EventHandler <PackageButtonSelectedEventArgs>(packageScroller_PackageButtonSelected);

            lblUpdateInfo          = new Label("lblUpdateInfo");
            lblUpdateInfo.Size     = new Size(188, 300);
            lblUpdateInfo.Location = new Point(212, 0);
            lblUpdateInfo.WordWrap = true;
            lblUpdateInfo.Font     = Graphics.FontManager.LoadFont("tahoma", 12);

            lblStatus          = new Label("lblStatus");
            lblStatus.Location = new Point(lblUpdateFound.Location.X, lblUpdateFound.Location.Y + lblUpdateFound.Height + 5);
            lblStatus.AutoSize = true;
            lblStatus.Font     = Graphics.FontManager.LoadFont("tahoma", 12);
            lblStatus.Visible  = false;

            lblStatus          = new Label("lblStatus");
            lblStatus.Location = new Point(lblUpdateFound.Location.X, lblUpdateFound.Location.Y + lblUpdateFound.Height + 5);
            lblStatus.AutoSize = true;
            lblStatus.Font     = Graphics.FontManager.LoadFont("tahoma", 12);
            lblStatus.Visible  = false;

            pgbDownloadProgress           = new ProgressBar("pgbDownloadProgress");
            pgbDownloadProgress.Location  = new Point(lblUpdateFound.Location.X, lblUpdateFound.Location.Y + lblUpdateFound.Height + 5);
            pgbDownloadProgress.Size      = new System.Drawing.Size(this.Width - (lblUpdateFound.Location.X * 2), 20);
            pgbDownloadProgress.Font      = Graphics.FontManager.LoadFont("tahoma", 12);
            pgbDownloadProgress.Visible   = false;
            pgbDownloadProgress.TextStyle = ProgressBarTextStyle.Percent;

            btnAccept          = new Button("btnAccept");
            btnAccept.Text     = "Yes";
            btnAccept.Font     = Graphics.FontManager.LoadFont("tahoma", 12);
            btnAccept.Size     = new Size(100, 20);
            btnAccept.Location = new Point(lblUpdateFound.Location.X, lblUpdateFound.Location.Y + lblUpdateFound.Height + 5);
            btnAccept.Click   += new EventHandler <MouseButtonEventArgs>(btnAccept_Click);

            btnDecline          = new Button("btnDecline");
            btnDecline.Text     = "Skip";
            btnDecline.Font     = Graphics.FontManager.LoadFont("tahoma", 12);
            btnDecline.Size     = new Size(100, 20);
            btnDecline.Location = new Point(lblUpdateFound.Location.X + btnAccept.Width + 5, lblUpdateFound.Location.Y + lblUpdateFound.Height + 5);
            btnDecline.Click   += new EventHandler <MouseButtonEventArgs>(btnDecline_Click);

            tmrRestart          = new SdlDotNet.Widgets.Timer("restartTimer");
            tmrRestart.Interval = 1000;
            tmrRestart.Elapsed += new EventHandler(tmrRestart_Elapsed);

            this.AddWidget(packageScroller);
            this.AddWidget(lblUpdateInfo);
            this.AddWidget(lblUpdateFound);
            this.AddWidget(btnAccept);
            this.AddWidget(btnDecline);
            this.AddWidget(lblStatus);
            this.AddWidget(pgbDownloadProgress);
            this.AddWidget(tmrRestart);

            this.LoadComplete();

            packageScroller.ScrollToButton(0);
            LoadPackageInfo(packageScroller.Buttons[0]);
        }
Exemplo n.º 6
0
        public winSelectChar()
            : base("winSelectChar")
        {
            this.Windowed                     = true;
            this.ShowInWindowSwitcher         = false;
            this.TitleBar.Text                = "Login";
            this.TitleBar.CloseButton.Visible = false;
            this.BackgroundImage              = Skins.SkinManager.LoadGui("Character Select");
            this.Size     = this.BackgroundImage.Size;
            this.Location = DrawingSupport.GetCenter(SdlDotNet.Graphics.Video.Screen.Size, this.Size);

            btnChar1                = new Button("btnChar1");
            btnChar1.Font           = Graphics.FontManager.LoadFont("PMDCP", 32);
            btnChar1.Location       = new Point(16, 104);
            btnChar1.Size           = new Size(359, 41);
            btnChar1.BackColor      = Color.SteelBlue;
            btnChar1.HighlightColor = Color.SkyBlue;
            btnChar1.BorderStyle    = SdlDotNet.Widgets.BorderStyle.None;
            btnChar1.Text           = "Character 1";
            btnChar1.Selected       = true;
            btnChar1.Click         += new EventHandler <SdlDotNet.Widgets.MouseButtonEventArgs>(btnChar1_Click);

            btnChar2                = new Button("btnChar2");
            btnChar2.Font           = Graphics.FontManager.LoadFont("PMDCP", 32);
            btnChar2.Location       = new Point(16, 145);
            btnChar2.Size           = new Size(359, 41);
            btnChar2.BackColor      = Color.SteelBlue;
            btnChar2.HighlightColor = Color.SkyBlue;
            btnChar2.BorderStyle    = SdlDotNet.Widgets.BorderStyle.None;
            btnChar2.Text           = "Character 2";
            btnChar2.Click         += new EventHandler <SdlDotNet.Widgets.MouseButtonEventArgs>(btnChar2_Click);

            btnChar3                = new Button("btnChar3");
            btnChar3.Font           = Graphics.FontManager.LoadFont("PMDCP", 32);
            btnChar3.Location       = new Point(16, 186);
            btnChar3.Size           = new Size(359, 41);
            btnChar3.BackColor      = Color.SteelBlue;
            btnChar3.HighlightColor = Color.SkyBlue;
            btnChar3.BorderStyle    = SdlDotNet.Widgets.BorderStyle.None;
            btnChar3.Text           = "Character 3";
            btnChar3.Click         += new EventHandler <SdlDotNet.Widgets.MouseButtonEventArgs>(btnChar3_Click);

            lblUseCharacter           = new Label("lblUseCharacter");
            lblUseCharacter.Font      = Graphics.FontManager.LoadFont("PMDCP", 16);
            lblUseCharacter.Location  = new Point(26, 225);
            lblUseCharacter.AutoSize  = true;
            lblUseCharacter.ForeColor = Color.Black;
            lblUseCharacter.Text      = "Use Character";
            lblUseCharacter.Click    += new EventHandler <SdlDotNet.Widgets.MouseButtonEventArgs>(lblUseCharacter_Click);

            lblDeleteCharacter           = new Label("lblDeleteCharacter");
            lblDeleteCharacter.Font      = Graphics.FontManager.LoadFont("PMDCP", 16);
            lblDeleteCharacter.Location  = new Point(158, 225);
            lblDeleteCharacter.AutoSize  = true;
            lblDeleteCharacter.ForeColor = Color.Black;
            lblDeleteCharacter.Text      = "Delete Character";
            lblDeleteCharacter.Click    += new EventHandler <MouseButtonEventArgs>(lblDeleteCharacter_Click);

            lblNewCharacter           = new Label("lblNewCharacter");
            lblNewCharacter.Font      = Graphics.FontManager.LoadFont("PMDCP", 16);
            lblNewCharacter.Location  = new Point(286, 225);
            lblNewCharacter.AutoSize  = true;
            lblNewCharacter.ForeColor = Color.Black;
            lblNewCharacter.Text      = "New Character";
            lblNewCharacter.Click    += new EventHandler <MouseButtonEventArgs>(lblNewCharacter_Click);

            lblLoginScreen           = new Label("lblLoginScreen");
            lblLoginScreen.Font      = Graphics.FontManager.LoadFont("PMDCP", 16);
            lblLoginScreen.Location  = new Point(140, 345);
            lblLoginScreen.AutoSize  = true;
            lblLoginScreen.ForeColor = Color.Black;
            lblLoginScreen.Text      = "Back to Login Screen";
            lblLoginScreen.Click    += new EventHandler <SdlDotNet.Widgets.MouseButtonEventArgs>(lblLoginScreen_Click);

            this.AddWidget(btnChar1);
            this.AddWidget(btnChar2);
            this.AddWidget(btnChar3);
            this.AddWidget(lblUseCharacter);
            this.AddWidget(lblDeleteCharacter);
            this.AddWidget(lblNewCharacter);
            this.AddWidget(lblLoginScreen);
        }
Exemplo n.º 7
0
        public winNewCharacter(int charSlot)
            : base("winNewCharacter")
        {
            this.charSlot = charSlot;

            this.Windowed                     = true;
            this.ShowInWindowSwitcher         = false;
            this.TitleBar.Text                = "New Character";
            this.TitleBar.CloseButton.Visible = false;
            //this.BackgroundImage = Skins.SkinManager.LoadGui("New Character"); - We should have a better GUI for this.
            //this.Size = this.BackgroundImage.Size;
            this.Size     = new Size(400, 200);
            this.Location = new Point(DrawingSupport.GetCenter(SdlDotNet.Graphics.Video.Screen.Size, this.Size).X, 5);

            lblName          = new Label("lblName");
            lblName.Font     = Graphics.FontManager.LoadFont("PMU", 18);
            lblName.Location = new Point(40, 40);
            lblName.AutoSize = true;
            lblName.Text     = "Name:";

            txtName          = new TextBox("txtName");
            txtName.Size     = new System.Drawing.Size(177, 16);
            txtName.Location = new Point(40, 70);

            lblCreateChar          = new Label("lblCreateChar");
            lblCreateChar.Font     = Graphics.FontManager.LoadFont("PMU", 18);
            lblCreateChar.Location = new Point(40, 130);
            lblCreateChar.AutoSize = true;
            lblCreateChar.Text     = "Create Character";
            lblCreateChar.Click   += new EventHandler <MouseButtonEventArgs>(lblCreateChar_Click);

            lblBack          = new Label("btnBack");
            lblBack.Font     = Graphics.FontManager.LoadFont("PMU", 18);
            lblBack.Location = new Point(147, 130);
            lblBack.AutoSize = true;
            lblBack.Text     = "Back to Login Screen";
            lblBack.Click   += new EventHandler <SdlDotNet.Widgets.MouseButtonEventArgs>(lblBack_Click);

            optMale           = new RadioButton("optMale");
            optMale.BackColor = Color.Transparent;
            optMale.Font      = Graphics.FontManager.LoadFont("tahoma", 12);
            optMale.Location  = new Point(240, 50);
            optMale.Size      = new System.Drawing.Size(95, 17);
            optMale.Text      = "Male";
            optMale.Checked   = true;

            optFemale           = new RadioButton("optFemale");
            optFemale.BackColor = Color.Transparent;
            optFemale.Font      = Graphics.FontManager.LoadFont("tahoma", 12);
            optFemale.Location  = new Point(240, 70);
            optFemale.Size      = new System.Drawing.Size(95, 17);
            optFemale.Text      = "Female";
            optFemale.Checked   = false;

            this.AddWidget(lblName);
            this.AddWidget(txtName);
            this.AddWidget(lblCreateChar);
            this.AddWidget(lblBack);
            this.AddWidget(optMale);
            this.AddWidget(optFemale);
            this.LoadComplete();
        }
Exemplo n.º 8
0
        public winOptions()
            : base("winOptions")
        {
            this.Windowed                     = true;
            this.ShowInWindowSwitcher         = false;
            this.TitleBar.Text                = "Options";
            this.TitleBar.CloseButton.Visible = false;
            this.Size = new Size(600, 280);
            //this.BackgroundImage = Skins.SkinManager.LoadGui("Options");
            this.Location = DrawingSupport.GetCenter(SdlDotNet.Graphics.Video.Screen.Size, this.Size);

            lblPlayerData          = new Label("lblPlayerData");
            lblPlayerData.Location = new Point(0, 0);
            lblPlayerData.AutoSize = true;
            lblPlayerData.Font     = Graphics.FontManager.LoadFont("PMDCP", 32);
            lblPlayerData.Text     = "Player Data:";

            lblPlayerDataName            = new Label("lblPlayerDataName");
            lblPlayerDataName.Location   = new Point(130, 8);
            lblPlayerDataName.AutoSize   = true;
            lblPlayerDataName.Font       = Graphics.FontManager.LoadFont("PMDCP", 24);
            lblPlayerDataName.Text       = "Name: ";
            lblPlayerDataName.HoverColor = Color.Red;
            lblPlayerDataName.Click     += new EventHandler <MouseButtonEventArgs>(lblPlayerDataName_Click);

            lblPlayerDataDamage            = new Label("lblPlayerDataDamage");
            lblPlayerDataDamage.Location   = new Point(250, 8);
            lblPlayerDataDamage.AutoSize   = true;
            lblPlayerDataDamage.Font       = Graphics.FontManager.LoadFont("PMDCP", 24);
            lblPlayerDataDamage.Text       = "Damage: ";
            lblPlayerDataDamage.HoverColor = Color.Red;
            lblPlayerDataDamage.Click     += new EventHandler <MouseButtonEventArgs>(lblPlayerDataDamage_Click);

            lblPlayerDataMiniHP            = new Label("lblPlayerDataMiniHP");
            lblPlayerDataMiniHP.Location   = new Point(400, 8);
            lblPlayerDataMiniHP.AutoSize   = true;
            lblPlayerDataMiniHP.Font       = Graphics.FontManager.LoadFont("PMDCP", 24);
            lblPlayerDataMiniHP.Text       = "Mini-HP: ";
            lblPlayerDataMiniHP.HoverColor = Color.Red;
            lblPlayerDataMiniHP.Click     += new EventHandler <MouseButtonEventArgs>(lblPlayerDataMiniHP_Click);

            lblPlayerDataAutoSaveSpeed          = new Label("lblPlayerDataAutoSaveSpeed");
            lblPlayerDataAutoSaveSpeed.Location = new Point(130, 32);
            lblPlayerDataAutoSaveSpeed.AutoSize = true;
            lblPlayerDataAutoSaveSpeed.Font     = Graphics.FontManager.LoadFont("PMDCP", 24);
            lblPlayerDataAutoSaveSpeed.Text     = "Auto-Save Speed: ";

            lblLeft            = new Label("lblLeft");
            lblLeft.Location   = new Point(100, 32);
            lblLeft.AutoSize   = true;
            lblLeft.Font       = Graphics.FontManager.LoadFont("PMDCP", 24);
            lblLeft.Text       = "<";
            lblLeft.HoverColor = Color.Red;
            lblLeft.Click     += new EventHandler <MouseButtonEventArgs>(lblLeft_Click);

            lblRight            = new Label("lblRight");
            lblRight.Location   = new Point(300, 32);
            lblRight.AutoSize   = true;
            lblRight.Font       = Graphics.FontManager.LoadFont("PMDCP", 24);
            lblRight.Text       = ">";
            lblRight.HoverColor = Color.Red;
            lblRight.Click     += new EventHandler <MouseButtonEventArgs>(lblRight_Click);

            lblNpcData          = new Label("lblNpcData");
            lblNpcData.Location = new Point(0, 56);
            lblNpcData.AutoSize = true;
            lblNpcData.Font     = Graphics.FontManager.LoadFont("PMDCP", 32);
            lblNpcData.Text     = "NPC Data:";

            lblNpcDataName            = new Label("lblNpcDataName");
            lblNpcDataName.Location   = new Point(130, 64);
            lblNpcDataName.AutoSize   = true;
            lblNpcDataName.Font       = Graphics.FontManager.LoadFont("PMDCP", 24);
            lblNpcDataName.Text       = "Name: ";
            lblNpcDataName.HoverColor = Color.Red;
            lblNpcDataName.Click     += new EventHandler <MouseButtonEventArgs>(lblNpcDataName_Click);

            lblNpcDataDamage            = new Label("lblNpcDataDamage");
            lblNpcDataDamage.Location   = new Point(250, 64);
            lblNpcDataDamage.AutoSize   = true;
            lblNpcDataDamage.Font       = Graphics.FontManager.LoadFont("PMDCP", 24);
            lblNpcDataDamage.Text       = "Damage: ";
            lblNpcDataDamage.HoverColor = Color.Red;
            lblNpcDataDamage.Click     += new EventHandler <MouseButtonEventArgs>(lblNpcDataDamage_Click);

            lblNpcDataMiniHP            = new Label("lblNpcDataMiniHP");
            lblNpcDataMiniHP.Location   = new Point(400, 64);
            lblNpcDataMiniHP.AutoSize   = true;
            lblNpcDataMiniHP.Font       = Graphics.FontManager.LoadFont("PMDCP", 24);
            lblNpcDataMiniHP.Text       = "Mini-HP: ";
            lblNpcDataMiniHP.HoverColor = Color.Red;
            lblNpcDataMiniHP.Click     += new EventHandler <MouseButtonEventArgs>(lblNpcDataMiniHP_Click);

            lblSoundData          = new Label("lblSoundData");
            lblSoundData.Location = new Point(0, 88);
            lblSoundData.AutoSize = true;
            lblSoundData.Font     = Graphics.FontManager.LoadFont("PMDCP", 32);
            lblSoundData.Text     = "Sound Data:";

            lblSoundDataMusic            = new Label("lblSoundDataMusic");
            lblSoundDataMusic.Location   = new Point(130, 96);
            lblSoundDataMusic.AutoSize   = true;
            lblSoundDataMusic.Font       = Graphics.FontManager.LoadFont("PMDCP", 24);
            lblSoundDataMusic.Text       = "Music: ";
            lblSoundDataMusic.HoverColor = Color.Red;
            lblSoundDataMusic.Click     += new EventHandler <MouseButtonEventArgs>(lblSoundDataMusic_Click);

            lblSoundDataSound            = new Label("lblSoundDataSound");
            lblSoundDataSound.Location   = new Point(250, 96);
            lblSoundDataSound.AutoSize   = true;
            lblSoundDataSound.Font       = Graphics.FontManager.LoadFont("PMDCP", 24);
            lblSoundDataSound.Text       = "Sound: ";
            lblSoundDataSound.HoverColor = Color.Red;
            lblSoundDataSound.Click     += new EventHandler <MouseButtonEventArgs>(lblSoundDataSound_Click);

            lblChatData          = new Label("lblChatData");
            lblChatData.Location = new Point(0, 120);
            lblChatData.AutoSize = true;
            lblChatData.Font     = Graphics.FontManager.LoadFont("PMDCP", 32);
            lblChatData.Text     = "Chat Data";

            lblChatDataSpeechBubbles            = new Label("lblChatDataSpeechBubbles");
            lblChatDataSpeechBubbles.Location   = new Point(130, 128);
            lblChatDataSpeechBubbles.AutoSize   = true;
            lblChatDataSpeechBubbles.Font       = Graphics.FontManager.LoadFont("PMDCP", 24);
            lblChatDataSpeechBubbles.Text       = "Speech Bubbles: ";
            lblChatDataSpeechBubbles.HoverColor = Color.Red;
            lblChatDataSpeechBubbles.Click     += new EventHandler <MouseButtonEventArgs>(lblChatDataSpeechBubbles_Click);

            lblChatDataTimeStamps            = new Label("lblChatDataTimeStamps");
            lblChatDataTimeStamps.Location   = new Point(300, 128);
            lblChatDataTimeStamps.AutoSize   = true;
            lblChatDataTimeStamps.Font       = Graphics.FontManager.LoadFont("PMDCP", 24);
            lblChatDataTimeStamps.Text       = "TimeStamps: ";
            lblChatDataTimeStamps.HoverColor = Color.Red;
            lblChatDataTimeStamps.Click     += new EventHandler <MouseButtonEventArgs>(lblChatDataTimeStamps_Click);

            lblChatDataAutoScroll            = new Label("lblChatDataAutoScroll");
            lblChatDataAutoScroll.Location   = new Point(130, 152);
            lblChatDataAutoScroll.AutoSize   = true;
            lblChatDataAutoScroll.Font       = Graphics.FontManager.LoadFont("PMDCP", 24);
            lblChatDataAutoScroll.Text       = "Auto-Scroll: ";
            lblChatDataAutoScroll.HoverColor = Color.Red;
            lblChatDataAutoScroll.Click     += new EventHandler <MouseButtonEventArgs>(lblChatDataAutoScroll_Click);

            lblSave            = new Label("lblSave");
            lblSave.Location   = new Point(480, 170);
            lblSave.AutoSize   = true;
            lblSave.Font       = Graphics.FontManager.LoadFont("PMDCP", 72);
            lblSave.Text       = "Save";
            lblSave.HoverColor = Color.Red;
            lblSave.Click     += new EventHandler <SdlDotNet.Widgets.MouseButtonEventArgs>(lblSave_Click);


            this.AddWidget(lblPlayerData);
            this.AddWidget(lblPlayerDataName);
            this.AddWidget(lblPlayerDataDamage);
            this.AddWidget(lblPlayerDataMiniHP);
            this.AddWidget(lblPlayerDataAutoSaveSpeed);
            this.AddWidget(lblLeft);
            this.AddWidget(lblRight);

            this.AddWidget(lblNpcData);
            this.AddWidget(lblNpcDataName);
            this.AddWidget(lblNpcDataDamage);
            this.AddWidget(lblNpcDataMiniHP);

            this.AddWidget(lblSoundData);
            this.AddWidget(lblSoundDataMusic);
            this.AddWidget(lblSoundDataSound);


            this.AddWidget(lblChatData);
            this.AddWidget(lblChatDataSpeechBubbles);
            this.AddWidget(lblChatDataTimeStamps);
            this.AddWidget(lblChatDataAutoScroll);

            this.AddWidget(lblSave);

            this.LoadComplete();

            tempOptions        = new bool[12];
            tempAutoSaveSpeed  = new int();
            tempAutoSaveSpeed2 = new int();


            for (int i = 0; i < 12; i++)
            {
                CreateTempOption(i);
                ShowOption(i);
            }
        }
Exemplo n.º 9
0
        public winNewAccount()
            : base("winNewAccount")
        {
            this.Windowed                     = true;
            this.ShowInWindowSwitcher         = false;
            this.TitleBar.Text                = "New Account";
            this.TitleBar.CloseButton.Visible = false;
            this.BackgroundImage              = Skins.SkinManager.LoadGui("New Account");
            this.Size     = this.BackgroundImage.Size;
            this.Location = DrawingSupport.GetCenter(SdlDotNet.Graphics.Video.Screen.Size, this.Size);

            lblBack           = new Label("btnBack");
            lblBack.Font      = Graphics.FontManager.LoadFont("PMU", 18);
            lblBack.Location  = new Point(147, 355);
            lblBack.AutoSize  = true;
            lblBack.ForeColor = Color.Black;
            lblBack.Text      = "Back to Login Screen";
            lblBack.Click    += new EventHandler <SdlDotNet.Widgets.MouseButtonEventArgs>(lblBack_Click);

            lblCreateNewAccount           = new Label("lblCreateNewAccount");
            lblCreateNewAccount.Font      = Graphics.FontManager.LoadFont("PMU", 18);
            lblCreateNewAccount.Location  = new Point(23, 200);
            lblCreateNewAccount.AutoSize  = true;
            lblCreateNewAccount.ForeColor = Color.Black;
            lblCreateNewAccount.Text      = "Create New Account";
            lblCreateNewAccount.Click    += new EventHandler <SdlDotNet.Widgets.MouseButtonEventArgs>(lblCreateNewAccount_Click);

            lblAccountName           = new Label("lblAccountName");
            lblAccountName.Font      = Graphics.FontManager.LoadFont("PMU", 18);
            lblAccountName.Location  = new Point(28, 90);
            lblAccountName.AutoSize  = true;
            lblAccountName.ForeColor = Color.Black;
            lblAccountName.Text      = "Desired Account";

            lblPassword           = new Label("lblPassword");
            lblPassword.Font      = Graphics.FontManager.LoadFont("PMU", 18);
            lblPassword.Location  = new Point(28, 122);
            lblPassword.AutoSize  = true;
            lblPassword.ForeColor = Color.Black;
            lblPassword.Text      = "Account Password:"******"lblRetypePassword");
            lblRetypePassword.Font      = Graphics.FontManager.LoadFont("PMU", 18);
            lblRetypePassword.Location  = new Point(28, 154);
            lblRetypePassword.AutoSize  = true;
            lblRetypePassword.ForeColor = Color.Black;
            lblRetypePassword.Text      = "Retype Password:"******"txtAccountName");
            txtAccountName.Size     = new System.Drawing.Size(177, 16);
            txtAccountName.Location = new Point(25, 109);

            txtPassword          = new TextBox("txtPassword");
            txtPassword.Size     = new System.Drawing.Size(177, 16);
            txtPassword.Location = new Point(25, 140);

            txtRetypePassword          = new TextBox("txtRetypePassword");
            txtRetypePassword.Size     = new System.Drawing.Size(177, 16);
            txtRetypePassword.Location = new Point(25, 174);

            this.AddWidget(lblBack);
            this.AddWidget(lblCreateNewAccount);
            this.AddWidget(lblAccountName);
            this.AddWidget(lblPassword);
            this.AddWidget(lblRetypePassword);
            this.AddWidget(txtAccountName);
            this.AddWidget(txtPassword);
            this.AddWidget(txtRetypePassword);

            this.LoadComplete();
        }
Exemplo n.º 10
0
        public winUpdater(UpdateEngine updateEngine)
            : base("winUpdater")
        {
            Windows.WindowSwitcher.UpdaterWindow = this;
            this.updateEngine = updateEngine;
            this.updateEngine.Updater.StatusUpdated               += new EventHandler(Updater_StatusUpdated);
            this.updateEngine.Updater.PackageDownloadStart        += new EventHandler <PMU.Updater.PackageDownloadStartEventArgs>(Updater_PackageDownloadStart);
            this.updateEngine.Updater.PackageInstallationComplete += new EventHandler <PMU.Updater.PackageInstallationCompleteEventArgs>(Updater_PackageInstallationComplete);
            this.updateEngine.Updater.InstallationComplete        += new EventHandler(Updater_InstallationComplete);
            this.Windowed      = true;
            this.TitleBar.Text = "Updater";
            this.TitleBar.Font = Graphics.FontManager.LoadFont("tahoma", 10);

            this.Size               = new Size(400, 400);
            this.BackColor          = Color.White;
            this.Location           = DrawingSupport.GetCenter(WindowManager.ScreenSize, this.Size);
            lblUpdateFound          = new Label("lblUpdateFound");
            lblUpdateFound.Location = new Point(10, 300);
            lblUpdateFound.AutoSize = true;
            lblUpdateFound.Font     = Graphics.FontManager.LoadFont("tahoma", 12);
            lblUpdateFound.Text     = "An update has been found! Would you like to install this update?";

            packageScroller          = new PackageScroller("packageScroller");
            packageScroller.Location = new Point(0, 0);

            for (int i = 0; i < updateEngine.LastCheckResult.PackagesToUpdate.Count; i++)
            {
                packageScroller.AddPackage(updateEngine.LastCheckResult.PackagesToUpdate[i]);
            }
            packageScroller.PackageButtonSelected += new EventHandler <PackageButtonSelectedEventArgs>(packageScroller_PackageButtonSelected);

            lblUpdateInfo          = new Label("lblUpdateInfo");
            lblUpdateInfo.Size     = new Size(188, 300);
            lblUpdateInfo.Location = new Point(212, 0);
            lblUpdateInfo.WordWrap = true;
            lblUpdateInfo.Font     = Graphics.FontManager.LoadFont("tahoma", 12);

            lblStatus          = new Label("lblStatus");
            lblStatus.Location = new Point(lblUpdateFound.Location.X, lblUpdateFound.Location.Y + lblUpdateFound.Height + 5);
            lblStatus.AutoSize = true;
            lblStatus.Font     = Graphics.FontManager.LoadFont("tahoma", 12);
            lblStatus.Visible  = false;

            lblStatus          = new Label("lblStatus");
            lblStatus.Location = new Point(lblUpdateFound.Location.X, lblUpdateFound.Location.Y + lblUpdateFound.Height + 5);
            lblStatus.AutoSize = true;
            lblStatus.Font     = Graphics.FontManager.LoadFont("tahoma", 12);
            lblStatus.Visible  = false;

            pgbDownloadProgress           = new ProgressBar("pgbDownloadProgress");
            pgbDownloadProgress.Location  = new Point(lblUpdateFound.Location.X, lblUpdateFound.Location.Y + lblUpdateFound.Height + 5);
            pgbDownloadProgress.Size      = new System.Drawing.Size(this.Width - (lblUpdateFound.Location.X * 2), 20);
            pgbDownloadProgress.Font      = Graphics.FontManager.LoadFont("tahoma", 12);
            pgbDownloadProgress.Visible   = false;
            pgbDownloadProgress.TextStyle = ProgressBarTextStyle.Percent;

            btnAccept          = new Button("btnAccept");
            btnAccept.Text     = "Yes";
            btnAccept.Font     = Graphics.FontManager.LoadFont("tahoma", 12);
            btnAccept.Size     = new Size(100, 20);
            btnAccept.Location = new Point(lblUpdateFound.Location.X, lblUpdateFound.Location.Y + lblUpdateFound.Height + 5);
            btnAccept.Click   += new EventHandler <MouseButtonEventArgs>(btnAccept_Click);

            btnDecline          = new Button("btnDecline");
            btnDecline.Text     = "No";
            btnDecline.Font     = Graphics.FontManager.LoadFont("tahoma", 12);
            btnDecline.Size     = new Size(100, 20);
            btnDecline.Location = new Point(lblUpdateFound.Location.X + btnAccept.Width + 5, lblUpdateFound.Location.Y + lblUpdateFound.Height + 5);
            btnDecline.Click   += new EventHandler <MouseButtonEventArgs>(btnDecline_Click);

            tmrRestart          = new SdlDotNet.Widgets.Timer("restartTimer");
            tmrRestart.Interval = 1000;
            tmrRestart.Elapsed += new EventHandler(tmrRestart_Elapsed);

            this.AddWidget(packageScroller);
            this.AddWidget(lblUpdateInfo);
            this.AddWidget(lblUpdateFound);
            this.AddWidget(btnAccept);
            this.AddWidget(btnDecline);
            this.AddWidget(lblStatus);
            this.AddWidget(pgbDownloadProgress);
            this.AddWidget(tmrRestart);

            this.LoadComplete();

            packageScroller.ScrollToButton(0);
            LoadPackageInfo(packageScroller.Buttons[0]);
        }
Exemplo n.º 11
0
        public winScreenshotOptions()
            : base("winScreenshotOptions")
        {
            this.Windowed                     = true;
            this.ShowInWindowSwitcher         = false;
            this.TitleBar.Text                = "Screenshot Options";
            this.TitleBar.Font                = Graphics.FontManager.LoadFont("tahoma", 12);
            this.TitleBar.CloseButton.Visible = false;
            this.AlwaysOnTop                  = true;
            this.BackColor                    = Color.White;
            this.BorderStyle                  = SdlDotNet.Widgets.BorderStyle.FixedSingle;
            this.BorderWidth                  = 2;
            this.BorderColor                  = Color.Black;
            this.Size     = new Size(200, 150);
            this.Location = DrawingSupport.GetCenter(SdlDotNet.Graphics.Video.Screen.Size, this.Size);

            chkCaptureRegion           = new CheckBox("chkCaptureRegion");
            chkCaptureRegion.BackColor = Color.Transparent;
            chkCaptureRegion.Location  = new Point(5, 5);
            chkCaptureRegion.Font      = Graphics.FontManager.LoadFont("tahoma", 12);
            chkCaptureRegion.Size      = new Size(200, 15);
            chkCaptureRegion.Text      = "Only capture visible area";

            chkCaptureAttributes           = new CheckBox("chkCaptureAttributes");
            chkCaptureAttributes.BackColor = Color.Transparent;
            chkCaptureAttributes.Location  = new Point(5, 20);
            chkCaptureAttributes.Font      = Graphics.FontManager.LoadFont("tahoma", 12);
            chkCaptureAttributes.Size      = new Size(200, 15);
            chkCaptureAttributes.Text      = "Capture Attributes";
            chkCaptureAttributes.Checked   = true;

            chkCaptureMapGrid           = new CheckBox("chkCaptureMapGrid");
            chkCaptureMapGrid.BackColor = Color.Transparent;
            chkCaptureMapGrid.Location  = new Point(5, 35);
            chkCaptureMapGrid.Font      = Graphics.FontManager.LoadFont("tahoma", 12);
            chkCaptureMapGrid.Size      = new Size(200, 15);
            chkCaptureMapGrid.Text      = "Capture Map Grid";
            chkCaptureMapGrid.Checked   = true;

            btnTakeScreenshot          = new Button("btnTakeScreenshot");
            btnTakeScreenshot.Size     = new Size(70, 20);
            btnTakeScreenshot.Location = new Point(5, 70);
            btnTakeScreenshot.Font     = Graphics.FontManager.LoadFont("tahoma", 12);
            btnTakeScreenshot.Text     = "Save!";
            btnTakeScreenshot.Click   += new EventHandler <SdlDotNet.Widgets.MouseButtonEventArgs>(btnTakeScreenshot_Click);

            btnCancel          = new Button("btnCancel");
            btnCancel.Size     = new Size(70, 20);
            btnCancel.Location = new Point(80, 70);
            btnCancel.Font     = Graphics.FontManager.LoadFont("tahoma", 12);
            btnCancel.Text     = "Cancel";
            btnCancel.Click   += new EventHandler <SdlDotNet.Widgets.MouseButtonEventArgs>(btnCancel_Click);

            lblSaved          = new Label("lblSaved");
            lblSaved.AutoSize = true;
            lblSaved.Font     = Graphics.FontManager.LoadFont("tahoma", 12);
            lblSaved.Location = new Point(5, btnTakeScreenshot.Y + btnTakeScreenshot.Height + 5);
            lblSaved.Text     = "Saved!";
            lblSaved.Visible  = false;

            tmrHideInfo          = new Timer("tmrHideInfo");
            tmrHideInfo.Interval = 2000;
            tmrHideInfo.Elapsed += new EventHandler(tmrHideInfo_Elapsed);

            this.AddWidget(chkCaptureRegion);
            this.AddWidget(chkCaptureAttributes);
            this.AddWidget(chkCaptureMapGrid);
            this.AddWidget(btnTakeScreenshot);
            this.AddWidget(btnCancel);
            this.AddWidget(lblSaved);
            this.AddWidget(tmrHideInfo);

            this.LoadComplete();
        }
Exemplo n.º 12
0
 private void RecalculatePositions()
 {
     lblCounter.Size       = new Size(containerSize.Width - 10, 30);
     btnIncrement.Location = new Point(DrawingSupport.GetCenter(containerSize, btnIncrement.Size).X - (btnIncrement.Width / 2), lblCounter.Y + lblCounter.Height + 5);
     btnDecrement.Location = new Point(DrawingSupport.GetCenter(containerSize, btnDecrement.Size).X + (btnDecrement.Width / 2), lblCounter.Y + lblCounter.Height + 5);
 }
Exemplo n.º 13
0
        public winCredits()
            : base("WinCredits")
        {
            this.Windowed                     = true;
            this.ShowInWindowSwitcher         = false;
            this.TitleBar.Text                = "Credits";
            this.TitleBar.CloseButton.Visible = false;
            //this.BackgroundImage = Skins.SkinManager.LoadGui("Credits");
            //this.Size = this.BackgroundImage.Size;
            this.BackColor = Color.White;
            this.Size      = new Size(400, 400);
            this.Location  = DrawingSupport.GetCenter(SdlDotNet.Graphics.Video.Screen.Size, this.Size);

            lblTeam           = new Label("lblTeam");
            lblTeam.Font      = Graphics.FontManager.LoadFont("PMU", 30);
            lblTeam.AutoSize  = true;
            lblTeam.Location  = new Point(30, 20);
            lblTeam.Text      = "Pokemon Journey Online Staff Team!";
            lblTeam.BackColor = Color.GreenYellow;

            lblBack           = new Label("lblBack");
            lblBack.Font      = Graphics.FontManager.LoadFont("PMU", 20);
            lblBack.AutoSize  = true;
            lblBack.Location  = new Point(0, 330);
            lblBack.Text      = "Return to Login Screen";
            lblBack.BackColor = Color.Blue;
            lblBack.Click    += new EventHandler <MouseButtonEventArgs>(lblBack_Click);

            lblProgramming           = new Label("lblProgramming");
            lblProgramming.Font      = Graphics.FontManager.LoadFont("PMU", 25);
            lblProgramming.AutoSize  = true;
            lblProgramming.Location  = new Point(0, 80);
            lblProgramming.Text      = "Programming:";
            lblProgramming.BackColor = Color.Silver;

            lblPikablu           = new Label("lblPikablu");
            lblPikablu.Font      = Graphics.FontManager.LoadFont("PMU", 20);
            lblPikablu.AutoSize  = true;
            lblPikablu.Location  = new Point(120, 85);
            lblPikablu.Text      = "Pikablu";
            lblPikablu.BackColor = Color.Yellow;

            lblBlaze           = new Label("lblBlaze");
            lblBlaze.Font      = Graphics.FontManager.LoadFont("PMU", 20);
            lblBlaze.AutoSize  = true;
            lblBlaze.Location  = new Point(175, 85);
            lblBlaze.Text      = "Blaze";
            lblBlaze.BackColor = Color.Red;
            // TODO: Add Forecolors for the Credits.
            //lblDarkmazer.BackColor = Color.Black; -For the Darkness, as always.
            //lblDarkmazer.ForeColor = Color.White; -Even in the deepest of darkness, there's always light...


            lblGraphics           = new Label("lblGraphics");
            lblGraphics.Font      = Graphics.FontManager.LoadFont("PMU", 25);
            lblGraphics.AutoSize  = true;
            lblGraphics.Location  = new Point(0, 140);
            lblGraphics.Text      = "Graphics:";
            lblGraphics.BackColor = Color.Brown;

            lblLossetta           = new Label("lblLossetta");
            lblLossetta.Font      = Graphics.FontManager.LoadFont("PMU", 20);
            lblLossetta.AutoSize  = true;
            lblLossetta.Location  = new Point(90, 145);
            lblLossetta.Text      = "Lossetta";
            lblLossetta.BackColor = Color.SkyBlue;

            lblZach           = new Label("lblZach");
            lblZach.Font      = Graphics.FontManager.LoadFont("PMU", 20);
            lblZach.AutoSize  = true;
            lblZach.Location  = new Point(130, 185);
            lblZach.Text      = "Zach";
            lblZach.BackColor = Color.Purple;
            //lblZach.BackColor = Color.Black; -Shiny, shiny!
            //lblZach.ForeColor = Color.Silver; -Isn't Silver shiny though? Doesn't it count?


            this.AddWidget(lblTeam);
            this.AddWidget(lblBack);
            this.AddWidget(lblProgramming);
            this.AddWidget(lblPikablu);
            this.AddWidget(lblBlaze);
            this.AddWidget(lblGraphics);
            this.AddWidget(lblLossetta);
            this.AddWidget(lblZach);
            this.LoadComplete();
        }