Skip to content

Commit

Permalink
feat: add Outlaw to inventory (#4)
Browse files Browse the repository at this point in the history
* feat: basic outlaw implementation

* chore: run chsarpier and remove unused method

* chore: format InventoryControl

---------

Co-authored-by: PWall <34860495+PWall2222@users.noreply.github.com>
  • Loading branch information
ajilidali and pwall2222 authored Jan 13, 2024
1 parent d7ba7e7 commit 7831600
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 25 deletions.
51 changes: 26 additions & 25 deletions NOWT/Controls/InventoryControl.xaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<UserControl x:Class="NOWT.Controls.InventoryControl"
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:controls="clr-namespace:NOWT.Controls"
xmlns:fa6="http://schemas.fontawesome.com/icons/fonts"
x:Name="Self" HorizontalAlignment="Stretch"
mc:Ignorable="d" Background="Transparent"
d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignData SkinData}">
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:controls="clr-namespace:NOWT.Controls"
xmlns:fa6="http://schemas.fontawesome.com/icons/fonts"
x:Name="Self" HorizontalAlignment="Stretch"
mc:Ignorable="d" Background="Transparent"
d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignData SkinData}">
<Border Background="#252A40" CornerRadius="20" Margin="10" Padding="10">
<Border.Effect>
<DropShadowEffect BlurRadius="5" ShadowDepth="3" />
Expand All @@ -29,17 +29,10 @@
<RowDefinition />
</Grid.RowDefinitions>

<TextBlock Grid.Column="1" Grid.ColumnSpan="4" Grid.Row="0" Text="{Binding Username, ElementName=Self}"
FontSize="30" FontWeight="Bold" Foreground="White" HorizontalAlignment="Center"
VerticalAlignment="Center" Margin="10" />

<!-- <Grid Grid.Column="0" Grid.Row="0" Grid.RowSpan="6" Width="Auto"> -->
<!-- <Grid.RowDefinitions> -->
<!-- <RowDefinition Height="Auto"></RowDefinition> -->
<!-- <RowDefinition SharedSizeGroup="A"></RowDefinition> -->
<!-- <RowDefinition SharedSizeGroup="A"></RowDefinition> -->
<!-- <RowDefinition SharedSizeGroup="A"></RowDefinition> -->
<!-- </Grid.RowDefinitions> -->
<TextBlock Grid.Column="1" Grid.ColumnSpan="4" Grid.Row="0"
Text="{Binding Username, ElementName=Self}"
FontSize="30" FontWeight="Bold" Foreground="White" HorizontalAlignment="Center"
VerticalAlignment="Center" Margin="10" />

<controls:InventoryEntryControl
Grid.Row="0" Grid.RowSpan="3"
Expand All @@ -57,8 +50,6 @@
Grid.Row="5"
Image="{Binding SkinDataObject.Spray3Image, ElementName=Self}"
TooltipName="{Binding SkinDataObject.Spray3Name, ElementName=Self}" />
<!-- </Grid> -->


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

<controls:InventoryEntryControl
Grid.Column="4" Grid.Row="1"
Grid.Column="4" Grid.Row="0"
Image="{Binding SkinDataObject.MarshalImage, ElementName=Self}"
TooltipName="{Binding SkinDataObject.MarshalName, ElementName=Self}" />

<controls:InventoryEntryControl
Grid.Column="4" Grid.Row="1"
Image="{Binding SkinDataObject.OutlawImage, ElementName=Self}"
TooltipName="{Binding SkinDataObject.OutlawName, ElementName=Self}" />

<controls:InventoryEntryControl
Grid.Column="4" Grid.Row="2"
Image="{Binding SkinDataObject.OperatorImage, ElementName=Self}"
TooltipName="{Binding SkinDataObject.OperatorName, ElementName=Self}" />

<controls:InventoryEntryControl
Grid.Column="4" Grid.Row="3"
Image="{Binding SkinDataObject.AresImage, ElementName=Self}"
TooltipName="{Binding SkinDataObject.AresName, ElementName=Self}" />

<controls:InventoryEntryControl
Grid.Column="4" Grid.Row="4"
Image="{Binding SkinDataObject.OdinImage, ElementName=Self}"
TooltipName="{Binding SkinDataObject.OdinName, ElementName=Self}" />

<controls:InventoryEntryControl
Grid.Column="4" Grid.Row="5"
Image="{Binding SkinDataObject.MeleeImage, ElementName=Self}"
TooltipName="{Binding SkinDataObject.MeleeName, ElementName=Self}" />

<Button
Grid.Row="5" Grid.Column="2" Grid.ColumnSpan="2" Cursor="Hand" Click="CloseBtnClick"
Grid.Row="6" Grid.Column="2" Grid.ColumnSpan="2" Cursor="Hand" Click="CloseBtnClick"
Template="{StaticResource ButtonTemplate}" Margin="10" Padding="20">
<fa6:ImageAwesome PrimaryColor="#007EF9" Icon="Solid_Xmark" Margin="10" />
</Button>

</Grid>
</Border>
</UserControl>
</UserControl>
14 changes: 14 additions & 0 deletions NOWT/Helpers/LiveMatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,20 @@ await File.ReadAllTextAsync(Constants.LocalAppDataPath + "\\ValAPI\\sprays.json"
.Item
.Id
].Name,
OutlawImage = skins[
loadout.Items["5f0aaf7a-4289-3998-d5ff-eb9a5cf7ef5c"].Sockets[
"3ad1b2b2-acdb-4524-852f-954a76ddae0a"
]
.Item
.Id
].Image,
OutlawName = skins[
loadout.Items["5f0aaf7a-4289-3998-d5ff-eb9a5cf7ef5c"].Sockets[
"3ad1b2b2-acdb-4524-852f-954a76ddae0a"
]
.Item
.Id
].Name,
OperatorImage = skins[
loadout.Items["a03b24d3-4319-996d-0f8c-94bbfba1dfc7"].Sockets[
"3ad1b2b2-acdb-4524-852f-954a76ddae0a"
Expand Down
6 changes: 6 additions & 0 deletions NOWT/Objects/CustomObjects.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ public partial class SkinData
[ObservableProperty]
private string _marshalName;

[ObservableProperty]
private Uri _outlawImage;

[ObservableProperty]
private string _outlawName;

[ObservableProperty]
private Uri _meleeImage;

Expand Down

0 comments on commit 7831600

Please sign in to comment.