UnderMainenanceOverlay help text

This commit is contained in:
Justin Swanson 2019-12-21 20:10:54 -06:00
parent cf73a2af2f
commit 946ff40021
3 changed files with 62 additions and 6 deletions

View File

@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:icon="http://metro.mahapps.com/winfx/xaml/iconpacks"
xmlns:local="clr-namespace:Wabbajack"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="250"
@ -11,7 +12,7 @@
<UserControl.Resources>
<Color x:Key="YellowColor">#fec701</Color>
<SolidColorBrush x:Key="YellowBrush" Color="{StaticResource YellowColor}" />
<Color x:Key="TransparentColor">#99000000</Color>
<Color x:Key="TransparentColor">#AA000000</Color>
<SolidColorBrush x:Key="TransparentBrush" Color="{StaticResource TransparentColor}" />
<LinearGradientBrush x:Key="LinesBrush" MappingMode="Absolute" SpreadMethod="Repeat" StartPoint="0,0" EndPoint="48,36">
<GradientStop Offset="0" Color="Black" />
@ -36,10 +37,36 @@
ShadowDepth="10" />
</Rectangle.Effect>
</Rectangle>
<Grid
Grid.Row="1"
Margin="30"
Visibility="{Binding ShowHelp, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Converter={StaticResource bool2VisibilityConverter}}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock
Grid.Row="0"
Margin="0,0,0,10"
FontFamily="Lucida Sans"
FontSize="30"
FontWeight="Bold"
Foreground="{StaticResource YellowBrush}"
Text="UNDER MAINTENANCE" />
<TextBlock
Grid.Row="1"
FontFamily="Lucida Sans"
FontSize="15"
FontWeight="Bold"
Foreground="{StaticResource YellowBrush}"
Text="When mods are updated and the old versions are taken down, Wabbajack can no longer install the modlist for you. &#x0a; &#x0a;Modlist authors need to download the new mod and confirm its correctness before the modlist can be made available again."
TextWrapping="WrapWithOverflow" />
</Grid>
<Viewbox
Grid.Row="1"
Margin="20"
VerticalAlignment="Top">
VerticalAlignment="Top"
Visibility="{Binding ShowHelp, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Converter={StaticResource bool2VisibilityConverter}, ConverterParameter=False}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@ -51,7 +78,6 @@
</Grid.RowDefinitions>
<TextBlock
Grid.Row="0"
Grid.Column="1"
FontFamily="Lucida Sans"
FontSize="100"
FontWeight="Bold"
@ -64,9 +90,26 @@
ShadowDepth="10" />
</TextBlock.Effect>
</TextBlock>
<Button
Grid.Row="0"
Width="45"
Height="45"
Margin="0,10"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Click="Help_Click">
<Button.Style>
<Style BasedOn="{StaticResource IconBareButtonStyle}" TargetType="Button">
<Setter Property="Foreground" Value="{StaticResource YellowBrush}" />
</Style>
</Button.Style>
<icon:PackIconMaterial
Width="35"
Height="35"
Kind="HelpCircle" />
</Button>
<TextBlock
Grid.Row="1"
Grid.Column="1"
FontFamily="Lucida Sans"
FontSize="100"
FontWeight="Bold"

View File

@ -20,9 +20,22 @@ namespace Wabbajack
/// </summary>
public partial class UnderMaintenanceOverlay : UserControl
{
public bool ShowHelp
{
get => (bool)GetValue(ShowHelpProperty);
set => SetValue(ShowHelpProperty, value);
}
public static readonly DependencyProperty ShowHelpProperty = DependencyProperty.Register(nameof(ShowHelp), typeof(bool), typeof(UnderMaintenanceOverlay),
new FrameworkPropertyMetadata(default(bool)));
public UnderMaintenanceOverlay()
{
InitializeComponent();
}
private void Help_Click(object sender, RoutedEventArgs e)
{
ShowHelp = !ShowHelp;
}
}
}

View File

@ -176,7 +176,7 @@
<DependentUpon>AttentionBorder.xaml</DependentUpon>
</Compile>
<Compile Include="Converters\IsTypeVisibilityConverter.cs" />
<Compile Include="UnderMaintenanceOverlay.xaml.cs">
<Compile Include="Views\Common\UnderMaintenanceOverlay.xaml.cs">
<DependentUpon>UnderMaintenanceOverlay.xaml</DependentUpon>
</Compile>
<Compile Include="Util\AsyncLazy.cs" />
@ -281,7 +281,7 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UnderMaintenanceOverlay.xaml">
<Page Include="Views\Common\UnderMaintenanceOverlay.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>