Skip to content

Commit

Permalink
Investigation Editor now has icons as well, Y0 has been capped.
Browse files Browse the repository at this point in the history
Signed-off-by: AsteriskAmpersand <aravuegnitsuga@gmail.com>
  • Loading branch information
AsteriskAmpersand committed Oct 8, 2018
1 parent 5a890cb commit 99e1f06
Show file tree
Hide file tree
Showing 39 changed files with 752 additions and 1,118 deletions.
35 changes: 35 additions & 0 deletions .idea/.idea.MHW Save Editor/.idea/contentModel.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1,692 changes: 579 additions & 1,113 deletions .idea/.idea.MHW Save Editor/.idea/workspace.xml

Large diffs are not rendered by default.

97 changes: 97 additions & 0 deletions MHW Save Editor/MHW Save Editor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@
<Compile Include="src\InvestigationEditing\InvestigationViewModel.cs">
<DependentUpon>InvestigationView.xaml</DependentUpon>
</Compile>
<Compile Include="src\InvestigationEditing\MonsterIconConverter.cs" />
<Compile Include="src\Support\DataGridRowBehavior.cs" />
<Compile Include="src\Support\RowToIndexConverter.cs" />
<Compile Include="src\Support\ScrollDataGridRowIntoView.cs" />
Expand Down Expand Up @@ -238,6 +239,102 @@
</ItemGroup>
<ItemGroup>
<Content Include=".gitignore" />
<EmbeddedResource Include="src\Resources\MonsterIcons\Anjanath.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Azure Rathalos.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Barroth.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Bazelgeuse.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Behemoth.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Black Diablos.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Deviljho.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Diablos.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Dodogama.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Great Girros.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Great Jagras.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Jyuratodus.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Kirin.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Kulu-Ya-Ku.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Kushala Daora.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Lavasioth.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Legiana.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Lunastra.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Nergigante.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Odogaron.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Paolumu.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Pink Rathian.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Pukei-Pukei.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\question_ID copy.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Radobaan.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Rathalos.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Rathian.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Teostra.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Tobi-Kadachi.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Tzitzi-Ya-Ku.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Uragaan.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="src\Resources\MonsterIcons\Vaal Hazak.png" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<Resource Include="src\Resources\ItemIcons\00000002">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
Expand Down
8 changes: 6 additions & 2 deletions MHW Save Editor/src/InvestigationEditing/Investigation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Windows.Data;
using MHW_Save_Editor.Data;


Expand Down Expand Up @@ -467,7 +471,7 @@ public ObservableCollection<string> CurrentFlourishes
{0x1f,22},{0x20,23},{0x21,24},{0x22,25},{0x23,26},{0x24,27},{0x25,28},{0x27,29},{0xffffffff,30}
};

private static readonly string[] _MonsterNames = new[]
public static readonly string[] _MonsterNames = new[]
{
"Anjanath", "Rathalos", "Great Jagras", "Rathian", "Pink Rathian", "Azure Rathalos",
"Diablos", "Black Diablos", "Kirin", "Kushala Daora", "Lunastra", "Teostra",
Expand All @@ -476,7 +480,7 @@ public ObservableCollection<string> CurrentFlourishes
"Legiana", "Great Girros", "Odogaron", "Radobaan", "Vaal Hazak", "Dodogama",
"Bazelgeuse", "Empty"
};

public ObservableCollection<string> MonsterNames
{
get => new ObservableCollection<string>(_MonsterNames);
Expand Down
13 changes: 10 additions & 3 deletions MHW Save Editor/src/InvestigationEditing/InvestigationView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:MHW_Save_Editor"
xmlns:converter="clr-namespace:MHW_Save_Editor.InvestigationEditing"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<UserControl.Resources>
<converter:MonsterIconConverter x:Key="MonsterIconConverter"/>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<!-- State Controls -->
<RowDefinition Height="1*" />
Expand Down Expand Up @@ -72,6 +76,9 @@
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<Image Grid.Row="0" Grid.Column="0" Source = "{Binding InvestigationCollectionView/Mon1, Mode = OneWay, Converter = {StaticResource MonsterIconConverter}}" />
<Image Grid.Row="0" Grid.Column="1" Source = "{Binding InvestigationCollectionView/Mon2, Mode = OneWay, Converter = {StaticResource MonsterIconConverter}}"/>
<Image Grid.Row="0" Grid.Column="2" Source = "{Binding InvestigationCollectionView/Mon3, Mode = OneWay, Converter = {StaticResource MonsterIconConverter}}"/>
<Grid Grid.Row="1" Grid.Column="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
Expand Down Expand Up @@ -208,8 +215,8 @@
<xctk:IntegerUpDown Grid.Column="1" Grid.Row="5" Minimum="1" Maximum="10" AllowTextInput = "False"
Value = "{Binding InvestigationCollectionView/Attempts, UpdateSourceTrigger=PropertyChanged, Mode = TwoWay}"
IsEnabled="{Binding InvestigationCollectionView/Filled}"/>
<TextBlock Grid.Column="0" Grid.Row="6" Style="{StaticResource InvestigationLabel}">Y0: </TextBlock>
<xctk:IntegerUpDown Grid.Column="1" Grid.Row="6" Minimum="0" Maximum="5" AllowTextInput = "False"
<TextBlock Grid.Column="0" Grid.Row="6" Style="{StaticResource InvestigationLabel}">Wildlife Extra Boxes: </TextBlock>
<xctk:IntegerUpDown Grid.Column="1" Grid.Row="6" Minimum="0" Maximum="2" AllowTextInput = "False"
Value = "{Binding InvestigationCollectionView/Y0, UpdateSourceTrigger=PropertyChanged, Mode = TwoWay}"
IsEnabled="{Binding InvestigationCollectionView/Filled}"/>
<TextBlock Grid.Column="0" Grid.Row="7" Style="{StaticResource InvestigationLabel}">Y3: </TextBlock>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
using System.Windows.Data;
using MHW_Save_Editor.InvestigationEditing;

namespace MHW_Save_Editor
{
public partial class InvestigationView : UserControl
Expand Down
19 changes: 19 additions & 0 deletions MHW Save Editor/src/InvestigationEditing/MonsterIconConverter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Windows.Data;

namespace MHW_Save_Editor.InvestigationEditing
{
public class MonsterIconConverter : IValueConverter
{
private static readonly string iconpath =
Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + @"/src/Resources/MonsterIcons/";
public object Convert(Object value, Type targetType, Object parameter, CultureInfo culture)
{
return iconpath + Investigation._MonsterNames[(int) value] + ".png";
}
public object ConvertBack(Object value, Type targetType, Object parameter, CultureInfo culture) => throw new NotImplementedException();
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 99e1f06

Please sign in to comment.