Skip to content

Commit c9e3248

Browse files
committed
Added support page and assets, updates to main window button linking.
1 parent 30c4dce commit c9e3248

13 files changed

Lines changed: 234 additions & 36 deletions

Images/bmac.png

4.27 KB
Loading

Images/cashapp.png

7.61 KB
Loading

Images/github.png

6.27 KB
Loading

Images/patreon.png

7.31 KB
Loading

Images/paypal.png

7.33 KB
Loading

Pages/GenericKeys.xaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Window x:Class="SimTools.GenericKeys"
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"
7+
mc:Ignorable="d"
8+
Title="GenericKeys" Height="450" Width="800">
9+
<Grid>
10+
11+
</Grid>
12+
</Window>

Pages/GenericKeys.xaml.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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
16+
{
17+
/// <summary>
18+
/// Interaction logic for GenericKeys.xaml
19+
/// </summary>
20+
public partial class GenericKeys : Window
21+
{
22+
public GenericKeys()
23+
{
24+
InitializeComponent();
25+
}
26+
}
27+
}

Pages/MainWindow.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
<ImageBrush ImageSource="/Images/button_normal.png"/>
154154
</Button.Background>
155155
</Button>
156-
<Button x:Name="DonateButton" Content="Support Me!" HorizontalAlignment="Left" Margin="313,600,0,0" VerticalAlignment="Top" Width="130" Height="34" FontFamily="Tahoma" FontWeight="Bold" Click="TweakButton_Click" FontSize="11" ContextMenuOpening="TweakButton_Context" BorderBrush="{x:Null}">
156+
<Button x:Name="DonateButton" Content="Support Me!" HorizontalAlignment="Left" Margin="313,600,0,0" VerticalAlignment="Top" Width="130" Height="34" FontFamily="Tahoma" FontWeight="Bold" FontSize="11" BorderBrush="{x:Null}" Click="DonateButton_Click">
157157
<Button.Background>
158158
<ImageBrush ImageSource="/Images/button_normal.png"/>
159159
</Button.Background>

Pages/MainWindow.xaml.cs

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

8180
// Routes user to the vanilla demo video on YouTube
@@ -1620,39 +1619,6 @@ private void StoreButton_Click(object sender, RoutedEventArgs e)
16201619

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

1623-
// ── Donate button context menu ────────────────────────────────────────────
1624-
// Opens a context menu with donation platform links on left-click.
1625-
private void SetupDonateContextMenu()
1626-
{
1627-
var contextMenu = new ContextMenu();
1628-
1629-
void Browse(string url)
1630-
=> OpenUrl(url);
1631-
1632-
// ── PayPal ──────────────────────────────────────────────────────────
1633-
var paypal = new MenuItem { Header = "PayPal" };
1634-
paypal.Click += (_, _) => Browse("https://www.paypal.com/donate/?hosted_button_id=VJZMHREBUFSC4");
1635-
contextMenu.Items.Add(paypal);
1636-
1637-
// ── Buy Me a Coffee ─────────────────────────────────────────────────
1638-
var bmc = new MenuItem { Header = "Buy Me a Coffee" };
1639-
bmc.Click += (_, _) => Browse("https://buymeacoffee.com/dbrown1986");
1640-
contextMenu.Items.Add(bmc);
1641-
1642-
// ── CashApp ─────────────────────────────────────────────────────────
1643-
var cashapp = new MenuItem { Header = "Cash App" };
1644-
cashapp.Click += (_, _) => Browse("https://cash.app/f/POOL?id=mu2otu1w");
1645-
contextMenu.Items.Add(cashapp);
1646-
1647-
// ── Patreon ─────────────────────────────────────────────────────────
1648-
var patreon = new MenuItem { Header = "Patreon" };
1649-
patreon.Click += (_, _) => Browse("https://www.patreon.com/cw/SimTools");
1650-
contextMenu.Items.Add(patreon);
1651-
1652-
// ── Assign to button ────────────────────────────────────────────────
1653-
DonateButton.ContextMenu = contextMenu;
1654-
}
1655-
16561622
private void SetupStoreContextMenu()
16571623
{
16581624
var contextMenu = new ContextMenu();
@@ -1757,5 +1723,14 @@ private void WarningButton_Click(object sender, RoutedEventArgs e)
17571723
MessageBoxImage.Warning);
17581724
}
17591725
}
1726+
1727+
// Opens the support window
1728+
private void DonateButton_Click(object sender, RoutedEventArgs e)
1729+
{
1730+
{
1731+
var about = new SupportSimTools { Owner = this };
1732+
about.ShowDialog();
1733+
}
1734+
}
17601735
}
17611736
}

