Skip to content

Commit

Permalink
fixed disappeared top-stats-highlighting (#859). if name already exis…
Browse files Browse the repository at this point in the history
…ts, background in name-input is colored (#860).
  • Loading branch information
cadaei committed Jan 2, 2019
1 parent 3dc7ff1 commit 4e832a3
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 58 deletions.
16 changes: 0 additions & 16 deletions ARKBreedingStats/AboutBox1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions ARKBreedingStats/AboutBox1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,5 @@ private void linkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs
{
System.Diagnostics.Process.Start("https://github.com/cadon/ARKStatsExtractor");
}

private void pictureBox1_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://ko-fi.com/826WMCII3B24");
}
}
}
43 changes: 22 additions & 21 deletions ARKBreedingStats/CreatureInfoInput.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 19 additions & 1 deletion ARKBreedingStats/CreatureInfoInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public partial class CreatureInfoInput : UserControl
private bool updateMaturation;
private List<Creature> _females;
private List<Creature> _males;
public List<string> NamesOfAllCreatures;
private string[] _ownersTribes;
private int[] regionColorIDs;
private bool _tribeLock, _ownerLock;
Expand Down Expand Up @@ -60,7 +61,11 @@ private void buttonSaveChanges_Click(object sender, EventArgs e)
public string CreatureName
{
get => textBoxName.Text;
set => textBoxName.Text = value;
set
{
textBoxName.Text = value;
textBoxName.BackColor = SystemColors.Window;
}
}
public string CreatureOwner
{
Expand Down Expand Up @@ -478,6 +483,19 @@ private void lblTribe_Click(object sender, EventArgs e)
TribeLock = !TribeLock;
}

private void textBoxName_TextChanged(object sender, EventArgs e)
{
// feedback if name already exists
if (NamesOfAllCreatures.Contains(textBoxName.Text))
{
textBoxName.BackColor = Color.Khaki;
}
else
{
textBoxName.BackColor = SystemColors.Window;
}
}

internal void Clear()
{
textBoxName.Clear();
Expand Down
27 changes: 14 additions & 13 deletions ARKBreedingStats/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2257,6 +2257,7 @@ private void updateParentListInput(CreatureInfoInput input)
input.ParentsSimilarities = findParentSimilarities(parents, creature);
input.Parents = parents;
input.parentListValid = true;
input.NamesOfAllCreatures = creatureCollection.creatures.Select(c => c.name).ToList();
}

private void newToolStripMenuItem_Click(object sender, EventArgs e)
Expand Down Expand Up @@ -2923,21 +2924,21 @@ private void calculateTopStats(List<Creature> creatures)
c.topBreedingStats = new bool[8];
c.topBreedingCreature = false;

// only consider creature if it's available for breeding
if (!creatureCollection.useFiltersInTopStatCalculation
&& !(
c.status == CreatureStatus.Available
|| c.status == CreatureStatus.Cryopod
|| c.status == CreatureStatus.Obelisk
)
)
if (creatureCollection.useFiltersInTopStatCalculation)
{
continue;
//if not in the filtered collection (using library filter settings), continue
if (!filteredCreatures.Contains(c))
continue;
}
else
{
// only consider creature if it's available for breeding
if (c.status != CreatureStatus.Available
&& c.status != CreatureStatus.Cryopod
&& c.status != CreatureStatus.Obelisk
)
continue;
}

//if not in the filtered collection (using library filter settings), continue
if (!filteredCreatures.Contains(c))
continue;

for (int s = 0; s < Enum.GetNames(typeof(StatName)).Length; s++)
{
Expand Down
2 changes: 1 addition & 1 deletion ARKBreedingStats/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("0.29.3.1")]
[assembly: AssemblyFileVersion("0.29.3.2")]
[assembly: NeutralResourcesLanguage("en")]

2 changes: 1 addition & 1 deletion ARKBreedingStats/ver.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
285.106.2,0.29.3.1
285.106.2,0.29.3.2

0 comments on commit 4e832a3

Please sign in to comment.