aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Main
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-07-22 15:35:30 -0400
committerlempamo <[email protected]>2017-07-22 15:35:30 -0400
commit7b12feef44adfcafd46d651adcd3e8fe11cb8523 (patch)
treec291216b6e30a94100189567b70372caa9c3e17a /TimeHACK.Main
parent845d40b0b9cd3ed2d14016a7d3cb5ce5a521a369 (diff)
downloadhistacom2-7b12feef44adfcafd46d651adcd3e8fe11cb8523.tar.gz
histacom2-7b12feef44adfcafd46d651adcd3e8fe11cb8523.tar.bz2
histacom2-7b12feef44adfcafd46d651adcd3e8fe11cb8523.zip
more achievement things
Diffstat (limited to 'TimeHACK.Main')
-rw-r--r--TimeHACK.Main/AchievementScreen.Designer.cs17
-rw-r--r--TimeHACK.Main/AchievementScreen.cs22
-rw-r--r--TimeHACK.Main/AchievementScreen.resx2
-rw-r--r--TimeHACK.Main/Resources/WinClassic/WinClassicEndings.pngbin429 -> 449 bytes
-rw-r--r--TimeHACK.Main/TitleScreen.cs9
5 files changed, 42 insertions, 8 deletions
diff --git a/TimeHACK.Main/AchievementScreen.Designer.cs b/TimeHACK.Main/AchievementScreen.Designer.cs
index 351f74a..586db8e 100644
--- a/TimeHACK.Main/AchievementScreen.Designer.cs
+++ b/TimeHACK.Main/AchievementScreen.Designer.cs
@@ -29,11 +29,12 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
- System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem("Piracy Ending", 0);
+ System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem("??? Ending", 1);
System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem("??? Ending", "WinClassicEndingsLocked.png");
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AchievementScreen));
this.listView1 = new System.Windows.Forms.ListView();
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
+ this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// listView1
@@ -41,6 +42,7 @@
this.listView1.BackColor = System.Drawing.Color.Silver;
this.listView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.listView1.ForeColor = System.Drawing.Color.Black;
+ listViewItem1.Tag = "piracy";
this.listView1.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
listViewItem1,
listViewItem2});
@@ -61,16 +63,28 @@
this.imageList1.Images.SetKeyName(0, "WinClassicEndings.png");
this.imageList1.Images.SetKeyName(1, "WinClassicEndingsLocked.png");
//
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(13, 226);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(75, 23);
+ this.button1.TabIndex = 1;
+ this.button1.Text = "Close";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
// AchievementScreen
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Silver;
this.ClientSize = new System.Drawing.Size(329, 261);
+ this.Controls.Add(this.button1);
this.Controls.Add(this.listView1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "AchievementScreen";
this.Text = "Achievements";
+ this.Load += new System.EventHandler(this.AchievementScreen_Load);
this.ResumeLayout(false);
}
@@ -79,5 +93,6 @@
private System.Windows.Forms.ListView listView1;
private System.Windows.Forms.ImageList imageList1;
+ private System.Windows.Forms.Button button1;
}
} \ No newline at end of file
diff --git a/TimeHACK.Main/AchievementScreen.cs b/TimeHACK.Main/AchievementScreen.cs
index 37fa68b..979ce91 100644
--- a/TimeHACK.Main/AchievementScreen.cs
+++ b/TimeHACK.Main/AchievementScreen.cs
@@ -7,6 +7,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
+using TimeHACK.Engine;
namespace TimeHACK
{
@@ -16,5 +17,26 @@ namespace TimeHACK
{
InitializeComponent();
}
+
+ private void AchievementScreen_Load(object sender, EventArgs e)
+ {
+ byte[] achieved = SaveSystem.GetAchievements();
+
+ if (achieved[0] == 1)
+ {
+ listView1.Items[0].ImageIndex = 0;
+ listView1.Items[0].Name = "Piracy Ending";
+ }
+ if (achieved[1] == 1)
+ {
+ listView1.Items[1].ImageIndex = 0;
+ listView1.Items[1].Name = "Netpocalypse Ending";
+ }
+ }
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
}
}
diff --git a/TimeHACK.Main/AchievementScreen.resx b/TimeHACK.Main/AchievementScreen.resx
index c8c0642..76e0ac7 100644
--- a/TimeHACK.Main/AchievementScreen.resx
+++ b/TimeHACK.Main/AchievementScreen.resx
@@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABw
- CwAAAk1TRnQBSQFMAgEBAgEAARgBAAEYAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+ CwAAAk1TRnQBSQFMAgEBAgEAASABAAEgAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABgAMAASADAAEBAQABCAYAARAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
diff --git a/TimeHACK.Main/Resources/WinClassic/WinClassicEndings.png b/TimeHACK.Main/Resources/WinClassic/WinClassicEndings.png
index c7de178..fc43294 100644
--- a/TimeHACK.Main/Resources/WinClassic/WinClassicEndings.png
+++ b/TimeHACK.Main/Resources/WinClassic/WinClassicEndings.png
Binary files differ
diff --git a/TimeHACK.Main/TitleScreen.cs b/TimeHACK.Main/TitleScreen.cs
index 2a3b35c..ef14a73 100644
--- a/TimeHACK.Main/TitleScreen.cs
+++ b/TimeHACK.Main/TitleScreen.cs
@@ -159,6 +159,7 @@ namespace TimeHACK
gameversion.Font = new Font(pfc.Families[0], 16F, FontStyle.Bold, GraphicsUnit.Point, (0));
ProgramsToolStripMenuItem.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
DocumentsToolStripMenuItem.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
+ achievementsToolStripMenuItem.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
SettingsToolStripMenuItem.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
HelpToolStripMenuItem.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
ShutdownToolStripMenuItem.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
@@ -269,11 +270,6 @@ namespace TimeHACK
loadGameBox = new LoadGameDialog();
loadGameBox.ShowDialog();
- //var result = LoadSave();
- //if(result == false)
- //{
- // MessageBox.Show(caption: "No save found.", text: "No save was found on your system. However, we have created a new one, and we will start it up for you.");
- //}
if (loadGameBox.successful == true)
{
LoadSave();
@@ -331,7 +327,8 @@ namespace TimeHACK
private void achievementsToolStripMenuItem_Click(object sender, EventArgs e)
{
-
+ AchievementScreen achievelist = new AchievementScreen();
+ achievelist.ShowDialog();
}
}
}