From 7c4bd01c22f2f702c04b7d7975f1cbeb827de651 Mon Sep 17 00:00:00 2001 From: cadon Date: Sun, 30 Apr 2023 15:20:48 +0200 Subject: [PATCH 1/4] UI fix for high total levels in the tester --- ARKBreedingStats/Form1.Designer.cs | 6 +- ARKBreedingStats/Form1.resx | 248 ++++++++++++++--------------- 2 files changed, 127 insertions(+), 127 deletions(-) diff --git a/ARKBreedingStats/Form1.Designer.cs b/ARKBreedingStats/Form1.Designer.cs index 7d404b3e..b4fb6093 100644 --- a/ARKBreedingStats/Form1.Designer.cs +++ b/ARKBreedingStats/Form1.Designer.cs @@ -1539,12 +1539,12 @@ private void InitializeComponent() // // labelTesterTotalLevel // - this.labelTesterTotalLevel.AutoSize = true; - this.labelTesterTotalLevel.Location = new System.Drawing.Point(184, 0); + this.labelTesterTotalLevel.Location = new System.Drawing.Point(147, 0); this.labelTesterTotalLevel.Name = "labelTesterTotalLevel"; - this.labelTesterTotalLevel.Size = new System.Drawing.Size(60, 13); + this.labelTesterTotalLevel.Size = new System.Drawing.Size(143, 13); this.labelTesterTotalLevel.TabIndex = 49; this.labelTesterTotalLevel.Text = "Total Level"; + this.labelTesterTotalLevel.TextAlign = System.Drawing.ContentAlignment.TopRight; // // lbNotYetTamed // diff --git a/ARKBreedingStats/Form1.resx b/ARKBreedingStats/Form1.resx index 6d64181b..d6f6fe4b 100644 --- a/ARKBreedingStats/Form1.resx +++ b/ARKBreedingStats/Form1.resx @@ -125,89 +125,6 @@ The TE can differ 0.1% due to ingame-rounding. 17, 17 - - - - iVBORw0KGgoAAAANSUhEUgAAAGQAAAAyCAYAAACqNX6+AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - vAAADrwBlbxySQAACDpJREFUeF7tWX9slOUdf3AkVocTN/7ossVgYlznjMFNLL01GzFu8Z85M8jSKTka - rICWUX5bqNy6gsMB0pq48aMy/3FjIwtmgwsNw9SMLXS4ecgEpVavqUKr5frDg7Z34H32+dzdM98dveu1 - 9Mi4vp/mm+f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dGMSF9jVxy4iToR5WwlU5Yd9N60j0 - brYO0ahzi+xT9QmDl8zUR49+iP5QEG3tbTjN4jDU1YrmQywA/3EC3QPtCDLgv0WyunvOoaPZm3BTsozL - ybCQpYiYCVOpjyM88PkDePejMMJDlEFKz7s4fsCLWzY34tSbLTjeGkCAVnLynRb493vgNhKvFmgtnhf8 - 8P+JSlflvccHf2cjvDquJXF/88P3nbg7cnG14PGREFbpydP4eYCVelwavS4ZLvIL2fa3tPPTBd/UjM6K - izFChGTKdFLT4lSMdN/FKKFCzNnOUO6vFoeF6gBbswwHl5Bxhooxq3BZipTr7COJHCldEHGyKLkkzVOV - nYkQ2yHQfP3OWaG7SAPFEatQKVwWob6SVZ6NMZon5doWh23ZixBn7JBYgvVbW2nbeS6ygFW6FCmFiwwp - 3EnWcIqXZLIQ3XdChGq+ixGgOCJFOf//oGNZTLqel4VLSA4ga5BrcTbyRIRIsQqUtViLEDTXxpd0hLgu - a4ywyrbxQbAB3Ak3qLu41mHMfwCWaqdyEzp1TQAAAABJRU5ErkJggg== - - - - - iVBORw0KGgoAAAANSUhEUgAAAGQAAAAyCAYAAACqNX6+AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - vAAADrwBlbxySQAACDpJREFUeF7tWX9slOUdf3AkVocTN/7ossVgYlznjMFNLL01GzFu8Z85M8jSKTka - rICWUX5bqNy6gsMB0pq48aMy/3FjIwtmgwsNw9SMLXS4ecgEpVavqUKr5frDg7Z34H32+dzdM98dveu1 - 9Mi4vp/mm+f98dz7vO/383x/1rhw4eIq4luUfYnD/8J5TcdIkRcpUygucoBsCHHeFxEiZF78zMW4Y7SE - CA9RRIqLHGC0hLgWkmNI4akxQuIkJPXeOoqLHGG0FuIix3AJ+T+DS0iOoCBrfXwrpZKSDa6UkLGum9eQ - 0qSML8fPEqPO74if5Q6Z1tU9kTQhoV05XOaT62o607oTmhDtTH28lCNFOGF3sURz5H7Gi6hM62odu96E - hNzEFopVvN25dqdahY13UTfSui4IKekIR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PTBd/UjM6K - izFChGTKdFLT4lSMdN/FKKFCzNnOUO6vFoeF6gBbswwHl5Bxhooxq3BZipTr7COJHCldEHGyKLkkzVOV - nYkQ2yHQfP3OWaG7SAPFEatQKVwWob6SVZ6NMZon5doWh23ZixBn7JBYgvVbW2nbeS6ygFW6FCmFiwwp - 3EnWcIqXZLIQ3XdChGq+ixGgOCJFOf//oGNZTLqel4VLSA4ga5BrcTbyRIRIsQqUtViLEDTXxpd0hLgu - a4ywyrbxQbAB3Ak3qLu41mHMfwCWaqdyEzp1TQAAAABJRU5ErkJggg== - - Extraction failed, common causes: @@ -241,47 +158,6 @@ The TE can differ 0.1% due to ingame-rounding. This will probably work if you play on a server with no new mod colors. If you play on a server with new colors, this will screw the colors up. It's recommended to first create a backup file of you library. - - - - iVBORw0KGgoAAAANSUhEUgAAAGQAAAAyCAYAAACqNX6+AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - vAAADrwBlbxySQAACDpJREFUeF7tWX9slOUdf3AkVocTN/7ossVgYlznjMFNLL01GzFu8Z85M8jSKTka - rICWUX5bqNy6gsMB0pq48aMy/3FjIwtmgwsNw9SMLXS4ecgEpVavqUKr5frDg7Z34H32+dzdM98dveu1 - 9Mi4vp/mm+f98dz7vO/383x/1rhw4eIq4luUfYnD/8J5TcdIkRcpUygucoBsCHHeFxEiZF78zMW4Y7SE - CA9RRIqLHGC0hLgWkmNI4akxQuIkJPXeOoqLHGG0FuIix3AJ+T+DS0iOoCBrfXwrpZKSDa6UkLGum9eQ - 0qSML8fPEqPO74if5Q6Z1tU9kTQhoV05XOaT62o607oTmhDtTH28lCNFOGF3sURz5H7Gi6hM62odu96E - hNzEFopVvN25dqdahY13UTfSui4IKekIRS0OKca5S1PPxxOp67qEOCD/LhkdIbvMDLPT1FOayzaVdWpM - ynb+zU7OygTnuhOWELkMiTPb0U6VUiRyJ7qWvg/1gimk0g9OajB91682uOkJg9ra2vgoKVhpMGmr6eWc - o5Si5K8yrau1Jiwh+ngp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vVbW2nbeS6ygFW6FCmFiwwp - 3EnWcIqXZLIQ3XdChGq+ixGgOCJFOf//oGNZTLqel4VLSA4ga5BrcTbyRIRIsQqUtViLEDTXxpd0hLgu - a4ywyrbxQbAB3Ak3qLu41mHMfwCWaqdyEzp1TQAAAABJRU5ErkJggg== - 248, 17 @@ -289,6 +165,7 @@ It's recommended to first create a backup file of you library. 655, 17 + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 @@ -485,6 +362,129 @@ It's recommended to first create a backup file of you library. 760, 17 + + + iVBORw0KGgoAAAANSUhEUgAAAGQAAAAyCAYAAACqNX6+AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAACDpJREFUeF7tWX9slOUdf3AkVocTN/7ossVgYlznjMFNLL01GzFu8Z85M8jSKTka + rICWUX5bqNy6gsMB0pq48aMy/3FjIwtmgwsNw9SMLXS4ecgEpVavqUKr5frDg7Z34H32+dzdM98dveu1 + 9Mi4vp/mm+f98dz7vO/383x/1rhw4eIq4luUfYnD/8J5TcdIkRcpUygucoBsCHHeFxEiZF78zMW4Y7SE + CA9RRIqLHGC0hLgWkmNI4akxQuIkJPXeOoqLHGG0FuIix3AJ+T+DS0iOoCBrfXwrpZKSDa6UkLGum9eQ + 0qSML8fPEqPO74if5Q6Z1tU9kTQhoV05XOaT62o607oTmhDtTH28lCNFOGF3sURz5H7Gi6hM62odu96E + hNzEFopVvN25dqdahY13UTfSui4IKekIRS0OKca5S1PPxxOp67qEOCD/LhkdIbvMDLPT1FOayzaVdWpM + ynb+zU7OygTnuhOWELkMiTPb0U6VUiRyJ7qWvg/1gimk0g9OajB91682uOkJg9ra2vgoKVhpMGmr6eWc + o5Si5K8yrau1Jiwh+ngpRgqQiAC5DcESkurjP8MO8yAJOXfDEoOvlBt8fZnBPTUJQoo3G3zTZ3DncoPp + CwxuXMRnNJgQSanmLzOtK4gcXXfhg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+nAr+mBnypsdIeo/ + 7TBHnzrVi6GhEDo6TqI9FMaFSBSDwTV45K9diA51ItgWwOlgK85dGMSF9jVxy4iToR5WwlU5Yd9N60j0 + brYO0ahzi+xT9QmDl8zUR49+iP5QEG3tbTjN4jDU1YrmQywA/3EC3QPtCDLgv0WyunvOoaPZm3BTsozL + ybCQpYiYCVOpjyM88PkDePejMMJDlEFKz7s4fsCLWzY34tSbLTjeGkCAVnLynRb493vgNhKvFmgtnhf8 + 8P+JSlflvccHf2cjvDquJXF/88P3nbg7cnG14PGREFbpydP4eYCVelwavS4ZLvIL2fa3tPPTBd/UjM6K + izFChGTKdFLT4lSMdN/FKKFCzNnOUO6vFoeF6gBbswwHl5Bxhooxq3BZipTr7COJHCldEHGyKLkkzVOV + nYkQ2yHQfP3OWaG7SAPFEatQKVwWob6SVZ6NMZon5doWh23ZixBn7JBYgvVbW2nbeS6ygFW6FCmFiwwp + 3EnWcIqXZLIQ3XdChGq+ixGgOCJFOf//oGNZTLqel4VLSA4ga5BrcTbyRIRIsQqUtViLEDTXxpd0hLgu + a4ywyrbxQbAB3Ak3qLu41mHMfwCWaqdyEzp1TQAAAABJRU5ErkJggg== + + 76 From 5ad36292ec7c3035594bf852342da1d77017f525 Mon Sep 17 00:00:00 2001 From: cadon Date: Sun, 30 Apr 2023 23:54:47 +0200 Subject: [PATCH 2/4] possible outOfRange fix --- ARKBreedingStats/Extraction.cs | 2 +- ARKBreedingStats/Form1.cs | 84 +++++++++++++++++----------------- ARKBreedingStats/Form1.l10n.cs | 2 +- 3 files changed, 44 insertions(+), 44 deletions(-) diff --git a/ARKBreedingStats/Extraction.cs b/ARKBreedingStats/Extraction.cs index 4d134185..b920dbd0 100644 --- a/ARKBreedingStats/Extraction.cs +++ b/ARKBreedingStats/Extraction.cs @@ -91,7 +91,7 @@ public void Clear() /// If true, the input is expected to be a float value from an export file. /// If false, it's assumed to be a displayed value from the game with one decimal digit. /// - public void ExtractLevels(Species species, int level, List statIOs, double lowerTEBound, double upperTEBound, + public void ExtractLevels(Species species, int level, StatIO[] statIOs, double lowerTEBound, double upperTEBound, bool tamed, bool bred, double imprintingBonusRounded, bool adjustImprinting, bool allowMoreThanHundredImprinting, double imprintingBonusMultiplier, bool considerWildLevelSteps, int wildLevelSteps, bool highPrecisionInputs, bool mutagenApplied, out bool imprintingChanged) { diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs index 26fda1ed..25a3bc71 100644 --- a/ARKBreedingStats/Form1.cs +++ b/ARKBreedingStats/Form1.cs @@ -33,8 +33,8 @@ public partial class Form1 : Form private readonly Dictionary _topLevels = new Dictionary(); private readonly Dictionary _lowestLevels = new Dictionary(); - private readonly List _statIOs = new List(); - private readonly List _testingIOs = new List(); + private readonly StatIO[] _statIOs = new StatIO[Stats.StatsCount]; + private readonly StatIO[] _testingIOs = new StatIO[Stats.StatsCount]; private int _activeStatIndex = -1; private readonly bool[] @@ -188,6 +188,46 @@ public Form1() openSettingsToolStripMenuItem.ShortcutKeyDisplayString = new KeysConverter() .ConvertTo(Keys.Control, typeof(string))?.ToString().Replace("None", ","); + for (int s = 0; s < Stats.StatsCount; s++) + { + var statIo = new StatIO + { + InputType = StatIOInputType.FinalValueInputType, + Title = Utils.StatName(s), + statIndex = s + }; + var statIoTesting = new StatIO + { + InputType = StatIOInputType.LevelsInputType, + Title = Utils.StatName(s), + statIndex = s + }; + + if (Utils.Precision(s) == 3) + { + statIo.Percent = true; + statIoTesting.Percent = true; + } + + statIoTesting.LevelChanged += TestingStatIoValueUpdate; + statIo.InputValueChanged += StatIOQuickWildLevelCheck; + statIo.Click += StatIO_Click; + _considerStatHighlight[s] = (Properties.Settings.Default.consideredStats & (1 << s)) != 0; + + _statIOs[s] = statIo; + _testingIOs[s] = statIoTesting; + } + + // add controls in the order they are shown in-game + for (int s = 0; s < Stats.StatsCount; s++) + { + var displayIndex = Stats.DisplayOrder[s]; + flowLayoutPanelStatIOsExtractor.Controls.Add(_statIOs[displayIndex]); + flowLayoutPanelStatIOsTester.Controls.Add(_testingIOs[displayIndex]); + checkedListBoxConsiderStatTop.Items.Add(Utils.StatName(displayIndex), + _considerStatHighlight[displayIndex]); + } + _timerGlobal.Interval = 1000; _timerGlobal.Tick += TimerGlobal_Tick; @@ -251,46 +291,6 @@ private void Form1_Load(object sender, EventArgs e) tamingControl1.WeaponDamages = Properties.Settings.Default.weaponDamages; tamingControl1.WeaponDamagesEnabled = Properties.Settings.Default.weaponDamagesEnabled; - for (int s = 0; s < Stats.StatsCount; s++) - { - var statIO = new StatIO - { - InputType = StatIOInputType.FinalValueInputType, - Title = Utils.StatName(s), - statIndex = s - }; - var statIoTesting = new StatIO - { - InputType = StatIOInputType.LevelsInputType, - Title = Utils.StatName(s), - statIndex = s - }; - - if (Utils.Precision(s) == 3) - { - statIO.Percent = true; - statIoTesting.Percent = true; - } - - statIoTesting.LevelChanged += TestingStatIoValueUpdate; - statIO.InputValueChanged += StatIOQuickWildLevelCheck; - statIO.Click += StatIO_Click; - _considerStatHighlight[s] = (Properties.Settings.Default.consideredStats & (1 << s)) != 0; - - _statIOs.Add(statIO); - _testingIOs.Add(statIoTesting); - } - - // add controls in the order they are shown in-game - for (int s = 0; s < Stats.StatsCount; s++) - { - var displayIndex = Stats.DisplayOrder[s]; - flowLayoutPanelStatIOsExtractor.Controls.Add(_statIOs[displayIndex]); - flowLayoutPanelStatIOsTester.Controls.Add(_testingIOs[displayIndex]); - checkedListBoxConsiderStatTop.Items.Add(Utils.StatName(displayIndex), - _considerStatHighlight[displayIndex]); - } - // torpor should not show bar, it get's too wide and is not interesting for breeding _statIOs[Stats.Torpidity].ShowBarAndLock = false; _testingIOs[Stats.Torpidity].ShowBarAndLock = false; diff --git a/ARKBreedingStats/Form1.l10n.cs b/ARKBreedingStats/Form1.l10n.cs index f2c5d358..fac34847 100644 --- a/ARKBreedingStats/Form1.l10n.cs +++ b/ARKBreedingStats/Form1.l10n.cs @@ -109,7 +109,7 @@ private void SetLocalizations(bool initialize = true) Loc.SetToolTip(lbExtractorDomLevel, "domLevelExplanation", _tt); Loc.SetToolTip(lbExtractorWildLevel, "wildLevelExplanation", _tt); var statNames = speciesSelector1.SelectedSpecies?.statNames; - for (int si = 0; si < _statIOs.Count; si++) + for (int si = 0; si < _statIOs.Length; si++) { _statIOs[si].Title = Utils.StatName(si, false, statNames); _testingIOs[si].Title = Utils.StatName(si, false, statNames); From ee5e65e30c3796e59d7b9f2ff9b9c5273be57fcc Mon Sep 17 00:00:00 2001 From: cadon Date: Mon, 1 May 2023 12:38:54 +0200 Subject: [PATCH 3/4] improved behaviour of stat weight preset organization --- ARKBreedingStats/Form1.extractor.cs | 2 +- ARKBreedingStats/Form1.library.cs | 2 +- ARKBreedingStats/Utils.cs | 11 ++- .../uiControls/StatWeighting.Designer.cs | 69 ++++++++------ ARKBreedingStats/uiControls/StatWeighting.cs | 93 ++++++++++++++----- 5 files changed, 125 insertions(+), 52 deletions(-) diff --git a/ARKBreedingStats/Form1.extractor.cs b/ARKBreedingStats/Form1.extractor.cs index 149f7e2a..4e779ebf 100644 --- a/ARKBreedingStats/Form1.extractor.cs +++ b/ARKBreedingStats/Form1.extractor.cs @@ -120,7 +120,7 @@ private void ShowSumOfChosenLevels() var checkLowLevels = _lowestLevels.TryGetValue(species, out int[] lowSpeciesLevels); var customStatNames = species.statNames; - var statWeights = breedingPlan1.StatWeighting.GetWeightingByPresetName(species.name); + var statWeights = breedingPlan1.StatWeighting.GetWeightingForSpecies(species); if (statWeights.Item1 == null) checkLowLevels = false; var analysisState = LevelStatus.Neutral; var newTopStatsText = new List(); diff --git a/ARKBreedingStats/Form1.library.cs b/ARKBreedingStats/Form1.library.cs index 2730be9b..d78f2413 100644 --- a/ARKBreedingStats/Form1.library.cs +++ b/ARKBreedingStats/Form1.library.cs @@ -354,7 +354,7 @@ private void CalculateTopStats(List creatures) List usedAndConsideredStatIndices = new List(Stats.StatsCount); int[] bestStat = new int[Stats.StatsCount]; int[] lowestStat = new int[Stats.StatsCount]; - var statWeights = breedingPlan1.StatWeighting.GetWeightingByPresetName(species.name); + var statWeights = breedingPlan1.StatWeighting.GetWeightingForSpecies(species); for (int s = 0; s < Stats.StatsCount; s++) { bestStat[s] = -1; diff --git a/ARKBreedingStats/Utils.cs b/ARKBreedingStats/Utils.cs index 6ab32149..ef0ed1dc 100644 --- a/ARKBreedingStats/Utils.cs +++ b/ARKBreedingStats/Utils.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Drawing; using System.Globalization; +using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; using ARKBreedingStats.values; @@ -469,7 +470,7 @@ public static Color ForeColor(Color backColor) return backColor.R * .3f + backColor.G * .59f + backColor.B * .11f < 110 ? Color.White : Color.Black; } - public static bool ShowTextInput(string text, out string input, string title = "", string preInput = "") + public static bool ShowTextInput(string text, out string input, string title = null, string preInput = null, params string[] autoCompleteStrings) { Form inputForm = new Form { @@ -493,6 +494,14 @@ public static bool ShowTextInput(string text, out string input, string title = " inputForm.AcceptButton = buttonOk; inputForm.CancelButton = buttonCancel; textBox.Text = preInput; + if (autoCompleteStrings?.Any() == true) + { + textBox.AutoCompleteMode = AutoCompleteMode.SuggestAppend; + textBox.AutoCompleteSource = AutoCompleteSource.CustomSource; + var ac = new AutoCompleteStringCollection(); + ac.AddRange(autoCompleteStrings); + textBox.AutoCompleteCustomSource = ac; + } textBox.SelectAll(); input = string.Empty; diff --git a/ARKBreedingStats/uiControls/StatWeighting.Designer.cs b/ARKBreedingStats/uiControls/StatWeighting.Designer.cs index 25bcbce1..e7271c02 100644 --- a/ARKBreedingStats/uiControls/StatWeighting.Designer.cs +++ b/ARKBreedingStats/uiControls/StatWeighting.Designer.cs @@ -31,11 +31,12 @@ private void InitializeComponent() this.groupBox1 = new System.Windows.Forms.GroupBox(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.label1 = new System.Windows.Forms.Label(); this.btAllToOne = new System.Windows.Forms.Button(); - this.btSavePreset = new System.Windows.Forms.Button(); + this.BtSavePreset = new System.Windows.Forms.Button(); + this.btSavePresetAs = new System.Windows.Forms.Button(); this.cbbPresets = new System.Windows.Forms.ComboBox(); this.btDelete = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); this.tableLayoutPanelMain = new System.Windows.Forms.TableLayoutPanel(); this.lbStatWeightInfo = new System.Windows.Forms.Label(); this.groupBox1.SuspendLayout(); @@ -73,11 +74,12 @@ private void InitializeComponent() // // groupBox2 // - this.groupBox2.Controls.Add(this.label1); this.groupBox2.Controls.Add(this.btAllToOne); - this.groupBox2.Controls.Add(this.btSavePreset); + this.groupBox2.Controls.Add(this.BtSavePreset); + this.groupBox2.Controls.Add(this.btSavePresetAs); this.groupBox2.Controls.Add(this.cbbPresets); this.groupBox2.Controls.Add(this.btDelete); + this.groupBox2.Controls.Add(this.label1); this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox2.Location = new System.Drawing.Point(108, 21); this.groupBox2.Name = "groupBox2"; @@ -85,38 +87,39 @@ private void InitializeComponent() this.groupBox2.TabIndex = 0; this.groupBox2.TabStop = false; this.groupBox2.Text = "Presets"; - // - // label1 - // - this.label1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.label1.Location = new System.Drawing.Point(3, 62); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(133, 76); - this.label1.TabIndex = 19; - this.label1.Text = "If a preset named \"Default\" exists it will be applied if no species specific pres" + - "et is available."; // // btAllToOne // this.btAllToOne.Dock = System.Windows.Forms.DockStyle.Bottom; - this.btAllToOne.Location = new System.Drawing.Point(3, 138); + this.btAllToOne.Location = new System.Drawing.Point(3, 48); this.btAllToOne.Name = "btAllToOne"; this.btAllToOne.Size = new System.Drawing.Size(133, 23); this.btAllToOne.TabIndex = 18; - this.btAllToOne.Text = "Set all weights to 1"; + this.btAllToOne.Text = "Reset Weightings"; this.btAllToOne.UseVisualStyleBackColor = true; this.btAllToOne.Click += new System.EventHandler(this.btAllToOne_Click); // - // btSavePreset + // BtSavePreset + // + this.BtSavePreset.Dock = System.Windows.Forms.DockStyle.Bottom; + this.BtSavePreset.Location = new System.Drawing.Point(3, 71); + this.BtSavePreset.Name = "BtSavePreset"; + this.BtSavePreset.Size = new System.Drawing.Size(133, 23); + this.BtSavePreset.TabIndex = 20; + this.BtSavePreset.Text = "Save"; + this.BtSavePreset.UseVisualStyleBackColor = true; + this.BtSavePreset.Click += new System.EventHandler(this.BtSavePreset_Click); + // + // btSavePresetAs // - this.btSavePreset.Dock = System.Windows.Forms.DockStyle.Bottom; - this.btSavePreset.Location = new System.Drawing.Point(3, 161); - this.btSavePreset.Name = "btSavePreset"; - this.btSavePreset.Size = new System.Drawing.Size(133, 23); - this.btSavePreset.TabIndex = 15; - this.btSavePreset.Text = "Save"; - this.btSavePreset.UseVisualStyleBackColor = true; - this.btSavePreset.Click += new System.EventHandler(this.btSavePreset_Click); + this.btSavePresetAs.Dock = System.Windows.Forms.DockStyle.Bottom; + this.btSavePresetAs.Location = new System.Drawing.Point(3, 94); + this.btSavePresetAs.Name = "btSavePresetAs"; + this.btSavePresetAs.Size = new System.Drawing.Size(133, 23); + this.btSavePresetAs.TabIndex = 15; + this.btSavePresetAs.Text = "Save as"; + this.btSavePresetAs.UseVisualStyleBackColor = true; + this.btSavePresetAs.Click += new System.EventHandler(this.btSavePresetAs_Click); // // cbbPresets // @@ -132,13 +135,24 @@ private void InitializeComponent() // btDelete // this.btDelete.Dock = System.Windows.Forms.DockStyle.Bottom; - this.btDelete.Location = new System.Drawing.Point(3, 184); + this.btDelete.Location = new System.Drawing.Point(3, 117); this.btDelete.Name = "btDelete"; this.btDelete.Size = new System.Drawing.Size(133, 23); this.btDelete.TabIndex = 17; this.btDelete.Text = "Remove"; this.btDelete.UseVisualStyleBackColor = true; this.btDelete.Click += new System.EventHandler(this.btDelete_Click); + // + // label1 + // + this.label1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.label1.Location = new System.Drawing.Point(3, 140); + this.label1.Margin = new System.Windows.Forms.Padding(3); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(133, 67); + this.label1.TabIndex = 19; + this.label1.Text = "If a preset named \"Default\" exists it will be applied if no species specific pres" + + "et is available."; // // tableLayoutPanelMain // @@ -183,12 +197,13 @@ private void InitializeComponent() private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.TableLayoutPanel tableLayoutPanelMain; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - private System.Windows.Forms.Button btSavePreset; + private System.Windows.Forms.Button btSavePresetAs; private System.Windows.Forms.ComboBox cbbPresets; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Button btDelete; private System.Windows.Forms.Button btAllToOne; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label lbStatWeightInfo; + private System.Windows.Forms.Button BtSavePreset; } } diff --git a/ARKBreedingStats/uiControls/StatWeighting.cs b/ARKBreedingStats/uiControls/StatWeighting.cs index 964cf6f6..21a2f449 100644 --- a/ARKBreedingStats/uiControls/StatWeighting.cs +++ b/ARKBreedingStats/uiControls/StatWeighting.cs @@ -18,11 +18,12 @@ public partial class StatWeighting : UserControl public event Action WeightingsChanged; private readonly Debouncer _valueChangedDebouncer = new Debouncer(); private readonly ToolTip _tt = new ToolTip(); + private const string NoPreset = "-"; + private const string DefaultPreset = "Default"; public StatWeighting() { InitializeComponent(); - _tt.SetToolTip(groupBox1, "Increase the weights for stats that are more important to you to be high in the offspring.\nRight click for Presets."); _currentSpecies = null; var displayedStats = new int[]{ @@ -97,11 +98,11 @@ public double[] Weightings get { double[] w = WeightValues; - double s = w.Sum() / Stats.StatsCount; - if (s > 0) + double sum = w.Sum() / Stats.StatsCount; + if (sum > 0) { for (int i = 0; i < Stats.StatsCount; i++) - w[i] /= s; + w[i] /= sum; } return w; } @@ -157,7 +158,7 @@ public byte[] AnyOddEven private void btAllToOne_Click(object sender, EventArgs e) { - cbbPresets.SelectedIndex = 0; + ResetValues(); } /// @@ -170,7 +171,7 @@ public bool TrySetPresetBySpecies(Species species, bool useDefaultBackupIfAvaila if (TrySetPresetByName(species.DescriptiveName)) return true; if (TrySetPresetByName(species.name)) return true; return useDefaultBackupIfAvailable - && TrySetPresetByName("Default"); + && TrySetPresetByName(DefaultPreset); } /// @@ -201,10 +202,8 @@ private void cbbPresets_SelectedIndexChanged(object sender, EventArgs e) /// True if the preset was set, false if there is no preset with the given name private bool SelectPresetByName(string presetName) { - if (presetName == "-") + if (presetName == NoPreset) { - WeightValues = Enumerable.Repeat(1d, Stats.StatsCount).ToArray(); - AnyOddEven = Enumerable.Repeat((byte)0, Stats.StatsCount).ToArray(); return true; } if (!_customWeightings.TryGetValue(presetName, out var weightings)) return false; @@ -213,6 +212,15 @@ private bool SelectPresetByName(string presetName) return true; } + /// + /// Resets all weightings. + /// + private void ResetValues() + { + WeightValues = Enumerable.Repeat(1d, Stats.StatsCount).ToArray(); + AnyOddEven = Enumerable.Repeat((byte)0, Stats.StatsCount).ToArray(); + } + /// /// Returns weightings for species. First the blueprint path is checked, then the full species name inclusive mod and variant, then only the base name. /// @@ -223,14 +231,14 @@ private bool SelectPresetByName(string presetName) if (_customWeightings.TryGetValue(species.DescriptiveName, out weightings)) return weightings; if (_customWeightings.TryGetValue(species.name, out weightings)) return weightings; return useDefaultBackupIfAvailable - && _customWeightings.TryGetValue("Default", out weightings) ? weightings : (null, null); + && _customWeightings.TryGetValue(DefaultPreset, out weightings) ? weightings : (null, null); } public (double[], byte[]) GetWeightingByPresetName(string presetName, bool useDefaultBackupIfAvailable = true) { if (_customWeightings.TryGetValue(presetName, out var weightings)) return weightings; return useDefaultBackupIfAvailable - && _customWeightings.TryGetValue("Default", out weightings) ? weightings : (null, null); + && _customWeightings.TryGetValue(DefaultPreset, out weightings) ? weightings : (null, null); } private void btDelete_Click(object sender, EventArgs e) @@ -250,29 +258,57 @@ private void DeletePresetByName(string presetName) } } - private void btSavePreset_Click(object sender, EventArgs e) + private void BtSavePreset_Click(object sender, EventArgs e) { - SavePreset(_currentSpecies.name); + var presetName = cbbPresets.SelectedItem.ToString(); + if (string.IsNullOrEmpty(presetName) || presetName == NoPreset) + SavePresetAs(_currentSpecies?.name); + else _customWeightings[presetName] = (WeightValues, AnyOddEven); } - private void SavePreset(string presetName) + private void btSavePresetAs_Click(object sender, EventArgs e) { - if (Utils.ShowTextInput("Preset-Name", out presetName, "New Preset", presetName) && presetName.Length > 0) + var presetName = cbbPresets.SelectedItem.ToString(); + if (string.IsNullOrEmpty(presetName) || presetName == NoPreset || presetName == DefaultPreset) + SavePresetAs(_currentSpecies?.name); + else SavePresetAs(presetName); + } + + private void SavePresetAs(string presetName) + { + string[] suggestions; + if (_currentSpecies != null) { - if (_customWeightings.ContainsKey(presetName)) + suggestions = new[] { - if (MessageBox.Show("Preset-Name exists already, overwrite?", "Overwrite Preset?", + DefaultPreset, + _currentSpecies.name, + _currentSpecies.DescriptiveName, + _currentSpecies.DescriptiveNameAndMod, + _currentSpecies.blueprintPath + }; + } + else + suggestions = new[] { DefaultPreset }; + + + if (Utils.ShowTextInput("Preset Name", out var presetNameUser, "New Preset", presetName, suggestions) + && presetNameUser.Length > 0) + { + if (_customWeightings.ContainsKey(presetNameUser)) + { + if (MessageBox.Show("Preset name exists already, overwrite?", "Overwrite Preset?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { - _customWeightings[presetName] = (WeightValues, AnyOddEven); + _customWeightings[presetNameUser] = (WeightValues, AnyOddEven); } else return; } else - _customWeightings.Add(presetName, (WeightValues, AnyOddEven)); + _customWeightings.Add(presetNameUser, (WeightValues, AnyOddEven)); CustomWeightings = _customWeightings; - TrySetPresetByName(presetName); + TrySetPresetByName(presetNameUser); } } @@ -285,12 +321,25 @@ private void SavePreset(string presetName) _customWeightings = value; // clear custom presets cbbPresets.Items.Clear(); - cbbPresets.Items.Add("-"); - cbbPresets.Items.AddRange(_customWeightings.Keys.ToArray()); + cbbPresets.Items.Add(NoPreset); + cbbPresets.Items.AddRange(_customWeightings.Keys.OrderBy(s => s).ToArray()); cbbPresets.SelectedIndex = 0; + SetComboboxDropdownWidthToMaxItemWidth(cbbPresets); } } + private void SetComboboxDropdownWidthToMaxItemWidth(ComboBox cbb) + { + var g = cbb.CreateGraphics(); + var verticalScrollBarWidth = cbb.Items.Count > cbb.MaxDropDownItems + ? SystemInformation.VerticalScrollBarWidth : 0; + + var maxWidth = cbb.Items.Cast().Select(s => (int)g.MeasureString(s, cbb.Font).Width + verticalScrollBarWidth).Max(); + maxWidth = Math.Min(600, maxWidth); + if (maxWidth > cbb.DropDownWidth) + cbb.DropDownWidth = maxWidth; + } + private class TriButton : Button { private readonly ToolTip _tt; From 12c45e3bd5087addb8fe91e10514268dde758ab6 Mon Sep 17 00:00:00 2001 From: cadon Date: Mon, 1 May 2023 12:45:21 +0200 Subject: [PATCH 4/4] ver --- ARKBreedingStats/Properties/AssemblyInfo.cs | 2 +- ARKBreedingStats/_manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ARKBreedingStats/Properties/AssemblyInfo.cs b/ARKBreedingStats/Properties/AssemblyInfo.cs index 6bf2b047..3a12e5f3 100644 --- a/ARKBreedingStats/Properties/AssemblyInfo.cs +++ b/ARKBreedingStats/Properties/AssemblyInfo.cs @@ -30,6 +30,6 @@ // Revision // [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("0.53.0.0")] +[assembly: AssemblyFileVersion("0.53.1.0")] [assembly: NeutralResourcesLanguage("en")] diff --git a/ARKBreedingStats/_manifest.json b/ARKBreedingStats/_manifest.json index 97371e62..051c6d48 100644 --- a/ARKBreedingStats/_manifest.json +++ b/ARKBreedingStats/_manifest.json @@ -4,7 +4,7 @@ "ARK Smart Breeding": { "Id": "ARK Smart Breeding", "Category": "main", - "version": "0.53.0.0" + "version": "0.53.1.0" }, "SpeciesColorImages": { "Id": "SpeciesColorImages",