Skip to content

Commit 7831600

Browse files
ajilidalipwall2222
andauthored
feat: add Outlaw to inventory (#4)
* feat: basic outlaw implementation * chore: run chsarpier and remove unused method * chore: format InventoryControl --------- Co-authored-by: PWall <34860495+PWall2222@users.noreply.github.com>
1 parent d7ba7e7 commit 7831600

File tree

3 files changed

+46
-25
lines changed

3 files changed

+46
-25
lines changed

NOWT/Controls/InventoryControl.xaml

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<UserControl x:Class="NOWT.Controls.InventoryControl"
2-
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4-
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5-
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6-
xmlns:controls="clr-namespace:NOWT.Controls"
7-
xmlns:fa6="http://schemas.fontawesome.com/icons/fonts"
8-
x:Name="Self" HorizontalAlignment="Stretch"
9-
mc:Ignorable="d" Background="Transparent"
10-
d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignData SkinData}">
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6+
xmlns:controls="clr-namespace:NOWT.Controls"
7+
xmlns:fa6="http://schemas.fontawesome.com/icons/fonts"
8+
x:Name="Self" HorizontalAlignment="Stretch"
9+
mc:Ignorable="d" Background="Transparent"
10+
d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignData SkinData}">
1111
<Border Background="#252A40" CornerRadius="20" Margin="10" Padding="10">
1212
<Border.Effect>
1313
<DropShadowEffect BlurRadius="5" ShadowDepth="3" />
@@ -29,17 +29,10 @@
2929
<RowDefinition />
3030
</Grid.RowDefinitions>
3131

32-
<TextBlock Grid.Column="1" Grid.ColumnSpan="4" Grid.Row="0" Text="{Binding Username, ElementName=Self}"
33-
FontSize="30" FontWeight="Bold" Foreground="White" HorizontalAlignment="Center"
34-
VerticalAlignment="Center" Margin="10" />
35-
36-
<!-- <Grid Grid.Column="0" Grid.Row="0" Grid.RowSpan="6" Width="Auto"> -->
37-
<!-- <Grid.RowDefinitions> -->
38-
<!-- <RowDefinition Height="Auto"></RowDefinition> -->
39-
<!-- <RowDefinition SharedSizeGroup="A"></RowDefinition> -->
40-
<!-- <RowDefinition SharedSizeGroup="A"></RowDefinition> -->
41-
<!-- <RowDefinition SharedSizeGroup="A"></RowDefinition> -->
42-
<!-- </Grid.RowDefinitions> -->
32+
<TextBlock Grid.Column="1" Grid.ColumnSpan="4" Grid.Row="0"
33+
Text="{Binding Username, ElementName=Self}"
34+
FontSize="30" FontWeight="Bold" Foreground="White" HorizontalAlignment="Center"
35+
VerticalAlignment="Center" Margin="10" />
4336

4437
<controls:InventoryEntryControl
4538
Grid.Row="0" Grid.RowSpan="3"
@@ -57,8 +50,6 @@
5750
Grid.Row="5"
5851
Image="{Binding SkinDataObject.Spray3Image, ElementName=Self}"
5952
TooltipName="{Binding SkinDataObject.Spray3Name, ElementName=Self}" />
60-
<!-- </Grid> -->
61-
6253

6354
<controls:InventoryEntryControl
6455
Grid.Column="1" Grid.Row="1"
@@ -116,31 +107,41 @@
116107
TooltipName="{Binding SkinDataObject.VandalName, ElementName=Self}" />
117108

118109
<controls:InventoryEntryControl
119-
Grid.Column="4" Grid.Row="1"
110+
Grid.Column="4" Grid.Row="0"
120111
Image="{Binding SkinDataObject.MarshalImage, ElementName=Self}"
121112
TooltipName="{Binding SkinDataObject.MarshalName, ElementName=Self}" />
113+
114+
<controls:InventoryEntryControl
115+
Grid.Column="4" Grid.Row="1"
116+
Image="{Binding SkinDataObject.OutlawImage, ElementName=Self}"
117+
TooltipName="{Binding SkinDataObject.OutlawName, ElementName=Self}" />
118+
122119
<controls:InventoryEntryControl
123120
Grid.Column="4" Grid.Row="2"
124121
Image="{Binding SkinDataObject.OperatorImage, ElementName=Self}"
125122
TooltipName="{Binding SkinDataObject.OperatorName, ElementName=Self}" />
123+
126124
<controls:InventoryEntryControl
127125
Grid.Column="4" Grid.Row="3"
128126
Image="{Binding SkinDataObject.AresImage, ElementName=Self}"
129127
TooltipName="{Binding SkinDataObject.AresName, ElementName=Self}" />
128+
130129
<controls:InventoryEntryControl
131130
Grid.Column="4" Grid.Row="4"
132131
Image="{Binding SkinDataObject.OdinImage, ElementName=Self}"
133132
TooltipName="{Binding SkinDataObject.OdinName, ElementName=Self}" />
133+
134134
<controls:InventoryEntryControl
135135
Grid.Column="4" Grid.Row="5"
136136
Image="{Binding SkinDataObject.MeleeImage, ElementName=Self}"
137137
TooltipName="{Binding SkinDataObject.MeleeName, ElementName=Self}" />
138138

139139
<Button
140-
Grid.Row="5" Grid.Column="2" Grid.ColumnSpan="2" Cursor="Hand" Click="CloseBtnClick"
140+
Grid.Row="6" Grid.Column="2" Grid.ColumnSpan="2" Cursor="Hand" Click="CloseBtnClick"
141141
Template="{StaticResource ButtonTemplate}" Margin="10" Padding="20">
142142
<fa6:ImageAwesome PrimaryColor="#007EF9" Icon="Solid_Xmark" Margin="10" />
143143
</Button>
144+
144145
</Grid>
145146
</Border>
146-
</UserControl>
147+
</UserControl>

NOWT/Helpers/LiveMatch.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,20 @@ await File.ReadAllTextAsync(Constants.LocalAppDataPath + "\\ValAPI\\sprays.json"
809809
.Item
810810
.Id
811811
].Name,
812+
OutlawImage = skins[
813+
loadout.Items["5f0aaf7a-4289-3998-d5ff-eb9a5cf7ef5c"].Sockets[
814+
"3ad1b2b2-acdb-4524-852f-954a76ddae0a"
815+
]
816+
.Item
817+
.Id
818+
].Image,
819+
OutlawName = skins[
820+
loadout.Items["5f0aaf7a-4289-3998-d5ff-eb9a5cf7ef5c"].Sockets[
821+
"3ad1b2b2-acdb-4524-852f-954a76ddae0a"
822+
]
823+
.Item
824+
.Id
825+
].Name,
812826
OperatorImage = skins[
813827
loadout.Items["a03b24d3-4319-996d-0f8c-94bbfba1dfc7"].Sockets[
814828
"3ad1b2b2-acdb-4524-852f-954a76ddae0a"

NOWT/Objects/CustomObjects.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ public partial class SkinData
128128
[ObservableProperty]
129129
private string _marshalName;
130130

131+
[ObservableProperty]
132+
private Uri _outlawImage;
133+
134+
[ObservableProperty]
135+
private string _outlawName;
136+
131137
[ObservableProperty]
132138
private Uri _meleeImage;
133139

0 commit comments

Comments
 (0)