mirror of
https://github.com/sp-tarkov/launcher.git
synced 2025-02-12 17:10:44 -05:00
update remaining view and styles
This commit is contained in:
parent
a8f9e70a1c
commit
820e48b4b8
@ -16,25 +16,26 @@
|
|||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.ThemeDictionaries>
|
<ResourceDictionary.ThemeDictionaries>
|
||||||
|
<!-- let's be real... we are never going to use a light theme lol -waffle.lazy -->
|
||||||
<ResourceDictionary x:Key="Light">
|
<ResourceDictionary x:Key="Light">
|
||||||
<SolidColorBrush x:Key="AccentBrush">#54a4ff</SolidColorBrush>
|
|
||||||
<SolidColorBrush x:Key="AccentBrush2">#4383cc</SolidColorBrush>
|
|
||||||
<SolidColorBrush x:Key="AccentBrush3">#326299</SolidColorBrush>
|
|
||||||
<SolidColorBrush x:Key="AltAccentBrush">#b2a58d</SolidColorBrush>
|
|
||||||
<SolidColorBrush x:Key="AltAccentBrush2">#7f7564</SolidColorBrush>
|
|
||||||
<SolidColorBrush x:Key="AltAccentBrush3">#4c463b</SolidColorBrush>
|
|
||||||
<SolidColorBrush x:Key="BackgroundBrush">White</SolidColorBrush>
|
|
||||||
<SolidColorBrush x:Key="BackgroundBrush2">#cccccc</SolidColorBrush>
|
|
||||||
<SolidColorBrush x:Key="AltBackgroundBrush">#cca480</SolidColorBrush>
|
|
||||||
<SolidColorBrush x:Key="ForegroundBrush">Black</SolidColorBrush>
|
|
||||||
</ResourceDictionary>
|
|
||||||
<ResourceDictionary x:Key="Dark">
|
|
||||||
<SolidColorBrush x:Key="AccentBrush">#436082</SolidColorBrush>
|
<SolidColorBrush x:Key="AccentBrush">#436082</SolidColorBrush>
|
||||||
<SolidColorBrush x:Key="AccentBrush2">#567ca8</SolidColorBrush>
|
<SolidColorBrush x:Key="AccentBrush2">#567ca8</SolidColorBrush>
|
||||||
<SolidColorBrush x:Key="AccentBrush3">#6998ce</SolidColorBrush>
|
<SolidColorBrush x:Key="AccentBrush3">#6998ce</SolidColorBrush>
|
||||||
<SolidColorBrush x:Key="AltAccentBrush">#6a6357</SolidColorBrush>
|
<SolidColorBrush x:Key="AltAccentBrush">#6a6357</SolidColorBrush>
|
||||||
<SolidColorBrush x:Key="AltAccentBrush2">#908676</SolidColorBrush>
|
<SolidColorBrush x:Key="AltAccentBrush2">#908676</SolidColorBrush>
|
||||||
<SolidColorBrush x:Key="AltAccentBrush3">#b6a995</SolidColorBrush>
|
<SolidColorBrush x:Key="AltAccentBrush3">#b6a995</SolidColorBrush>
|
||||||
|
<SolidColorBrush x:Key="BackgroundBrush">White</SolidColorBrush>
|
||||||
|
<SolidColorBrush x:Key="BackgroundBrush2">#cccccc</SolidColorBrush>
|
||||||
|
<SolidColorBrush x:Key="AltBackgroundBrush">#cca480</SolidColorBrush>
|
||||||
|
<SolidColorBrush x:Key="ForegroundBrush">Black</SolidColorBrush>
|
||||||
|
</ResourceDictionary>
|
||||||
|
<ResourceDictionary x:Key="Dark">
|
||||||
|
<SolidColorBrush x:Key="AccentBrush">#54a4ff</SolidColorBrush>
|
||||||
|
<SolidColorBrush x:Key="AccentBrush2">#4383cc</SolidColorBrush>
|
||||||
|
<SolidColorBrush x:Key="AccentBrush3">#326299</SolidColorBrush>
|
||||||
|
<SolidColorBrush x:Key="AltAccentBrush">#b2a58d</SolidColorBrush>
|
||||||
|
<SolidColorBrush x:Key="AltAccentBrush2">#7f7564</SolidColorBrush>
|
||||||
|
<SolidColorBrush x:Key="AltAccentBrush3">#4c463b</SolidColorBrush>
|
||||||
<SolidColorBrush x:Key="BackgroundBrush">#181a1b</SolidColorBrush>
|
<SolidColorBrush x:Key="BackgroundBrush">#181a1b</SolidColorBrush>
|
||||||
<SolidColorBrush x:Key="BackgroundBrush2">#393e41</SolidColorBrush>
|
<SolidColorBrush x:Key="BackgroundBrush2">#393e41</SolidColorBrush>
|
||||||
<SolidColorBrush x:Key="AltBackgroundBrush">#37332d</SolidColorBrush>
|
<SolidColorBrush x:Key="AltBackgroundBrush">#37332d</SolidColorBrush>
|
||||||
|
@ -3,13 +3,15 @@
|
|||||||
xmlns:cc="using:SPT.Launcher.CustomControls"
|
xmlns:cc="using:SPT.Launcher.CustomControls"
|
||||||
>
|
>
|
||||||
<Design.PreviewWith>
|
<Design.PreviewWith>
|
||||||
<Grid Background="{DynamicResource BackgroundBrush}">
|
<Border Classes="card">
|
||||||
<StackPanel Spacing="5" Margin="50">
|
<StackPanel Spacing="5" Margin="50">
|
||||||
<Label Content="Some label here"/>
|
<Label Content="Some label here"/>
|
||||||
<Label Content="Some acc label here" Classes="acc"/>
|
<Label Content="Some acc label here" Classes="acc"/>
|
||||||
<Label Content="Some alt label here" Classes="alt"/>
|
<Label Content="Some alt label here" Classes="alt"/>
|
||||||
<Label Classes="versionMismatch" Content="invalid version tag" />
|
<Label Classes="versionMismatch" Content="invalid version tag" />
|
||||||
<Button Content="button" />
|
<Button Content="button" />
|
||||||
|
<Button Content="outlined button" Classes="outlined"></Button>
|
||||||
|
<Button Content="Icon button" Classes="icon"/>
|
||||||
<Button Content="acc button" Classes="acc"/>
|
<Button Content="acc button" Classes="acc"/>
|
||||||
<Button Content="alt button" Classes="alt"/>
|
<Button Content="alt button" Classes="alt"/>
|
||||||
<Button IsEnabled="False" Content="disabled button"/>
|
<Button IsEnabled="False" Content="disabled button"/>
|
||||||
@ -28,16 +30,35 @@
|
|||||||
<ProgressBar IsIndeterminate="True" />
|
<ProgressBar IsIndeterminate="True" />
|
||||||
<ProgressBar Classes="error" />
|
<ProgressBar Classes="error" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Border>
|
||||||
</Design.PreviewWith>
|
</Design.PreviewWith>
|
||||||
|
|
||||||
<!-- Add Styles Here -->
|
<!-- Add Styles Here -->
|
||||||
|
|
||||||
|
<!-- Textblock Styles -->
|
||||||
|
|
||||||
|
<Style Selector="TextBlock.alt">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource AltAccentBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- Border Styles -->
|
||||||
|
<Style Selector="Border.card">
|
||||||
|
<Setter Property="CornerRadius" Value="5"/>
|
||||||
|
<Setter Property="BoxShadow" Value="2 5 5 black"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource AltBackgroundBrush}"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource BackgroundBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="Margin" Value="10"></Setter>
|
||||||
|
</Style>
|
||||||
|
<!-- BoxShadow="2 5 5 black"></Setter> CornerRadius="5" -->
|
||||||
|
<!-- BorderBrush="{DynamicResource AltBackgroundBrush}" -->
|
||||||
|
<!-- Background="{DynamicResource BackgroundBrush}" -->
|
||||||
|
<!-- Margin="15" -->
|
||||||
|
<!-- BorderThickness="1" -->
|
||||||
|
|
||||||
<!-- Notification Manager Styles -->
|
<!-- Notification Manager Styles -->
|
||||||
<Style Selector="WindowNotificationManager">
|
<Style Selector="WindowNotificationManager">
|
||||||
<Setter Property="Margin" Value="0 35 0 0"/>
|
<Setter Property="Margin" Value="0 35 0 0"/>
|
||||||
<!-- <Setter Property="VerticalAlignment" Value="Bottom"/> -->
|
|
||||||
<!-- <Setter Property="HorizontalAlignment" Value="Center"/> -->
|
|
||||||
<Setter Property="MaxItems" Value="2"/>
|
<Setter Property="MaxItems" Value="2"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
@ -59,50 +80,8 @@
|
|||||||
</LayoutTransformControl>
|
</LayoutTransformControl>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
|
||||||
<!-- <Style.Animations> -->
|
|
||||||
<!-- <Animation Duration="0:0:0.45" Easing="SineEaseIn" FillMode="Forward"> -->
|
|
||||||
<!-- <KeyFrame Cue="0%"> -->
|
|
||||||
<!-- <Setter Property="Opacity" Value="0"/> -->
|
|
||||||
<!-- <Setter Property="ZIndex" Value="0"/> -->
|
|
||||||
<!-- <Setter Property="TranslateTransform.Y" Value="-100"/> -->
|
|
||||||
<!-- <Setter Property="ScaleTransform.ScaleX" Value="1"/> -->
|
|
||||||
<!-- <Setter Property="ScaleTransform.ScaleY" Value="1"/> -->
|
|
||||||
<!-- </KeyFrame> -->
|
|
||||||
<!-- <KeyFrame Cue="30%"> -->
|
|
||||||
<!-- <Setter Property="Opacity" Value="0"/> -->
|
|
||||||
<!-- </KeyFrame> -->
|
|
||||||
<!-- <KeyFrame Cue="99%"> -->
|
|
||||||
<!-- <Setter Property="ZIndex" Value="0"/> -->
|
|
||||||
<!-- </KeyFrame> -->
|
|
||||||
<!-- <KeyFrame Cue="100%"> -->
|
|
||||||
<!-- <Setter Property="Opacity" Value="1"/> -->
|
|
||||||
<!-- <Setter Property="ZIndex" Value="1"/> -->
|
|
||||||
<!-- <Setter Property="TranslateTransform.Y" Value="0"/> -->
|
|
||||||
<!-- <Setter Property="ScaleTransform.ScaleX" Value="1"/> -->
|
|
||||||
<!-- <Setter Property="ScaleTransform.ScaleY" Value="1"/> -->
|
|
||||||
<!-- </KeyFrame> -->
|
|
||||||
<!-- </Animation> -->
|
|
||||||
<!-- </Style.Animations> -->
|
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- <Style Selector="NotificationCard[IsClosing=true] /template/ LayoutTransformControl#PART_LayoutTransformControl"> -->
|
|
||||||
<!-- <Style.Animations> -->
|
|
||||||
<!-- <Animation Duration="0:0:0.3" Easing="SineEaseOut" FillMode="Backward"> -->
|
|
||||||
<!-- <KeyFrame Cue="0%"> -->
|
|
||||||
<!-- <Setter Property="Opacity" Value="1"/> -->
|
|
||||||
<!-- <Setter Property="TranslateTransform.X" Value="0"/> -->
|
|
||||||
<!-- <Setter Property="TranslateTransform.Y" Value="0"/> -->
|
|
||||||
<!-- </KeyFrame> -->
|
|
||||||
<!-- <KeyFrame Cue="100%"> -->
|
|
||||||
<!-- <Setter Property="Opacity" Value="0"/> -->
|
|
||||||
<!-- <Setter Property="TranslateTransform.X" Value="0"/> -->
|
|
||||||
<!-- <Setter Property="TranslateTransform.Y" Value="-100"/> -->
|
|
||||||
<!-- </KeyFrame> -->
|
|
||||||
<!-- </Animation> -->
|
|
||||||
<!-- </Style.Animations> -->
|
|
||||||
<!-- </Style> -->
|
|
||||||
|
|
||||||
<!-- TitleBar Styles -->
|
<!-- TitleBar Styles -->
|
||||||
<Style Selector="cc|TitleBar">
|
<Style Selector="cc|TitleBar">
|
||||||
<Setter Property="Background" Value="{DynamicResource BackgroundBrush}"/>
|
<Setter Property="Background" Value="{DynamicResource BackgroundBrush}"/>
|
||||||
@ -172,7 +151,7 @@
|
|||||||
|
|
||||||
<!-- ProgressBar Styles -->
|
<!-- ProgressBar Styles -->
|
||||||
<Style Selector="ProgressBar">
|
<Style Selector="ProgressBar">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource AccentBrush3}"/>
|
<Setter Property="Foreground" Value="{DynamicResource AccentBrush}"/>
|
||||||
<Setter Property="Background" Value="{DynamicResource BackgroundBrush2}"/>
|
<Setter Property="Background" Value="{DynamicResource BackgroundBrush2}"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
@ -223,13 +202,13 @@
|
|||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Button.acc:pointerover /template/ ContentPresenter">
|
<Style Selector="Button.acc:pointerover /template/ ContentPresenter">
|
||||||
<Setter Property="Background" Value="{DynamicResource AccentBrush3}"/>
|
<Setter Property="Background" Value="{DynamicResource AccentBrush2}"/>
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource BackgroundBrush2}"/>
|
<Setter Property="BorderBrush" Value="{DynamicResource BackgroundBrush2}"/>
|
||||||
<Setter Property="BorderThickness" Value="1"/>
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Button.acc:pressed /template/ ContentPresenter">
|
<Style Selector="Button.acc:pressed /template/ ContentPresenter">
|
||||||
<Setter Property="Background" Value="{DynamicResource AccentBrush}"/>
|
<Setter Property="Background" Value="{DynamicResource AccentBrush3}"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Button.acc:disabled /template/ ContentPresenter">
|
<Style Selector="Button.acc:disabled /template/ ContentPresenter">
|
||||||
@ -244,13 +223,13 @@
|
|||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Button.alt:pointerover /template/ ContentPresenter">
|
<Style Selector="Button.alt:pointerover /template/ ContentPresenter">
|
||||||
<Setter Property="Background" Value="{DynamicResource AltAccentBrush3}"/>
|
<Setter Property="Background" Value="{DynamicResource AltAccentBrush2}"/>
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource BackgroundBrush2}"/>
|
<Setter Property="BorderBrush" Value="{DynamicResource BackgroundBrush2}"/>
|
||||||
<Setter Property="BorderThickness" Value="1"/>
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Button.alt:pressed /template/ ContentPresenter">
|
<Style Selector="Button.alt:pressed /template/ ContentPresenter">
|
||||||
<Setter Property="Background" Value="{DynamicResource AltAccentBrush}"/>
|
<Setter Property="Background" Value="{DynamicResource AltAccentBrush3}"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Button.alt:disabled /template/ ContentPresenter">
|
<Style Selector="Button.alt:disabled /template/ ContentPresenter">
|
||||||
@ -264,61 +243,70 @@
|
|||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Button.link, Button.ulink">
|
<Style Selector="Button.link, Button.ulink">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource AltAccentBrush3}"/>
|
<Setter Property="Foreground" Value="{DynamicResource AltAccentBrush}"/>
|
||||||
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||||
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Button.link:pointerover /template/ ContentPresenter, Button.ulink:pointerover /template/ ContentPresenter">
|
<Style Selector="Button.link:pointerover /template/ ContentPresenter, Button.ulink:pointerover /template/ ContentPresenter">
|
||||||
<Setter Property="TextBlock.Foreground" Value="{DynamicResource AccentBrush3}"/>
|
|
||||||
<Setter Property="Background" Value="Transparent"/>
|
|
||||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
|
||||||
<Setter Property="BorderThickness" Value="0"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style Selector="Button.link:pressed /template/ ContentPresenter, Button.ulink:pressed /template/ ContentPresenter">
|
|
||||||
<Setter Property="TextBlock.Foreground" Value="{DynamicResource AccentBrush}"/>
|
<Setter Property="TextBlock.Foreground" Value="{DynamicResource AccentBrush}"/>
|
||||||
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||||
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Button Bordered Link Style -->
|
<Style Selector="Button.link:pressed /template/ ContentPresenter, Button.ulink:pressed /template/ ContentPresenter">
|
||||||
<!-- <Style Selector="Button.borderedlink"> -->
|
<Setter Property="TextBlock.Foreground" Value="{DynamicResource AccentBrush3}"/>
|
||||||
<!-- <Setter Property="Foreground" Value="{DynamicResource ForegroundBrush}"/> -->
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
<!-- <Setter Property="Background" Value="Transparent"/> -->
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||||
<!-- <Setter Property="BorderBrush" Value="{DynamicResource ForegroundBrush}"/> -->
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
<!-- <Setter Property="BorderThickness" Value="1"/> -->
|
</Style>
|
||||||
<!-- </Style> -->
|
|
||||||
<!-- -->
|
<!-- Outlined Button -->
|
||||||
<!-- <Style Selector="Button.borderedlink:pointerover /template/ ContentPresenter"> -->
|
<Style Selector="Button.outlined">
|
||||||
<!-- <Setter Property="TextBlock.Foreground" Value="{DynamicResource AccentBrush}"/> -->
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
<!-- <Setter Property="Background" Value="Transparent"/> -->
|
<Setter Property="Foreground" Value="{DynamicResource ForegroundBrush}"/>
|
||||||
<!-- <Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}"/> -->
|
<Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}"/>
|
||||||
<!-- </Style> -->
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
<!-- -->
|
</Style>
|
||||||
<!-- <Style Selector="Button.borderedlink:pressed /template/ ContentPresenter"> -->
|
|
||||||
<!-- <Setter Property="TextBlock.Foreground" Value="{DynamicResource BackgroundBrush2}"/> -->
|
<Style Selector="Button.outlined:pointerover /template/ ContentPresenter">
|
||||||
<!-- <Setter Property="Background" Value="Transparent"/> -->
|
<Setter Property="Background" Value="{DynamicResource AltBackgroundBrush}"/>
|
||||||
<!-- <Setter Property="BorderBrush" Value="{DynamicResource BackgroundBrush2}"/> -->
|
<Setter Property="BorderBrush" Value="{DynamicResource AccentBrush2}"/>
|
||||||
<!-- <Setter Property="BorderThickness" Value="0"/> -->
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
<!-- </Style> -->
|
</Style>
|
||||||
|
|
||||||
<!-- Button Profile Info Style -->
|
<Style Selector="Button.outlined:pressed /template/ ContentPresenter">
|
||||||
<!-- <Style Selector="Button.profileinfo"> -->
|
<Setter Property="Background" Value="{DynamicResource AccentBrush3}"/>
|
||||||
<!-- <Setter Property="Background" Value="{DynamicResource BackgroundBrush}"/> -->
|
</Style>
|
||||||
<!-- <Setter Property="BorderBrush" Value="{DynamicResource BackgroundBrush}"/> -->
|
|
||||||
<!-- </Style> -->
|
<Style Selector="Button.outlined:disabled /template/ ContentPresenter">
|
||||||
<!-- -->
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
<!-- <Style Selector="Button.icon"> -->
|
<Setter Property="BorderBrush" Value="{DynamicResource BackgroundBrush2}"/>
|
||||||
<!-- <Setter Property="Background" Value="Transparent"/> -->
|
</Style>
|
||||||
<!-- <Setter Property="BorderBrush" Value="Transparent"/> -->
|
|
||||||
<!-- </Style> -->
|
<!-- Icon button -->
|
||||||
<!-- -->
|
<Style Selector="Button.icon">
|
||||||
<!-- <Style Selector="Button.icon:pointerover"> -->
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
<!-- <Setter Property="Background" Value="{DynamicResource BackgroundBrush2}"/> -->
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||||
<!-- </Style> -->
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="Button.icon:pointerover /template/ ContentPresenter">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource AltBackgroundBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource AccentBrush2}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="Button.icon:pressed /template/ ContentPresenter">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource AccentBrush3}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="Button.icon:disabled /template/ ContentPresenter">
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BackgroundBrush2}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
<!-- Checkbox styles -->
|
<!-- Checkbox styles -->
|
||||||
<Style Selector="CheckBox">
|
<Style Selector="CheckBox">
|
||||||
@ -335,16 +323,16 @@
|
|||||||
|
|
||||||
<Style Selector="CheckBox:checked">
|
<Style Selector="CheckBox:checked">
|
||||||
<Setter Property="FontWeight" Value="SemiBold"/>
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||||
<Setter Property="Foreground" Value="{DynamicResource AccentBrush3}"/>
|
<Setter Property="Foreground" Value="{DynamicResource AccentBrush}"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="CheckBox:checked /template/ Border#NormalRectangle">
|
<Style Selector="CheckBox:checked /template/ Border#NormalRectangle">
|
||||||
<Setter Property="Background" Value="{DynamicResource BackgroundBrush2}"/>
|
<Setter Property="Background" Value="{DynamicResource BackgroundBrush2}"/>
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource AccentBrush3}"/>
|
<Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="CheckBox:checked /template/ Path#CheckGlyph">
|
<Style Selector="CheckBox:checked /template/ Path#CheckGlyph">
|
||||||
<Setter Property="Fill" Value="{DynamicResource AccentBrush3}"/>
|
<Setter Property="Fill" Value="{DynamicResource AccentBrush}"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- ComboBox Styles -->
|
<!-- ComboBox Styles -->
|
||||||
@ -379,8 +367,8 @@
|
|||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
Background="{DynamicResource AltBackgroundBrush}"
|
Background="{TemplateBinding Background}"
|
||||||
BorderBrush="{DynamicResource AltAccentBrush2}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
CornerRadius="{TemplateBinding CornerRadius}" />
|
CornerRadius="{TemplateBinding CornerRadius}" />
|
||||||
<TextBlock x:Name="PlaceholderTextBlock"
|
<TextBlock x:Name="PlaceholderTextBlock"
|
||||||
@ -458,17 +446,26 @@
|
|||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="ComboBox">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource AltBackgroundBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="ComboBox:dropdownopen">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource BackgroundBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
<Style Selector="ComboBox /template/ Path#DropDownGlyph">
|
<Style Selector="ComboBox /template/ Path#DropDownGlyph">
|
||||||
<Setter Property="Fill" Value="{DynamicResource ForegroundBrush}" />
|
<Setter Property="Fill" Value="{DynamicResource ForegroundBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="ComboBox:pointerover /template/ Path#DropDownGlyph">
|
<Style Selector="ComboBox:pointerover /template/ Path#DropDownGlyph">
|
||||||
<Setter Property="Fill" Value="{DynamicResource AccentBrush3}" />
|
<Setter Property="Fill" Value="{DynamicResource AccentBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="ComboBox:pointerover">
|
<Style Selector="ComboBox:pointerover">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource AccentBrush3}"/>
|
<Setter Property="Foreground" Value="{DynamicResource AccentBrush}"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- ComboBoxItem Styles -->
|
<!-- ComboBoxItem Styles -->
|
||||||
@ -478,7 +475,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="ComboBoxItem:pointerover /template/ ContentPresenter">
|
<Style Selector="ComboBoxItem:pointerover /template/ ContentPresenter">
|
||||||
<Setter Property="Background" Value="{DynamicResource AltAccentBrush}" />
|
<Setter Property="Background" Value="{DynamicResource AltAccentBrush2}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource BackgroundBrush2}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource BackgroundBrush2}" />
|
||||||
<Setter Property="TextBlock.Foreground" Value="{DynamicResource ForegroundBrush}" />
|
<Setter Property="TextBlock.Foreground" Value="{DynamicResource ForegroundBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
xmlns:helpers="using:SPT.Launcher.Helpers"
|
xmlns:helpers="using:SPT.Launcher.Helpers"
|
||||||
xmlns:cvt="using:SPT.Launcher.Converters"
|
xmlns:cvt="using:SPT.Launcher.Converters"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="SPT.Launcher.CustomControls.ExistingProfileCard"
|
x:Class="SPT.Launcher.CustomControls.DetailedProfileCard"
|
||||||
MinWidth="250" MinHeight="250"
|
MinWidth="250" MinHeight="250"
|
||||||
PointerEntered="InputElement_OnPointerEntered"
|
PointerEntered="InputElement_OnPointerEntered"
|
||||||
PointerExited="InputElement_OnPointerExited"
|
PointerExited="InputElement_OnPointerExited"
|
||||||
@ -16,12 +16,7 @@
|
|||||||
<cvt:ImageSourceConverter x:Key="ImageSourceCvt" />
|
<cvt:ImageSourceConverter x:Key="ImageSourceCvt" />
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
|
|
||||||
<Border x:Name="CardBorder"
|
<Border x:Name="CardBorder" Classes="card" Margin="15">
|
||||||
BoxShadow="2 5 5 black" CornerRadius="5"
|
|
||||||
BorderBrush="{DynamicResource AltBackgroundBrush}"
|
|
||||||
Background="{DynamicResource BackgroundBrush}"
|
|
||||||
Margin="15"
|
|
||||||
BorderThickness="1">
|
|
||||||
<Border.Transitions>
|
<Border.Transitions>
|
||||||
<Transitions>
|
<Transitions>
|
||||||
<TransformOperationsTransition Property="RenderTransform" Duration="0:0:0.200"/>
|
<TransformOperationsTransition Property="RenderTransform" Duration="0:0:0.200"/>
|
@ -1,6 +1,4 @@
|
|||||||
using System;
|
using System.Threading.Tasks;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
@ -13,9 +11,9 @@ using SPT.Launcher.Models.Launcher;
|
|||||||
|
|
||||||
namespace SPT.Launcher.CustomControls;
|
namespace SPT.Launcher.CustomControls;
|
||||||
|
|
||||||
public partial class ExistingProfileCard : UserControl
|
public partial class DetailedProfileCard : UserControl
|
||||||
{
|
{
|
||||||
public ExistingProfileCard()
|
public DetailedProfileCard()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
@ -29,15 +27,14 @@ public partial class ExistingProfileCard : UserControl
|
|||||||
await Dispatcher.UIThread.InvokeAsync(async () =>
|
await Dispatcher.UIThread.InvokeAsync(async () =>
|
||||||
{
|
{
|
||||||
border.Opacity = 1;
|
border.Opacity = 1;
|
||||||
border.BoxShadow = BoxShadows.Parse("2 5 5 black");
|
|
||||||
await Task.Delay(200);
|
|
||||||
border.RenderTransform = TransformOperations.Parse("scale(1)");
|
border.RenderTransform = TransformOperations.Parse("scale(1)");
|
||||||
|
border.BoxShadow = BoxShadows.Parse("2 5 5 black");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static readonly StyledProperty<ProfileInfo> ProfileInfoProperty =
|
public static readonly StyledProperty<ProfileInfo> ProfileInfoProperty =
|
||||||
AvaloniaProperty.Register<ExistingProfileCard, ProfileInfo>(
|
AvaloniaProperty.Register<DetailedProfileCard, ProfileInfo>(
|
||||||
"ProfileInfo");
|
"ProfileInfo");
|
||||||
|
|
||||||
public ProfileInfo ProfileInfo
|
public ProfileInfo ProfileInfo
|
||||||
@ -46,7 +43,7 @@ public partial class ExistingProfileCard : UserControl
|
|||||||
set => SetValue(ProfileInfoProperty, value);
|
set => SetValue(ProfileInfoProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static readonly StyledProperty<ICommand> LoginCommandProperty = AvaloniaProperty.Register<ExistingProfileCard, ICommand>(
|
public static readonly StyledProperty<ICommand> LoginCommandProperty = AvaloniaProperty.Register<DetailedProfileCard, ICommand>(
|
||||||
"LoginCommand");
|
"LoginCommand");
|
||||||
|
|
||||||
public ICommand LoginCommand
|
public ICommand LoginCommand
|
61
project/SPT.Launcher/CustomControls/GameLaunchBar.axaml
Normal file
61
project/SPT.Launcher/CustomControls/GameLaunchBar.axaml
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
<UserControl xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:cvt="using:SPT.Launcher.Converters"
|
||||||
|
xmlns:helpers="using:SPT.Launcher.Helpers"
|
||||||
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
|
x:Class="SPT.Launcher.CustomControls.GameLaunchBar">
|
||||||
|
<UserControl.Resources>
|
||||||
|
<cvt:ImageSourceConverter x:Key="ImageSourceCvt" />
|
||||||
|
</UserControl.Resources>
|
||||||
|
|
||||||
|
<Border Classes="card">
|
||||||
|
<DockPanel Background="{DynamicResource BackgroundBrush}" Margin="2">
|
||||||
|
|
||||||
|
<StackPanel Orientation="Horizontal"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
Spacing="10"
|
||||||
|
IsVisible="{Binding $parent[UserControl].ProfileInfo.HasData}">
|
||||||
|
<Grid RowDefinitions="AUTO,AUTO" ColumnDefinitions="AUTO,AUTO">
|
||||||
|
<Image Source="{Binding $parent[UserControl].ProfileInfo.SideImage, Converter={StaticResource ImageSourceCvt}}"
|
||||||
|
Grid.RowSpan="2" Height="40" Margin="10 0" />
|
||||||
|
<Label Content="{Binding $parent[UserControl].ProfileInfo.Nickname}" Grid.Row="0" Grid.Column="2" Classes="acc"/>
|
||||||
|
<Label Content="{Binding $parent[UserControl].ProfileInfo.Side}" Grid.Row="1" Grid.Column="2" />
|
||||||
|
</Grid>
|
||||||
|
<Label Content="{Binding $parent[UserControl].ProfileInfo.Level}" VerticalAlignment="Center"
|
||||||
|
FontSize="22" />
|
||||||
|
<ProgressBar Value="{Binding $parent[UserControl].ProfileInfo.XPLevelProgress}" />
|
||||||
|
<StackPanel>
|
||||||
|
<Label Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=next_level_in}"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
/>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<Label Content="{Binding $parent[UserControl].ProfileInfo.RemainingExp}"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Classes="acc"/>
|
||||||
|
<Label Content="xp"/>
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
|
||||||
|
<Button Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=start_game}"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
DockPanel.Dock="Right"
|
||||||
|
Command="{Binding $parent[UserControl].StartGameCommand}"
|
||||||
|
IsEnabled="{Binding Source={x:Static helpers:LauncherSettingsProvider.Instance}, Path=!GameRunning}"
|
||||||
|
Classes="acc" />
|
||||||
|
|
||||||
|
<Button Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=logout}"
|
||||||
|
Command="{Binding $parent[UserControl].LogoutCommand}"
|
||||||
|
Margin="10 0"
|
||||||
|
Classes="ulink"
|
||||||
|
DockPanel.Dock="Right"
|
||||||
|
HorizontalAlignment="Right" />
|
||||||
|
|
||||||
|
</DockPanel>
|
||||||
|
</Border>
|
||||||
|
</UserControl>
|
41
project/SPT.Launcher/CustomControls/GameLaunchBar.axaml.cs
Normal file
41
project/SPT.Launcher/CustomControls/GameLaunchBar.axaml.cs
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
using System.Windows.Input;
|
||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using SPT.Launcher.Models.Launcher;
|
||||||
|
|
||||||
|
namespace SPT.Launcher.CustomControls;
|
||||||
|
|
||||||
|
public partial class GameLaunchBar : UserControl
|
||||||
|
{
|
||||||
|
public GameLaunchBar()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly StyledProperty<ProfileInfo> ProfileInfoProperty = AvaloniaProperty.Register<GameLaunchBar, ProfileInfo>(
|
||||||
|
"ProfileInfo");
|
||||||
|
|
||||||
|
public ProfileInfo ProfileInfo
|
||||||
|
{
|
||||||
|
get => GetValue(ProfileInfoProperty);
|
||||||
|
set => SetValue(ProfileInfoProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly StyledProperty<ICommand> StartGameCommandProperty = AvaloniaProperty.Register<GameLaunchBar, ICommand>(
|
||||||
|
"StartGameCommand");
|
||||||
|
|
||||||
|
public ICommand StartGameCommand
|
||||||
|
{
|
||||||
|
get => GetValue(StartGameCommandProperty);
|
||||||
|
set => SetValue(StartGameCommandProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly StyledProperty<ICommand> LogoutCommandProperty = AvaloniaProperty.Register<GameLaunchBar, ICommand>(
|
||||||
|
"LogoutCommand");
|
||||||
|
|
||||||
|
public ICommand LogoutCommand
|
||||||
|
{
|
||||||
|
get => GetValue(LogoutCommandProperty);
|
||||||
|
set => SetValue(LogoutCommandProperty, value);
|
||||||
|
}
|
||||||
|
}
|
@ -10,7 +10,7 @@
|
|||||||
>
|
>
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate DataType="{x:Type model:LocalizedLauncherAction}">
|
<DataTemplate DataType="{x:Type model:LocalizedLauncherAction}">
|
||||||
<Label Content="{Binding Name}"/>
|
<TextBlock Text="{Binding Name}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
@ -5,11 +5,7 @@
|
|||||||
xmlns:helpers="using:SPT.Launcher.Helpers"
|
xmlns:helpers="using:SPT.Launcher.Helpers"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="SPT.Launcher.CustomControls.LoginBox">
|
x:Class="SPT.Launcher.CustomControls.LoginBox">
|
||||||
<Border BoxShadow="2 5 5 black" CornerRadius="5"
|
<Border Classes="card">
|
||||||
BorderBrush="{DynamicResource AltBackgroundBrush}"
|
|
||||||
Background="{DynamicResource BackgroundBrush}"
|
|
||||||
Margin="10"
|
|
||||||
BorderThickness="1">
|
|
||||||
|
|
||||||
<Grid RowDefinitions="Auto, Auto" ColumnDefinitions="*, Auto" Margin="10">
|
<Grid RowDefinitions="Auto, Auto" ColumnDefinitions="*, Auto" Margin="10">
|
||||||
<!-- Username box -->
|
<!-- Username box -->
|
||||||
|
@ -5,12 +5,10 @@
|
|||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
xmlns:helpers="using:SPT.Launcher.Helpers"
|
xmlns:helpers="using:SPT.Launcher.Helpers"
|
||||||
x:Class="SPT.Launcher.CustomControls.ModInfoCard">
|
x:Class="SPT.Launcher.CustomControls.ModInfoCard">
|
||||||
<Border CornerRadius="5" HorizontalAlignment="Stretch"
|
<Border Classes="card" HorizontalAlignment="Stretch">
|
||||||
BorderBrush="{DynamicResource BackgroundBrush}"
|
<Grid RowDefinitions="10,AUTO,AUTO,AUTO,10" ColumnDefinitions="10,AUTO,*,AUTO,10"
|
||||||
BorderThickness="5"
|
|
||||||
>
|
|
||||||
<Grid RowDefinitions="10,AUTO,AUTO,AUTO,10" ColumnDefinitions="10,AUTO,*,AUTO,10"
|
|
||||||
Background="{DynamicResource BackgroundBrush}"
|
Background="{DynamicResource BackgroundBrush}"
|
||||||
|
Margin="2"
|
||||||
>
|
>
|
||||||
|
|
||||||
<!-- Icon stack -->
|
<!-- Icon stack -->
|
||||||
@ -19,19 +17,19 @@
|
|||||||
Orientation="Horizontal" Spacing="5"
|
Orientation="Horizontal" Spacing="5"
|
||||||
>
|
>
|
||||||
<!-- Server Icon -->
|
<!-- Server Icon -->
|
||||||
<Path Data="{StaticResource Server}" Fill="DarkSlateGray"
|
<Path Data="{StaticResource Server}" Fill="{DynamicResource AltAccentBrush}"
|
||||||
IsVisible="{Binding IsInServer, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
IsVisible="{Binding IsInServer, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- Profile Icon -->
|
<!-- Profile Icon -->
|
||||||
<Path Data="{StaticResource Profile}" Fill="DarkSlateGray"
|
<Path Data="{StaticResource Profile}" Fill="{DynamicResource AltAccentBrush}"
|
||||||
IsVisible="{Binding IsInProfile, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
IsVisible="{Binding IsInProfile, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- Info Icon -->
|
<!-- Info Icon -->
|
||||||
<Canvas>
|
<Canvas>
|
||||||
<Rectangle ToolTip.Tip="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=mod_not_in_server_warning}" Fill="Transparent" Height="20" Width="20"/>
|
<Rectangle ToolTip.Tip="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=mod_not_in_server_warning}" Fill="Transparent" Height="20" Width="20"/>
|
||||||
<Path Data="{StaticResource Info}" Fill="DodgerBlue"
|
<Path Data="{StaticResource Info}" Fill="{DynamicResource AccentBrush}"
|
||||||
ToolTip.Tip="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=mod_not_in_server_warning}"
|
ToolTip.Tip="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=mod_not_in_server_warning}"
|
||||||
>
|
>
|
||||||
<Path.IsVisible>
|
<Path.IsVisible>
|
||||||
@ -66,7 +64,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- Author Text -->
|
<!-- Author Text -->
|
||||||
<Label Grid.Row="3" Grid.Column="1" FontSize="12" Foreground="DimGray"
|
<Label Grid.Row="3" Grid.Column="1" FontSize="12" Foreground="{DynamicResource AltAccentBrush}"
|
||||||
Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=author}"
|
Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=author}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@ -78,6 +76,7 @@
|
|||||||
<!-- Mod Version -->
|
<!-- Mod Version -->
|
||||||
<Label Grid.Row="3" Grid.Column="3" FontSize="12"
|
<Label Grid.Row="3" Grid.Column="3" FontSize="12"
|
||||||
Content="{Binding Version, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
Content="{Binding Version, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||||
|
Classes="acc"
|
||||||
/>
|
/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
61
project/SPT.Launcher/CustomControls/ProfileCard.axaml
Normal file
61
project/SPT.Launcher/CustomControls/ProfileCard.axaml
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
<UserControl xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:helpers="using:SPT.Launcher.Helpers"
|
||||||
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
|
x:Class="SPT.Launcher.CustomControls.ProfileCard">
|
||||||
|
<Border Classes="card">
|
||||||
|
<Grid RowDefinitions="10,AUTO,AUTO,AUTO,AUTO,10" ColumnDefinitions="10,AUTO,*,10" Margin="2"
|
||||||
|
Background="{DynamicResource BackgroundBrush}">
|
||||||
|
<StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="1">
|
||||||
|
<Label Content="{Binding $parent[UserControl].ProfileInfo.Username}" Margin="5 0" />
|
||||||
|
|
||||||
|
<!-- profile name and version -->
|
||||||
|
<Label x:Name="SPTVersion"
|
||||||
|
Background="Transparent"
|
||||||
|
ToolTip.Tip="{Binding $parent[UserControl].ProfileInfo.MismatchMessage}"
|
||||||
|
Classes.versionMismatch="{Binding $parent[UserControl].ProfileInfo.VersionMismatch}"
|
||||||
|
Classes.acc="{Binding !$parent[UserControl].ProfileInfo.VersionMismatch}"
|
||||||
|
>
|
||||||
|
<StackPanel Orientation="Horizontal" Background="Transparent">
|
||||||
|
<TextBlock Text="{Binding $parent[UserControl].ProfileInfo.SPT.version}" />
|
||||||
|
<Path Data="{StaticResource Info}"
|
||||||
|
Fill="{Binding ElementName=SPTVersion, Path=Foreground}"
|
||||||
|
Margin="10 0"
|
||||||
|
IsVisible="{Binding $parent[UserControl].ProfileInfo.VersionMismatch}" />
|
||||||
|
</StackPanel>
|
||||||
|
</Label>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- delete profile button -->
|
||||||
|
<Button HorizontalAlignment="Right" Grid.Row="1" Grid.Column="2"
|
||||||
|
Classes="icon"
|
||||||
|
Command="{Binding $parent[UserControl].RemoveProfileCommand}"
|
||||||
|
IsEnabled="{Binding Source={x:Static helpers:LauncherSettingsProvider.Instance}, Path=!GameRunning}">
|
||||||
|
<Path Data="{StaticResource Delete}" Fill="IndianRed" />
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<!-- profile id button -->
|
||||||
|
<Button Content="{Binding $parent[UserControl].CurrentId}" Classes="ulink"
|
||||||
|
Grid.Row="2" Grid.Column="1"
|
||||||
|
Command="{Binding $parent[UserControl].CopyCommand}"
|
||||||
|
CommandParameter="{Binding $parent[UserControl].CurrentId}" />
|
||||||
|
|
||||||
|
<!-- profile edition button -->
|
||||||
|
<Button Content="{Binding $parent[UserControl].CurrentEdition}" Classes="ulink"
|
||||||
|
Grid.Row="3" Grid.Column="1"
|
||||||
|
Command="{Binding $parent[UserControl].ChangeEditionCommand}"
|
||||||
|
IsEnabled="{Binding Source={x:Static helpers:LauncherSettingsProvider.Instance}, Path=!GameRunning}" />
|
||||||
|
|
||||||
|
<!-- wipe profile checkbox -->
|
||||||
|
<CheckBox
|
||||||
|
Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=wipe_on_start}"
|
||||||
|
Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2"
|
||||||
|
IsChecked="{Binding $parent[UserControl].WipeProfileOnStart}"
|
||||||
|
IsEnabled="{Binding Source={x:Static helpers:LauncherSettingsProvider.Instance}, Path=!GameRunning}"
|
||||||
|
IsVisible="{Binding !$parent[UserControl].ProfileWipePending}"
|
||||||
|
/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</UserControl>
|
86
project/SPT.Launcher/CustomControls/ProfileCard.axaml.cs
Normal file
86
project/SPT.Launcher/CustomControls/ProfileCard.axaml.cs
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
using System.Windows.Input;
|
||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using SPT.Launcher.Models.Launcher;
|
||||||
|
|
||||||
|
namespace SPT.Launcher.CustomControls;
|
||||||
|
|
||||||
|
public partial class ProfileCard : UserControl
|
||||||
|
{
|
||||||
|
public ProfileCard()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly StyledProperty<ProfileInfo> ProfileInfoProperty = AvaloniaProperty.Register<ProfileCard, ProfileInfo>(
|
||||||
|
"ProfileInfo");
|
||||||
|
|
||||||
|
public ProfileInfo ProfileInfo
|
||||||
|
{
|
||||||
|
get => GetValue(ProfileInfoProperty);
|
||||||
|
set => SetValue(ProfileInfoProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly StyledProperty<string> CurrentIdProperty = AvaloniaProperty.Register<ProfileCard, string>(
|
||||||
|
"CurrentId");
|
||||||
|
|
||||||
|
public string CurrentId
|
||||||
|
{
|
||||||
|
get => GetValue(CurrentIdProperty);
|
||||||
|
set => SetValue(CurrentIdProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly StyledProperty<string> CurrentEditionProperty = AvaloniaProperty.Register<ProfileCard, string>(
|
||||||
|
"CurrentEdition");
|
||||||
|
|
||||||
|
public string CurrentEdition
|
||||||
|
{
|
||||||
|
get => GetValue(CurrentEditionProperty);
|
||||||
|
set => SetValue(CurrentEditionProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly StyledProperty<bool> WipeProfileOnStartProperty = AvaloniaProperty.Register<ProfileCard, bool>(
|
||||||
|
"WipeProfileOnStart");
|
||||||
|
|
||||||
|
public bool WipeProfileOnStart
|
||||||
|
{
|
||||||
|
get => GetValue(WipeProfileOnStartProperty);
|
||||||
|
set => SetValue(WipeProfileOnStartProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly StyledProperty<bool> ProfileWipePendingProperty = AvaloniaProperty.Register<ProfileCard, bool>(
|
||||||
|
"ProfileWipePending");
|
||||||
|
|
||||||
|
public bool ProfileWipePending
|
||||||
|
{
|
||||||
|
get => GetValue(ProfileWipePendingProperty);
|
||||||
|
set => SetValue(ProfileWipePendingProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly StyledProperty<ICommand> RemoveProfileCommandProperty = AvaloniaProperty.Register<ProfileCard, ICommand>(
|
||||||
|
"RemoveProfileCommand");
|
||||||
|
|
||||||
|
public ICommand RemoveProfileCommand
|
||||||
|
{
|
||||||
|
get => GetValue(RemoveProfileCommandProperty);
|
||||||
|
set => SetValue(RemoveProfileCommandProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly StyledProperty<ICommand> CopyCommandProperty = AvaloniaProperty.Register<ProfileCard, ICommand>(
|
||||||
|
"CopyCommand");
|
||||||
|
|
||||||
|
public ICommand CopyCommand
|
||||||
|
{
|
||||||
|
get => GetValue(CopyCommandProperty);
|
||||||
|
set => SetValue(CopyCommandProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly StyledProperty<ICommand> ChangeEditionCommandProperty = AvaloniaProperty.Register<ProfileCard, ICommand>(
|
||||||
|
"ChangeEditionCommand");
|
||||||
|
|
||||||
|
public ICommand ChangeEditionCommand
|
||||||
|
{
|
||||||
|
get => GetValue(ChangeEditionCommandProperty);
|
||||||
|
set => SetValue(ChangeEditionCommandProperty, value);
|
||||||
|
}
|
||||||
|
}
|
@ -55,12 +55,12 @@
|
|||||||
>
|
>
|
||||||
<Button.Styles>
|
<Button.Styles>
|
||||||
<Style Selector="Button:pointerover /template/ ContentPresenter">
|
<Style Selector="Button:pointerover /template/ ContentPresenter">
|
||||||
<Setter Property="Background" Value="DarkSlateGray"/>
|
<Setter Property="Background" Value="{DynamicResource AccentBrush2}"/>
|
||||||
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
</Style>
|
</Style>
|
||||||
<!-- <Style Selector="Button:pressed /template/ ContentPresenter"> -->
|
<Style Selector="Button:pressed /template/ ContentPresenter">
|
||||||
<!-- <Setter Property="Background" Value="{DynamicResource BackgroundBrush}"/> -->
|
<Setter Property="Background" Value="{DynamicResource AccentBrush3}"/>
|
||||||
<!-- </Style> -->
|
</Style>
|
||||||
</Button.Styles>
|
</Button.Styles>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
31
project/SPT.Launcher/CustomControls/TotalModsCard.axaml
Normal file
31
project/SPT.Launcher/CustomControls/TotalModsCard.axaml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<UserControl xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:helpers="using:SPT.Launcher.Helpers"
|
||||||
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
|
x:Class="SPT.Launcher.CustomControls.TotalModsCard">
|
||||||
|
<Border Classes="card" IsVisible="{Binding ModInfoCollection.HasMods}">
|
||||||
|
<Grid RowDefinitions="10,AUTO,10" ColumnDefinitions="10,Auto,*,AUTO,10" Margin="2"
|
||||||
|
Background="{DynamicResource BackgroundBrush}">
|
||||||
|
|
||||||
|
<!-- server mods count text -->
|
||||||
|
<StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal">
|
||||||
|
<Label Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=active_server_mods}" VerticalAlignment="Center"/>
|
||||||
|
<Label Content="{Binding $parent[UserControl].ActiveModsCount}" Classes="acc" FontWeight="SemiBold" VerticalAlignment="Center"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Show mods info view button -->
|
||||||
|
<Button Grid.Row="0" Grid.RowSpan="3" Grid.Column="3" Grid.ColumnSpan="2"
|
||||||
|
VerticalAlignment="Stretch" FontSize="18" Margin="10 0 0 0"
|
||||||
|
Command="{Binding $parent[UserControl].OpenModsInfoCommand}"
|
||||||
|
Classes="icon">
|
||||||
|
<Button.Content>
|
||||||
|
<Path Data="{StaticResource Open}" Fill="{DynamicResource ForegroundBrush}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
/>
|
||||||
|
</Button.Content>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</UserControl>
|
33
project/SPT.Launcher/CustomControls/TotalModsCard.axaml.cs
Normal file
33
project/SPT.Launcher/CustomControls/TotalModsCard.axaml.cs
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
|
namespace SPT.Launcher.CustomControls;
|
||||||
|
|
||||||
|
public partial class TotalModsCard : UserControl
|
||||||
|
{
|
||||||
|
public TotalModsCard()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly StyledProperty<int> ActiveModsCountProperty = AvaloniaProperty.Register<TotalModsCard, int>(
|
||||||
|
"ActiveModsCount");
|
||||||
|
|
||||||
|
public int ActiveModsCount
|
||||||
|
{
|
||||||
|
get => GetValue(ActiveModsCountProperty);
|
||||||
|
set => SetValue(ActiveModsCountProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly StyledProperty<ICommand> OpenModsInfoCommandProperty = AvaloniaProperty.Register<TotalModsCard, ICommand>(
|
||||||
|
"OpenModsInfoCommand");
|
||||||
|
|
||||||
|
public ICommand OpenModsInfoCommand
|
||||||
|
{
|
||||||
|
get => GetValue(OpenModsInfoCommandProperty);
|
||||||
|
set => SetValue(OpenModsInfoCommandProperty, value);
|
||||||
|
}
|
||||||
|
}
|
@ -18,8 +18,8 @@ namespace SPT.Launcher.ViewModels
|
|||||||
[RequireLoggedIn]
|
[RequireLoggedIn]
|
||||||
public class ProfileViewModel : ViewModelBase
|
public class ProfileViewModel : ViewModelBase
|
||||||
{
|
{
|
||||||
public string CurrentUsername { get; set; }
|
// public string CurrentUsername { get; set; }
|
||||||
|
|
||||||
private string _CurrentEdition;
|
private string _CurrentEdition;
|
||||||
public string CurrentEdition
|
public string CurrentEdition
|
||||||
{
|
{
|
||||||
@ -41,7 +41,7 @@ namespace SPT.Launcher.ViewModels
|
|||||||
set => this.RaiseAndSetIfChanged(ref _ProfileWipePending, value);
|
set => this.RaiseAndSetIfChanged(ref _ProfileWipePending, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string CurrentID { get; set; }
|
public string CurrentId { get; set; }
|
||||||
|
|
||||||
public ProfileInfo ProfileInfo { get; set; } = AccountManager.SelectedProfileInfo;
|
public ProfileInfo ProfileInfo { get; set; } = AccountManager.SelectedProfileInfo;
|
||||||
|
|
||||||
@ -49,9 +49,9 @@ namespace SPT.Launcher.ViewModels
|
|||||||
|
|
||||||
public ModInfoCollection ModInfoCollection { get; set; } = new ModInfoCollection();
|
public ModInfoCollection ModInfoCollection { get; set; } = new ModInfoCollection();
|
||||||
|
|
||||||
private GameStarter gameStarter = new GameStarter(new GameStarterFrontend());
|
private readonly GameStarter _gameStarter = new GameStarter(new GameStarterFrontend());
|
||||||
|
|
||||||
private ProcessMonitor monitor { get; set; }
|
private readonly ProcessMonitor _monitor;
|
||||||
|
|
||||||
public ProfileViewModel(IScreen Host) : base(Host)
|
public ProfileViewModel(IScreen Host) : base(Host)
|
||||||
{
|
{
|
||||||
@ -63,13 +63,13 @@ namespace SPT.Launcher.ViewModels
|
|||||||
SideImage.Touch();
|
SideImage.Touch();
|
||||||
}
|
}
|
||||||
|
|
||||||
monitor = new ProcessMonitor("EscapeFromTarkov", 1000, aliveCallback: GameAliveCallBack, exitCallback: GameExitCallback);
|
_monitor = new ProcessMonitor("EscapeFromTarkov", 1000, aliveCallback: GameAliveCallBack, exitCallback: GameExitCallback);
|
||||||
|
|
||||||
CurrentUsername = AccountManager.SelectedAccount.username;
|
// CurrentUsername = AccountManager.SelectedAccount.username;
|
||||||
|
|
||||||
CurrentEdition = AccountManager.SelectedAccount.edition;
|
CurrentEdition = AccountManager.SelectedAccount.edition;
|
||||||
|
|
||||||
CurrentID = AccountManager.SelectedAccount.id;
|
CurrentId = AccountManager.SelectedAccount.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task GameVersionCheck()
|
private async Task GameVersionCheck()
|
||||||
@ -155,11 +155,11 @@ namespace SPT.Launcher.ViewModels
|
|||||||
WipeProfileOnStart = false;
|
WipeProfileOnStart = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
GameStarterResult gameStartResult = await gameStarter.LaunchGame(ServerManager.SelectedServer, AccountManager.SelectedAccount, LauncherSettingsProvider.Instance.GamePath);
|
GameStarterResult gameStartResult = await _gameStarter.LaunchGame(ServerManager.SelectedServer, AccountManager.SelectedAccount, LauncherSettingsProvider.Instance.GamePath);
|
||||||
|
|
||||||
if (gameStartResult.Succeeded)
|
if (gameStartResult.Succeeded)
|
||||||
{
|
{
|
||||||
monitor.Start();
|
_monitor.Start();
|
||||||
|
|
||||||
switch (LauncherSettingsProvider.Instance.LauncherStartGameAction)
|
switch (LauncherSettingsProvider.Instance.LauncherStartGameAction)
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
>
|
>
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Label Background="Transparent" Content="{Binding Name}" ToolTip.Tip="{Binding Description}"/>
|
<TextBlock Background="Transparent" Text="{Binding Name}" ToolTip.Tip="{Binding Description}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
@ -32,7 +32,7 @@
|
|||||||
<Button Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=update}"
|
<Button Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=update}"
|
||||||
Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=dialogHost:DialogHost}, Path=CloseDialogCommand}"
|
Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=dialogHost:DialogHost}, Path=CloseDialogCommand}"
|
||||||
CommandParameter="{Binding editions.SelectedEdition}"
|
CommandParameter="{Binding editions.SelectedEdition}"
|
||||||
Classes="alt"
|
Classes="acc"
|
||||||
/>
|
/>
|
||||||
<Button Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=cancel}"
|
<Button Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=cancel}"
|
||||||
Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=dialogHost:DialogHost}, Path=CloseDialogCommand}"
|
Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=dialogHost:DialogHost}, Path=CloseDialogCommand}"
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
Orientation="Horizontal" Spacing="10">
|
Orientation="Horizontal" Spacing="10">
|
||||||
<Button Content="{Binding ConfirmButtonText}"
|
<Button Content="{Binding ConfirmButtonText}"
|
||||||
Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=dialogHost:DialogHost}, Path=CloseDialogCommand}"
|
Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=dialogHost:DialogHost}, Path=CloseDialogCommand}"
|
||||||
Classes="alt"
|
Classes="acc"
|
||||||
IsEnabled="{Binding AllowConfirm}"
|
IsEnabled="{Binding AllowConfirm}"
|
||||||
>
|
>
|
||||||
<Button.CommandParameter>
|
<Button.CommandParameter>
|
||||||
|
@ -27,15 +27,14 @@
|
|||||||
>
|
>
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Label Background="Transparent" Content="{Binding Name}" ToolTip.Tip="{Binding Description}"/>
|
<TextBlock Background="Transparent" Text="{Binding Name}" ToolTip.Tip="{Binding Description}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
|
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
|
||||||
<!-- Description Area -->
|
<!-- Description Area -->
|
||||||
<Border Grid.Row="2" Grid.ColumnSpan="3" Margin="0 10"
|
<Border Grid.Row="2" Grid.ColumnSpan="3" Margin="0 10"
|
||||||
Background="{StaticResource SPT_Background_Light}" CornerRadius="10"
|
Background="{DynamicResource BackgroundBrush2}" CornerRadius="10"
|
||||||
MaxWidth="500" MinHeight="50"
|
MaxWidth="500" MinHeight="50"
|
||||||
MinWidth="500"
|
MinWidth="500"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
@ -59,7 +58,7 @@
|
|||||||
CommandParameter="{Binding Editions.SelectedEdition}"
|
CommandParameter="{Binding Editions.SelectedEdition}"
|
||||||
IsEnabled="{Binding Editions.HasSelection}"
|
IsEnabled="{Binding Editions.HasSelection}"
|
||||||
IsDefault="True"
|
IsDefault="True"
|
||||||
Classes="alt"
|
Classes="acc"
|
||||||
/>
|
/>
|
||||||
<Button Content="{Binding CancelButtonText}"
|
<Button Content="{Binding CancelButtonText}"
|
||||||
Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=dialogHost:DialogHost}, Path=CloseDialogCommand}"
|
Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=dialogHost:DialogHost}, Path=CloseDialogCommand}"
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=dialogHost:DialogHost}, Path=CloseDialogCommand}"
|
Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=dialogHost:DialogHost}, Path=CloseDialogCommand}"
|
||||||
Classes="alt"
|
Classes="acc"
|
||||||
/>
|
/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
</ItemsControl.ItemsPanel>
|
</ItemsControl.ItemsPanel>
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
<DataTemplate DataType="launcher:ProfileInfo">
|
<DataTemplate DataType="launcher:ProfileInfo">
|
||||||
<cc:ExistingProfileCard
|
<cc:DetailedProfileCard
|
||||||
ProfileInfo="{Binding }"
|
ProfileInfo="{Binding }"
|
||||||
LoginCommand="{Binding $parent[ItemsControl].DataContext.LoginProfileCommand}"
|
LoginCommand="{Binding $parent[ItemsControl].DataContext.LoginProfileCommand}"
|
||||||
/>
|
/>
|
||||||
|
@ -19,25 +19,21 @@
|
|||||||
|
|
||||||
<!-- Active Mods List Header -->
|
<!-- Active Mods List Header -->
|
||||||
<Border Grid.Row="3" Grid.Column="1"
|
<Border Grid.Row="3" Grid.Column="1"
|
||||||
CornerRadius="5"
|
Classes="card"
|
||||||
Background="{DynamicResource BackgroundBrush}">
|
>
|
||||||
<StackPanel Spacing="2" Margin="10">
|
<StackPanel Spacing="2" Margin="10">
|
||||||
<!-- Active mods count and text -->
|
<!-- Active mods count and text -->
|
||||||
<Label VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="16">
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||||
<Label.Content>
|
<Label Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=active_server_mods}"/>
|
||||||
<MultiBinding StringFormat="{}{0}: {1}">
|
<Label Content="{Binding ModsCollection.ActiveMods.Count}" Classes="acc"/>
|
||||||
<Binding Source="{x:Static helpers:LocalizationProvider.Instance}" Path="active_server_mods"/>
|
</StackPanel>
|
||||||
<Binding Path="ModsCollection.ActiveMods.Count"/>
|
|
||||||
</MultiBinding>
|
|
||||||
</Label.Content>
|
|
||||||
</Label>
|
|
||||||
|
|
||||||
<!-- Active mods info text -->
|
<!-- Active mods info text -->
|
||||||
<TextBlock Text="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=active_server_mods_info_text}"
|
<TextBlock Text="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=active_server_mods_info_text}"
|
||||||
VerticalAlignment="Center" HorizontalAlignment="Center"
|
VerticalAlignment="Center" HorizontalAlignment="Center"
|
||||||
FontSize="12"
|
FontSize="12"
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
/>
|
Classes="alt"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
@ -61,24 +57,21 @@
|
|||||||
|
|
||||||
<!-- Inactive Mods List Header -->
|
<!-- Inactive Mods List Header -->
|
||||||
<Border Grid.Row="3" Grid.Column="3"
|
<Border Grid.Row="3" Grid.Column="3"
|
||||||
CornerRadius="5"
|
Classes="card"
|
||||||
Background="{DynamicResource BackgroundBrush}">
|
>
|
||||||
<StackPanel Spacing="2" Margin="10">
|
<StackPanel Spacing="2" Margin="10">
|
||||||
<!-- Inactive mods count and text -->
|
<!-- Inactive mods count and text -->
|
||||||
<Label VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="16">
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||||
<Label.Content>
|
<Label Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=inactive_server_mods}"/>
|
||||||
<MultiBinding StringFormat="{}{0}: {1}">
|
<Label Content="{Binding ModsCollection.InactiveMods.Count}" Classes="acc"/>
|
||||||
<Binding Source="{x:Static helpers:LocalizationProvider.Instance}" Path="inactive_server_mods"/>
|
</StackPanel>
|
||||||
<Binding Path="ModsCollection.InactiveMods.Count"/>
|
|
||||||
</MultiBinding>
|
|
||||||
</Label.Content>
|
|
||||||
</Label>
|
|
||||||
|
|
||||||
<!-- Inactive mods info text -->
|
<!-- Inactive mods info text -->
|
||||||
<TextBlock Text="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=inactive_server_mods_info_text}"
|
<TextBlock Text="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=inactive_server_mods_info_text}"
|
||||||
VerticalAlignment="Center" HorizontalAlignment="Center"
|
VerticalAlignment="Center" HorizontalAlignment="Center"
|
||||||
FontSize="12"
|
FontSize="12"
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
|
Classes="alt"
|
||||||
/>
|
/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
@ -2,148 +2,36 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:helpers="using:SPT.Launcher.Helpers"
|
xmlns:cc="using:SPT.Launcher.CustomControls"
|
||||||
xmlns:cvt="using:SPT.Launcher.Converters"
|
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="SPT.Launcher.Views.ProfileView">
|
x:Class="SPT.Launcher.Views.ProfileView">
|
||||||
|
|
||||||
<UserControl.Resources>
|
|
||||||
<cvt:ImageSourceConverter x:Key="imageSourceCvt" />
|
|
||||||
</UserControl.Resources>
|
|
||||||
|
|
||||||
<Grid RowDefinitions="10,AUTO,10,AUTO,10,*,10,AUTO,10" ColumnDefinitions="10,AUTO,10,*,10">
|
<Grid RowDefinitions="10,AUTO,10,AUTO,10,*,10,AUTO,10" ColumnDefinitions="10,AUTO,10,*,10">
|
||||||
|
|
||||||
<!-- profile info -->
|
<!-- profile info -->
|
||||||
<Border Grid.Row="1" Grid.Column="1" CornerRadius="5"
|
<cc:ProfileCard Grid.Row="1" Grid.Column="1"
|
||||||
BorderBrush="{DynamicResource BackgroundBrush}"
|
ProfileInfo="{Binding ProfileInfo}"
|
||||||
BorderThickness="5">
|
CurrentEdition="{Binding CurrentEdition}"
|
||||||
<Grid RowDefinitions="10,AUTO,AUTO,AUTO,AUTO,10" ColumnDefinitions="10,AUTO,*,10"
|
CurrentId="{Binding CurrentId}"
|
||||||
Background="{DynamicResource BackgroundBrush}">
|
WipeProfileOnStart="{Binding WipeProfileOnStart}"
|
||||||
<StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="1">
|
ProfileWipePending="{Binding ProfileWipePending}"
|
||||||
<Label Content="{Binding CurrentUsername}" Margin="5 0" />
|
CopyCommand="{Binding CopyCommand}"
|
||||||
|
ChangeEditionCommand="{Binding ChangeEditionCommand}"
|
||||||
<!-- profile name and version -->
|
RemoveProfileCommand="{Binding RemoveProfileCommand}"
|
||||||
<Label x:Name="SPTVersion"
|
/>
|
||||||
Background="Transparent"
|
|
||||||
ToolTip.Tip="{Binding ProfileInfo.MismatchMessage}"
|
|
||||||
Classes.versionMismatch="{Binding ProfileInfo.VersionMismatch}">
|
|
||||||
<StackPanel Orientation="Horizontal" Background="Transparent">
|
|
||||||
<TextBlock Text="{Binding ProfileInfo.SPT.version}" />
|
|
||||||
<Path Data="{StaticResource Info}"
|
|
||||||
Fill="{Binding ElementName=SPTVersion, Path=Foreground}"
|
|
||||||
Margin="10 0"
|
|
||||||
IsVisible="{Binding ProfileInfo.VersionMismatch}" />
|
|
||||||
</StackPanel>
|
|
||||||
</Label>
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<!-- delete profile button -->
|
|
||||||
<Button HorizontalAlignment="Right" Grid.Row="1" Grid.Column="2"
|
|
||||||
Classes="icon"
|
|
||||||
Command="{Binding RemoveProfileCommand}"
|
|
||||||
IsEnabled="{Binding Source={x:Static helpers:LauncherSettingsProvider.Instance}, Path=!GameRunning}">
|
|
||||||
<Path Data="{StaticResource Delete}" Fill="IndianRed" />
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<!-- profile id button -->
|
|
||||||
<Button Content="{Binding CurrentID}" Classes="link"
|
|
||||||
Grid.Row="2" Grid.Column="1"
|
|
||||||
Command="{Binding CopyCommand}"
|
|
||||||
CommandParameter="{Binding CurrentID}" />
|
|
||||||
|
|
||||||
<!-- profile edition button -->
|
|
||||||
<Button Content="{Binding CurrentEdition}" Classes="link"
|
|
||||||
Grid.Row="3" Grid.Column="1"
|
|
||||||
Command="{Binding ChangeEditionCommand}"
|
|
||||||
IsEnabled="{Binding Source={x:Static helpers:LauncherSettingsProvider.Instance}, Path=!GameRunning}" />
|
|
||||||
|
|
||||||
<!-- wipe profile checkbox -->
|
|
||||||
<CheckBox
|
|
||||||
Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=wipe_on_start}"
|
|
||||||
Grid.Row="4" Grid.Column="1"
|
|
||||||
IsChecked="{Binding WipeProfileOnStart}"
|
|
||||||
IsEnabled="{Binding Source={x:Static helpers:LauncherSettingsProvider.Instance}, Path=!GameRunning}"
|
|
||||||
IsVisible="{Binding !ProfileWipePending}" />
|
|
||||||
</Grid>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
<!-- Total Mods Info -->
|
<!-- Total Mods Info -->
|
||||||
<Border Grid.Row="3" Grid.Column="1" CornerRadius="5"
|
<cc:TotalModsCard Grid.Row="3" Grid.Column="1"
|
||||||
BorderBrush="{DynamicResource BackgroundBrush}"
|
ActiveModsCount="{Binding ModInfoCollection.ActiveMods.Count}"
|
||||||
BorderThickness="5" IsVisible="{Binding ModInfoCollection.HasMods}">
|
OpenModsInfoCommand="{Binding OpenModsInfoCommand}"
|
||||||
<Grid RowDefinitions="10,AUTO,10" ColumnDefinitions="10,Auto,*,AUTO,10"
|
/>
|
||||||
Background="{DynamicResource BackgroundBrush}">
|
|
||||||
|
|
||||||
<!-- server mods count text -->
|
|
||||||
<Label Grid.Row="1" Grid.Column="1">
|
|
||||||
<Label.Content>
|
|
||||||
<MultiBinding StringFormat="{}{0}: {1}">
|
|
||||||
<Binding Source="{x:Static helpers:LocalizationProvider.Instance}" Path="active_server_mods"/>
|
|
||||||
<Binding Path="ModInfoCollection.ActiveMods.Count"/>
|
|
||||||
</MultiBinding>
|
|
||||||
</Label.Content>
|
|
||||||
</Label>
|
|
||||||
|
|
||||||
<!-- Show mods info view button -->
|
|
||||||
<Button Grid.Row="0" Grid.RowSpan="3" Grid.Column="3" Grid.ColumnSpan="2"
|
|
||||||
VerticalAlignment="Stretch" FontSize="18" Margin="10 0 0 0"
|
|
||||||
Command="{Binding OpenModsInfoCommand}"
|
|
||||||
Classes="icon">
|
|
||||||
<Button.Content>
|
|
||||||
<Path Data="{StaticResource Open}" Fill="{DynamicResource ForegroundBrush}"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
/>
|
|
||||||
</Button.Content>
|
|
||||||
</Button>
|
|
||||||
</Grid>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
<!-- Bottom bar -->
|
<!-- Game bar -->
|
||||||
<Border Grid.Row="7" Grid.Column="1" Grid.ColumnSpan="3" CornerRadius="5"
|
<cc:GameLaunchBar Grid.Row="7" Grid.Column="1" Grid.ColumnSpan="3"
|
||||||
BorderBrush="{DynamicResource BackgroundBrush}"
|
ProfileInfo="{Binding ProfileInfo}"
|
||||||
BorderThickness="5">
|
StartGameCommand="{Binding StartGameCommand}"
|
||||||
<DockPanel Background="{DynamicResource BackgroundBrush}">
|
LogoutCommand="{Binding LogoutCommand}"
|
||||||
|
/>
|
||||||
<StackPanel Orientation="Horizontal"
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
Spacing="10"
|
|
||||||
IsVisible="{Binding ProfileInfo.HasData}">
|
|
||||||
<Grid RowDefinitions="AUTO,AUTO" ColumnDefinitions="AUTO,AUTO">
|
|
||||||
<Image Source="{Binding SideImage.Path, Converter={StaticResource imageSourceCvt}}"
|
|
||||||
Grid.RowSpan="2" Height="40" Margin="10 0" />
|
|
||||||
<Label Content="{Binding ProfileInfo.Nickname}" Grid.Row="0" Grid.Column="2" />
|
|
||||||
<Label Content="{Binding ProfileInfo.Side}" Grid.Row="1" Grid.Column="2" />
|
|
||||||
</Grid>
|
|
||||||
<Label Content="{Binding ProfileInfo.Level}" VerticalAlignment="Center"
|
|
||||||
FontSize="22" />
|
|
||||||
<ProgressBar Value="{Binding ProfileInfo.XPLevelProgress}" />
|
|
||||||
<StackPanel>
|
|
||||||
<Label
|
|
||||||
Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=next_level_in}"
|
|
||||||
HorizontalAlignment="Center" />
|
|
||||||
<Label Content="{Binding ProfileInfo.RemainingExp, StringFormat={}{0} xp}"
|
|
||||||
HorizontalAlignment="Center" />
|
|
||||||
</StackPanel>
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
|
|
||||||
<Button Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=start_game}"
|
|
||||||
HorizontalAlignment="Right"
|
|
||||||
VerticalContentAlignment="Center"
|
|
||||||
VerticalAlignment="Stretch"
|
|
||||||
DockPanel.Dock="Right"
|
|
||||||
Command="{Binding StartGameCommand}"
|
|
||||||
IsEnabled="{Binding Source={x:Static helpers:LauncherSettingsProvider.Instance}, Path=!GameRunning}"
|
|
||||||
Classes="alt" />
|
|
||||||
|
|
||||||
<Button Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=logout}"
|
|
||||||
Command="{Binding LogoutCommand}"
|
|
||||||
Margin="10 0"
|
|
||||||
Classes="link"
|
|
||||||
DockPanel.Dock="Right"
|
|
||||||
HorizontalAlignment="Right" />
|
|
||||||
|
|
||||||
</DockPanel>
|
|
||||||
</Border>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
@ -18,22 +18,22 @@
|
|||||||
<WrapPanel Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Orientation="Horizontal">
|
<WrapPanel Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Orientation="Horizontal">
|
||||||
<Button Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=remove_registry_keys}"
|
<Button Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=remove_registry_keys}"
|
||||||
Command="{Binding RemoveRegistryKeysCommand}"
|
Command="{Binding RemoveRegistryKeysCommand}"
|
||||||
Classes="borderedlink"
|
Classes="outlined"
|
||||||
Margin="0 0 10 5"
|
Margin="0 0 10 5"
|
||||||
/>
|
/>
|
||||||
<Button Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=load_live_settings}"
|
<Button Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=load_live_settings}"
|
||||||
Command="{Binding ResetGameSettingsCommand}"
|
Command="{Binding ResetGameSettingsCommand}"
|
||||||
Classes="borderedlink"
|
Classes="outlined"
|
||||||
Margin="0 0 10 5"
|
Margin="0 0 10 5"
|
||||||
/>
|
/>
|
||||||
<Button Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=clear_game_settings}"
|
<Button Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=clear_game_settings}"
|
||||||
Command="{Binding ClearGameSettingsCommand}"
|
Command="{Binding ClearGameSettingsCommand}"
|
||||||
Classes="borderedlink"
|
Classes="outlined"
|
||||||
Margin="0 0 10 5"
|
Margin="0 0 10 5"
|
||||||
/>
|
/>
|
||||||
<Button Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=clean_temp_files}"
|
<Button Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=clean_temp_files}"
|
||||||
Command="{Binding CleanTempFilesCommand}"
|
Command="{Binding CleanTempFilesCommand}"
|
||||||
Classes="borderedlink"
|
Classes="outlined"
|
||||||
Margin="0 0 10 5"
|
Margin="0 0 10 5"
|
||||||
/>
|
/>
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user