Skip to content

Commit

Permalink
Added New Year's and Valentine's themes
Browse files Browse the repository at this point in the history
  • Loading branch information
TollyH committed Feb 15, 2022
1 parent 0199e9a commit 3d50ba0
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CandyClicker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
<None Remove="Images\candy-reincarnate.png" />
<None Remove="Images\candy-season-christmas.png" />
<None Remove="Images\candy-season-halloween.png" />
<None Remove="Images\candy-season-newyear.png" />
<None Remove="Images\candy-season-valentines.png" />
<None Remove="Images\candy-special.png" />
<None Remove="Images\candy.png" />
<None Remove="Icons\candy_special_dzI_icon.ico" />
Expand All @@ -52,6 +54,8 @@
<Resource Include="Images\candy-reincarnate.png" />
<Resource Include="Images\candy-season-christmas.png" />
<Resource Include="Images\candy-season-halloween.png" />
<Resource Include="Images\candy-season-newyear.png" />
<Resource Include="Images\candy-season-valentines.png" />
<Resource Include="Images\candy-special.png" />
<Resource Include="Images\candy.png" />
<Resource Include="Icons\candy_special_dzI_icon.ico" />
Expand Down
Binary file added Images/candy-season-newyear.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/candy-season-valentines.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 15 additions & 1 deletion MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ private void SeasonThemeCheck()
}
DateTime now = DateTime.Now;
// Christmas
if (now.Month == 12 || (now.Month == 1 && now.Day <= 6))
if (now.Month == 12 || (now.Month == 1 && now.Day <= 6 && now.Day != 1))
{
imageCandy.Source = new BitmapImage(new Uri("pack://application:,,,/Images/candy-season-christmas.png"));
FadeBackgroundColor(new Color() { R = 0x64, G = 0xF5, B = 0x5F, A = 0xFF });
Expand All @@ -690,6 +690,20 @@ private void SeasonThemeCheck()
Application.Current.Resources["MainForeground"] = Brushes.OrangeRed;
FadeBackgroundColor(new Color() { R = 0x26, G = 0x06, B = 0x61, A = 0xFF });
}
// New Year's Day
else if (now.Month == 1 && now.Day == 1)
{
imageCandy.Source = new BitmapImage(new Uri("pack://application:,,,/Images/candy-season-newyear.png"));
Application.Current.Resources["MainForeground"] = Brushes.Gold;
FadeBackgroundColor(Colors.Black);
}
// Valentine's Day
else if (now.Month == 2 && now.Day == 14)
{
imageCandy.Source = new BitmapImage(new Uri("pack://application:,,,/Images/candy-season-valentines.png"));
Application.Current.Resources["MainForeground"] = Brushes.DeepPink;
FadeBackgroundColor(Colors.LightPink);
}
}

private void OpenHelpPopUp()
Expand Down

0 comments on commit 3d50ba0

Please sign in to comment.