Skip to content

Commit aabc809

Browse files
committed
- Added donation context menu.
- Added Special Thanks window. - Added Donors window.
1 parent 344246a commit aabc809

6 files changed

Lines changed: 143 additions & 1 deletion

File tree

Pages/Donors.xaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<Window x:Name="DonorsWindow" x:Class="SimTools_v4.Pages.Donors"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6+
xmlns:local="clr-namespace:SimTools_v4.Pages"
7+
mc:Ignorable="d"
8+
Title="Donors" Height="532" Width="530" WindowStyle="None" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
9+
<Window.Background>
10+
<ImageBrush ImageSource="/Images/TS3_Box2.png"/>
11+
</Window.Background>
12+
<Grid>
13+
<TextBlock x:Name="DonorsText" HorizontalAlignment="Left" Margin="32,40,0,0" TextWrapping="Wrap" Text="Whether through one-time, or recurring donations (fiscal or otherwise), the following people have contributed to SimTools:" VerticalAlignment="Top" Width="465" Height="49" FontFamily="Tahoma" FontWeight="Bold"/>
14+
<TextBlock x:Name="DonorList1" HorizontalAlignment="Left" Margin="32,96,0,0" TextWrapping="Wrap" Text="EliSims Love" VerticalAlignment="Top" Width="145" Height="321" FontFamily="SimSun" TextAlignment="Center"/>
15+
<TextBlock x:Name="DonorList2" HorizontalAlignment="Left" Margin="184,96,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="145" Height="321" FontFamily="SimSun" TextAlignment="Center"/>
16+
<TextBlock x:Name="DonorList3" HorizontalAlignment="Left" Margin="336,96,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="145" Height="321" FontFamily="SimSun" TextAlignment="Center"/>
17+
<TextBlock x:Name="PreviousMenu" HorizontalAlignment="Left" Margin="328,424,0,0" TextWrapping="Wrap" Text="Click the 'X' to go back to the previous menu." VerticalAlignment="Top" Width="161" Height="33" FontFamily="SimSun" TextAlignment="Center"/>
18+
<Button x:Name="CloseButton" Content="Button" HorizontalAlignment="Left" Margin="455,481,0,0" VerticalAlignment="Top" Click="CloseButton_Click" Background="{x:Null}" BorderBrush="{x:Null}" Foreground="{x:Null}" Width="25" Height="32"/>
19+
20+
</Grid>
21+
</Window>

Pages/Donors.xaml.cs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using System.Windows;
7+
using System.Windows.Controls;
8+
using System.Windows.Data;
9+
using System.Windows.Documents;
10+
using System.Windows.Input;
11+
using System.Windows.Media;
12+
using System.Windows.Media.Imaging;
13+
using System.Windows.Shapes;
14+
15+
namespace SimTools_v4.Pages
16+
{
17+
/// <summary>
18+
/// Interaction logic for Donors.xaml
19+
/// </summary>
20+
public partial class Donors : Window
21+
{
22+
public Donors()
23+
{
24+
InitializeComponent();
25+
}
26+
27+
private void CloseButton_Click(object sender, RoutedEventArgs e)
28+
{
29+
Close();
30+
}
31+
}
32+
}

Pages/MainWindow.xaml.cs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public void ApplyLanguage()
7575
SetupBugFixContextMenu();
7676
SetupModContextMenu();
7777
SetupStoreContextMenu();
78+
SetupDonateContextMenu();
7879
}
7980

8081
// Routes user to the vanilla demo video on YouTube
@@ -1614,6 +1615,39 @@ private void StoreButton_Click(object sender, RoutedEventArgs e)
16141615

16151616
private void StoreButton_Context(object sender, ContextMenuEventArgs e) { e.Handled = true; }
16161617

