public winAccountSettings() : base("winAccountSettings") { this.Windowed = true; this.ShowInWindowSwitcher = false; this.TitleBar.Text = "Account Settings"; this.TitleBar.CloseButton.Visible = false; this.Size = new Size(260, 200); //this.BackgroundImage = Skins.SkinManager.LoadGui("Account Settings"); this.Location = new Point(DrawingSupport.GetCenter(SdlDotNet.Graphics.Video.Screen.Size, this.Size).X, 5); btnChangePassword = new Button("btnChangePassword"); btnChangePassword.Font = Graphics.FontManager.LoadFont("PMDCP", 24); btnChangePassword.Text = "Change Password"; btnChangePassword.Location = new Point(65, 55); btnChangePassword.Size = new System.Drawing.Size(130, 32); btnChangePassword.Click += new EventHandler <MouseButtonEventArgs>(btnChangePassword_Click); lblBack = new Label("lblBack"); lblBack.Font = Graphics.FontManager.LoadFont("PMDCP", 24); lblBack.Text = "Return to Login Screen"; lblBack.Location = new Point(45, 100); lblBack.AutoSize = true; lblBack.ForeColor = Color.Black; lblBack.Click += new EventHandler <MouseButtonEventArgs>(lblBack_Click); this.AddWidget(btnChangePassword); this.AddWidget(lblBack); this.LoadComplete(); }
public winDeleteAccount() : base("winDeleteAccount") { this.Windowed = true; this.ShowInWindowSwitcher = false; this.TitleBar.Text = "Delete Account"; this.TitleBar.CloseButton.Visible = false; this.BackgroundImage = Skins.SkinManager.LoadGui("Delete Account"); this.Size = this.BackgroundImage.Size; this.Location = DrawingSupport.GetCenter(SdlDotNet.Graphics.Video.Screen.Size, this.Size); lblBack = new Label("lblBack"); lblBack.Font = Graphics.FontManager.LoadFont("PMDCP", 18); lblBack.Location = new Point(140, 355); lblBack.AutoSize = true; lblBack.ForeColor = Color.Black; lblBack.Text = "Back to Login Screen"; lblBack.Click += new EventHandler <SdlDotNet.Widgets.MouseButtonEventArgs>(lblBack_Click); lblName = new Label("lblName"); lblName.Font = Graphics.FontManager.LoadFont("PMDCP", 18); lblName.Location = new Point(28, 97); lblName.AutoSize = true; lblName.ForeColor = Color.Black; lblName.Text = "Account Name"; lblPassword = new Label("lblPassword"); lblPassword.Font = Graphics.FontManager.LoadFont("PMDCP", 18); lblPassword.Location = new Point(32, 143); lblPassword.AutoSize = true; lblPassword.ForeColor = Color.Black; lblPassword.Text = "Password"; lblDelete = new Label("lblDelete"); lblDelete.Font = Graphics.FontManager.LoadFont("PMDCP", 18); lblDelete.Location = new Point(35, 190); lblDelete.AutoSize = true; lblDelete.ForeColor = Color.Black; lblDelete.Text = "Delete Account"; lblDelete.Click += new EventHandler <MouseButtonEventArgs>(lblDelete_Click); txtName = new TextBox("txtName"); txtName.Size = new System.Drawing.Size(165, 16); txtName.Location = new Point(30, 118); txtPassword = new TextBox("txtPassword"); txtPassword.Size = new System.Drawing.Size(165, 16); txtPassword.Location = new Point(30, 164); this.AddWidget(lblBack); this.AddWidget(lblName); this.AddWidget(lblPassword); this.AddWidget(lblDelete); this.AddWidget(txtName); this.AddWidget(txtPassword); this.LoadComplete(); }
public winSkinSelector() : base("winSkinSelector") { this.Windowed = true; this.Size = new Size(390, 300); this.Location = DrawingSupport.GetCenter(SdlDotNet.Graphics.Video.Screen.Size, this.Size); this.TitleBar.BackgroundImageSizeMode = ImageSizeMode.StretchImage; this.TitleBar.BackgroundImage = SkinManager.LoadGuiElement("Skin Selector", "titlebar.png"); this.TitleBar.CloseButton.Visible = false; this.Text = "Skin Selector"; this.BackgroundImageSizeMode = ImageSizeMode.StretchImage; this.BackgroundImage = SkinManager.LoadGui("Skin Selector"); picSkinPreview = new PictureBox("picSkinPreview"); picSkinPreview.SizeMode = ImageSizeMode.StretchImage; picSkinPreview.Size = new System.Drawing.Size(242, 182); picSkinPreview.Location = new Point(DrawingSupport.GetCenter(this.Width, picSkinPreview.Width), 10); picSkinPreview.BackColor = Color.Green; picSkinPreview.BorderStyle = SdlDotNet.Widgets.BorderStyle.FixedSingle; picSkinPreview.BorderColor = Color.Black; picSkinPreview.BorderWidth = 1; cmbSkinSelect = new ComboBox("cmbSkinSelect"); cmbSkinSelect.Location = new Point(10, 200); cmbSkinSelect.Size = new Size(this.Width - 20, 30); cmbSkinSelect.ItemSelected += new EventHandler(cmbSkinSelect_ItemSelected); btnSave = new Button("btnSave"); btnSave.Size = new Size(100, 30); btnSave.Location = new Point(10, 240); btnSave.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 12); btnSave.Text = "Switch Skins!"; btnSave.Click += new EventHandler <MouseButtonEventArgs>(btnSave_Click); btnFindSkin = new Button("btnFindSkin"); btnFindSkin.Size = new System.Drawing.Size(100, 30); btnFindSkin.Location = new Point(110, 240); btnFindSkin.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 12); btnFindSkin.Text = "Find Skin"; btnFindSkin.Click += new EventHandler <MouseButtonEventArgs>(btnFindSkin_Click); btnCancel = new Button("btnCancel"); btnCancel.Size = new Size(100, 30); btnCancel.Location = new Point(210, 240); btnCancel.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 12); btnCancel.Text = "Cancel"; btnCancel.Click += new EventHandler <MouseButtonEventArgs>(btnCancel_Click); this.AddWidget(picSkinPreview); this.AddWidget(cmbSkinSelect); this.AddWidget(btnSave); this.AddWidget(btnFindSkin); this.AddWidget(btnCancel); PopulateSkinList(); }
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("PMDCP", 30); lblTeam.AutoSize = true; lblTeam.Location = new Point(30, 20); lblTeam.Text = "The PMDCP Team!"; lblTeam.BackColor = Color.GreenYellow; lblBack = new Label("lblBack"); lblBack.Font = Graphics.FontManager.LoadFont("PMDCP", 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("PMDCP", 25); lblProgramming.AutoSize = true; lblProgramming.Location = new Point(0, 80); lblProgramming.Text = "Everything:"; lblProgramming.BackColor = Color.Silver; lblPikablu = new Label("lblPikablu"); lblPikablu.Font = Graphics.FontManager.LoadFont("PMDCP", 20); lblPikablu.AutoSize = true; lblPikablu.Location = new Point(120, 85); lblPikablu.Text = "Visit http://mdcp.wikia.com for a full list!"; lblPikablu.BackColor = Color.Yellow; this.AddWidget(lblTeam); this.AddWidget(lblBack); this.AddWidget(lblProgramming); this.AddWidget(lblPikablu); this.LoadComplete(); }
public winWelcome(Action postWelcomeLoad) : base("winWelcome") { this.postWelcomeLoad = postWelcomeLoad; this.Windowed = true; this.ShowInWindowSwitcher = false; this.TitleBar.Text = "Welcome"; 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, 225); this.Location = DrawingSupport.GetCenter(SdlDotNet.Graphics.Video.Screen.Size, this.Size); lblWelcome = new Label("lblWelcome"); lblWelcome.Font = Graphics.FontManager.LoadFont("PMDCP", 22); lblWelcome.AutoSize = true; lblWelcome.Location = new Point(30, 20); lblWelcome.Text = $"Welcome to {Constants.GameName}!\n\nTo get started, fill in the settings below:"; lblServerIP = new Label("lblServerIP"); lblServerIP.Font = Graphics.FontManager.LoadFont("PMDCP", 18); lblServerIP.AutoSize = true; lblServerIP.Location = new Point(30, 100); lblServerIP.Text = "Server:"; txtServerIP = new TextBox("txtServerIP"); txtServerIP.Font = Graphics.FontManager.LoadFont("PMDCP", 18); txtServerIP.Size = new Size(300, 20); txtServerIP.Location = new Point(40, 120); btnStart = new Button("btnStart"); btnStart.Font = Graphics.FontManager.LoadFont("PMDCP", 18); btnStart.Text = "Start"; btnStart.Size = new Size(100, 30); btnStart.Location = new Point(DrawingSupport.GetCenter(this.Size, btnStart.Size).X, 160); btnStart.Click += BtnStart_Click; this.AddWidget(lblWelcome); this.AddWidget(lblServerIP); this.AddWidget(txtServerIP); this.AddWidget(btnStart); }
public SpokenTextMenu(string name, Size storyBounds) : base(name) { this.Size = new System.Drawing.Size(storyBounds.Width - 10, 100); this.Location = new Point(5, storyBounds.Height - this.Height); lblText = new Label("lblText"); lblText.BackColor = Color.Transparent; lblText.ForeColor = Color.WhiteSmoke; lblText.AutoSize = false; lblText.Font = Graphics.FontManager.LoadFont("PMDCP", 24); lblText.Location = new Point(15, 10); lblText.Size = new System.Drawing.Size(this.WidgetPanel.Width - lblText.Location.X, this.WidgetPanel.Height - lblText.Location.Y); picSpeaker = new PictureBox("picSpeaker"); picSpeaker.Size = new Size(40, 40); picSpeaker.Location = new Point(10, DrawingSupport.GetCenter(WidgetPanel.Height, 40)); picSpeaker.BorderWidth = 1; picSpeaker.BorderStyle = SdlDotNet.Widgets.BorderStyle.FixedSingle; this.WidgetPanel.AddWidget(lblText); this.WidgetPanel.AddWidget(picSpeaker); }
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]); }
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", 32); 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(); }
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", 32); 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", 32); 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", 32); 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", 32); lblPlayerDataAutoSaveSpeed.Text = "Auto-Save Speed: "; lblLeft = new Label("lblLeft"); lblLeft.Location = new Point(100, 32); lblLeft.AutoSize = true; lblLeft.Font = Graphics.FontManager.LoadFont("PMDCP", 32); lblLeft.Text = "<"; lblLeft.HoverColor = Color.Red; lblLeft.Click += new EventHandler <MouseButtonEventArgs>(lblLeft_Click); lblRight = new Label("lblRight"); lblRight.Location = new Point(330, 32); lblRight.AutoSize = true; lblRight.Font = Graphics.FontManager.LoadFont("PMDCP", 32); 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", 32); 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", 32); 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", 32); 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", 32); 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", 32); 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", 32); lblChatDataSpeechBubbles.Text = "Speech Bubbles: "; lblChatDataSpeechBubbles.HoverColor = Color.Red; lblChatDataSpeechBubbles.Click += new EventHandler <MouseButtonEventArgs>(lblChatDataSpeechBubbles_Click); lblChatDataTimeStamps = new Label("lblChatDataTimeStamps"); lblChatDataTimeStamps.Location = new Point(400, 128); lblChatDataTimeStamps.AutoSize = true; lblChatDataTimeStamps.Font = Graphics.FontManager.LoadFont("PMDCP", 32); lblChatDataTimeStamps.Text = "TimeStamps: "; lblChatDataTimeStamps.HoverColor = Color.Red; lblChatDataTimeStamps.Click += new EventHandler <MouseButtonEventArgs>(lblChatDataTimeStamps_Click); lblChatDataAutoScroll = new Label("lblChatDataAutoScroll"); lblChatDataAutoScroll.Location = new Point(130, 155); lblChatDataAutoScroll.AutoSize = true; lblChatDataAutoScroll.Font = Graphics.FontManager.LoadFont("PMDCP", 32); 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); } }
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("PMDCP", 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("PMDCP", 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("PMDCP", 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(); }
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); }
public winLogin() : base("winLogin") { this.Windowed = true; this.ShowInWindowSwitcher = false; this.Size = new Size(500, 150); this.Location = new Point(DrawingSupport.GetCenter(SdlDotNet.Graphics.Video.Screen.Size, this.Size).X, 5); //this.TitleBar.Text = "Login"; this.TitleBar.CloseButton.Visible = false; this.TitleBar.BackgroundImage = SkinManager.LoadGuiElement("Login Menu", "titlebar.png"); this.BackgroundImageSizeMode = ImageSizeMode.StretchImage; this.BackgroundImage = SkinManager.LoadGui("Login Menu"); btnLogin = new Button("btnLogin"); btnLogin.Location = new Point(360, 27); btnLogin.Size = new System.Drawing.Size(134, 32); btnLogin.BorderStyle = SdlDotNet.Widgets.BorderStyle.None; btnLogin.BackColor = Color.Transparent; btnLogin.BackgroundImage = SkinManager.LoadGuiElement("Login Menu", "buttons/login.png"); btnLogin.HighlightType = HighlightType.Image; btnLogin.HighlightSurface = SkinManager.LoadGuiElement("Login Menu", "buttons/login-h.png"); btnLogin.Click += new EventHandler <SdlDotNet.Widgets.MouseButtonEventArgs>(btnLogin_Click); lblUsername = new Label("lblUsername"); lblUsername.Font = Graphics.FontManager.LoadFont("Tahoma", 16); lblUsername.Text = "Username"; lblUsername.AutoSize = true; lblUsername.Location = new Point(30, 30); lblPassword = new Label("lblPassword"); lblPassword.Font = Graphics.FontManager.LoadFont("Tahoma", 16); lblPassword.Text = "Password"; lblPassword.AutoSize = true; lblPassword.Location = new Point(30, 60); txtUsername = new TextBox("txtUsername"); txtUsername.Size = new System.Drawing.Size(180, 16); txtUsername.Location = new Point(130, 30); txtUsername.Text = IO.Options.SavedAccount; txtPassword = new TextBox("txtPassword"); txtPassword.Location = new Point(130, 60); txtPassword.Size = new System.Drawing.Size(180, 16); txtPassword.Text = IO.Options.SavedPassword; txtPassword.PasswordChar = '*'; chkSavePassword = new CheckBox("chkSavePassword"); chkSavePassword.Text = "Save Password?"; chkSavePassword.Size = new System.Drawing.Size(200, 16); chkSavePassword.Location = new Point(130, 80); chkSavePassword.BackColor = Color.Transparent; if (!string.IsNullOrEmpty(IO.Options.SavedPassword)) { chkSavePassword.Checked = true; } btnClear = new Button("btnClear"); btnClear.Location = new Point(360, 59); btnClear.Size = new System.Drawing.Size(134, 32); btnClear.BorderStyle = SdlDotNet.Widgets.BorderStyle.None; btnClear.BackColor = Color.Transparent; btnClear.BackgroundImage = SkinManager.LoadGuiElement("Login Menu", "buttons/clear.png"); btnClear.HighlightType = HighlightType.Image; btnClear.HighlightSurface = SkinManager.LoadGuiElement("Login Menu", "buttons/clear-h.png"); btnClear.Click += new EventHandler <SdlDotNet.Widgets.MouseButtonEventArgs>(btnClear_Click); lblServerStatus = new Label("lblServerStatus"); lblServerStatus.AntiAlias = true; lblServerStatus.Font = Graphics.FontManager.LoadFont("tahoma", 10); lblServerStatus.ForeColor = Color.Turquoise; lblServerStatus.AutoSize = true; lblServerStatus.Text = "Checking..."; lblServerStatus.Location = new Point(90, 107); tmrServerChecker = new Timer("tmrServerChecker"); tmrServerChecker.Interval = 500; tmrServerChecker.Name = "serverChecker"; tmrServerChecker.Elapsed += new EventHandler(tmrServerChecker_Elapsed); this.AddWidget(lblUsername); this.AddWidget(lblPassword); this.AddWidget(btnLogin); this.AddWidget(txtPassword); this.AddWidget(txtUsername); this.AddWidget(chkSavePassword); this.AddWidget(btnClear); this.AddWidget(lblServerStatus); this.AddWidget(tmrServerChecker); tmrServerChecker.Start(); }
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(); }
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(); }
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(); }
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); }
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]); }
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(); }
public winOptions2() : base("winOptions") { this.Windowed = true; this.ShowInWindowSwitcher = false; this.TitleBar.Text = "Options"; this.TitleBar.CloseButton.Visible = false; this.BackColor = Color.Blue; //this.BackgroundImage = Skins.SkinManager.LoadGui("Options"); this.Size = new Size(280, 390); this.Location = DrawingSupport.GetCenter(SdlDotNet.Graphics.Video.Screen.Size, this.Size); itemPicker = new Widgets.MenuItemPicker("itemPicker"); itemPicker.Location = new Point(30, 83); lblOptions = new Label("lblOptions"); lblOptions.Location = new Point(20, 0); lblOptions.AutoSize = true; lblOptions.Font = Graphics.FontManager.LoadFont("PMU", 48); lblOptions.Text = "Options"; lblPlayerData = new Label("lblPlayerData"); lblPlayerData.Location = new Point(30, 48); lblPlayerData.AutoSize = true; lblPlayerData.Font = Graphics.FontManager.LoadFont("PMU", 32); lblPlayerData.Text = "Player Data"; lblPlayerDataName = new Label("lblPlayerDataName"); lblPlayerDataName.Location = new Point(40, 78); lblPlayerDataName.AutoSize = true; lblPlayerDataName.Font = Graphics.FontManager.LoadFont("PMU", 16); lblPlayerDataName.Text = "Name: "; lblPlayerDataName.HoverColor = Color.Red; lblPlayerDataDamage = new Label("lblPlayerDataDamage"); lblPlayerDataDamage.Location = new Point(40, 92); lblPlayerDataDamage.AutoSize = true; lblPlayerDataDamage.Font = Graphics.FontManager.LoadFont("PMU", 16); lblPlayerDataDamage.Text = "Damage: "; lblPlayerDataDamage.HoverColor = Color.Red; lblPlayerDataMiniHP = new Label("lblPlayerDataMiniHP"); lblPlayerDataMiniHP.Location = new Point(40, 106); lblPlayerDataMiniHP.AutoSize = true; lblPlayerDataMiniHP.Font = Graphics.FontManager.LoadFont("PMU", 16); lblPlayerDataMiniHP.Text = "Mini-HP: "; lblPlayerDataMiniHP.HoverColor = Color.Red; lblPlayerDataAutoSaveSpeed = new Label("lblPlayerDataAutoSaveSpeed"); lblPlayerDataAutoSaveSpeed.Location = new Point(40, 120); lblPlayerDataAutoSaveSpeed.AutoSize = true; lblPlayerDataAutoSaveSpeed.Font = Graphics.FontManager.LoadFont("PMU", 16); lblPlayerDataAutoSaveSpeed.Text = "Auto-Save Speed: "; lblPlayerDataAutoSaveSpeed.HoverColor = Color.Red; lblNpcData = new Label("lblNpcData"); lblNpcData.Location = new Point(30, 130); lblNpcData.AutoSize = true; lblNpcData.Font = Graphics.FontManager.LoadFont("PMU", 32); lblNpcData.Text = "NPC Data"; lblNpcDataName = new Label("lblNpcDataName"); lblNpcDataName.Location = new Point(40, 160); lblNpcDataName.AutoSize = true; lblNpcDataName.Font = Graphics.FontManager.LoadFont("PMU", 16); lblNpcDataName.Text = "Name: "; lblNpcDataName.HoverColor = Color.Red; lblNpcDataDamage = new Label("lblNpcDataDamage"); lblNpcDataDamage.Location = new Point(40, 174); lblNpcDataDamage.AutoSize = true; lblNpcDataDamage.Font = Graphics.FontManager.LoadFont("PMU", 16); lblNpcDataDamage.Text = "Damage: "; lblNpcDataDamage.HoverColor = Color.Red; lblNpcDataMiniHP = new Label("lblNpcDataMiniHP"); lblNpcDataMiniHP.Location = new Point(40, 188); lblNpcDataMiniHP.AutoSize = true; lblNpcDataMiniHP.Font = Graphics.FontManager.LoadFont("PMU", 16); lblNpcDataMiniHP.Text = "Mini-HP: "; lblNpcDataMiniHP.HoverColor = Color.Red; lblSoundData = new Label("lblSoundData"); lblSoundData.Location = new Point(30, 198); lblSoundData.AutoSize = true; lblSoundData.Font = Graphics.FontManager.LoadFont("PMU", 32); lblSoundData.Text = "Sound Data"; lblSoundDataMusic = new Label("lblSoundDataMusic"); lblSoundDataMusic.Location = new Point(40, 228); lblSoundDataMusic.AutoSize = true; lblSoundDataMusic.Font = Graphics.FontManager.LoadFont("PMU", 16); lblSoundDataMusic.Text = "Music: "; lblSoundDataMusic.HoverColor = Color.Red; lblSoundDataSound = new Label("lblSoundDataSound"); lblSoundDataSound.Location = new Point(40, 242); lblSoundDataSound.AutoSize = true; lblSoundDataSound.Font = Graphics.FontManager.LoadFont("PMU", 16); lblSoundDataSound.Text = "Sound: "; lblSoundDataSound.HoverColor = Color.Red; lblChatData = new Label("lblChatData"); lblChatData.Location = new Point(30, 252); lblChatData.AutoSize = true; lblChatData.Font = Graphics.FontManager.LoadFont("PMU", 32); lblChatData.Text = "Chat Data"; lblChatDataSpeechBubbles = new Label("lblChatDataSpeechBubbles"); lblChatDataSpeechBubbles.Location = new Point(40, 282); lblChatDataSpeechBubbles.AutoSize = true; lblChatDataSpeechBubbles.Font = Graphics.FontManager.LoadFont("PMU", 16); lblChatDataSpeechBubbles.Text = "Speech Bubbles: "; lblChatDataSpeechBubbles.HoverColor = Color.Red; lblChatDataTimeStamps = new Label("lblChatDataTimeStamps"); lblChatDataTimeStamps.Location = new Point(40, 296); lblChatDataTimeStamps.AutoSize = true; lblChatDataTimeStamps.Font = Graphics.FontManager.LoadFont("PMU", 16); lblChatDataTimeStamps.Text = "TimeStamps: "; lblChatDataTimeStamps.HoverColor = Color.Red; lblChatDataAutoScroll = new Label("lblChatDataAutoScroll"); lblChatDataAutoScroll.Location = new Point(40, 310); lblChatDataAutoScroll.AutoSize = true; lblChatDataAutoScroll.Font = Graphics.FontManager.LoadFont("PMU", 16); lblChatDataAutoScroll.Text = "Auto-Scroll: "; lblChatDataAutoScroll.HoverColor = Color.Red; lblSave = new Label("lblSave"); lblSave.Location = new Point(30, 330); lblSave.AutoSize = true; lblSave.Font = Graphics.FontManager.LoadFont("PMU", 16); lblSave.Text = "Save"; lblSave.HoverColor = Color.Red; lblSave.Click += new EventHandler <SdlDotNet.Widgets.MouseButtonEventArgs>(lblSave_Click); this.AddWidget(itemPicker); this.AddWidget(lblOptions); this.AddWidget(lblPlayerData); this.AddWidget(lblPlayerDataName); this.AddWidget(lblPlayerDataDamage); this.AddWidget(lblPlayerDataMiniHP); this.AddWidget(lblPlayerDataAutoSaveSpeed); 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); tempOptions = new bool[12]; tempAutoSaveSpeed = new int(); for (int i = 0; i < 12; i++) { CreateTempOption(i); ShowOption(i); } }
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(); }