mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Implemented clickable images
This commit is contained in:
parent
a280a00321
commit
15409f6446
@ -6,19 +6,28 @@
|
||||
Style="{StaticResource {x:Type Window}}" Icon="square_transparent_icon.ico" WindowStyle="ToolWindow"
|
||||
xmlns:local="clr-namespace:Wabbajack"
|
||||
mc:Ignorable="d"
|
||||
Title="Wabbajack" Height="450" Width="800" ResizeMode="NoResize"
|
||||
Title="Wabbajack" Height="500" Width="800" ResizeMode="NoResize"
|
||||
Closing="Close_Window">
|
||||
<Grid Margin="20">
|
||||
<Grid Margin="20" ShowGridLines="False">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition Width="30"></ColumnDefinition>
|
||||
<ColumnDefinition Width="30"></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="30"></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition Height="70"></RowDefinition>
|
||||
<RowDefinition Height="70"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Image Name="Banner"></Image>
|
||||
<Button Name="InstallModlist" Grid.Row="1" Margin="2" Click="InstallModlist_Click">
|
||||
<Image MouseLeftButtonDown="GitHub_MouseLeftButtonDown" Margin="5,0,0,0" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Right" Name="GitHub"></Image>
|
||||
<Image MouseLeftButtonDown="Patreon_MouseLeftButtonDown" Margin="5,0,0,0" Grid.Row="0" Grid.Column="1" Name="Patreon"></Image>
|
||||
<Image MouseLeftButtonDown="Discord_MouseLeftButtonDown" Margin="5,0,0,0" Grid.Row="0" Grid.Column="2" Name="Discord"></Image>
|
||||
<Image Grid.Row="1" Grid.ColumnSpan="3" Name="Banner"></Image>
|
||||
<Button Name="InstallModlist" Grid.ColumnSpan="3" Grid.Row="2" Margin="2" Click="InstallModlist_Click">
|
||||
<TextBlock FontSize="40">Install a ModList</TextBlock>
|
||||
</Button>
|
||||
<Button Name="CreateModlist" Grid.Row="2" Margin="2" Click="CreateModlist_Click">
|
||||
<Button Name="CreateModlist" Grid.ColumnSpan="3" Grid.Row="3" Margin="2" Click="CreateModlist_Click">
|
||||
<TextBlock FontSize="40">Create a ModList</TextBlock>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
@ -6,6 +6,7 @@ using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Diagnostics;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
@ -25,8 +26,14 @@ namespace Wabbajack
|
||||
public ModeSelectionWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
var img = UIUtils.BitmapImageFromResource("Wabbajack.banner_small.png");
|
||||
Banner.Source = img;
|
||||
var bannerImage = UIUtils.BitmapImageFromResource("Wabbajack.banner_small.png");
|
||||
Banner.Source = bannerImage;
|
||||
var patreonIcon = UIUtils.BitmapImageFromResource("Wabbajack.Icons.patreon.png");
|
||||
Patreon.Source = patreonIcon;
|
||||
var githubIcon = UIUtils.BitmapImageFromResource("Wabbajack.Icons.github.png");
|
||||
GitHub.Source = githubIcon;
|
||||
var discordIcon = UIUtils.BitmapImageFromResource("Wabbajack.Icons.discord.png");
|
||||
Discord.Source = discordIcon;
|
||||
}
|
||||
|
||||
private void CreateModlist_Click(object sender, RoutedEventArgs e)
|
||||
@ -60,5 +67,20 @@ namespace Wabbajack
|
||||
}
|
||||
|
||||
public bool ShutdownOnClose { get; set; } = true;
|
||||
|
||||
private void GitHub_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
Process.Start("https://github.com/halgari/wabbajack");
|
||||
}
|
||||
|
||||
private void Patreon_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
Process.Start("https://www.patreon.com/user?u=11907933");
|
||||
}
|
||||
|
||||
private void Discord_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
Process.Start("https://discord.gg/zgbrkmA");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user