Skip to content

Commit

Permalink
Tracking of most recent 3 items instead of just one
Browse files Browse the repository at this point in the history
  • Loading branch information
thezerothcat committed Mar 16, 2018
1 parent 4636749 commit c8e0a7a
Show file tree
Hide file tree
Showing 3 changed files with 123 additions and 45 deletions.
97 changes: 63 additions & 34 deletions LaMulanaItemTrackerForm.Designer.cs

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

69 changes: 59 additions & 10 deletions LaMulanaItemTrackerForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1091,21 +1091,41 @@ internal void updateLastItem(string flagName)
{
if(this.gameStarted)
{
lastItem.Invoke(new Action(() =>
lastItemPanel.Invoke(new Action(() =>
{
System.Drawing.Bitmap lastItemImage = getFoundImage(flagName);
if(lastItemImage != null)
if (lastItemImage != null)
{
lastItem.Image = lastItemImage;
System.Drawing.Image lastItemImageTemp = lastItem2.Image;
if (lastItemImageTemp != null)
{
lastItem3.Image = lastItemImageTemp;
lastItem3.BackgroundImage = lastItem2.BackgroundImage;
lastItem2.Image = lastItem1.Image;
lastItem2.BackgroundImage = lastItem1.BackgroundImage;
}
else
{
lastItemImageTemp = lastItem1.Image;
if (lastItemImageTemp != null)
{
lastItem2.Image = lastItemImageTemp;
lastItem2.BackgroundImage = lastItem1.BackgroundImage;
}
}
lastItem1.Image = lastItemImage;
if ("w-map-shrine".Equals(flagName))
{
lastItem.BackgroundImage = global::LMRItemTracker.Properties.Resources.Icon_map;
lastItem1.BackgroundImage = global::LMRItemTracker.Properties.Resources.Icon_map;
}
else
{
lastItem.BackgroundImage = null;
lastItem1.BackgroundImage = null;
}
lastItem.Refresh();
lastItem1.Refresh();
lastItem2.Refresh();
lastItem3.Refresh();
}
}));
}
Expand Down Expand Up @@ -1347,6 +1367,12 @@ private void LaMulanaItemTrackerForm_Load(object sender, EventArgs e)
Properties.Settings.Default.Upgrade();
Properties.Settings.Default.UpgradeRequired = false;
Properties.Settings.Default.Save();

updateFormSize();
updateFormColor();
updateTextColor();
updateLastItem();
InitializeFormPanels();
}

try
Expand Down Expand Up @@ -2619,11 +2645,34 @@ private void toggleLastItemDisplay(object sender, EventArgs e)

private void clearLastItem(object sender, EventArgs e)
{
lastItem.Invoke(new Action(() =>
lastItem1.Invoke(new Action(() =>
{
lastItem1.Image = null;
lastItem1.BackgroundImage = null;
lastItem2.Image = null;
lastItem2.BackgroundImage = null;
lastItem3.Image = null;
lastItem3.BackgroundImage = null;
lastItem1.Refresh();
lastItem2.Refresh();
lastItem3.Refresh();
}));
}

private void changeLanguage(object sender, EventArgs e)
{
lastItemLabel.Invoke(new Action(() =>
{
lastItem.Image = null;
lastItem.BackgroundImage = null;
lastItem.Refresh();
if(lastItemLabel.Text.Equals("Recent Items:"))
{
lastItemLabel.Text = "最近:";
}
else
{
lastItemLabel.Text = "Recent Items:";
}
lastItemLabel.Refresh();
}));
}
}
Expand Down
2 changes: 1 addition & 1 deletion Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.8")]
[assembly: AssemblyVersion("1.0.9")]

0 comments on commit c8e0a7a

Please sign in to comment.