Pages/SupportSimTools.xaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<Window x:Class="SimTools.SupportSimTools"
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"
7+
mc:Ignorable="d"
8+
Title="SupportSimTools" Height="532" Width="530" WindowStyle="None" AllowsTransparency="True" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
9+
<Window.Background>
10+
<ImageBrush ImageSource="/Images/TS3_Box2.png"/>
11+
</Window.Background>
12+
<Grid>
13+
<Button x:Name="CloseButton" Content="Button" HorizontalAlignment="Left" Margin="456,480,0,0" VerticalAlignment="Top" Background="{x:Null}" BorderBrush="{x:Null}" Foreground="{x:Null}" Width="24" Height="33" Click="CloseButton_Click"/>
14+
<TextBlock x:Name="SupportText" HorizontalAlignment="Center" Margin="0,40,0,0" TextWrapping="Wrap" Text="First off, thank you for your interest in supporting SimTools. There are various ways in which you can offer support to the SimTools Project. These include, but are not limited to the following:" VerticalAlignment="Top" FontWeight="Bold" FontFamily="Tahoma" Width="474" Height="44"/>
15+
<TextBlock x:Name="FiscalSupport" HorizontalAlignment="Center" Margin="0,100,0,0" TextWrapping="Wrap" Text="Fiscally" VerticalAlignment="Top" FontWeight="Bold" FontFamily="Tahoma" Width="474" Height="27" FontSize="18"/>
16+
<TextBlock x:Name="FiscalSupport2" HorizontalAlignment="Center" Margin="0,125,0,0" TextWrapping="Wrap" Text="I designed SimTools as a hobby, but SimTools does incur monthly hosting costs and annual domain renewals. You can help offset these costs by donating to the project." VerticalAlignment="Top" FontFamily="Tahoma" Width="474" Height="44"/>
17+
<Button x:Name="PayPalButton" Content="Button" HorizontalAlignment="Left" Margin="89,176,0,0" VerticalAlignment="Top" Width="160" Height="35" BorderBrush="{x:Null}" Foreground="{x:Null}" Click="PayPalButton_Click">
18+
<Button.Background>
19+
<ImageBrush ImageSource="/Images/paypal.png"/>
20+
</Button.Background>
21+
</Button>
22+
<Button x:Name="CashAppButton" Content="Button" HorizontalAlignment="Left" Margin="279,176,0,0" VerticalAlignment="Top" Width="160" Height="35" BorderBrush="{x:Null}" Foreground="{x:Null}" Click="CashAppButton_Click">
23+
<Button.Background>
24+
<ImageBrush ImageSource="/Images/cashapp.png"/>
25+
</Button.Background>
26+
</Button>
27+
<Button x:Name="BMACButton" Content="Button" HorizontalAlignment="Left" Margin="89,226,0,0" VerticalAlignment="Top" Width="160" Height="35" BorderBrush="{x:Null}" Foreground="{x:Null}" Click="BMACButton_Click">
28+
<Button.Background>
29+
<ImageBrush ImageSource="/Images/bmac.png"/>
30+
</Button.Background>
31+
</Button>
32+
<Button x:Name="PatreonButton" Content="Button" HorizontalAlignment="Left" Margin="279,226,0,0" VerticalAlignment="Top" Width="160" Height="35" BorderBrush="{x:Null}" Foreground="{x:Null}" Click="PatreonButton_Click">
33+
<Button.Background>
34+
<ImageBrush ImageSource="/Images/patreon.png"/>
35+
</Button.Background>
36+
</Button>
37+
<TextBlock x:Name="FiscalSupport_Copy" HorizontalAlignment="Center" Margin="0,280,0,0" TextWrapping="Wrap" Text="Contribute" VerticalAlignment="Top" FontWeight="Bold" FontFamily="Tahoma" Width="474" Height="27" FontSize="18"/>
38+
<TextBlock x:Name="FiscalSupport2_Copy" HorizontalAlignment="Center" TextWrapping="Wrap" Text="You can contribute code to the SimTools GitHub page, or host a file repository mirror. You can also use the language translation tool to help bring new languages to SimTools." VerticalAlignment="Top" FontFamily="Tahoma" Width="474" Height="31" Margin="0,304,0,0"/>
39+
<Button x:Name="GitHubButton" Content="Button" HorizontalAlignment="Left" Margin="29,346,0,0" VerticalAlignment="Top" Width="150" Height="35" BorderBrush="{x:Null}" Foreground="{x:Null}" Click="GitHubButton_Click">
40+
<Button.Background>
41+
<ImageBrush ImageSource="/Images/github.png"/>
42+
</Button.Background>
43+
</Button>
44+
<Button x:Name="RepoMakerButton" Content="📁 Repo Maker" HorizontalAlignment="Left" Margin="188,346,0,0" VerticalAlignment="Top" Width="151" Height="35" BorderBrush="{x:Null}" Click="RepoMakerButton_Click" Foreground="Black" FontWeight="Bold" FontFamily="Tahoma" FontSize="10">
45+
<Button.Background>
46+
<ImageBrush ImageSource="/Images/button_green.png"/>
47+
</Button.Background>
48+
</Button>
49+
<Button x:Name="TranslationButton" Content="🌐 Translation Tool" HorizontalAlignment="Left" Margin="348,346,0,0" VerticalAlignment="Top" Width="150" Height="35" BorderBrush="{x:Null}" Click="TranslationButton_Click" Foreground="Black" FontFamily="Tahoma" FontSize="10" FontWeight="Bold">
50+
<Button.Background>
51+
<ImageBrush ImageSource="/Images/button_green.png"/>
52+
</Button.Background>
53+
</Button>
54+
55+
</Grid>
56+
</Window>

0 commit comments

Comments
 (0)