diff --git a/AchievementsTracker/AchievementsTracker/AchievementsTracker.csproj b/AchievementsTracker/AchievementsTracker/AchievementsTracker.csproj index 14e5c60..8784f2c 100644 --- a/AchievementsTracker/AchievementsTracker/AchievementsTracker.csproj +++ b/AchievementsTracker/AchievementsTracker/AchievementsTracker.csproj @@ -9,7 +9,7 @@ WinExe AchievementsTracker SpelunkyRTATracker - v4.6.1 + v4.7.1 512 true @@ -76,6 +76,8 @@ + + diff --git a/AchievementsTracker/AchievementsTracker/App.config b/AchievementsTracker/AchievementsTracker/App.config index bae5d6d..8fc0551 100644 --- a/AchievementsTracker/AchievementsTracker/App.config +++ b/AchievementsTracker/AchievementsTracker/App.config @@ -1,6 +1,6 @@ - + diff --git a/AchievementsTracker/AchievementsTracker/EntryType.cs b/AchievementsTracker/AchievementsTracker/EntryType.cs new file mode 100644 index 0000000..437c811 --- /dev/null +++ b/AchievementsTracker/AchievementsTracker/EntryType.cs @@ -0,0 +1,7 @@ +namespace AchievementsTracker +{ + public enum EntryType + { + Character, Monster, Item, Trap + } +} diff --git a/AchievementsTracker/AchievementsTracker/ImgForm.cs b/AchievementsTracker/AchievementsTracker/ImgForm.cs index 4d46788..91ea7f0 100644 --- a/AchievementsTracker/AchievementsTracker/ImgForm.cs +++ b/AchievementsTracker/AchievementsTracker/ImgForm.cs @@ -7,6 +7,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Forms; +using System.Diagnostics; namespace AchievementsTracker { @@ -16,7 +17,8 @@ public partial class ImgForm : Form int imageSize = 40; int rows = 8; bool inverted = false; - int[] CHAR_ORDER = { 2, 6, 7, 4, 9, 12, 11, 5, 1, 8, 14, 10, 13, 15, 3, 0 }; + bool groupByArea = false; + Category category = Category.AA; public ImgForm() { @@ -55,70 +57,120 @@ public void SetInverted(bool inv) inverted = inv; } - public void Reset() + public void changeCategory(Category cat) { - ArrangeUnlockables(); + category = cat; + } + public void SetGroupByArea(bool param) + { + groupByArea = param; + } + + public void Reset() + { foreach (Control c in Controls) { c.Show(); } + ArrangeUnlockables(); + } public void ArrangeUnlockables() { - for (int i = 0; i < 120; i++) + Debug.WriteLine("Category: " + category.ToString()); + + + int pos = 0; + + var imgOrder = ImgOrder.DEFAULT; + if (groupByArea) + { + imgOrder = ImgOrder.BY_AREA; + } + + foreach ((EntryType entryType, string name) in imgOrder) { // Get the right image box Control picBox; - if (i < 16) + + if (entryType == EntryType.Character) { - picBox = Controls.Find("c" + CHAR_ORDER[i], false)[0]; + + picBox = Controls.Find(name, false)[0]; + if (category != Category.AA && category != Category.AC) + { + picBox.Hide(); + continue; + } + picBox.Show(); } - else if (i >= 16 && i < 72) + else if (entryType == EntryType.Monster) { - picBox = Controls.Find("m" + (i - 16), false)[0]; + picBox = Controls.Find(name, false)[0]; + if (category != Category.AA && category != Category.AJE) + { + picBox.Hide(); + continue; + } + picBox.Show(); } - else if (i >= 72 && i < 106) + else if (entryType == EntryType.Item) { - picBox = Controls.Find("i" + (i - 72), false)[0]; + picBox = Controls.Find(name, false)[0]; + if (category != Category.AA && category != Category.AJE) + { + picBox.Hide(); + continue; + } + picBox.Show(); } else { - picBox = Controls.Find("t" + (i - 106), false)[0]; + picBox = Controls.Find(name, false)[0]; + if (category != Category.AA && category != Category.AJE) + { + picBox.Hide(); + continue; + } + picBox.Show(); } + // Position it accordingly int xIdx; int yIdx; if (!inverted) { - xIdx = (i / rows); - yIdx = (i % rows); + xIdx = (pos / rows); + yIdx = (pos % rows); } else { - xIdx = (i % rows); - yIdx = (i / rows); + xIdx = (pos % rows); + yIdx = (pos / rows); } int x = imageSize * xIdx; int y = imageSize * yIdx; picBox.Location = new Point(x, y); picBox.Size = new Size(imageSize, imageSize); + + pos++; } // Handle remainder int remainder = 0; - if (120 % rows != 0) + if ((pos-1) % rows != 0) { remainder = 1; } if (inverted) { - ClientSize = new Size(imageSize * rows, imageSize * (120 / rows + remainder)); + ClientSize = new Size(imageSize * rows, imageSize * ((pos-1) / rows + remainder)); } else { - ClientSize = new Size(imageSize * (120 / rows + remainder), imageSize * rows); + ClientSize = new Size(imageSize * ((pos-1) / rows + remainder), imageSize * rows); } } diff --git a/AchievementsTracker/AchievementsTracker/ImgOrder.cs b/AchievementsTracker/AchievementsTracker/ImgOrder.cs new file mode 100644 index 0000000..cbd4ec7 --- /dev/null +++ b/AchievementsTracker/AchievementsTracker/ImgOrder.cs @@ -0,0 +1,276 @@ +namespace AchievementsTracker +{ + public static class ImgOrder + { + public static (EntryType, string)[] DEFAULT = { + (EntryType.Character, "c2"), // Yellow + (EntryType.Character, "c6"), // Cyan + (EntryType.Character, "c7"), // Lime + (EntryType.Character, "c4"), // Purple + (EntryType.Character, "c9"), // Round Girl + (EntryType.Character, "c12"), // Round Boy + (EntryType.Character, "c11"), // Viking + (EntryType.Character, "c5"), // Black + (EntryType.Character, "c1"), // Meat Boy + (EntryType.Character, "c8"), // Magenta + (EntryType.Character, "c14"), // Robot + (EntryType.Character, "c10"), // Ninja + (EntryType.Character, "c13"), // Carl + (EntryType.Character, "c15"), // Golden Monk + (EntryType.Character, "c3"), // Brown + (EntryType.Character, "c0"), // Yang + + (EntryType.Monster, "m0"), // Snake + (EntryType.Monster, "m1"), // Cobra + (EntryType.Monster, "m2"), // Bat + (EntryType.Monster, "m3"), // Spike + (EntryType.Monster, "m4"), // Hangspider + (EntryType.Monster, "m5"), // Giant Spider + (EntryType.Monster, "m6"), // Skeleton + (EntryType.Monster, "m7"), // Scorpian + (EntryType.Monster, "m8"), // Caveman + (EntryType.Monster, "m9"), // Damsel + (EntryType.Monster, "m10"), // Shopkeeper + (EntryType.Monster, "m11"), // Tunnelman + (EntryType.Monster, "m12"), // Scarab + (EntryType.Monster, "m13"), // Tiki Man + (EntryType.Monster, "m14"), // Blue Frog + (EntryType.Monster, "m15"), // Orange Frog + (EntryType.Monster, "m16"), // Giant Frog + (EntryType.Monster, "m17"), // Mantrap + (EntryType.Monster, "m18"), // Piranha + (EntryType.Monster, "m19"), // Old Bitey + (EntryType.Monster, "m20"), // Bee + (EntryType.Monster, "m21"), // Queen Bee + (EntryType.Monster, "m22"), // Snail + (EntryType.Monster, "m23"), // Monkey + (EntryType.Monster, "m24"), // Golden Monkey + (EntryType.Monster, "m25"), // Jiangshi + (EntryType.Monster, "m26"), // Green Knight + (EntryType.Monster, "m27"), // Black Knight + (EntryType.Monster, "m28"), // Vampire + (EntryType.Monster, "m29"), // Ghost + (EntryType.Monster, "m30"), // Bacterium + (EntryType.Monster, "m31"), // Worm Egg + (EntryType.Monster, "m32"), // Worm Baby + (EntryType.Monster, "m33"), // Yeti + (EntryType.Monster, "m34"), // Yeti King + (EntryType.Monster, "m35"), // Mammoth + (EntryType.Monster, "m36"), // Alien + (EntryType.Monster, "m37"), // UFO + (EntryType.Monster, "m38"), // Alien Tank + (EntryType.Monster, "m39"), // Alien Lord + (EntryType.Monster, "m40"), // Alien Queen + (EntryType.Monster, "m41"), // Hawkman + (EntryType.Monster, "m42"), // Crocman + (EntryType.Monster, "m43"), // Magmaman + (EntryType.Monster, "m44"), // Scorpian Fly + (EntryType.Monster, "m45"), // Mummy + (EntryType.Monster, "m46"), // Anubis + (EntryType.Monster, "m47"), // Abubis II + (EntryType.Monster, "m48"), // Olmec + (EntryType.Monster, "m49"), // Vlad + (EntryType.Monster, "m50"), // Imp + (EntryType.Monster, "m51"), // Blue Devil + (EntryType.Monster, "m52"), // Succubus + (EntryType.Monster, "m53"), // Horse Head + (EntryType.Monster, "m54"), // Ox Face + (EntryType.Monster, "m55"), // Yama + + (EntryType.Item, "i0"), // Rope Pile + (EntryType.Item, "i1"), // Bomb Bag + (EntryType.Item, "i2"), // Bomb Box + (EntryType.Item, "i3"), // Specs + (EntryType.Item, "i4"), // Climbing Glove + (EntryType.Item, "i5"), // Pitcher's Mitt + (EntryType.Item, "i6"), // Spring Shoes + (EntryType.Item, "i7"), // Spike Shoes + (EntryType.Item, "i8"), // Paste + (EntryType.Item, "i9"), // Compass + (EntryType.Item, "i10"), // Mattock + (EntryType.Item, "i11"), // Boomerang + (EntryType.Item, "i12"), // Machete + (EntryType.Item, "i13"), // Crysknife + (EntryType.Item, "i14"), // Webgun + (EntryType.Item, "i15"), // Shotgun + (EntryType.Item, "i16"), // Freezeray + (EntryType.Item, "i17"), // Plasma Cannon + (EntryType.Item, "i18"), // Camera + (EntryType.Item, "i19"), // Teleporter + (EntryType.Item, "i20"), // Parachute + (EntryType.Item, "i21"), // Cape + (EntryType.Item, "i22"), // Jetpack + (EntryType.Item, "i23"), // Shield + (EntryType.Item, "i24"), // Royal Jelly + (EntryType.Item, "i25"), // Idol + (EntryType.Item, "i26"), // Kapala + (EntryType.Item, "i27"), // Udjat + (EntryType.Item, "i28"), // Ankh + (EntryType.Item, "i29"), // Hedjet + (EntryType.Item, "i30"), // Sceptre + (EntryType.Item, "i31"), // Book of the Dead + (EntryType.Item, "i32"), // Vlad's Cape + (EntryType.Item, "i33"), // Vlad's Amulet + + (EntryType.Trap, "t0"), // Spikes + (EntryType.Trap, "t1"), // Arrow Trap + (EntryType.Trap, "t2"), // TNT + (EntryType.Trap, "t3"), // Boulder + (EntryType.Trap, "t4"), // Tikitrap + (EntryType.Trap, "t5"), // Acid + (EntryType.Trap, "t6"), // Jump Pad + (EntryType.Trap, "t7"), // Landmine + (EntryType.Trap, "t8"), // Turret + (EntryType.Trap, "t9"), // Laser + (EntryType.Trap, "t10"), // Crush Trap + (EntryType.Trap, "t11"), // Ceiling Trap + (EntryType.Trap, "t12"), // Spikeball + (EntryType.Trap, "t13"), // Lava + }; + + public static (EntryType, string)[] BY_AREA = { + (EntryType.Character, "c2"), // Yellow + (EntryType.Character, "c6"), // Cyan + (EntryType.Character, "c7"), // Lime + (EntryType.Character, "c4"), // Purple + (EntryType.Character, "c9"), // Round Girl + (EntryType.Character, "c12"), // Round Boy + (EntryType.Character, "c11"), // Viking + (EntryType.Character, "c5"), // Black + (EntryType.Character, "c1"), // Meat Boy + (EntryType.Character, "c8"), // Magenta + (EntryType.Character, "c14"), // Robot + (EntryType.Character, "c10"), // Ninja + (EntryType.Character, "c13"), // Carl + (EntryType.Character, "c15"), // Golden Monk + (EntryType.Character, "c3"), // Brown + (EntryType.Character, "c0"), // Yang + + // Mines + (EntryType.Monster, "m0"), // Snake + (EntryType.Monster, "m1"), // Cobra + (EntryType.Monster, "m2"), // Bat + (EntryType.Monster, "m3"), // Spike + (EntryType.Monster, "m4"), // Hangspider + (EntryType.Monster, "m5"), // Giant Spider + (EntryType.Item, "i8"), // Paste + (EntryType.Monster, "m6"), // Skeleton + (EntryType.Monster, "m7"), // Scorpian + (EntryType.Monster, "m8"), // Caveman + (EntryType.Monster, "m9"), // Damsel + (EntryType.Monster, "m10"), // Shopkeeper + (EntryType.Monster, "m11"), // Tunnelman + (EntryType.Trap, "t1"), // Arrow Trap + (EntryType.Trap, "t2"), // TNT + (EntryType.Trap, "t3"), // Boulder + (EntryType.Item, "i10"), // Mattock + (EntryType.Item, "i27"), // Udjat + + // Jungle + (EntryType.Monster, "m13"), // Tiki Man + (EntryType.Item, "i11"), // Boomerang + (EntryType.Monster, "m14"), // Blue Frog + (EntryType.Monster, "m15"), // Orange Frog + (EntryType.Monster, "m16"), // Giant Frog + (EntryType.Monster, "m17"), // Mantrap + (EntryType.Monster, "m22"), // Snail + (EntryType.Monster, "m23"), // Monkey + (EntryType.Trap, "t4"), // Tikitrap + + (EntryType.Monster, "m18"), // Piranha + (EntryType.Monster, "m19"), // Old Bitey + + (EntryType.Monster, "m20"), // Bee + (EntryType.Monster, "m21"), // Queen Bee + (EntryType.Item, "i24"), // Royal Jelly + + // Haunted Castle + (EntryType.Monster, "m29"), // Ghost + (EntryType.Monster, "m26"), // Green Knight + (EntryType.Monster, "m27"), // Black Knight + (EntryType.Item, "i23"), // Shield + + // Worm + (EntryType.Monster, "m31"), // Worm Egg + (EntryType.Monster, "m32"), // Worm Baby + (EntryType.Item, "i13"), // Crysknife + (EntryType.Trap, "t5"), // Acid + (EntryType.Monster, "m30"), // Bacterium + + // Ice Caves + (EntryType.Monster, "m33"), // Yeti + (EntryType.Monster, "m35"), // Mammoth + (EntryType.Monster, "m37"), // UFO + (EntryType.Monster, "m36"), // Alien + (EntryType.Trap, "t6"), // Jump Pad + (EntryType.Trap, "t7"), // Landmine + (EntryType.Monster, "m34"), // Yeti King + (EntryType.Item, "i9"), // Compass + (EntryType.Item, "i0"), // Rope Pile + (EntryType.Item, "i7"), // Spike Shoes + + (EntryType.Monster, "m38"), // Alien Tank + (EntryType.Monster, "m39"), // Alien Lord + (EntryType.Monster, "m40"), // Alien Queen + (EntryType.Item, "i17"), // Plasma Cannon + (EntryType.Trap, "t8"), // Turret + (EntryType.Trap, "t9"), // Laser + + + // Temple / CoG + (EntryType.Monster, "m41"), // Hawkman + (EntryType.Monster, "m42"), // Crocman + (EntryType.Monster, "m43"), // Magmaman + (EntryType.Monster, "m46"), // Anubis + (EntryType.Monster, "m48"), // Olmec + (EntryType.Trap, "t10"), // Crush Trap + (EntryType.Trap, "t11"), // Ceiling Trap + (EntryType.Trap, "t13"), // Lava + (EntryType.Monster, "m12"), // Scarab + (EntryType.Monster, "m44"), // Scorpian Fly + (EntryType.Monster, "m45"), // Mummy + (EntryType.Monster, "m47"), // Abubis II + + // Hell + (EntryType.Monster, "m25"), // Jiangshi + (EntryType.Monster, "m28"), // Vampire + (EntryType.Item, "i21"), // Cape + (EntryType.Monster, "m49"), // Vlad + (EntryType.Item, "i32"), // Vlad's Cape + (EntryType.Item, "i33"), // Vlad's Amulet + (EntryType.Monster, "m50"), // Imp + (EntryType.Monster, "m51"), // Blue Devil + (EntryType.Monster, "m52"), // Succubus + (EntryType.Trap, "t12"), // Spikeball + + (EntryType.Item, "i28"), // Ankh + (EntryType.Item, "i29"), // Hedjet + (EntryType.Item, "i30"), // Sceptre + (EntryType.Item, "i31"), // Book of the Dead + (EntryType.Monster, "m53"), // Horse Head + (EntryType.Monster, "m54"), // Ox Face + (EntryType.Item, "i2"), // Bomb Box + (EntryType.Monster, "m55"), // Yama + (EntryType.Trap, "t0"), // Spikes + + + (EntryType.Item, "i1"), // Bomb Bag + (EntryType.Item, "i3"), // Specs + (EntryType.Item, "i4"), // Climbing Glove + (EntryType.Item, "i5"), // Pitcher's Mitt + (EntryType.Item, "i6"), // Spring Shoes + (EntryType.Item, "i12"), // Machete + (EntryType.Item, "i14"), // Webgun + (EntryType.Item, "i15"), // Shotgun + (EntryType.Item, "i16"), // Freezeray + (EntryType.Item, "i18"), // Camera + (EntryType.Item, "i19"), // Teleporter + (EntryType.Item, "i20"), // Parachute + (EntryType.Item, "i22"), // Jetpack + (EntryType.Item, "i25"), // Idol + (EntryType.Item, "i26"), // Kapala + (EntryType.Monster, "m24"), // Golden Monkey + }; + + } +} diff --git a/AchievementsTracker/AchievementsTracker/Program.cs b/AchievementsTracker/AchievementsTracker/Program.cs index 0a1ce67..1dda91b 100644 --- a/AchievementsTracker/AchievementsTracker/Program.cs +++ b/AchievementsTracker/AchievementsTracker/Program.cs @@ -124,10 +124,11 @@ public TrayApplicationContext(TrackerSettings trackerSettings) form.SetResetHotKey(mods, key); settings.SetHotkey(mods, key); - // Set image size, rows, inverted + // Set image size, rows, inverted, groupByArea settings.SetImageSize(trackerSettings.imageSize); settings.SetRows(trackerSettings.rows); settings.SetInverted(trackerSettings.inverted); + settings.SetGroupByArea(trackerSettings.groupByArea); // Set background color Color bgColor = ColorTranslator.FromHtml(trackerSettings.backColor); @@ -269,6 +270,8 @@ void SelectAA(object sender, EventArgs e) form.drawList(); form.drawStatusList(); + imgForm.changeCategory(Category.AA); + imgForm.ArrangeUnlockables(); imgForm.Show(); form.changeCategory(Category.AA); @@ -325,6 +328,8 @@ void SelectAJE(object sender, EventArgs e) form.drawList(); form.drawStatusList(); + imgForm.changeCategory(Category.AJE); + imgForm.ArrangeUnlockables(); imgForm.Show(); form.changeCategory(Category.AJE); @@ -381,6 +386,8 @@ void SelectAC(object sender, EventArgs e) form.drawList(); form.drawStatusList(); + imgForm.changeCategory(Category.AC); + imgForm.ArrangeUnlockables(); imgForm.Show(); form.changeCategory(Category.AC); @@ -437,6 +444,7 @@ void SelectASO(object sender, EventArgs e) form.drawList(); form.drawStatusList(); + imgForm.changeCategory(Category.ASO); imgForm.Hide(); form.changeCategory(Category.ASO); @@ -493,6 +501,7 @@ void SelectTutorial(object sender, EventArgs e) form.drawList(); form.drawStatusList(); + imgForm.changeCategory(Category.Tutorial); imgForm.Hide(); form.changeCategory(Category.Tutorial); @@ -538,7 +547,7 @@ public void Reset(object sender, EventArgs e) settings.ResetSaveFile(); } - public void SaveSettings(Color backColor, Color formColor, Keys resetHotkey, int resetHotkeyMods, String freshSave, String gameSave, int imageSize, int rows, bool inverted) + public void SaveSettings(Color backColor, Color formColor, Keys resetHotkey, int resetHotkeyMods, String freshSave, String gameSave, int imageSize, int rows, bool inverted, bool groupByArea) { trackerSettings.backColor = ColorTranslator.ToHtml(backColor); trackerSettings.textColor = ColorTranslator.ToHtml(formColor); @@ -549,6 +558,7 @@ public void SaveSettings(Color backColor, Color formColor, Keys resetHotkey, int trackerSettings.imageSize = imageSize; trackerSettings.rows = rows; trackerSettings.inverted = inverted; + trackerSettings.groupByArea = groupByArea; trackerSettings.Save(); } } @@ -565,6 +575,7 @@ public class TrackerSettings : AppSettings public int imageSize = 40; public int rows = 8; public bool inverted = false; + public bool groupByArea = false; } } diff --git a/AchievementsTracker/AchievementsTracker/Properties/Resources.Designer.cs b/AchievementsTracker/AchievementsTracker/Properties/Resources.Designer.cs index 8f65858..42107d1 100644 --- a/AchievementsTracker/AchievementsTracker/Properties/Resources.Designer.cs +++ b/AchievementsTracker/AchievementsTracker/Properties/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace AchievementsTracker.Properties { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { diff --git a/AchievementsTracker/AchievementsTracker/Properties/Settings.Designer.cs b/AchievementsTracker/AchievementsTracker/Properties/Settings.Designer.cs index 1219841..e926ebd 100644 --- a/AchievementsTracker/AchievementsTracker/Properties/Settings.Designer.cs +++ b/AchievementsTracker/AchievementsTracker/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace AchievementsTracker.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.6.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/AchievementsTracker/AchievementsTracker/SettingsForm.Designer.cs b/AchievementsTracker/AchievementsTracker/SettingsForm.Designer.cs index 10c2dda..7d88bfe 100644 --- a/AchievementsTracker/AchievementsTracker/SettingsForm.Designer.cs +++ b/AchievementsTracker/AchievementsTracker/SettingsForm.Designer.cs @@ -53,6 +53,7 @@ private void InitializeComponent() this.rowsBox = new System.Windows.Forms.NumericUpDown(); this.label7 = new System.Windows.Forms.Label(); this.invertedBox = new System.Windows.Forms.CheckBox(); + this.groupByAreaBox = new System.Windows.Forms.CheckBox(); ((System.ComponentModel.ISupportInitialize)(this.imageSizeBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.rowsBox)).BeginInit(); this.SuspendLayout(); @@ -60,7 +61,7 @@ private void InitializeComponent() // button1 // this.button1.ForeColor = System.Drawing.Color.Black; - this.button1.Location = new System.Drawing.Point(190, 553); + this.button1.Location = new System.Drawing.Point(190, 544); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(75, 23); this.button1.TabIndex = 0; @@ -153,7 +154,7 @@ private void InitializeComponent() // this.label4.AutoSize = true; this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); - this.label4.Location = new System.Drawing.Point(12, 375); + this.label4.Location = new System.Drawing.Point(12, 366); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(90, 20); this.label4.TabIndex = 9; @@ -163,7 +164,7 @@ private void InitializeComponent() // this.label5.AutoSize = true; this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); - this.label5.Location = new System.Drawing.Point(12, 468); + this.label5.Location = new System.Drawing.Point(12, 459); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(93, 20); this.label5.TabIndex = 10; @@ -173,7 +174,7 @@ private void InitializeComponent() // this.freshSaveBox.Enabled = false; this.freshSaveBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.freshSaveBox.Location = new System.Drawing.Point(16, 415); + this.freshSaveBox.Location = new System.Drawing.Point(16, 406); this.freshSaveBox.Name = "freshSaveBox"; this.freshSaveBox.ReadOnly = true; this.freshSaveBox.RightToLeft = System.Windows.Forms.RightToLeft.Yes; @@ -183,7 +184,7 @@ private void InitializeComponent() // gameSaveBox // this.gameSaveBox.Enabled = false; - this.gameSaveBox.Location = new System.Drawing.Point(16, 506); + this.gameSaveBox.Location = new System.Drawing.Point(16, 497); this.gameSaveBox.Name = "gameSaveBox"; this.gameSaveBox.ReadOnly = true; this.gameSaveBox.RightToLeft = System.Windows.Forms.RightToLeft.Yes; @@ -193,7 +194,7 @@ private void InitializeComponent() // freshSaveButton // this.freshSaveButton.ForeColor = System.Drawing.Color.Black; - this.freshSaveButton.Location = new System.Drawing.Point(113, 374); + this.freshSaveButton.Location = new System.Drawing.Point(113, 365); this.freshSaveButton.Name = "freshSaveButton"; this.freshSaveButton.Size = new System.Drawing.Size(73, 24); this.freshSaveButton.TabIndex = 14; @@ -205,7 +206,7 @@ private void InitializeComponent() // gameSaveButton // this.gameSaveButton.ForeColor = System.Drawing.Color.Black; - this.gameSaveButton.Location = new System.Drawing.Point(113, 467); + this.gameSaveButton.Location = new System.Drawing.Point(113, 458); this.gameSaveButton.Name = "gameSaveButton"; this.gameSaveButton.Size = new System.Drawing.Size(73, 24); this.gameSaveButton.TabIndex = 15; @@ -217,7 +218,7 @@ private void InitializeComponent() // clearFresh // this.clearFresh.ForeColor = System.Drawing.Color.Black; - this.clearFresh.Location = new System.Drawing.Point(192, 375); + this.clearFresh.Location = new System.Drawing.Point(192, 366); this.clearFresh.Name = "clearFresh"; this.clearFresh.Size = new System.Drawing.Size(61, 24); this.clearFresh.TabIndex = 16; @@ -229,7 +230,7 @@ private void InitializeComponent() // clearGame // this.clearGame.ForeColor = System.Drawing.Color.Black; - this.clearGame.Location = new System.Drawing.Point(192, 468); + this.clearGame.Location = new System.Drawing.Point(192, 459); this.clearGame.Name = "clearGame"; this.clearGame.Size = new System.Drawing.Size(61, 24); this.clearGame.TabIndex = 17; @@ -262,7 +263,7 @@ private void InitializeComponent() // // rowsBox // - this.rowsBox.Location = new System.Drawing.Point(151, 323); + this.rowsBox.Location = new System.Drawing.Point(129, 323); this.rowsBox.Name = "rowsBox"; this.rowsBox.Size = new System.Drawing.Size(39, 20); this.rowsBox.TabIndex = 20; @@ -276,7 +277,7 @@ private void InitializeComponent() // this.label7.AutoSize = true; this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); - this.label7.Location = new System.Drawing.Point(137, 290); + this.label7.Location = new System.Drawing.Point(115, 290); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(49, 20); this.label7.TabIndex = 21; @@ -285,19 +286,30 @@ private void InitializeComponent() // invertedBox // this.invertedBox.AutoSize = true; - this.invertedBox.Location = new System.Drawing.Point(200, 324); + this.invertedBox.Location = new System.Drawing.Point(188, 326); this.invertedBox.Name = "invertedBox"; this.invertedBox.Size = new System.Drawing.Size(65, 17); this.invertedBox.TabIndex = 22; this.invertedBox.Text = "Inverted"; this.invertedBox.UseVisualStyleBackColor = true; // + // groupByAreaBox + // + this.groupByAreaBox.AutoSize = true; + this.groupByAreaBox.Location = new System.Drawing.Point(188, 303); + this.groupByAreaBox.Name = "groupByAreaBox"; + this.groupByAreaBox.Size = new System.Drawing.Size(95, 17); + this.groupByAreaBox.TabIndex = 23; + this.groupByAreaBox.Text = "Group By Area"; + this.groupByAreaBox.UseVisualStyleBackColor = true; + // // SettingsForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15))))); - this.ClientSize = new System.Drawing.Size(277, 594); + this.ClientSize = new System.Drawing.Size(292, 597); + this.Controls.Add(this.groupByAreaBox); this.Controls.Add(this.invertedBox); this.Controls.Add(this.label7); this.Controls.Add(this.rowsBox); @@ -359,5 +371,6 @@ private void InitializeComponent() private System.Windows.Forms.NumericUpDown rowsBox; private System.Windows.Forms.Label label7; private System.Windows.Forms.CheckBox invertedBox; + private System.Windows.Forms.CheckBox groupByAreaBox; } } \ No newline at end of file diff --git a/AchievementsTracker/AchievementsTracker/SettingsForm.cs b/AchievementsTracker/AchievementsTracker/SettingsForm.cs index 926ae88..dd33fdf 100644 --- a/AchievementsTracker/AchievementsTracker/SettingsForm.cs +++ b/AchievementsTracker/AchievementsTracker/SettingsForm.cs @@ -26,6 +26,7 @@ public partial class SettingsForm : Form int imageSize; int rows; bool inverted; + bool groupByArea; public SettingsForm(TrayApplicationContext context, MainForm form, ImgForm imgForm) { @@ -57,6 +58,13 @@ public void SetInverted(bool inv) imgForm.SetInverted(inv); } + public void SetGroupByArea(bool param) + { + groupByArea = param; + groupByAreaBox.Checked = param; + imgForm.SetGroupByArea(param); + } + public void SetBackgroundColor(Color color) { bgColorText.Text = HexConverter(color); @@ -132,11 +140,12 @@ void Save() SetImageSize((int)imageSizeBox.Value); SetRows((int)rowsBox.Value); SetInverted(invertedBox.Checked); + SetGroupByArea(groupByAreaBox.Checked); imgForm.ArrangeUnlockables(); context.SetBackgroundColor(bgColorDialog.Color); context.SetTextColor(textColorDialog.Color); - context.SaveSettings(bgColorDialog.Color, textColorDialog.Color, hotkey, modifiers, freshSaveFile, gameSaveFile, imageSize, rows, inverted); + context.SaveSettings(bgColorDialog.Color, textColorDialog.Color, hotkey, modifiers, freshSaveFile, gameSaveFile, imageSize, rows, inverted, groupByArea); } private void SaveButton_Click(object sender, EventArgs e)