Skip to content

Commit

Permalink
Merge pull request #59 from Stuff-Mods/settings-gui
Browse files Browse the repository at this point in the history
Some UI enhancements to settings
  • Loading branch information
DevilPepper authored May 15, 2021
2 parents 61c2479 + 169fa44 commit 746dede
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 16 deletions.
3 changes: 3 additions & 0 deletions ItemBoxTracker/ItemBoxTracker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@
<PackageReference
Include="Microsoft.Xaml.Behaviors.Wpf"
Version="1.1.31" />
<PackageReference
Include="gong-wpf-dragdrop"
Version="2.3.2" />
</ItemGroup>

<!-- Build tools -->
Expand Down
28 changes: 14 additions & 14 deletions ItemBoxTracker/src/Plugin/Views/TrackingTabView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
xmlns:src="clr-namespace:HunterPie.GUI;assembly=HunterPie.UI"
xmlns:Custom="clr-namespace:HunterPie.GUIControls.Custom_Controls;assembly=HunterPie.UI"
xmlns:convert="clr-namespace:MHWItemBoxTracker.Converter"
xmlns:dd="urn:gong-wpf-dragdrop"
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"
Expand Down Expand Up @@ -61,7 +62,9 @@
Style="{StaticResource buttons_settings}" />
<ItemsControl
ItemsSource="{Binding Model.Tracking, Mode=TwoWay}"
BorderThickness="0">
BorderThickness="0"
dd:DragDrop.IsDragSource="True"
dd:DragDrop.IsDropTarget="True">
<ItemsControl.Background>
<SolidColorBrush
Color="#00000000"
Expand All @@ -70,16 +73,10 @@
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Button
ToolTip="Move up"
Command="{Binding DataContext.MoveUp, RelativeSource={RelativeSource AncestorType=UserControl}}"
CommandParameter="{Binding}"
Content="" />
<Button
ToolTip="Move down"
Command="{Binding DataContext.MoveDown, RelativeSource={RelativeSource AncestorType=UserControl}}"
CommandParameter="{Binding}"
Content="" />
<TextBlock
Padding="10 0 5 0"
Text=""
Cursor="Hand" />
<local:AutoSuggestBox
Placeholder="Search items..."
NoResultsText="{Binding DataContext.Items.Count, RelativeSource={RelativeSource AncestorType=UserControl}, Converter={convert:CountToString Zero=Please launch the game to enable this search and then reload this screen once HunterPie has loaded the strings, More=No Results...}}"
Expand All @@ -103,10 +100,13 @@
Text="{Binding Amount, Mode=TwoWay}" />
<Button
ToolTip="Delete row"
Foreground="Red"
Command="{Binding DataContext.DeleteRow, RelativeSource={RelativeSource AncestorType=UserControl}}"
CommandParameter="{Binding}"
Content="" />
CommandParameter="{Binding}">
<Image
Source="{StaticResource ICON_REMOVE}"
Width="16"
Height="16" />
</Button>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
Expand Down
3 changes: 1 addition & 2 deletions ItemBoxTracker/src/Shareables/Views/AutoSuggestBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
</TextBox>

<Border
Grid.Column='0'
CornerRadius="5"
Background="#1e5878"
Visibility="{Binding IsEnabled, Converter={StaticResource InverseBool2Visibility}}">
Expand All @@ -89,7 +88,7 @@
Grid.Column='1'
Foreground="#cc9E9D9D"
Command="{Binding OnClear}"
Content="" />
Content="" />
</Grid>
</Border>

Expand Down
1 change: 1 addition & 0 deletions scripts/gen-module-json.csx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ var buildDirectory = $"ItemBoxTracker/bin/{configuration}";
var files = new List<string>() {
"ItemBoxTracker.dll",
"Microsoft.Xaml.Behaviors.dll",
"GongSolutions.WPF.DragDrop.dll",
};

var main = new Main();
Expand Down

0 comments on commit 746dede

Please sign in to comment.