-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontrollerWidget.xaml
More file actions
74 lines (73 loc) · 6.73 KB
/
controllerWidget.xaml
File metadata and controls
74 lines (73 loc) · 6.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<Page x:Class="DualSenseBatteryMonitor.controllerWidget"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DualSenseBatteryMonitor"
mc:Ignorable="d"
d:DesignHeight="125" d:DesignWidth="250"
Title="controllerWidget" Focusable="False" Width="250" Height="125" ScrollViewer.VerticalScrollBarVisibility="Disabled" ClipToBounds="True" IsHitTestVisible="False">
<Page.Resources>
<!-- Blinking storyboard for low battery warning -->
<Storyboard x:Key="BlinkStoryboard" RepeatBehavior="Forever" AutoReverse="True" Timeline.DesiredFrameRate="30">
<DoubleAnimation Storyboard.TargetName="icon_battery" Storyboard.TargetProperty="Opacity" From="1" To="0.3" Duration="0:0:0.3" AutoReverse="True" RepeatBehavior="Forever"/>
<DoubleAnimation Storyboard.TargetName="progressbar_battery" Storyboard.TargetProperty="Opacity" From="1" To="0.3" Duration="0:0:0.3" AutoReverse="True" RepeatBehavior="Forever"/>
</Storyboard>
</Page.Resources>
<Grid ClipToBounds="True" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled">
<!-- Controller icon (changes on connection state) -->
<Image x:Name="image_controller_icon" HorizontalAlignment="Left" Width="120" Height="120" Margin="0,0,0,0" VerticalAlignment="Center" Stretch="UniformToFill" Source="{StaticResource controller_DualSenseDrawingImage}" IsHitTestVisible="False" Opacity="0.7"/>
<!-- Battery overlay icon -->
<Image x:Name="icon_battery" Height="125" Width="125" Stretch="UniformToFill" Source="{StaticResource battery_emptyDrawingImage}" Margin="50,0,0,0" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Right" IsHitTestVisible="False" ClipToBounds="True"></Image>
<!-- Battery drain stats-->
<TextBlock x:Name="text_drainstat_average" Text="~--h --m" FontSize="14" Opacity="0.6" VerticalAlignment="Top" Margin="159,12,0,0" HorizontalAlignment="Left" TextAlignment="Center" FontFamily="Artifakt Element Black" Foreground="White" RenderTransformOrigin="0.438,0.518"/>
<TextBlock x:Name="text_drainstat_left" Text="~--h --m" FontSize="14" Opacity="0.6" VerticalAlignment="Top" Margin="140,91,0,0" HorizontalAlignment="Left" TextAlignment="Center" FontFamily="Artifakt Element Black" Foreground="White"/>
<TextBlock x:Name="text_drainstat_error" Text="ERROR 1200" FontSize="16" Opacity="0.6" VerticalAlignment="Top" Margin="147,7,0,0" HorizontalAlignment="Left" TextAlignment="Center" FontFamily="Artifakt Element Black" Foreground="White" Visibility="Collapsed"/>
<TextBlock x:Name="text_drainstat_Deco02" Text="left" FontSize="14" Opacity="0.6" VerticalAlignment="Top" Margin="185,103,0,0" HorizontalAlignment="Left" TextAlignment="Center" FontFamily="Artifakt Element Black" Foreground="White"/>
<!-- Charging bolt icon (visible only when charging) -->
<Image x:Name="icon_charging" Height="30" Width="30" Stretch="UniformToFill" Source="{StaticResource chargingDrawingImage}" Margin="50,0,0,0" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Right" IsHitTestVisible="False" ClipToBounds="True" Panel.ZIndex="2">
<Image.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="-90"/>
<TranslateTransform X="-55"/>
</TransformGroup>
</Image.RenderTransform>
</Image>
<!-- connection type icon -->
<Image x:Name="icon_connectiontype" Height="20" Width="20" Stretch="UniformToFill" Source="{StaticResource connection_UnknownDrawingImage}" Margin="0,80,180,25" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Right" IsHitTestVisible="False" ClipToBounds="True" Panel.ZIndex="2"></Image>
<!-- low batterylevel warning icon -->
<Image x:Name="icon_batterywarning" Height="40" Width="40" Stretch="UniformToFill" Source="{StaticResource warningDrawingImage}" Margin="0,71,0,14" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Right" IsHitTestVisible="False" ClipToBounds="True" Panel.ZIndex="3" Visibility="Collapsed"/>
<!-- Batterylevel progress bar -->
<ProgressBar x:Name="progressbar_battery" HorizontalAlignment="Left" Height="37" Margin="151,0,0,0" VerticalAlignment="Center" Width="85" BorderBrush="{x:Null}" FlowDirection="RightToLeft" Background="{x:Null}" IsHitTestVisible="False" IsTabStop="False" Value="25" Panel.ZIndex="-1" SnapsToDevicePixels="True" />
<!-- Controller index (1–4) with player color -->
<TextBlock x:Name="count_index" HorizontalAlignment="Left" Margin="42,20,0,0" TextWrapping="Wrap" Text="1" VerticalAlignment="Top" FontSize="36" TextAlignment="Center" FontWeight="Bold" Width="36" FontFamily="Artifakt Element Black" Height="49" IsHitTestVisible="False" Foreground="White">
<TextBlock.Effect>
<DropShadowEffect/>
</TextBlock.Effect>
</TextBlock>
<TextBlock x:Name="debug_errorcode_text" HorizontalAlignment="Left" Margin="139,0,0,0" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="36" TextAlignment="Center" Width="111" FontFamily="Artifakt Element Black" Height="49" IsHitTestVisible="False" Text="1111" FontStyle="Italic" Visibility="Collapsed">
<TextBlock.Foreground>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFD86E6E"/>
<GradientStop Color="#FFA20404" Offset="1"/>
</LinearGradientBrush>
</TextBlock.Foreground>
<TextBlock.Effect>
<DropShadowEffect/>
</TextBlock.Effect>
</TextBlock>
<TextBlock x:Name="debug_errorcode_text_text" HorizontalAlignment="Left" Margin="139,35,0,0" TextWrapping="Wrap" VerticalAlignment="Top" FontSize="10" TextAlignment="Center" Width="111" FontFamily="Artifakt Element Black" Height="49" IsHitTestVisible="False" Text="ERROR" FontStyle="Italic" Visibility="Collapsed">
<TextBlock.Foreground>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFD86E6E"/>
<GradientStop Color="#FFA20404" Offset="1"/>
</LinearGradientBrush>
</TextBlock.Foreground>
<TextBlock.Effect>
<DropShadowEffect/>
</TextBlock.Effect>
</TextBlock>
</Grid>
</Page>