Fix background image tiling and ensure options form is centered.

This commit is contained in:
Nick Blakely 2020-08-16 15:48:51 -07:00
parent 6d46fa2875
commit 1bbd5e4fc0
4 changed files with 21 additions and 17 deletions

View File

@ -130,6 +130,7 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.CancelButton = this.btnExit;
this.ClientSize = new System.Drawing.Size(800, 500);
this.ControlBox = false;
@ -139,6 +140,7 @@
this.Controls.Add(this.btnExit);
this.Controls.Add(this.btnOptions);
this.Controls.Add(this.btnPlay);
this.DoubleBuffered = true;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "LauncherForm";

View File

@ -86,6 +86,7 @@ namespace Giants.Launcher
{
OptionsForm form = new OptionsForm(GameName + " Options", this.gamePath);
form.StartPosition = FormStartPosition.CenterParent;
form.ShowDialog();
}

View File

@ -38,6 +38,7 @@
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.cmbMode = new System.Windows.Forms.ComboBox();
this.chkTripleBuffering = new System.Windows.Forms.CheckBox();
this.chkVSync = new System.Windows.Forms.CheckBox();
this.btnOK = new System.Windows.Forms.Button();
@ -45,7 +46,6 @@
this.btnResetDefaults = new System.Windows.Forms.Button();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.chkUpdates = new System.Windows.Forms.CheckBox();
this.cmbMode = new System.Windows.Forms.ComboBox();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
@ -153,6 +153,19 @@
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Mode";
//
// cmbMode
//
this.cmbMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbMode.FormattingEnabled = true;
this.cmbMode.Items.AddRange(new object[] {
"Fullscreen",
"Windowed",
"Borderless"});
this.cmbMode.Location = new System.Drawing.Point(12, 19);
this.cmbMode.Name = "cmbMode";
this.cmbMode.Size = new System.Drawing.Size(88, 21);
this.cmbMode.TabIndex = 3;
//
// chkTripleBuffering
//
this.chkTripleBuffering.AutoSize = true;
@ -224,24 +237,12 @@
this.chkUpdates.Text = "Check for Updates";
this.chkUpdates.UseVisualStyleBackColor = true;
//
// cmbMode
//
this.cmbMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbMode.FormattingEnabled = true;
this.cmbMode.Items.AddRange(new object[] {
"Fullscreen",
"Windowed",
"Borderless"});
this.cmbMode.Location = new System.Drawing.Point(12, 19);
this.cmbMode.Name = "cmbMode";
this.cmbMode.Size = new System.Drawing.Size(88, 21);
this.cmbMode.TabIndex = 3;
//
// OptionsForm
//
this.AcceptButton = this.btnOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoSize = true;
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(406, 273);
this.ControlBox = false;

View File

@ -112,12 +112,12 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>