mirror of
https://github.com/MilkBarModding/MilkBarLauncher.git
synced 2025-06-16 20:20:56 +00:00
402 lines
25 KiB
XML
402 lines
25 KiB
XML
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
|
|
<Style TargetType="{x:Type Button}" x:Key="ConnectionButtons">
|
|
<Setter Property="Width" Value="90"/>
|
|
<Setter Property="Height" Value="85"/>
|
|
<Setter Property="Margin" Value="0, 0, 0, 0"/>
|
|
<Setter Property="FontSize" Value="16"/>
|
|
<Setter Property="FontFamily" Value="Roboto"/>
|
|
<Setter Property="FontStyle" Value="Italic"/>
|
|
<Setter Property="FontWeight" Value="Bold"/>
|
|
<Setter Property="Foreground" Value="Transparent"/>
|
|
<Setter Property="BorderBrush" Value="#CCD9D9D9"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Border Background="Transparent">
|
|
<StackPanel>
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
<Image HorizontalAlignment="Center" VerticalAlignment="Center" Width="50" Height="50" Source="{TemplateBinding Tag}">
|
|
<Image.Effect>
|
|
<DropShadowEffect ShadowDepth="0"
|
|
Color="Black"
|
|
Opacity="1"
|
|
BlurRadius="10"/>
|
|
</Image.Effect>
|
|
</Image>
|
|
<Rectangle Fill="{TemplateBinding BorderBrush}" Width="890" Height="2" Margin="0, 10, 0, 0"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Foreground" Value="White"/>
|
|
<Setter Property="BorderBrush" Value="White"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type Button}" x:Key="ConnectToServerButton">
|
|
<Setter Property="BorderBrush" Value="#FF626262"/>
|
|
<Setter Property="Background" Value="#AA000000"/>
|
|
<Setter Property="Foreground" Value="White"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Border Background="{TemplateBinding Background}" CornerRadius="5">
|
|
<Border Margin="2" CornerRadius="5" Background="Transparent" BorderThickness="2" BorderBrush="{TemplateBinding BorderBrush}">
|
|
<Label Content="{TemplateBinding Content}"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
FontSize="32"
|
|
FontFamily="Roboto"
|
|
FontStyle="Italic"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Center"/>
|
|
</Border>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
|
|
<Style.Triggers>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter Property="BorderBrush" Value="#FF808080"/>
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Background" Value="#CC000000"/>
|
|
<Setter Property="BorderBrush" Value="#FF808080"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="Foreground" Value="Gray"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type Button}" x:Key="ServerButton">
|
|
<Setter Property="Margin" Value="5, 3, 5, 3"/>
|
|
<Setter Property="Background" Value="#99000000"/>
|
|
<Setter Property="Foreground" Value="LightGray"/>
|
|
<Setter Property="BorderBrush" Value="#FF404040"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Grid>
|
|
<Grid Panel.ZIndex="1">
|
|
<Polygon Points="0 0,10 0,0 10" Stroke="#FFCCCCCC" Fill="#FFCCCCCC" Margin="0"/>
|
|
<Polygon Points="0 0,10 0,10 10" Stroke="#FFCCCCCC" Fill="#FFCCCCCC" Margin="0" HorizontalAlignment="Right"/>
|
|
<Polygon Points="10 0,10 10,0 10" Stroke="#FFCCCCCC" Fill="#FFCCCCCC" Margin="0" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
|
|
<Polygon Points="0 0,0 10,10 10" Stroke="#FFCCCCCC" Fill="#FFCCCCCC" Margin="0" VerticalAlignment="Bottom"/>
|
|
|
|
<Grid.Style>
|
|
<Style TargetType="Grid">
|
|
<Setter Property="Visibility" Value="Hidden"/>
|
|
<Setter Property="Margin" Value="2"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding selected}" Value="true">
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
<DataTrigger.EnterActions>
|
|
<BeginStoryboard>
|
|
<Storyboard>
|
|
<ThicknessAnimation Storyboard.TargetProperty="Margin" Duration="0:0:0.5" From="1" To="-5" RepeatBehavior="Forever" AutoReverse="True"/>
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</DataTrigger.EnterActions>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Grid.Style>
|
|
</Grid>
|
|
|
|
<Border Background="{TemplateBinding Background}" CornerRadius="3">
|
|
<Border Background="Transparent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="2" Margin="2">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
<ColumnDefinition Width="25"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid Grid.Column="0" Margin="10,0,10,0">
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="0.6*"/>
|
|
<RowDefinition Height="0.4*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition Width="150"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Label Content="{Binding Name}"
|
|
Grid.ColumnSpan="2"
|
|
FontSize="32"
|
|
FontFamily="Roboto"
|
|
FontStyle="Italic"
|
|
Foreground="White"
|
|
VerticalAlignment="Center"
|
|
Padding="0"/>
|
|
|
|
<Label Content="{Binding connectedPlayersString}"
|
|
Grid.Row="1"
|
|
FontSize="20"
|
|
FontFamily="Roboto"
|
|
FontStyle="Italic"
|
|
Foreground="#E3D146"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Left"
|
|
Padding="0">
|
|
|
|
<Label.ToolTip>
|
|
<ToolTip>
|
|
<ToolTip.Style>
|
|
<Style TargetType="{x:Type ToolTip}">
|
|
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ToolTip">
|
|
<Border Background="#CC000000" CornerRadius="10">
|
|
<Border Margin="2" CornerRadius="10" Background="Transparent" BorderThickness="2" BorderBrush="#FF626262">
|
|
<ItemsControl Name="playerList" ItemsSource="{Binding playerListWithNumber}" Background="Transparent">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<UniformGrid Margin="11" Columns="{Binding TooltipColumnCount}">
|
|
<UniformGrid.LayoutTransform>
|
|
<TransformGroup>
|
|
<RotateTransform Angle="90"/>
|
|
<ScaleTransform ScaleX="-1"/>
|
|
</TransformGroup>
|
|
</UniformGrid.LayoutTransform>
|
|
</UniformGrid>
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Label Content="{TemplateBinding Content}" Foreground="White">
|
|
<Label.LayoutTransform>
|
|
<TransformGroup>
|
|
<RotateTransform Angle="90"/>
|
|
<ScaleTransform ScaleX="-1"/>
|
|
</TransformGroup>
|
|
</Label.LayoutTransform>
|
|
</Label>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</Border>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding shouldDisplayPlayersTooltip}" Value="false">
|
|
<Setter Property="Visibility" Value="Hidden"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</ToolTip.Style>
|
|
</ToolTip>
|
|
</Label.ToolTip>
|
|
</Label>
|
|
|
|
<Label Content="{Binding pingData}"
|
|
Grid.Column="1"
|
|
Grid.Row="1"
|
|
FontSize="20"
|
|
FontFamily="Roboto"
|
|
FontStyle="Italic"
|
|
Foreground="{Binding pingColor}"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Right"
|
|
Padding="0"/>
|
|
</Grid>
|
|
|
|
<Button Background="#FF5C5C5C" Grid.Column="1" Command="{Binding changeFavoriteState}">
|
|
<Button.Template>
|
|
<ControlTemplate TargetType="Button">
|
|
<Grid>
|
|
<Rectangle Fill="#FF5C5C5C"/>
|
|
<Ellipse Fill="Black" Width="5" Height="5"/>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Button.Template>
|
|
</Button>
|
|
|
|
<Ellipse Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Width="30" Height="30" IsHitTestVisible="False">
|
|
<Ellipse.Fill>
|
|
<RadialGradientBrush Center="0.5,0.5" GradientOrigin="0.5,0.5" RadiusX="0.5" RadiusY="0.5">
|
|
<GradientStop Color="#FFE3D146" Offset="0.0"/>
|
|
<GradientStop Color="#FFE3D146" Offset="0.15"/>
|
|
<GradientStop Color="#00E3D146" Offset="0.15"/>
|
|
<GradientStop Color="#00E3D146" Offset="0.25"/>
|
|
<GradientStop Color="#FFE3D146" Offset="0.25"/>
|
|
<GradientStop Color="#FFE3D146" Offset="0.4"/>
|
|
<GradientStop Color="#44E3D146" Offset="0.4"/>
|
|
<GradientStop Color="#00E3D146" Offset="1.0"/>
|
|
</RadialGradientBrush>
|
|
</Ellipse.Fill>
|
|
|
|
<Ellipse.Style>
|
|
<Style TargetType="Ellipse">
|
|
<Setter Property="Visibility" Value="Hidden"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding favorite}" Value="true">
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Ellipse.Style>
|
|
</Ellipse>
|
|
|
|
<Ellipse IsHitTestVisible="False" Grid.Column="1">
|
|
<Ellipse.Style>
|
|
<Style TargetType="Ellipse">
|
|
<Setter Property="Stroke" Value="#FFE3D146"/>
|
|
<!--<Setter Property="Width" Value="5"/>
|
|
<Setter Property="Height" Value="5"/>-->
|
|
<Setter Property="Visibility" Value="Hidden"/>
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="Margin" Value="-200"/>
|
|
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding favorite}" Value="true">
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
<DataTrigger.EnterActions>
|
|
<BeginStoryboard>
|
|
<Storyboard Duration="0:0:1.5" RepeatBehavior="Forever">
|
|
<DoubleAnimation Storyboard.TargetProperty="Width" Duration="0:0:0.8" From="10" To="40" FillBehavior="Stop"/>
|
|
<DoubleAnimation Storyboard.TargetProperty="Height" Duration="0:0:0.8" From="10" To="40" FillBehavior="Stop"/>
|
|
<DoubleAnimation Storyboard.TargetProperty="Width" Duration="0:0:0.2" BeginTime="0:0:0.8" From="40" To="40" FillBehavior="Stop"/>
|
|
<DoubleAnimation Storyboard.TargetProperty="Height" Duration="0:0:0.2" BeginTime="0:0:0.8" From="40" To="40" FillBehavior="Stop"/>
|
|
<DoubleAnimation Storyboard.TargetProperty="Opacity" Duration="0:0:0.2" BeginTime="0:0:0.8" To="0" FillBehavior="Stop"/>
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</DataTrigger.EnterActions>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Ellipse.Style>
|
|
</Ellipse>
|
|
</Grid>
|
|
</Border>
|
|
</Border>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<!--<Setter Property="Background" Value="#99808080"/>-->
|
|
<Setter Property="BorderBrush" Value="#FFCCCCCC"/>
|
|
<Setter Property="Foreground" Value="White"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type ScrollViewer}" x:Key="Scroll">
|
|
|
|
<Setter Property="ScrollViewer.OpacityMask">
|
|
<Setter.Value>
|
|
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
|
<GradientStop Color="Black" Offset="0" />
|
|
<GradientStop Color="Black" Offset="1" />
|
|
</LinearGradientBrush>
|
|
</Setter.Value>
|
|
</Setter>
|
|
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding scrollState}" Value="1">
|
|
<Setter Property="ScrollViewer.OpacityMask">
|
|
<Setter.Value>
|
|
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
|
<GradientStop Color="Black" Offset="0.85" />
|
|
<GradientStop Color="Transparent" Offset="1" />
|
|
</LinearGradientBrush>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</DataTrigger>
|
|
|
|
<DataTrigger Binding="{Binding scrollState}" Value="2">
|
|
<Setter Property="ScrollViewer.OpacityMask">
|
|
<Setter.Value>
|
|
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
|
<GradientStop Color="Transparent" Offset="0" />
|
|
<GradientStop Color="Black" Offset="0.15" />
|
|
<GradientStop Color="Black" Offset="0.85" />
|
|
<GradientStop Color="Transparent" Offset="1" />
|
|
</LinearGradientBrush>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</DataTrigger>
|
|
|
|
<DataTrigger Binding="{Binding scrollState}" Value="3">
|
|
<Setter Property="ScrollViewer.OpacityMask">
|
|
<Setter.Value>
|
|
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
|
<GradientStop Color="Transparent" Offset="0" />
|
|
<GradientStop Color="Black" Offset="0.15" />
|
|
</LinearGradientBrush>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</DataTrigger>
|
|
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type ContextMenu}" x:Key="ServerContextMenu">
|
|
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ContextMenu}">
|
|
<Border Background="#CC000000" CornerRadius="10">
|
|
<Border Margin="2" CornerRadius="10" Background="Transparent" BorderThickness="2" BorderBrush="#FF626262">
|
|
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" ClipToBounds="True"/>
|
|
</Border>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type MenuItem}" x:Key="ServerContextMenuItemUpper">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type MenuItem}">
|
|
<Border x:Name="Bd" CornerRadius="10, 10, 0, 0">
|
|
<ContentPresenter Content="{TemplateBinding Header}" Margin="10, 0, 10, 0"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsHighlighted" Value="True">
|
|
<Setter Property="Background" TargetName="Bd" Value="#11FFFFFF"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type MenuItem}" x:Key="ServerContextMenuItemLower">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type MenuItem}">
|
|
<Border x:Name="Bd" CornerRadius="0, 0, 10, 10">
|
|
<ContentPresenter Content="{TemplateBinding Header}" Margin="10, 0, 10, 0"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsHighlighted" Value="True">
|
|
<Setter Property="Background" TargetName="Bd" Value="#11FFFFFF"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
</ResourceDictionary> |