diff --git a/App.config b/App.config index 8c4fc9c..9e9c9f8 100644 --- a/App.config +++ b/App.config @@ -12,7 +12,7 @@ - Hermes Boots,Grapple Claw,Feather,Hand Scanner,Glyph Reader,Holy Grail,mirai.exe + Hermes' Boots,Grapple Claw,Feather,Hand Scanner,reader.exe,Holy Grail,mirai.exe Bronze Mirror,Fruit of Eden,Twin Statue,Key of Eternity,Helmet,Plane Model,Crystal Skull,Dimensional Key,Pochette Key,Ice Cape,Scalesphere,Cog of the Soul,Dragon Bone,Serpent Staff,Mulana Talisman,Woman Statue,Pepper,Talisman,Diary,Mini Doll,Treasures,Anchor,Key Fairy Combo,Isis' Pendant,Eye of Truth,Magatama Jewel,torude.exe,Shrine Wall Removal @@ -36,10 +36,10 @@ True - 320 + 356 - 662 + 822 True @@ -56,6 +56,12 @@ + + True + + + 0 + diff --git a/LMRItemTracker.csproj b/LMRItemTracker.csproj index e074457..8b2d41a 100644 --- a/LMRItemTracker.csproj +++ b/LMRItemTracker.csproj @@ -90,6 +90,7 @@ Settings.settings + diff --git a/LaMulanaItemTrackerForm.Designer.cs b/LaMulanaItemTrackerForm.Designer.cs index 0b391ae..38390f1 100644 --- a/LaMulanaItemTrackerForm.Designer.cs +++ b/LaMulanaItemTrackerForm.Designer.cs @@ -72,6 +72,8 @@ private void InitializeComponent() this.hideImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.alwaysOnTopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.showAmmoCountToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.showDeathCountToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.clearDeathCountToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.showLastItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.clearLastItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); @@ -87,12 +89,15 @@ private void InitializeComponent() this.grail = new System.Windows.Forms.PictureBox(); this.mirai = new System.Windows.Forms.PictureBox(); this.mainPanel = new System.Windows.Forms.FlowLayoutPanel(); - this.lastItemWrapperPanel = new System.Windows.Forms.FlowLayoutPanel(); + this.overviewPanel = new System.Windows.Forms.FlowLayoutPanel(); this.lastItemPanel = new System.Windows.Forms.FlowLayoutPanel(); this.lastItemLabel = new System.Windows.Forms.Label(); this.lastItem1 = new System.Windows.Forms.PictureBox(); this.lastItem2 = new System.Windows.Forms.PictureBox(); this.lastItem3 = new System.Windows.Forms.PictureBox(); + this.deathPanel = new System.Windows.Forms.FlowLayoutPanel(); + this.deathLabel = new System.Windows.Forms.Label(); + this.deathCount = new System.Windows.Forms.Label(); this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); this.bronzeMirror = new System.Windows.Forms.PictureBox(); this.fruitOfEden = new System.Windows.Forms.PictureBox(); @@ -239,11 +244,12 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.grail)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.mirai)).BeginInit(); this.mainPanel.SuspendLayout(); - this.lastItemWrapperPanel.SuspendLayout(); + this.overviewPanel.SuspendLayout(); this.lastItemPanel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.lastItem1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.lastItem2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.lastItem3)).BeginInit(); + this.deathPanel.SuspendLayout(); this.flowLayoutPanel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.bronzeMirror)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.fruitOfEden)).BeginInit(); @@ -520,7 +526,7 @@ private void InitializeComponent() this.layoutToolStripMenuItem}); this.menu.Location = new System.Drawing.Point(0, 0); this.menu.Name = "menu"; - this.menu.Size = new System.Drawing.Size(304, 24); + this.menu.Size = new System.Drawing.Size(340, 24); this.menu.TabIndex = 109; this.menu.Text = "Settings"; // @@ -578,6 +584,8 @@ private void InitializeComponent() this.uncollectedItemsToolStripMenuItem, this.alwaysOnTopToolStripMenuItem, this.showAmmoCountToolStripMenuItem, + this.showDeathCountToolStripMenuItem, + this.clearDeathCountToolStripMenuItem, this.showLastItemToolStripMenuItem, this.clearLastItemToolStripMenuItem}); this.layoutToolStripMenuItem.Name = "layoutToolStripMenuItem"; @@ -684,6 +692,20 @@ private void InitializeComponent() this.showAmmoCountToolStripMenuItem.Text = "Show Ammo Count"; this.showAmmoCountToolStripMenuItem.Click += new System.EventHandler(this.toggleAmmoCount); // + // showDeathCountToolStripMenuItem + // + this.showDeathCountToolStripMenuItem.Name = "showDeathCountToolStripMenuItem"; + this.showDeathCountToolStripMenuItem.Size = new System.Drawing.Size(179, 22); + this.showDeathCountToolStripMenuItem.Text = "Show Death Count"; + this.showDeathCountToolStripMenuItem.Click += new System.EventHandler(this.toggleDeathCount); + // + // clearDeathCountToolStripMenuItem + // + this.clearDeathCountToolStripMenuItem.Name = "clearDeathCountToolStripMenuItem"; + this.clearDeathCountToolStripMenuItem.Size = new System.Drawing.Size(179, 22); + this.clearDeathCountToolStripMenuItem.Text = "Clear Death Count"; + this.clearDeathCountToolStripMenuItem.Click += new System.EventHandler(this.resetDeathCount); + // // showLastItemToolStripMenuItem // this.showLastItemToolStripMenuItem.Name = "showLastItemToolStripMenuItem"; @@ -713,7 +735,7 @@ private void InitializeComponent() this.flowLayoutPanel1.Location = new System.Drawing.Point(10, 66); this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0, 0, 0, 8); this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(280, 56); + this.flowLayoutPanel1.Size = new System.Drawing.Size(280, 40); this.flowLayoutPanel1.TabIndex = 110; this.flowLayoutPanel1.DoubleClick += new System.EventHandler(this.LaMulanaItemTrackerForm_DoubleClick); // @@ -764,7 +786,7 @@ private void InitializeComponent() this.readerPanel.Location = new System.Drawing.Point(160, 0); this.readerPanel.Margin = new System.Windows.Forms.Padding(0); this.readerPanel.Name = "readerPanel"; - this.readerPanel.Size = new System.Drawing.Size(40, 56); + this.readerPanel.Size = new System.Drawing.Size(40, 40); this.readerPanel.TabIndex = 111; // // reader @@ -837,7 +859,7 @@ private void InitializeComponent() // this.mainPanel.AutoSize = true; this.mainPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.mainPanel.Controls.Add(this.lastItemWrapperPanel); + this.mainPanel.Controls.Add(this.overviewPanel); this.mainPanel.Controls.Add(this.flowLayoutPanel1); this.mainPanel.Controls.Add(this.flowLayoutPanel2); this.mainPanel.Controls.Add(this.flowLayoutPanel3); @@ -850,19 +872,22 @@ private void InitializeComponent() this.mainPanel.Margin = new System.Windows.Forms.Padding(0); this.mainPanel.Name = "mainPanel"; this.mainPanel.Padding = new System.Windows.Forms.Padding(10); - this.mainPanel.Size = new System.Drawing.Size(304, 766); + this.mainPanel.Size = new System.Drawing.Size(340, 710); this.mainPanel.TabIndex = 111; this.mainPanel.DoubleClick += new System.EventHandler(this.LaMulanaItemTrackerForm_DoubleClick); // - // lastItemWrapperPanel + // overviewPanel // - this.lastItemWrapperPanel.AutoSize = true; - this.lastItemWrapperPanel.Controls.Add(this.lastItemPanel); - this.lastItemWrapperPanel.Location = new System.Drawing.Point(10, 10); - this.lastItemWrapperPanel.Margin = new System.Windows.Forms.Padding(0); - this.lastItemWrapperPanel.Name = "lastItemWrapperPanel"; - this.lastItemWrapperPanel.Size = new System.Drawing.Size(219, 56); - this.lastItemWrapperPanel.TabIndex = 119; + this.overviewPanel.AutoSize = true; + this.overviewPanel.Controls.Add(this.lastItemPanel); + this.overviewPanel.Controls.Add(this.deathPanel); + this.mainPanel.SetFlowBreak(this.overviewPanel, true); + this.overviewPanel.Location = new System.Drawing.Point(10, 10); + this.overviewPanel.Margin = new System.Windows.Forms.Padding(0); + this.overviewPanel.Name = "overviewPanel"; + this.overviewPanel.Size = new System.Drawing.Size(303, 56); + this.overviewPanel.TabIndex = 119; + this.overviewPanel.WrapContents = false; // // lastItemPanel // @@ -871,7 +896,7 @@ private void InitializeComponent() this.lastItemPanel.Controls.Add(this.lastItem1); this.lastItemPanel.Controls.Add(this.lastItem2); this.lastItemPanel.Controls.Add(this.lastItem3); - this.lastItemWrapperPanel.SetFlowBreak(this.lastItemPanel, true); + this.overviewPanel.SetFlowBreak(this.lastItemPanel, true); this.lastItemPanel.Location = new System.Drawing.Point(0, 0); this.lastItemPanel.Margin = new System.Windows.Forms.Padding(0, 0, 0, 16); this.lastItemPanel.Name = "lastItemPanel"; @@ -920,6 +945,46 @@ private void InitializeComponent() this.lastItem3.TabIndex = 117; this.lastItem3.TabStop = false; // + // deathPanel + // + this.deathPanel.AutoSize = true; + this.deathPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.deathPanel.Controls.Add(this.deathLabel); + this.deathPanel.Controls.Add(this.deathCount); + this.deathPanel.Location = new System.Drawing.Point(227, 0); + this.deathPanel.Margin = new System.Windows.Forms.Padding(8, 0, 0, 0); + this.deathPanel.Name = "deathPanel"; + this.deathPanel.Size = new System.Drawing.Size(76, 40); + this.deathPanel.TabIndex = 119; + this.deathPanel.WrapContents = false; + this.deathPanel.MouseClick += new System.Windows.Forms.MouseEventHandler(this.deathCount_MouseClick); + // + // deathLabel + // + this.deathLabel.AutoSize = true; + this.deathLabel.Font = new System.Drawing.Font("Arial", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel); + this.deathLabel.Location = new System.Drawing.Point(3, 0); + this.deathLabel.MinimumSize = new System.Drawing.Size(0, 40); + this.deathLabel.Name = "deathLabel"; + this.deathLabel.Size = new System.Drawing.Size(49, 40); + this.deathLabel.TabIndex = 0; + this.deathLabel.Text = "Death:"; + this.deathLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.deathLabel.MouseClick += new System.Windows.Forms.MouseEventHandler(this.deathCount_MouseClick); + // + // deathCount + // + this.deathCount.AutoSize = true; + this.deathCount.Font = new System.Drawing.Font("Arial", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel); + this.deathCount.Location = new System.Drawing.Point(58, 0); + this.deathCount.MinimumSize = new System.Drawing.Size(0, 40); + this.deathCount.Name = "deathCount"; + this.deathCount.Size = new System.Drawing.Size(15, 40); + this.deathCount.TabIndex = 1; + this.deathCount.Text = "0"; + this.deathCount.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.deathCount.MouseClick += new System.Windows.Forms.MouseEventHandler(this.deathCount_MouseClick); + // // flowLayoutPanel2 // this.flowLayoutPanel2.AutoSize = true; @@ -953,10 +1018,10 @@ private void InitializeComponent() this.flowLayoutPanel2.Controls.Add(this.torude); this.flowLayoutPanel2.Controls.Add(this.shrinePanel); this.mainPanel.SetFlowBreak(this.flowLayoutPanel2, true); - this.flowLayoutPanel2.Location = new System.Drawing.Point(10, 130); + this.flowLayoutPanel2.Location = new System.Drawing.Point(10, 114); this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0, 0, 0, 8); this.flowLayoutPanel2.Name = "flowLayoutPanel2"; - this.flowLayoutPanel2.Size = new System.Drawing.Size(280, 176); + this.flowLayoutPanel2.Size = new System.Drawing.Size(320, 176); this.flowLayoutPanel2.TabIndex = 112; this.flowLayoutPanel2.DoubleClick += new System.EventHandler(this.LaMulanaItemTrackerForm_DoubleClick); // @@ -1033,7 +1098,7 @@ private void InitializeComponent() // dimensionalKey // this.dimensionalKey.Image = global::LMRItemTracker.Properties.Resources.Icon_dimensionalkey_blank; - this.dimensionalKey.Location = new System.Drawing.Point(0, 40); + this.dimensionalKey.Location = new System.Drawing.Point(280, 0); this.dimensionalKey.Margin = new System.Windows.Forms.Padding(0); this.dimensionalKey.Name = "dimensionalKey"; this.dimensionalKey.Size = new System.Drawing.Size(40, 40); @@ -1043,7 +1108,7 @@ private void InitializeComponent() // pochetteKey // this.pochetteKey.Image = global::LMRItemTracker.Properties.Resources.Icon_pochettekey_blank; - this.pochetteKey.Location = new System.Drawing.Point(40, 40); + this.pochetteKey.Location = new System.Drawing.Point(0, 40); this.pochetteKey.Margin = new System.Windows.Forms.Padding(0); this.pochetteKey.Name = "pochetteKey"; this.pochetteKey.Size = new System.Drawing.Size(40, 40); @@ -1053,7 +1118,7 @@ private void InitializeComponent() // iceCape // this.iceCape.Image = global::LMRItemTracker.Properties.Resources.Icon_icecape_blank; - this.iceCape.Location = new System.Drawing.Point(80, 40); + this.iceCape.Location = new System.Drawing.Point(40, 40); this.iceCape.Margin = new System.Windows.Forms.Padding(0); this.iceCape.Name = "iceCape"; this.iceCape.Size = new System.Drawing.Size(40, 40); @@ -1063,7 +1128,7 @@ private void InitializeComponent() // scalesphere // this.scalesphere.Image = global::LMRItemTracker.Properties.Resources.Icon_scalesphere_blank; - this.scalesphere.Location = new System.Drawing.Point(120, 40); + this.scalesphere.Location = new System.Drawing.Point(80, 40); this.scalesphere.Margin = new System.Windows.Forms.Padding(0); this.scalesphere.Name = "scalesphere"; this.scalesphere.Size = new System.Drawing.Size(40, 40); @@ -1073,7 +1138,7 @@ private void InitializeComponent() // cogOfTheSoul // this.cogOfTheSoul.Image = global::LMRItemTracker.Properties.Resources.Icon_cogofthesoul_blank; - this.cogOfTheSoul.Location = new System.Drawing.Point(160, 40); + this.cogOfTheSoul.Location = new System.Drawing.Point(120, 40); this.cogOfTheSoul.Margin = new System.Windows.Forms.Padding(0); this.cogOfTheSoul.Name = "cogOfTheSoul"; this.cogOfTheSoul.Size = new System.Drawing.Size(40, 40); @@ -1083,7 +1148,7 @@ private void InitializeComponent() // dragonBone // this.dragonBone.Image = global::LMRItemTracker.Properties.Resources.Icon_dragonbone_blank; - this.dragonBone.Location = new System.Drawing.Point(200, 40); + this.dragonBone.Location = new System.Drawing.Point(160, 40); this.dragonBone.Margin = new System.Windows.Forms.Padding(0); this.dragonBone.Name = "dragonBone"; this.dragonBone.Size = new System.Drawing.Size(40, 40); @@ -1093,7 +1158,7 @@ private void InitializeComponent() // serpentStaff // this.serpentStaff.Image = global::LMRItemTracker.Properties.Resources.Icon_serpentstaff_blank; - this.serpentStaff.Location = new System.Drawing.Point(240, 40); + this.serpentStaff.Location = new System.Drawing.Point(200, 40); this.serpentStaff.Margin = new System.Windows.Forms.Padding(0); this.serpentStaff.Name = "serpentStaff"; this.serpentStaff.Size = new System.Drawing.Size(40, 40); @@ -1103,7 +1168,7 @@ private void InitializeComponent() // mulanaTalisman // this.mulanaTalisman.Image = global::LMRItemTracker.Properties.Resources.Icon_mulanatalisman_blank; - this.mulanaTalisman.Location = new System.Drawing.Point(0, 80); + this.mulanaTalisman.Location = new System.Drawing.Point(240, 40); this.mulanaTalisman.Margin = new System.Windows.Forms.Padding(0); this.mulanaTalisman.Name = "mulanaTalisman"; this.mulanaTalisman.Size = new System.Drawing.Size(40, 40); @@ -1114,7 +1179,7 @@ private void InitializeComponent() // this.womanPanel.Controls.Add(this.maternityStatue); this.womanPanel.Controls.Add(this.womanStatue); - this.womanPanel.Location = new System.Drawing.Point(40, 80); + this.womanPanel.Location = new System.Drawing.Point(280, 40); this.womanPanel.Margin = new System.Windows.Forms.Padding(0); this.womanPanel.Name = "womanPanel"; this.womanPanel.Size = new System.Drawing.Size(40, 40); @@ -1129,7 +1194,6 @@ private void InitializeComponent() this.maternityStatue.Size = new System.Drawing.Size(40, 40); this.maternityStatue.TabIndex = 106; this.maternityStatue.TabStop = false; - this.maternityStatue.Visible = false; // // womanStatue // @@ -1144,7 +1208,7 @@ private void InitializeComponent() // pepper // this.pepper.Image = global::LMRItemTracker.Properties.Resources.Icon_pepper_blank; - this.pepper.Location = new System.Drawing.Point(80, 80); + this.pepper.Location = new System.Drawing.Point(0, 80); this.pepper.Margin = new System.Windows.Forms.Padding(0); this.pepper.Name = "pepper"; this.pepper.Size = new System.Drawing.Size(40, 40); @@ -1154,7 +1218,7 @@ private void InitializeComponent() // talisman // this.talisman.Image = global::LMRItemTracker.Properties.Resources.Icon_talisman_blank; - this.talisman.Location = new System.Drawing.Point(120, 80); + this.talisman.Location = new System.Drawing.Point(40, 80); this.talisman.Margin = new System.Windows.Forms.Padding(0); this.talisman.Name = "talisman"; this.talisman.Size = new System.Drawing.Size(40, 40); @@ -1164,7 +1228,7 @@ private void InitializeComponent() // diary // this.diary.Image = global::LMRItemTracker.Properties.Resources.Icon_diary_blank; - this.diary.Location = new System.Drawing.Point(160, 80); + this.diary.Location = new System.Drawing.Point(80, 80); this.diary.Margin = new System.Windows.Forms.Padding(0); this.diary.Name = "diary"; this.diary.Size = new System.Drawing.Size(40, 40); @@ -1174,7 +1238,7 @@ private void InitializeComponent() // miniDoll // this.miniDoll.Image = global::LMRItemTracker.Properties.Resources.Icon_minidoll_blank; - this.miniDoll.Location = new System.Drawing.Point(200, 80); + this.miniDoll.Location = new System.Drawing.Point(120, 80); this.miniDoll.Margin = new System.Windows.Forms.Padding(0); this.miniDoll.Name = "miniDoll"; this.miniDoll.Size = new System.Drawing.Size(40, 40); @@ -1184,7 +1248,7 @@ private void InitializeComponent() // treasures // this.treasures.Image = global::LMRItemTracker.Properties.Resources.Icon_treasures_blank; - this.treasures.Location = new System.Drawing.Point(240, 80); + this.treasures.Location = new System.Drawing.Point(160, 80); this.treasures.Margin = new System.Windows.Forms.Padding(0); this.treasures.Name = "treasures"; this.treasures.Size = new System.Drawing.Size(40, 40); @@ -1194,7 +1258,7 @@ private void InitializeComponent() // anchor // this.anchor.Image = global::LMRItemTracker.Properties.Resources.Icon_anchor_blank; - this.anchor.Location = new System.Drawing.Point(0, 120); + this.anchor.Location = new System.Drawing.Point(200, 80); this.anchor.Margin = new System.Windows.Forms.Padding(0); this.anchor.Name = "anchor"; this.anchor.Size = new System.Drawing.Size(40, 40); @@ -1204,7 +1268,7 @@ private void InitializeComponent() // keyFairy // this.keyFairy.Image = global::LMRItemTracker.Properties.Resources.Icon_keyfairy_blank; - this.keyFairy.Location = new System.Drawing.Point(40, 120); + this.keyFairy.Location = new System.Drawing.Point(240, 80); this.keyFairy.Margin = new System.Windows.Forms.Padding(0); this.keyFairy.Name = "keyFairy"; this.keyFairy.Size = new System.Drawing.Size(40, 40); @@ -1214,7 +1278,7 @@ private void InitializeComponent() // isisPendant // this.isisPendant.Image = global::LMRItemTracker.Properties.Resources.Icon_isispendant_blank; - this.isisPendant.Location = new System.Drawing.Point(80, 120); + this.isisPendant.Location = new System.Drawing.Point(280, 80); this.isisPendant.Margin = new System.Windows.Forms.Padding(0); this.isisPendant.Name = "isisPendant"; this.isisPendant.Size = new System.Drawing.Size(40, 40); @@ -1224,7 +1288,7 @@ private void InitializeComponent() // eyeOfTruth // this.eyeOfTruth.Image = global::LMRItemTracker.Properties.Resources.Icon_eyeoftruth_blank; - this.eyeOfTruth.Location = new System.Drawing.Point(120, 120); + this.eyeOfTruth.Location = new System.Drawing.Point(0, 120); this.eyeOfTruth.Margin = new System.Windows.Forms.Padding(0); this.eyeOfTruth.Name = "eyeOfTruth"; this.eyeOfTruth.Size = new System.Drawing.Size(40, 40); @@ -1234,7 +1298,7 @@ private void InitializeComponent() // magatamaJewel // this.magatamaJewel.Image = global::LMRItemTracker.Properties.Resources.Icon_magatamajewel_blank; - this.magatamaJewel.Location = new System.Drawing.Point(160, 120); + this.magatamaJewel.Location = new System.Drawing.Point(40, 120); this.magatamaJewel.Margin = new System.Windows.Forms.Padding(0); this.magatamaJewel.Name = "magatamaJewel"; this.magatamaJewel.Size = new System.Drawing.Size(40, 40); @@ -1244,7 +1308,7 @@ private void InitializeComponent() // torude // this.torude.Image = global::LMRItemTracker.Properties.Resources.Icon_torude_blank; - this.torude.Location = new System.Drawing.Point(200, 120); + this.torude.Location = new System.Drawing.Point(80, 120); this.torude.Margin = new System.Windows.Forms.Padding(0); this.torude.Name = "torude"; this.torude.Size = new System.Drawing.Size(40, 40); @@ -1255,7 +1319,7 @@ private void InitializeComponent() // this.shrinePanel.Controls.Add(this.skullWall); this.shrinePanel.Controls.Add(this.skullWallCount); - this.shrinePanel.Location = new System.Drawing.Point(240, 120); + this.shrinePanel.Location = new System.Drawing.Point(120, 120); this.shrinePanel.Margin = new System.Windows.Forms.Padding(0); this.shrinePanel.Name = "shrinePanel"; this.shrinePanel.Size = new System.Drawing.Size(40, 56); @@ -1291,10 +1355,10 @@ private void InitializeComponent() this.flowLayoutPanel3.Controls.Add(this.bracelet); this.flowLayoutPanel3.Controls.Add(this.spaulder); this.mainPanel.SetFlowBreak(this.flowLayoutPanel3, true); - this.flowLayoutPanel3.Location = new System.Drawing.Point(10, 314); + this.flowLayoutPanel3.Location = new System.Drawing.Point(10, 298); this.flowLayoutPanel3.Margin = new System.Windows.Forms.Padding(0, 0, 0, 8); this.flowLayoutPanel3.Name = "flowLayoutPanel3"; - this.flowLayoutPanel3.Size = new System.Drawing.Size(280, 80); + this.flowLayoutPanel3.Size = new System.Drawing.Size(320, 80); this.flowLayoutPanel3.TabIndex = 117; this.flowLayoutPanel3.DoubleClick += new System.EventHandler(this.LaMulanaItemTrackerForm_DoubleClick); // @@ -1371,7 +1435,7 @@ private void InitializeComponent() // msx2 // this.msx2.Image = global::LMRItemTracker.Properties.Resources.Icon_msx2_blank; - this.msx2.Location = new System.Drawing.Point(0, 40); + this.msx2.Location = new System.Drawing.Point(280, 0); this.msx2.Margin = new System.Windows.Forms.Padding(0); this.msx2.Name = "msx2"; this.msx2.Size = new System.Drawing.Size(40, 40); @@ -1381,7 +1445,7 @@ private void InitializeComponent() // scriptures // this.scriptures.Image = global::LMRItemTracker.Properties.Resources.Icon_scriptures_blank; - this.scriptures.Location = new System.Drawing.Point(40, 40); + this.scriptures.Location = new System.Drawing.Point(0, 40); this.scriptures.Margin = new System.Windows.Forms.Padding(0); this.scriptures.Name = "scriptures"; this.scriptures.Size = new System.Drawing.Size(40, 40); @@ -1391,7 +1455,7 @@ private void InitializeComponent() // crucifix // this.crucifix.Image = global::LMRItemTracker.Properties.Resources.Icon_crucifix_blank; - this.crucifix.Location = new System.Drawing.Point(80, 40); + this.crucifix.Location = new System.Drawing.Point(40, 40); this.crucifix.Margin = new System.Windows.Forms.Padding(0); this.crucifix.Name = "crucifix"; this.crucifix.Size = new System.Drawing.Size(40, 40); @@ -1401,7 +1465,7 @@ private void InitializeComponent() // perfume // this.perfume.Image = global::LMRItemTracker.Properties.Resources.Icon_perfume_blank; - this.perfume.Location = new System.Drawing.Point(120, 40); + this.perfume.Location = new System.Drawing.Point(80, 40); this.perfume.Margin = new System.Windows.Forms.Padding(0); this.perfume.Name = "perfume"; this.perfume.Size = new System.Drawing.Size(40, 40); @@ -1411,7 +1475,7 @@ private void InitializeComponent() // glove // this.glove.Image = global::LMRItemTracker.Properties.Resources.Icon_glove_blank; - this.glove.Location = new System.Drawing.Point(160, 40); + this.glove.Location = new System.Drawing.Point(120, 40); this.glove.Margin = new System.Windows.Forms.Padding(0); this.glove.Name = "glove"; this.glove.Size = new System.Drawing.Size(40, 40); @@ -1421,7 +1485,7 @@ private void InitializeComponent() // bracelet // this.bracelet.Image = global::LMRItemTracker.Properties.Resources.Icon_bracelet_blank; - this.bracelet.Location = new System.Drawing.Point(200, 40); + this.bracelet.Location = new System.Drawing.Point(160, 40); this.bracelet.Margin = new System.Windows.Forms.Padding(0); this.bracelet.Name = "bracelet"; this.bracelet.Size = new System.Drawing.Size(40, 40); @@ -1431,7 +1495,7 @@ private void InitializeComponent() // spaulder // this.spaulder.Image = global::LMRItemTracker.Properties.Resources.Icon_spaulder_blank; - this.spaulder.Location = new System.Drawing.Point(240, 40); + this.spaulder.Location = new System.Drawing.Point(200, 40); this.spaulder.Margin = new System.Windows.Forms.Padding(0); this.spaulder.Name = "spaulder"; this.spaulder.Size = new System.Drawing.Size(40, 40); @@ -1457,10 +1521,10 @@ private void InitializeComponent() this.flowLayoutPanel4.Controls.Add(this.earthSpearPanel); this.flowLayoutPanel4.Controls.Add(this.bombPanel); this.mainPanel.SetFlowBreak(this.flowLayoutPanel4, true); - this.flowLayoutPanel4.Location = new System.Drawing.Point(10, 402); + this.flowLayoutPanel4.Location = new System.Drawing.Point(10, 386); this.flowLayoutPanel4.Margin = new System.Windows.Forms.Padding(0, 0, 0, 8); this.flowLayoutPanel4.Name = "flowLayoutPanel4"; - this.flowLayoutPanel4.Size = new System.Drawing.Size(280, 80); + this.flowLayoutPanel4.Size = new System.Drawing.Size(320, 80); this.flowLayoutPanel4.TabIndex = 115; this.flowLayoutPanel4.DoubleClick += new System.EventHandler(this.LaMulanaItemTrackerForm_DoubleClick); // @@ -1541,7 +1605,7 @@ private void InitializeComponent() // this.shurikenPanel.Controls.Add(this.shurikenAmmoCount); this.shurikenPanel.Controls.Add(this.shuriken); - this.shurikenPanel.Location = new System.Drawing.Point(0, 40); + this.shurikenPanel.Location = new System.Drawing.Point(280, 0); this.shurikenPanel.Margin = new System.Windows.Forms.Padding(0); this.shurikenPanel.Name = "shurikenPanel"; this.shurikenPanel.Size = new System.Drawing.Size(40, 40); @@ -1574,7 +1638,7 @@ private void InitializeComponent() // this.rollingShurikenPanel.Controls.Add(this.rollingShurikenAmmoCount); this.rollingShurikenPanel.Controls.Add(this.rollingShuriken); - this.rollingShurikenPanel.Location = new System.Drawing.Point(40, 40); + this.rollingShurikenPanel.Location = new System.Drawing.Point(0, 40); this.rollingShurikenPanel.Margin = new System.Windows.Forms.Padding(0); this.rollingShurikenPanel.Name = "rollingShurikenPanel"; this.rollingShurikenPanel.Size = new System.Drawing.Size(40, 40); @@ -1607,7 +1671,7 @@ private void InitializeComponent() // this.caltropsPanel.Controls.Add(this.caltropsAmmoCount); this.caltropsPanel.Controls.Add(this.caltrops); - this.caltropsPanel.Location = new System.Drawing.Point(80, 40); + this.caltropsPanel.Location = new System.Drawing.Point(40, 40); this.caltropsPanel.Margin = new System.Windows.Forms.Padding(0); this.caltropsPanel.Name = "caltropsPanel"; this.caltropsPanel.Size = new System.Drawing.Size(40, 40); @@ -1640,7 +1704,7 @@ private void InitializeComponent() // this.flareGunPanel.Controls.Add(this.flareGunAmmoCount); this.flareGunPanel.Controls.Add(this.flareGun); - this.flareGunPanel.Location = new System.Drawing.Point(120, 40); + this.flareGunPanel.Location = new System.Drawing.Point(80, 40); this.flareGunPanel.Margin = new System.Windows.Forms.Padding(0); this.flareGunPanel.Name = "flareGunPanel"; this.flareGunPanel.Size = new System.Drawing.Size(40, 40); @@ -1673,7 +1737,7 @@ private void InitializeComponent() // this.chakramPanel.Controls.Add(this.chakramAmmoCount); this.chakramPanel.Controls.Add(this.chakram); - this.chakramPanel.Location = new System.Drawing.Point(160, 40); + this.chakramPanel.Location = new System.Drawing.Point(120, 40); this.chakramPanel.Margin = new System.Windows.Forms.Padding(0); this.chakramPanel.Name = "chakramPanel"; this.chakramPanel.Size = new System.Drawing.Size(40, 40); @@ -1706,7 +1770,7 @@ private void InitializeComponent() // this.earthSpearPanel.Controls.Add(this.earthSpearAmmoCount); this.earthSpearPanel.Controls.Add(this.earthSpear); - this.earthSpearPanel.Location = new System.Drawing.Point(200, 40); + this.earthSpearPanel.Location = new System.Drawing.Point(160, 40); this.earthSpearPanel.Margin = new System.Windows.Forms.Padding(0); this.earthSpearPanel.Name = "earthSpearPanel"; this.earthSpearPanel.Size = new System.Drawing.Size(40, 40); @@ -1739,7 +1803,7 @@ private void InitializeComponent() // this.bombPanel.Controls.Add(this.bombAmmoCount); this.bombPanel.Controls.Add(this.bomb); - this.bombPanel.Location = new System.Drawing.Point(240, 40); + this.bombPanel.Location = new System.Drawing.Point(200, 40); this.bombPanel.Margin = new System.Windows.Forms.Padding(0); this.bombPanel.Name = "bombPanel"; this.bombPanel.Size = new System.Drawing.Size(40, 40); @@ -1780,7 +1844,7 @@ private void InitializeComponent() this.flowLayoutPanel5.Controls.Add(this.mapsPanel); this.flowLayoutPanel5.Controls.Add(this.ankhJewelPanel); this.mainPanel.SetFlowBreak(this.flowLayoutPanel5, true); - this.flowLayoutPanel5.Location = new System.Drawing.Point(10, 490); + this.flowLayoutPanel5.Location = new System.Drawing.Point(10, 474); this.flowLayoutPanel5.Margin = new System.Windows.Forms.Padding(0, 0, 0, 8); this.flowLayoutPanel5.Name = "flowLayoutPanel5"; this.flowLayoutPanel5.Size = new System.Drawing.Size(280, 56); @@ -1960,10 +2024,10 @@ private void InitializeComponent() this.flowLayoutPanel6.Controls.Add(this.miracle); this.flowLayoutPanel6.Controls.Add(this.lamulana); this.mainPanel.SetFlowBreak(this.flowLayoutPanel6, true); - this.flowLayoutPanel6.Location = new System.Drawing.Point(10, 554); + this.flowLayoutPanel6.Location = new System.Drawing.Point(10, 538); this.flowLayoutPanel6.Margin = new System.Windows.Forms.Padding(0, 0, 0, 8); this.flowLayoutPanel6.Name = "flowLayoutPanel6"; - this.flowLayoutPanel6.Size = new System.Drawing.Size(280, 160); + this.flowLayoutPanel6.Size = new System.Drawing.Size(320, 120); this.flowLayoutPanel6.TabIndex = 120; // // shellHorn @@ -2039,7 +2103,7 @@ private void InitializeComponent() // yagomap // this.yagomap.Image = global::LMRItemTracker.Properties.Resources.Icon_yagomap_blank; - this.yagomap.Location = new System.Drawing.Point(0, 40); + this.yagomap.Location = new System.Drawing.Point(280, 0); this.yagomap.Margin = new System.Windows.Forms.Padding(0); this.yagomap.Name = "yagomap"; this.yagomap.Size = new System.Drawing.Size(40, 40); @@ -2049,7 +2113,7 @@ private void InitializeComponent() // yagostr // this.yagostr.Image = global::LMRItemTracker.Properties.Resources.Icon_yagostr_blank; - this.yagostr.Location = new System.Drawing.Point(40, 40); + this.yagostr.Location = new System.Drawing.Point(0, 40); this.yagostr.Margin = new System.Windows.Forms.Padding(0); this.yagostr.Name = "yagostr"; this.yagostr.Size = new System.Drawing.Size(40, 40); @@ -2059,7 +2123,7 @@ private void InitializeComponent() // bunemon // this.bunemon.Image = global::LMRItemTracker.Properties.Resources.Icon_bunemon_blank; - this.bunemon.Location = new System.Drawing.Point(80, 40); + this.bunemon.Location = new System.Drawing.Point(40, 40); this.bunemon.Margin = new System.Windows.Forms.Padding(0); this.bunemon.Name = "bunemon"; this.bunemon.Size = new System.Drawing.Size(40, 40); @@ -2069,7 +2133,7 @@ private void InitializeComponent() // bunplus // this.bunplus.Image = global::LMRItemTracker.Properties.Resources.Icon_bunplus_blank; - this.bunplus.Location = new System.Drawing.Point(120, 40); + this.bunplus.Location = new System.Drawing.Point(80, 40); this.bunplus.Margin = new System.Windows.Forms.Padding(0); this.bunplus.Name = "bunplus"; this.bunplus.Size = new System.Drawing.Size(40, 40); @@ -2079,7 +2143,7 @@ private void InitializeComponent() // guild // this.guild.Image = global::LMRItemTracker.Properties.Resources.Icon_guild_blank; - this.guild.Location = new System.Drawing.Point(160, 40); + this.guild.Location = new System.Drawing.Point(120, 40); this.guild.Margin = new System.Windows.Forms.Padding(0); this.guild.Name = "guild"; this.guild.Size = new System.Drawing.Size(40, 40); @@ -2089,7 +2153,7 @@ private void InitializeComponent() // beolamu // this.beolamu.Image = global::LMRItemTracker.Properties.Resources.Icon_beolamu_blank; - this.beolamu.Location = new System.Drawing.Point(200, 40); + this.beolamu.Location = new System.Drawing.Point(160, 40); this.beolamu.Margin = new System.Windows.Forms.Padding(0); this.beolamu.Name = "beolamu"; this.beolamu.Size = new System.Drawing.Size(40, 40); @@ -2099,7 +2163,7 @@ private void InitializeComponent() // emusic // this.emusic.Image = global::LMRItemTracker.Properties.Resources.Icon_emusic_blank; - this.emusic.Location = new System.Drawing.Point(240, 40); + this.emusic.Location = new System.Drawing.Point(200, 40); this.emusic.Margin = new System.Windows.Forms.Padding(0); this.emusic.Name = "emusic"; this.emusic.Size = new System.Drawing.Size(40, 40); @@ -2109,7 +2173,7 @@ private void InitializeComponent() // randc // this.randc.Image = global::LMRItemTracker.Properties.Resources.Icon_randc_blank; - this.randc.Location = new System.Drawing.Point(0, 80); + this.randc.Location = new System.Drawing.Point(240, 40); this.randc.Margin = new System.Windows.Forms.Padding(0); this.randc.Name = "randc"; this.randc.Size = new System.Drawing.Size(40, 40); @@ -2119,7 +2183,7 @@ private void InitializeComponent() // capstar // this.capstar.Image = global::LMRItemTracker.Properties.Resources.Icon_capstar_blank; - this.capstar.Location = new System.Drawing.Point(40, 80); + this.capstar.Location = new System.Drawing.Point(280, 40); this.capstar.Margin = new System.Windows.Forms.Padding(0); this.capstar.Name = "capstar"; this.capstar.Size = new System.Drawing.Size(40, 40); @@ -2129,7 +2193,7 @@ private void InitializeComponent() // deathv // this.deathv.Image = global::LMRItemTracker.Properties.Resources.Icon_deathv_blank; - this.deathv.Location = new System.Drawing.Point(80, 80); + this.deathv.Location = new System.Drawing.Point(0, 80); this.deathv.Margin = new System.Windows.Forms.Padding(0); this.deathv.Name = "deathv"; this.deathv.Size = new System.Drawing.Size(40, 40); @@ -2139,7 +2203,7 @@ private void InitializeComponent() // move // this.move.Image = global::LMRItemTracker.Properties.Resources.Icon_move_blank; - this.move.Location = new System.Drawing.Point(120, 80); + this.move.Location = new System.Drawing.Point(40, 80); this.move.Margin = new System.Windows.Forms.Padding(0); this.move.Name = "move"; this.move.Size = new System.Drawing.Size(40, 40); @@ -2149,7 +2213,7 @@ private void InitializeComponent() // mekuri // this.mekuri.Image = global::LMRItemTracker.Properties.Resources.Icon_mekuri_blank; - this.mekuri.Location = new System.Drawing.Point(160, 80); + this.mekuri.Location = new System.Drawing.Point(80, 80); this.mekuri.Margin = new System.Windows.Forms.Padding(0); this.mekuri.Name = "mekuri"; this.mekuri.Size = new System.Drawing.Size(40, 40); @@ -2159,7 +2223,7 @@ private void InitializeComponent() // bounce // this.bounce.Image = global::LMRItemTracker.Properties.Resources.Icon_bounce_blank; - this.bounce.Location = new System.Drawing.Point(200, 80); + this.bounce.Location = new System.Drawing.Point(120, 80); this.bounce.Margin = new System.Windows.Forms.Padding(0); this.bounce.Name = "bounce"; this.bounce.Size = new System.Drawing.Size(40, 40); @@ -2169,7 +2233,7 @@ private void InitializeComponent() // miracle // this.miracle.Image = global::LMRItemTracker.Properties.Resources.Icon_miracle_blank; - this.miracle.Location = new System.Drawing.Point(240, 80); + this.miracle.Location = new System.Drawing.Point(160, 80); this.miracle.Margin = new System.Windows.Forms.Padding(0); this.miracle.Name = "miracle"; this.miracle.Size = new System.Drawing.Size(40, 40); @@ -2179,7 +2243,7 @@ private void InitializeComponent() // lamulana // this.lamulana.Image = global::LMRItemTracker.Properties.Resources.Icon_lamulana_blank; - this.lamulana.Location = new System.Drawing.Point(0, 120); + this.lamulana.Location = new System.Drawing.Point(200, 80); this.lamulana.Margin = new System.Windows.Forms.Padding(0); this.lamulana.Name = "lamulana"; this.lamulana.Size = new System.Drawing.Size(40, 40); @@ -2199,7 +2263,7 @@ private void InitializeComponent() this.bossPanel.Controls.Add(this.baphomet); this.bossPanel.Controls.Add(this.tiamat); this.mainPanel.SetFlowBreak(this.bossPanel, true); - this.bossPanel.Location = new System.Drawing.Point(10, 722); + this.bossPanel.Location = new System.Drawing.Point(10, 666); this.bossPanel.Margin = new System.Windows.Forms.Padding(0); this.bossPanel.MaximumSize = new System.Drawing.Size(280, 0); this.bossPanel.Name = "bossPanel"; @@ -2290,13 +2354,14 @@ private void InitializeComponent() // LaMulanaItemTrackerForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; - this.ClientSize = new System.Drawing.Size(304, 791); + this.ClientSize = new System.Drawing.Size(340, 783); this.Controls.Add(this.mainPanel); this.Controls.Add(this.menu); this.HelpButton = true; this.Name = "LaMulanaItemTrackerForm"; this.Text = "Item Tracker"; this.TopMost = true; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.formClosing); this.Load += new System.EventHandler(this.LaMulanaItemTrackerForm_Load); this.DoubleClick += new System.EventHandler(this.LaMulanaItemTrackerForm_DoubleClick); this.shieldsPanel.ResumeLayout(false); @@ -2324,13 +2389,15 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.mirai)).EndInit(); this.mainPanel.ResumeLayout(false); this.mainPanel.PerformLayout(); - this.lastItemWrapperPanel.ResumeLayout(false); - this.lastItemWrapperPanel.PerformLayout(); + this.overviewPanel.ResumeLayout(false); + this.overviewPanel.PerformLayout(); this.lastItemPanel.ResumeLayout(false); this.lastItemPanel.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.lastItem1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.lastItem2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.lastItem3)).EndInit(); + this.deathPanel.ResumeLayout(false); + this.deathPanel.PerformLayout(); this.flowLayoutPanel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.bronzeMirror)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.fruitOfEden)).EndInit(); @@ -2485,6 +2552,7 @@ private void InitializeComponent() private bool angelShieldCollected; private List allItems; + private SettingsBackup settingsBackup; [STAThread] static void Main(string[] args) @@ -2604,7 +2672,7 @@ static void Main(string[] args) private PictureBox lastItem1; private Label lastItemLabel; private ToolStripMenuItem showLastItemToolStripMenuItem; - private FlowLayoutPanel lastItemWrapperPanel; + private FlowLayoutPanel overviewPanel; private ToolStripMenuItem clearLastItemToolStripMenuItem; private Label mapCount; private PictureBox lastItem2; @@ -2659,5 +2727,10 @@ static void Main(string[] args) private PictureBox lamulana; private FlowLayoutPanel flowLayoutPanel6; private ToolStripMenuItem addItemPanel6ToolStripMenuItem; + private ToolStripMenuItem showDeathCountToolStripMenuItem; + private FlowLayoutPanel deathPanel; + private Label deathLabel; + private Label deathCount; + private ToolStripMenuItem clearDeathCountToolStripMenuItem; } } \ No newline at end of file diff --git a/LaMulanaItemTrackerForm.cs b/LaMulanaItemTrackerForm.cs index e9f417c..871f3a6 100644 --- a/LaMulanaItemTrackerForm.cs +++ b/LaMulanaItemTrackerForm.cs @@ -20,21 +20,24 @@ public LaMulanaItemTrackerForm() this.mekuriCollected = false; this.gameStarted = false; - this.vesselNotFound.TabIndex = 1; - this.vessel.TabIndex = 0; - this.lampOfTimeNotFound.TabIndex = 1; - this.lampOfTime.TabIndex = 0; - this.womanStatue.TabIndex = 1; - this.maternityStatue.TabIndex = 0; + this.settingsBackup = new SettingsBackup(); updateAlwaysOnTop(); updateFormSize(); updateFormColor(); updateTextColor(); updateShowLastItem(); + updateShowDeathCount(); updateBackgroundMode(); + if("shaded".Equals(Properties.Settings.Default.BackgroundMode)) + { + readerPanel.Size = new System.Drawing.Size(40, 56); + } + else + { + readerPanel.Size = new System.Drawing.Size(40, 40); + } updateShowAmmoCount(); - readerPanel.Size = GetAmmoPanelSize(translationTablets.Text); InitializePossibleItems(); InitializeFormPanels(); InitializeMenuOptions(); @@ -164,6 +167,7 @@ private void InitializeFormPanels() Control control = GetControl(item); if (control != null) { + SetStartingImage(item); control.Parent = null; } } @@ -178,7 +182,6 @@ private void InitializeFormPanels() flowLayoutPanel1.Controls.Add(control); control.Margin = new Padding(0); control.TabIndex = index; - SetStartingImage(item); } } if(flowLayoutPanel1.Controls.Count < 1) @@ -196,7 +199,6 @@ private void InitializeFormPanels() flowLayoutPanel2.Controls.Add(control); control.Margin = new Padding(0); control.TabIndex = index; - SetStartingImage(item); } } if (flowLayoutPanel2.Controls.Count < 1) @@ -214,7 +216,6 @@ private void InitializeFormPanels() flowLayoutPanel3.Controls.Add(control); control.Margin = new Padding(0); control.TabIndex = index; - SetStartingImage(item); } } if (flowLayoutPanel3.Controls.Count < 1) @@ -232,7 +233,6 @@ private void InitializeFormPanels() flowLayoutPanel4.Controls.Add(control); control.Margin = new Padding(0); control.TabIndex = index; - SetStartingImage(item); } } if (flowLayoutPanel4.Controls.Count < 1) @@ -250,7 +250,6 @@ private void InitializeFormPanels() flowLayoutPanel5.Controls.Add(control); control.Margin = new Padding(0); control.TabIndex = index; - SetStartingImage(item); } } if (flowLayoutPanel5.Controls.Count < 1) @@ -268,7 +267,6 @@ private void InitializeFormPanels() flowLayoutPanel6.Controls.Add(control); control.Margin = new Padding(0); control.TabIndex = index; - SetStartingImage(item); } } if (flowLayoutPanel6.Controls.Count < 1) @@ -283,6 +281,13 @@ private void InitializeFormPanels() control.Visible = false; } } + else if(Properties.Settings.Default.BackgroundMode.Equals("blank")) + { + foreach (Control control in bossPanel.Controls) + { + SetBackgroundImage((PictureBox)control, null); + } + } } private void SetStartingImage(String item) @@ -325,11 +330,24 @@ private void SetStartingImage(String item) if ("Vessel/Medicine".Equals(item)) { - vessel.Visible = false; + if (!"shaded".Equals(Properties.Settings.Default.BackgroundMode)) + { + vesselPanel.Controls.Remove(vessel); + } } if ("Lamp of Time".Equals(item)) { - lampOfTime.Visible = false; + if (!"shaded".Equals(Properties.Settings.Default.BackgroundMode)) + { + lampOfTimePanel.Controls.Remove(lampOfTime); + } + } + if ("Woman Statue".Equals(item)) + { + if (!"shaded".Equals(Properties.Settings.Default.BackgroundMode)) + { + womanPanel.Controls.Remove(maternityStatue); + } } if ("Shield".Equals(item)) { @@ -337,7 +355,7 @@ private void SetStartingImage(String item) fakeShieldCollected = false; silverShieldCollected = false; - if(!"shaded".Equals(Properties.Settings.Default.BackgroundMode)) + if (!"shaded".Equals(Properties.Settings.Default.BackgroundMode)) { shieldsPanel.Controls.Remove(buckler); } @@ -796,11 +814,11 @@ public void toggleItem(string flagName, bool isAdd) if (isAdd) { - setBackgroundImage(mantra, getFoundImage(flagName)); + SetBackgroundImage(mantra, getFoundImage(flagName)); } else { - setBackgroundImage(mantra, getBlankImage("w-soft-mantra-combo")); + SetBackgroundImage(mantra, getBlankImage("w-soft-mantra-combo")); } if (Properties.Settings.Default.BackgroundMode.Equals("hide")) @@ -844,13 +862,33 @@ public void toggleItem(string flagName, bool isAdd) SetImage(keyFairy, global::LMRItemTracker.Properties.Resources.Icon_keyfairy_blank); } } + else if("w-soft-reader".Equals(flagName)) + { + if(!"shaded".Equals(Properties.Settings.Default.BackgroundMode)) + { + if (isAdd) + { + readerPanel.Invoke(new Action(() => + { + readerPanel.Size = new System.Drawing.Size(40, 56); + })); + } + else + { + readerPanel.Invoke(new Action(() => + { + readerPanel.Size = new System.Drawing.Size(40, 40); + })); + } + } + } else if ("w-soft-yagomap".Equals(flagName)) { - updateCount(skullWallCount, isAdd, 4); + UpdateCount(skullWallCount, isAdd, 4); } else if ("w-soft-yagostr".Equals(flagName)) { - updateCount(skullWallCount, isAdd, 4); + UpdateCount(skullWallCount, isAdd, 4); if (isAdd) { SetImage(yagostr, getFoundImage(flagName)); @@ -867,27 +905,30 @@ public void toggleItem(string flagName, bool isAdd) } else if ("w-maternity".Equals(flagName)) { - //if (isAdd && Properties.Settings.Default.BackgroundMode.Equals("hide")) - //{ - // toggleVisibility(womanPanel, true); - //} - toggleVisibility(maternityStatue, isAdd); + if (isAdd && Properties.Settings.Default.BackgroundMode.Equals("hide")) + { + toggleVisibility(womanPanel, true); + } + //toggleVisibility(maternityStatue, isAdd); + UpdatePanelControls(womanPanel, maternityStatue, womanStatue, isAdd); } else if ("w-vessel".Equals(flagName)) { - if (Properties.Settings.Default.BackgroundMode.Equals("hide")) + if (isAdd && Properties.Settings.Default.BackgroundMode.Equals("hide")) { - toggleVisibility(vesselPanel, isAdd); + toggleVisibility(vesselPanel, true); } - toggleVisibility(vessel, isAdd); + + UpdatePanelControls(vesselPanel, vessel, vesselNotFound, isAdd); } else if ("w-lamp".Equals(flagName)) { - if (Properties.Settings.Default.BackgroundMode.Equals("hide")) + if (isAdd && Properties.Settings.Default.BackgroundMode.Equals("hide")) { toggleVisibility(lampOfTimePanel, isAdd); } - toggleVisibility(lampOfTime, isAdd); + + UpdatePanelControls(lampOfTimePanel, lampOfTime, lampOfTimeNotFound, isAdd); } else if ("w-djed".Equals(flagName)) { @@ -909,7 +950,7 @@ public void toggleItem(string flagName, bool isAdd) } else if ("w-dragonbone".Equals(flagName)) { - updateCount(skullWallCount, isAdd, 4); + UpdateCount(skullWallCount, isAdd, 4); SetImage(flagName, isAdd); } else if ("w-medicine-yellow".Equals(flagName)) @@ -947,6 +988,26 @@ public void toggleItem(string flagName, bool isAdd) } } + private void UpdatePanelControls(Control panel, Control foundControl, Control blankControl, bool isAdd) + { + if (isAdd) + { + panel.Invoke(new Action(() => + { + panel.Controls.Add(foundControl); + panel.Controls.Remove(blankControl); + })); + } + else + { + panel.Invoke(new Action(() => + { + panel.Controls.Add(blankControl); + panel.Controls.Remove(foundControl); + })); + } + } + private void toggleSubWeapon(string flagName, bool isAdd) { SetImage(flagName, isAdd); @@ -1014,7 +1075,7 @@ public void toggleGrail(string flagName, bool isAdd) { toggleVisibility(grailFull, isAdd); } - else if ("invtr-grailfull".Equals(flagName)) + else if ("invtr-grailbr".Equals(flagName)) { toggleVisibility(grailBroken, isAdd); } @@ -1180,7 +1241,6 @@ internal void updateTranslationTablets(byte cur) translationTablets.Text = "0%"; } } - readerPanel.Size = GetAmmoPanelSize(translationTablets.Text); translationTablets.Refresh(); })); } @@ -1240,17 +1300,17 @@ public void toggleBoss(string itemName, bool isAdd) { if (isAdd) { - setBackgroundImage(amphisbaena, global::LMRItemTracker.Properties.Resources.Boss_amphisbaena); + SetBackgroundImage(amphisbaena, global::LMRItemTracker.Properties.Resources.Boss_amphisbaena); } else { if (Properties.Settings.Default.BackgroundMode.Equals("blank")) { - setBackgroundImage(amphisbaena, null); + SetBackgroundImage(amphisbaena, null); } else { - setBackgroundImage(amphisbaena, global::LMRItemTracker.Properties.Resources.Boss_amphisbaena_blank); + SetBackgroundImage(amphisbaena, global::LMRItemTracker.Properties.Resources.Boss_amphisbaena_blank); } } @@ -1263,17 +1323,17 @@ public void toggleBoss(string itemName, bool isAdd) { if (isAdd) { - setBackgroundImage(sakit, global::LMRItemTracker.Properties.Resources.Boss_sakit); + SetBackgroundImage(sakit, global::LMRItemTracker.Properties.Resources.Boss_sakit); } else { if (Properties.Settings.Default.BackgroundMode.Equals("blank")) { - setBackgroundImage(sakit, null); + SetBackgroundImage(sakit, null); } else { - setBackgroundImage(sakit, global::LMRItemTracker.Properties.Resources.Boss_sakit_blank); + SetBackgroundImage(sakit, global::LMRItemTracker.Properties.Resources.Boss_sakit_blank); } } @@ -1286,17 +1346,17 @@ public void toggleBoss(string itemName, bool isAdd) { if (isAdd) { - setBackgroundImage(ellmac, global::LMRItemTracker.Properties.Resources.Boss_ellmac); + SetBackgroundImage(ellmac, global::LMRItemTracker.Properties.Resources.Boss_ellmac); } else { if (Properties.Settings.Default.BackgroundMode.Equals("blank")) { - setBackgroundImage(ellmac, null); + SetBackgroundImage(ellmac, null); } else { - setBackgroundImage(ellmac, global::LMRItemTracker.Properties.Resources.Boss_ellmac_blank); + SetBackgroundImage(ellmac, global::LMRItemTracker.Properties.Resources.Boss_ellmac_blank); } } @@ -1309,17 +1369,17 @@ public void toggleBoss(string itemName, bool isAdd) { if (isAdd) { - setBackgroundImage(bahamut, global::LMRItemTracker.Properties.Resources.Boss_bahamut); + SetBackgroundImage(bahamut, global::LMRItemTracker.Properties.Resources.Boss_bahamut); } else { if (Properties.Settings.Default.BackgroundMode.Equals("blank")) { - setBackgroundImage(bahamut, null); + SetBackgroundImage(bahamut, null); } else { - setBackgroundImage(bahamut, global::LMRItemTracker.Properties.Resources.Boss_bahamut_blank); + SetBackgroundImage(bahamut, global::LMRItemTracker.Properties.Resources.Boss_bahamut_blank); } } @@ -1332,17 +1392,17 @@ public void toggleBoss(string itemName, bool isAdd) { if (isAdd) { - setBackgroundImage(viy, global::LMRItemTracker.Properties.Resources.Boss_viy); + SetBackgroundImage(viy, global::LMRItemTracker.Properties.Resources.Boss_viy); } else { if (Properties.Settings.Default.BackgroundMode.Equals("blank")) { - setBackgroundImage(viy, null); + SetBackgroundImage(viy, null); } else { - setBackgroundImage(viy, global::LMRItemTracker.Properties.Resources.Boss_viy_blank); + SetBackgroundImage(viy, global::LMRItemTracker.Properties.Resources.Boss_viy_blank); } } @@ -1355,17 +1415,17 @@ public void toggleBoss(string itemName, bool isAdd) { if (isAdd) { - setBackgroundImage(palenque, global::LMRItemTracker.Properties.Resources.Boss_palenque); + SetBackgroundImage(palenque, global::LMRItemTracker.Properties.Resources.Boss_palenque); } else { if (Properties.Settings.Default.BackgroundMode.Equals("blank")) { - setBackgroundImage(palenque, null); + SetBackgroundImage(palenque, null); } else { - setBackgroundImage(palenque, global::LMRItemTracker.Properties.Resources.Boss_palenque_blank); + SetBackgroundImage(palenque, global::LMRItemTracker.Properties.Resources.Boss_palenque_blank); } } @@ -1378,17 +1438,17 @@ public void toggleBoss(string itemName, bool isAdd) { if (isAdd) { - setBackgroundImage(baphomet, global::LMRItemTracker.Properties.Resources.Boss_baphomet); + SetBackgroundImage(baphomet, global::LMRItemTracker.Properties.Resources.Boss_baphomet); } else { if (Properties.Settings.Default.BackgroundMode.Equals("blank")) { - setBackgroundImage(baphomet, null); + SetBackgroundImage(baphomet, null); } else { - setBackgroundImage(baphomet, global::LMRItemTracker.Properties.Resources.Boss_baphomet_blank); + SetBackgroundImage(baphomet, global::LMRItemTracker.Properties.Resources.Boss_baphomet_blank); } } @@ -1401,17 +1461,17 @@ public void toggleBoss(string itemName, bool isAdd) { if (isAdd) { - setBackgroundImage(tiamat, global::LMRItemTracker.Properties.Resources.Boss_tiamat); + SetBackgroundImage(tiamat, global::LMRItemTracker.Properties.Resources.Boss_tiamat); } else { if (Properties.Settings.Default.BackgroundMode.Equals("blank")) { - setBackgroundImage(tiamat, null); + SetBackgroundImage(tiamat, null); } else { - setBackgroundImage(tiamat, global::LMRItemTracker.Properties.Resources.Boss_tiamat_blank); + SetBackgroundImage(tiamat, global::LMRItemTracker.Properties.Resources.Boss_tiamat_blank); } } @@ -1429,10 +1489,10 @@ public void toggleWhip(Boolean isAdd) public void toggleMap(string flagName, Boolean isAdd) { - updateCount(mapCount, isAdd, 17); + UpdateCount(mapCount, isAdd, 17); if ("w-map-shrine".Equals(flagName)) { - updateCount(skullWallCount, isAdd, 4); + UpdateCount(skullWallCount, isAdd, 4); if (isAdd) { SetImage(maps, getFoundImage(flagName)); @@ -1559,31 +1619,31 @@ public void setAmmoCount(string flagName, int newCount) { if("ammo-shuriken".Equals(flagName)) { - updateAmmoCount(shurikenAmmoCount, newCount, 150); + UpdateCount(shurikenAmmoCount, newCount, 150); } else if ("ammo-roll-shuriken".Equals(flagName)) { - updateAmmoCount(rollingShurikenAmmoCount, newCount, 100); + UpdateCount(rollingShurikenAmmoCount, newCount, 100); } else if ("ammo-spear".Equals(flagName)) { - updateAmmoCount(earthSpearAmmoCount, newCount, 80); + UpdateCount(earthSpearAmmoCount, newCount, 80); } else if ("ammo-flare".Equals(flagName)) { - updateAmmoCount(flareGunAmmoCount, newCount, 80); + UpdateCount(flareGunAmmoCount, newCount, 80); } else if ("ammo-bomb".Equals(flagName)) { - updateAmmoCount(bombAmmoCount, newCount, 30); + UpdateCount(bombAmmoCount, newCount, 30); } else if ("ammo-chakram".Equals(flagName)) { - updateAmmoCount(chakramAmmoCount, newCount, 10); + UpdateCount(chakramAmmoCount, newCount, 10); } else if ("ammo-caltrop".Equals(flagName)) { - updateAmmoCount(caltropsAmmoCount, newCount, 80); + UpdateCount(caltropsAmmoCount, newCount, 80); } else if ("ammo-clip".Equals(flagName)) { @@ -1601,10 +1661,22 @@ public void setAmmoCount(string flagName, int newCount) { UpdateTextVisibility(ankhJewelPanel, isAdd); } - updateAmmoCount(ankhJewelCount, newCount, 8); + UpdateCount(ankhJewelCount, newCount, 8); } } + public void updateDeathCount(bool isAdd) + { + if (isAdd) + { + Properties.Settings.Default.DeathCount += 1; + } + else + { + Properties.Settings.Default.DeathCount -= 1; + } + UpdateCount(deathCount, Properties.Settings.Default.DeathCount, int.MaxValue); + } private void LaMulanaItemTrackerForm_Load(object sender, EventArgs e) { @@ -1614,10 +1686,22 @@ private void LaMulanaItemTrackerForm_Load(object sender, EventArgs e) Properties.Settings.Default.UpgradeRequired = false; Properties.Settings.Default.Save(); + updateAlwaysOnTop(); updateFormSize(); updateFormColor(); updateTextColor(); updateShowLastItem(); + updateShowDeathCount(); + updateShowAmmoCount(); + if ("shaded".Equals(Properties.Settings.Default.BackgroundMode)) + { + readerPanel.Size = new System.Drawing.Size(40, 56); + } + else + { + readerPanel.Size = new System.Drawing.Size(40, 40); + } + InitializeFormPanels(); } @@ -1832,8 +1916,8 @@ private void removeItemFromPanel(object sender, EventArgs e) } else { - control.Parent = null; Control parent = control.Parent; + control.Parent = null; if(parent.Controls.Count < 1) { parent.Visible = false; @@ -1857,11 +1941,7 @@ private void removeItemFromPanel(object sender, EventArgs e) private System.Drawing.Bitmap getFoundImage(string flagName) { - if (flagName.StartsWith("w-jewel-")) - { - return global::LMRItemTracker.Properties.Resources.Icon_ankhjewel; - } - else if (flagName.StartsWith("w-orb-")) + if (flagName.StartsWith("w-orb-")) { return global::LMRItemTracker.Properties.Resources.Icon_sacredorb; } @@ -3802,7 +3882,7 @@ private void updateShowLastItem() { if(lastItemPanel.Parent == null) { - lastItemWrapperPanel.Controls.Add(lastItemPanel); + overviewPanel.Controls.Add(lastItemPanel); } } else @@ -3833,6 +3913,13 @@ private void updateShowAmmoCount() showAmmoCountToolStripMenuItem.Checked = Properties.Settings.Default.ShowAmmoCount; } + private void updateShowDeathCount() + { + showDeathCountToolStripMenuItem.Checked = Properties.Settings.Default.ShowDeathCount; + UpdateCount(deathCount, Properties.Settings.Default.DeathCount, int.MaxValue); + deathPanel.Visible = Properties.Settings.Default.ShowDeathCount; + } + private System.Drawing.Size GetAmmoPanelSize(String panelCountText) { if (!Properties.Settings.Default.ShowAmmoCount && !panelCountText.Contains("%")) @@ -3856,6 +3943,8 @@ private void updateTextColor() this.translationTablets.ForeColor = Properties.Settings.Default.TextColor; this.skullWallCount.ForeColor = Properties.Settings.Default.TextColor; this.lastItemLabel.ForeColor = Properties.Settings.Default.TextColor; + this.deathLabel.ForeColor = Properties.Settings.Default.TextColor; + this.deathCount.ForeColor = Properties.Settings.Default.TextColor; this.shurikenAmmoCount.ForeColor = Properties.Settings.Default.TextColor; this.rollingShurikenAmmoCount.ForeColor = Properties.Settings.Default.TextColor; this.caltropsAmmoCount.ForeColor = Properties.Settings.Default.TextColor; @@ -3871,23 +3960,26 @@ private void saveSettings(object sender, EventArgs e) Properties.Settings.Default.FormWidth = this.Width; Properties.Settings.Default.FormHeight = this.Height; Properties.Settings.Default.Save(); + settingsBackup = new SettingsBackup(); } private void restoreDefaultSettings(object sender, EventArgs e) { - Properties.Settings.Default.Panel1Contents = "Hermes Boots,Grapple Claw,Feather,Hand Scanner,Glyph Reader,Holy Grail,mirai.exe"; + Properties.Settings.Default.Panel1Contents = "Hermes' Boots,Grapple Claw,Feather,Hand Scanner,reader.exe,Holy Grail,mirai.exe"; Properties.Settings.Default.Panel2Contents = "Bronze Mirror,Fruit of Eden,Twin Statue,Key of Eternity,Helmet,Plane Model,Crystal Skull,Dimensional Key,Pochette Key,Ice Cape,Scalesphere,Cog of the Soul,Dragon Bone,Serpent Staff,Mulana Talisman,Woman Statue,Pepper,Talisman,Diary,Mini Doll,Treasures,Anchor,Key Fairy Combo,Isis' Pendant,Eye of Truth,Magatama Jewel,torude.exe,Shrine Wall Removal"; Properties.Settings.Default.Panel3Contents = "Origin Seal,Birth Seal,Life Seal,Death Seal,Book of the Dead,Ring,Fairy Clothes,Mobile Super X2,Scriptures,Crucifix,Perfume,Glove,Bracelet,Spaulder"; Properties.Settings.Default.Panel4Contents = "Whip,Knife,Axe,Katana,Shield,Gauntlet,Pistol,Shuriken,Rolling Shuriken,Caltrops,Flare Gun,Chakram,Earth Spear,Bomb"; Properties.Settings.Default.Panel5Contents = "Philosopher's Ocarina,Mantra/Djed Pillar,Vessel/Medicine,Key Sword,Lamp of Time,Maps,Ankh Jewels"; Properties.Settings.Default.BackgroundColor = System.Drawing.SystemColors.Control; Properties.Settings.Default.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(70)))), ((int)(((byte)(70)))), ((int)(((byte)(200))))); - Properties.Settings.Default.FormWidth = 320; - Properties.Settings.Default.FormHeight = 694; + Properties.Settings.Default.FormWidth = 356; + Properties.Settings.Default.FormHeight = 822; Properties.Settings.Default.BackgroundMode = "shaded"; Properties.Settings.Default.ShowLastItem = true; Properties.Settings.Default.AlwaysOnTop = true; Properties.Settings.Default.ShowAmmoCount = true; + Properties.Settings.Default.ShowDeathCount = true; + Properties.Settings.Default.DeathCount = 0; updateAlwaysOnTop(); updateShowAmmoCount(); @@ -3899,33 +3991,6 @@ private void restoreDefaultSettings(object sender, EventArgs e) this.Refresh(); } - //private void toggleVisibility(Control control, bool visible) - //{ - // if(control != null) - // { - // try - // { - // control.Invoke(new Action(() => - // { - // if (control.Visible != visible) - // { - // int controlIndex = control.TabIndex; - // control.Visible = visible; - // control.Parent.Controls.SetChildIndex(control, controlIndex); - // control.Refresh(); - // } - // })); - // } - // catch (Exception ex) - // { - // // In case this isn't an active form control right now. - // int controlIndex = control.TabIndex; - // control.Parent.Controls.SetChildIndex(control, controlIndex); - // control.Visible = visible; - // } - // } - //} - private void toggleVisibility(Control control, bool visible) { if (control != null) @@ -3988,7 +4053,7 @@ private void SetImage(String flagName, bool isAdd) private void SetImage(PictureBox pictureBox, System.Drawing.Image image) { - try + if (pictureBox.InvokeRequired) { pictureBox.Invoke(new Action(() => { @@ -3996,7 +4061,7 @@ private void SetImage(PictureBox pictureBox, System.Drawing.Image image) pictureBox.Refresh(); })); } - catch(Exception ex) + else { // In case this isn't an active form control right now. pictureBox.Image = image; @@ -4033,7 +4098,7 @@ private void UpdateTextVisibility(Control panel, bool showText) } } - private void setBackgroundImage(PictureBox pictureBox, System.Drawing.Image image) + private void SetBackgroundImage(PictureBox pictureBox, System.Drawing.Image image) { if (pictureBox.InvokeRequired) { @@ -4049,7 +4114,7 @@ private void setBackgroundImage(PictureBox pictureBox, System.Drawing.Image imag } } - private void updateCount(Label label, bool isAdd, int max) + private void UpdateCount(Label label, bool isAdd, int max) { if (label.InvokeRequired) { @@ -4095,7 +4160,7 @@ private void updateCount(Label label, bool isAdd, int max) } } - private void updateAmmoCount(Label label, int newCount, int max) + private void UpdateCount(Label label, int newCount, int max) { if (newCount >= 0 && newCount <= max) { @@ -4151,32 +4216,6 @@ private void updatePistolAmmoCount(Label label, bool clip, int newCount) } } - private void setFlailWhipIndex(object sender, EventArgs e) - { - whipsPanel.Controls.SetChildIndex(flailWhip, 0); - } - private void setChainWhipIndex(object sender, EventArgs e) - { - whipsPanel.Controls.SetChildIndex(chainWhip, 1); - } - - private void setAngelShieldIndex(object sender, EventArgs e) - { - shieldsPanel.Controls.SetChildIndex(angelShield, 0); - } - private void setSilverShieldIndex(object sender, EventArgs e) - { - shieldsPanel.Controls.SetChildIndex(silverShield, 1); - } - private void setFakeSilverShieldIndex(object sender, EventArgs e) - { - shieldsPanel.Controls.SetChildIndex(fakeSilverShield, 2); - } - private void setBucklerIndex(object sender, EventArgs e) - { - shieldsPanel.Controls.SetChildIndex(buckler, 3); - } - private void toggleShowLastItem(object sender, EventArgs e) { Properties.Settings.Default.ShowLastItem = !Properties.Settings.Default.ShowLastItem; @@ -4233,6 +4272,12 @@ private void toggleAmmoCount(object sender, EventArgs e) updateShowAmmoCount(); } + private void toggleDeathCount(object sender, EventArgs e) + { + Properties.Settings.Default.ShowDeathCount = !Properties.Settings.Default.ShowDeathCount; + updateShowDeathCount(); + } + private void setHideUncollected(object sender, EventArgs e) { Properties.Settings.Default.BackgroundMode = "hide"; @@ -4256,5 +4301,30 @@ private void setShadedUncollected(object sender, EventArgs e) updateBackgroundMode(); MessageBox.Show("Your settings have been saved. Please restart to allow them to take effect."); } + + private void resetDeathCount(object sender, EventArgs e) + { + Properties.Settings.Default.DeathCount = 0; + UpdateCount(deathCount, Properties.Settings.Default.DeathCount, int.MaxValue); + } + + private void deathCount_MouseClick(object sender, MouseEventArgs e) + { + MouseEventArgs me = (MouseEventArgs)e; + if (me.Button == System.Windows.Forms.MouseButtons.Left) + { + updateDeathCount(true); + } + else if (me.Button == System.Windows.Forms.MouseButtons.Right) + { + updateDeathCount(false); + } + } + + private void formClosing(object sender, FormClosingEventArgs e) + { + settingsBackup.RestoreSettings(); + Properties.Settings.Default.Save(); + } } } diff --git a/Program.cs b/Program.cs index d2a1349..4642478 100644 --- a/Program.cs +++ b/Program.cs @@ -39,7 +39,7 @@ class Program static void changed(object cur, object old, string name, LMRItemTracker.LaMulanaItemTrackerForm laMulanaItemTrackerForm) { - if (!name.StartsWith("byte-") && !name.StartsWith("word-")) + if (!name.StartsWith("byte-") && !name.StartsWith("word-") && !"flags-1".Equals(name)) return; string displayname; @@ -56,7 +56,14 @@ static void changed(object cur, object old, string name, LMRItemTracker.LaMulana format = ":x8"; System.Console.WriteLine("{0} {1,15} := {2" + format + "} to {3" + format + "}", name, displayname, old, cur); - if(displayname.StartsWith("boss-")) + if (displayname.Equals("death-tracker")) + { + if (((uint)old & 0x1000000) == 0 && (((uint)cur & 0x1000000) == 16777216)) + { + laMulanaItemTrackerForm.updateDeathCount(true); + } + } + else if (displayname.StartsWith("boss-")) { laMulanaItemTrackerForm.toggleBoss(displayname, (byte)cur >= (byte)3); } @@ -121,7 +128,7 @@ static void changed(object cur, object old, string name, LMRItemTracker.LaMulana laMulanaItemTrackerForm.toggleWhip(true); } } - else if (displayname.Equals("ankh-jewels") || displayname.StartsWith("ammo-")) + else if (displayname.StartsWith("ammo-")) { int ammoCount = 0; if (cur is ushort) @@ -135,10 +142,44 @@ static void changed(object cur, object old, string name, LMRItemTracker.LaMulana laMulanaItemTrackerForm.setAmmoCount(displayname, ammoCount); } + else if(displayname.Equals("ankh-jewels")) + { + int ammoCount = 0; + bool isAdd = false; + if (cur is ushort) + { + ammoCount = (ushort)cur; + isAdd = ammoCount > (ushort)old; + } + else if (cur is short) + { + ammoCount = (short)cur; + isAdd = ammoCount > (short)old; + } + + laMulanaItemTrackerForm.setAmmoCount(displayname, ammoCount); + if(isAdd) + { + laMulanaItemTrackerForm.UpdateLastItem(displayname); + } + } else if (displayname.Equals("invtr-grailfull") || displayname.Equals("invtr-grailbr")) { laMulanaItemTrackerForm.toggleGrail(displayname, (ushort)cur >= 1); } + else if (displayname.StartsWith("inv-")) + { + string updatedName = displayname.Replace("inv-", ""); + if ((ushort)cur >= 1) + { + laMulanaItemTrackerForm.toggleItem(updatedName, true); + laMulanaItemTrackerForm.UpdateLastItem(updatedName); + } + else + { + laMulanaItemTrackerForm.toggleItem(updatedName, false); + } + } else if (displayname.StartsWith("w-")) { if ((byte)old < 2 && (byte)cur >= 2) @@ -167,10 +208,20 @@ public static object DoStuff(LMRItemTracker.LaMulanaItemTrackerForm laMulanaItem byte[] rwords_old = new byte[510], rwords_new; remakenames = loadnames(namesXml); int startupCounter = 1; + laMulanaItemTrackerForm.setGameStarted(false); while (true) { - DateTime sleeptarget = DateTime.UtcNow.AddMilliseconds(100); + DateTime sleeptarget; + if (startupCounter == 2) + { + sleeptarget = DateTime.UtcNow.AddMilliseconds(5); + } + else + { + sleeptarget = DateTime.UtcNow.AddMilliseconds(100); + } + try { if (remake.Attach()) @@ -181,14 +232,20 @@ public static object DoStuff(LMRItemTracker.LaMulanaItemTrackerForm laMulanaItem remake.vars.UpdateAll(remake.proc); rbytes_new = remake.readbytes(); rwords_new = remake.readwords(); + if(rwords_new == null) + { + continue; + } + if (rbytes_new[824] == 0) { // Player is dead or hasn't started a game. laMulanaItemTrackerForm.setGameStarted(false); + sleeptarget = DateTime.UtcNow.AddMilliseconds(20); startupCounter = 1; } - if(startupCounter == 2) + if (startupCounter == 3) { laMulanaItemTrackerForm.setGameStarted(true); } @@ -219,7 +276,7 @@ public static object DoStuff(LMRItemTracker.LaMulanaItemTrackerForm laMulanaItem } rbytes_old = rbytes_new; rwords_old = rwords_new; - if (startupCounter < 2) + if (startupCounter < 3 && rbytes_new[824] != 0) { ++startupCounter; } diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 9d80f3d..d71558c 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -32,4 +32,4 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.11")] +[assembly: AssemblyVersion("1.1.0")] diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs index 6e91319..5bb6aa7 100644 --- a/Properties/Settings.Designer.cs +++ b/Properties/Settings.Designer.cs @@ -25,7 +25,7 @@ internal sealed partial class Settings : global::System.Configuration.Applicatio [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("Hermes Boots,Grapple Claw,Feather,Hand Scanner,Glyph Reader,Holy Grail,mirai.exe")] + [global::System.Configuration.DefaultSettingValueAttribute("Hermes\' Boots,Grapple Claw,Feather,Hand Scanner,reader.exe,Holy Grail,mirai.exe")] public string Panel1Contents { get { return ((string)(this["Panel1Contents"])); @@ -124,7 +124,7 @@ internal sealed partial class Settings : global::System.Configuration.Applicatio [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("320")] + [global::System.Configuration.DefaultSettingValueAttribute("356")] public int FormWidth { get { return ((int)(this["FormWidth"])); @@ -136,7 +136,7 @@ internal sealed partial class Settings : global::System.Configuration.Applicatio [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("662")] + [global::System.Configuration.DefaultSettingValueAttribute("822")] public int FormHeight { get { return ((int)(this["FormHeight"])); @@ -205,5 +205,29 @@ internal sealed partial class Settings : global::System.Configuration.Applicatio this["Panel6Contents"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool ShowDeathCount { + get { + return ((bool)(this["ShowDeathCount"])); + } + set { + this["ShowDeathCount"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("0")] + public int DeathCount { + get { + return ((int)(this["DeathCount"])); + } + set { + this["DeathCount"] = value; + } + } } } diff --git a/Properties/Settings.settings b/Properties/Settings.settings index 932d592..6f1c055 100644 --- a/Properties/Settings.settings +++ b/Properties/Settings.settings @@ -3,7 +3,7 @@ - Hermes Boots,Grapple Claw,Feather,Hand Scanner,Glyph Reader,Holy Grail,mirai.exe + Hermes' Boots,Grapple Claw,Feather,Hand Scanner,reader.exe,Holy Grail,mirai.exe Bronze Mirror,Fruit of Eden,Twin Statue,Key of Eternity,Helmet,Plane Model,Crystal Skull,Dimensional Key,Pochette Key,Ice Cape,Scalesphere,Cog of the Soul,Dragon Bone,Serpent Staff,Mulana Talisman,Woman Statue,Pepper,Talisman,Diary,Mini Doll,Treasures,Anchor,Key Fairy Combo,Isis' Pendant,Eye of Truth,Magatama Jewel,torude.exe,Shrine Wall Removal @@ -27,10 +27,10 @@ True - 320 + 356 - 662 + 822 True @@ -47,5 +47,11 @@ + + True + + + 0 + \ No newline at end of file diff --git a/README.md b/README.md index 3633f3a..7922b3f 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ * Includes some information not available in the pause menu, such as which mantras you've recited and whether or not you have the map for Shrine of the Mother * Ability to change background color and text color, either by double-clicking the background/text or using the menu option. * Ability to reorganize item layout (with some limitations). +* Death tracker (beta) which automatically saves across sessions and can be manually adjusted by left or right clicking. * Ability to save settings. ## Installation diff --git a/SettingsBackup.cs b/SettingsBackup.cs new file mode 100644 index 0000000..cbd5e1f --- /dev/null +++ b/SettingsBackup.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LMRItemTracker +{ + class SettingsBackup + { + int BackgroundColor { get; } + int TextColor { get; } + int FormWidth { get; } + int FormHeight { get; } + bool AlwaysOnTop { get; } + bool ShowLastItem { get; } + bool ShowAmmoCount { get; } + bool ShowDeathCount { get; } + string Panel1Contents { get; } + string Panel2Contents { get; } + string Panel3Contents { get; } + string Panel4Contents { get; } + string Panel5Contents { get; } + string Panel6Contents { get; } + + public SettingsBackup() + { + BackgroundColor = Properties.Settings.Default.BackgroundColor.ToArgb(); + TextColor = Properties.Settings.Default.TextColor.ToArgb(); + FormWidth = Properties.Settings.Default.FormWidth; + FormHeight = Properties.Settings.Default.FormHeight; + ShowLastItem = Properties.Settings.Default.ShowLastItem; + AlwaysOnTop = Properties.Settings.Default.AlwaysOnTop; + ShowAmmoCount = Properties.Settings.Default.ShowAmmoCount; + ShowDeathCount = Properties.Settings.Default.ShowDeathCount; + + Panel1Contents = Properties.Settings.Default.Panel1Contents; + Panel2Contents = Properties.Settings.Default.Panel2Contents; + Panel3Contents = Properties.Settings.Default.Panel3Contents; + Panel4Contents = Properties.Settings.Default.Panel4Contents; + Panel5Contents = Properties.Settings.Default.Panel5Contents; + Panel6Contents = Properties.Settings.Default.Panel6Contents; + } + + public void RestoreSettings() + { + Properties.Settings.Default.BackgroundColor = System.Drawing.Color.FromArgb(BackgroundColor); + Properties.Settings.Default.TextColor = System.Drawing.Color.FromArgb(TextColor); + Properties.Settings.Default.FormWidth = FormWidth; + Properties.Settings.Default.FormHeight = FormHeight; + Properties.Settings.Default.AlwaysOnTop = AlwaysOnTop; + Properties.Settings.Default.ShowLastItem = ShowLastItem; + Properties.Settings.Default.ShowAmmoCount = ShowAmmoCount; + Properties.Settings.Default.ShowDeathCount = ShowDeathCount; + + Properties.Settings.Default.Panel1Contents = Panel1Contents; + Properties.Settings.Default.Panel2Contents = Panel2Contents; + Properties.Settings.Default.Panel3Contents = Panel3Contents; + Properties.Settings.Default.Panel4Contents = Panel4Contents; + Properties.Settings.Default.Panel5Contents = Panel5Contents; + Properties.Settings.Default.Panel6Contents = Panel6Contents; + } + } +} diff --git a/names.xml b/names.xml index 5c87b2a..09a55cd 100644 --- a/names.xml +++ b/names.xml @@ -9,14 +9,14 @@ - - - - - - - - + + + + + + + + @@ -25,55 +25,56 @@ - - - - - + + + + + - + - - + + - - - - + + + + + - - + + - - + + - - - + + + - - + + - - - + + + - + - - + + - - - - - - - - - + + + + + + + + + @@ -128,16 +129,16 @@ - - + + - - + + @@ -147,7 +148,6 @@ - @@ -162,7 +162,6 @@ - @@ -192,8 +191,6 @@ - - @@ -210,4 +207,6 @@ + +