1618+
// ── Donate button context menu ────────────────────────────────────────────
1619+
// Opens a context menu with donation platform links on left-click.
1620+
private void SetupDonateContextMenu()
1621+
{
1622+
var contextMenu = new ContextMenu();
1623+
1624+
void Browse(string url)
1625+
=> OpenUrl(url);
1626+
1627+
// ── PayPal ──────────────────────────────────────────────────────────
1628+
var paypal = new MenuItem { Header = "PayPal" };
1629+
paypal.Click += (_, _) => Browse("https://www.paypal.com/donate/?hosted_button_id=VJZMHREBUFSC4");
1630+
contextMenu.Items.Add(paypal);
1631+
1632+
// ── Buy Me a Coffee ─────────────────────────────────────────────────
1633+
var bmc = new MenuItem { Header = "Buy Me a Coffee" };
1634+
bmc.Click += (_, _) => Browse("https://buymeacoffee.com/dbrown1986");
1635+
contextMenu.Items.Add(bmc);
1636+
1637+
// ── CashApp ─────────────────────────────────────────────────────────
1638+
var cashapp = new MenuItem { Header = "Cash App" };
1639+
cashapp.Click += (_, _) => Browse("https://cash.app/f/POOL?id=mu2otu1w");
1640+
contextMenu.Items.Add(cashapp);
1641+
1642+
// ── Patreon ─────────────────────────────────────────────────────────
1643+
var patreon = new MenuItem { Header = "Patreon" };
1644+
patreon.Click += (_, _) => Browse("https://www.patreon.com/cw/SimTools");
1645+
contextMenu.Items.Add(patreon);
1646+
1647+
// ── Assign to button ────────────────────────────────────────────────
1648+
DonateButton.ContextMenu = contextMenu;
1649+
}
1650+
16171651
private void SetupStoreContextMenu()
16181652
{
16191653
var contextMenu = new ContextMenu();

Pages/SpecialThanks.xaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<Window x:Class="SimTools_v4.Pages.SpecialThanks"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6+
xmlns:local="clr-namespace:SimTools_v4.Pages"
7+
mc:Ignorable="d"
8+
Title="Special Thanks" Height="532" Width="530" HorizontalAlignment="Left" VerticalAlignment="Top" ResizeMode="NoResize" WindowStyle="None" WindowStartupLocation="CenterScreen">
9+
<Window.Background>
10+
<ImageBrush ImageSource="/Images/TS3_Box2.png"/>
11+
</Window.Background>
12+
<Grid>
13+
<TextBlock x:Name="MuchThanksText" HorizontalAlignment="Left" Margin="32,40,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="465" Height="369" FontFamily="SimSun" FontSize="10"><Run Text="The entire 'The Sims 3' Facebook group - Thank you for inspiring this suite of tools. So many of you had many issues over the years; and this tool aims to help in every way possible to put those issues to rest."/><LineBreak/><Run/><LineBreak/><Run Text="Anime_Boom - For their comprehensive tweak and performance guide published on Steam, most of which has been incorporated into this tool."/><LineBreak/><Run/><LineBreak/><Run Text="alfa1295 - For your incredible work on The Sims 3 GPU Addon software and bringing support for modern-day graphics cards."/><LineBreak/><Run/><LineBreak/><Run Text="Dmitry Zhutkov - For Regul Save Cleaner. Truly amazing bit of software. Our saves are safe!"/><LineBreak/><Run/><LineBreak/><Run Text="LazyDuchess - Many useful modifications to the game engine."/><LineBreak/><Run/><LineBreak/><Run Text="Chain_Reaction / Twallan - For nRaas and its dedicated community of TS3 modders. Several package and core mods overhauling scripts within the game."/><LineBreak/><Run/><LineBreak/><Run Text="Guifrog - Guifrog is a composer on OCRemix, whose theme is featured in this suite. It features melodies from The Sims 3 and The Sims 1. His profile can be found at https://ocremix.org/artist/9047/guifrog"/><LineBreak/><Run/><LineBreak/><Run Text="Blocky9032 &amp; JonySimmer - New Intros to bring TS3 into the modern age!"/><LineBreak/><Run/><LineBreak/><Run Text="Eli Sims - For her amazing work translating SimTools to French (Bonjour!)"/></TextBlock>
14+
<Button x:Name="CloseButton" Content="Button" HorizontalAlignment="Left" Margin="455,481,0,0" VerticalAlignment="Top" Width="25" Height="32" Background="{x:Null}" BorderBrush="{x:Null}" Foreground="{x:Null}" Click="CloseButton_Click"/>
15+
<Button x:Name="ViewDonors" Content="View Donors" HorizontalAlignment="Left" Margin="32,416,0,0" VerticalAlignment="Top" Width="154" Height="34" FontWeight="Bold" FontFamily="Tahoma">
16+
<Button.Background>
17+
<ImageBrush ImageSource="/Images/button_normal.png"/>
18+
</Button.Background>
19+
</Button>
20+
<TextBlock x:Name="PreviousMenu" HorizontalAlignment="Center" Margin="328,432,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="161" Height="25" FontFamily="SimSun" FontSize="10" Text="Click the 'X' to go back to the previous menu."/>
21+
22+
</Grid>
23+
</Window>

Pages/SpecialThanks.xaml.cs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using System.Windows;
7+
using System.Windows.Controls;
8+
using System.Windows.Data;
9+
using System.Windows.Documents;
10+
using System.Windows.Input;
11+
using System.Windows.Media;
12+
using System.Windows.Media.Imaging;
13+
using System.Windows.Shapes;
14+
15+
namespace SimTools_v4.Pages
16+
{
17+
/// <summary>
18+
/// Interaction logic for SpecialThanks.xaml
19+
/// </summary>
20+
public partial class SpecialThanks : Window
21+
{
22+
public SpecialThanks()
23+
{
24+
InitializeComponent();
25+
}
26+
27+
private void CloseButton_Click(object sender, RoutedEventArgs e)
28+
{
29+
Close();
30+
}
31+
}
32+
}

build.counter

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4002
1+
4003

0 commit comments

Comments
 (0)