GUI: Usability tweaks when using Linux process map

This commit is contained in:
Katy Coe
2020-12-13 01:38:38 +01:00
parent eee290fa85
commit aae7f9d921
2 changed files with 9 additions and 3 deletions

View File

@@ -437,7 +437,13 @@
<!-- Load options -->
<Button Grid.Row="2" Name="btnLoadOptions" Style="{StaticResource LightBoxButton}" Click="BtnLoadOptions_Click" Margin="0,0,10,10" Padding="5" HorizontalAlignment="Right" VerticalAlignment="Bottom" FontSize="18" Width="180" Content="Import options..."/>
</Grid>
<Button Name="btnSelectBinaryFile" Style="{StaticResource LightBoxButton}" Margin="100" Click="BtnSelectBinaryFile_OnClick" Visibility="Hidden">Select or drag &amp; drop an IL2CPP binary file</Button>
<Button Name="btnSelectBinaryFile" Style="{StaticResource LightBoxButton}" Margin="100" Click="BtnSelectBinaryFile_OnClick" Visibility="Hidden">
<TextBlock TextAlignment="Center">
<TextBlock>Select or drag &amp; drop an IL2CPP binary file</TextBlock>
<LineBreak/>
<TextBlock FontSize="16">You can also use a Linux process map (eg. maps.txt from GameGuardian)</TextBlock>
</TextBlock>
</Button>
<!-- Back button -->
<Button Name="btnBack" Margin="7" Padding="2" HorizontalAlignment="Left" VerticalAlignment="Bottom" FontSize="18" Width="120" Click="BtnBack_OnClick" Content="&lt;&lt; Back">

View File

@@ -118,7 +118,7 @@ namespace Il2CppInspectorGUI
/// </summary>
private async void BtnSelectBinaryFile_OnClick(object sender, RoutedEventArgs e) {
var openFileDialog = new OpenFileDialog {
Filter = "Binary executable file (*.exe;*.dll;*.so;*.bin;*.prx;*.sprx)|*.exe;*.dll;*.so;*.bin;*.prx;*.sprx|All files (*.*)|*.*",
Filter = "Binary executable file (*.exe;*.dll;*.so;*.bin;*.prx;*.sprx)|*.exe;*.dll;*.so;*.bin;*.prx;*.sprx|Linux process map file (*.txt)|*.txt|All files (*.*)|*.*",
CheckFileExists = true
};
@@ -608,7 +608,7 @@ namespace Il2CppInspectorGUI
break;
}
}
// Metadata and binary
// Metadata and binary/text
else if (files.Length == 2 && (files[0].ToLower().EndsWith(".dat") || files[1].ToLower().EndsWith(".dat"))) {
var metadataIndex = files[0].ToLower().EndsWith(".dat") ? 0 : 1;
var binaryIndex = 1 - metadataIndex;