Skip to content

Commit

Permalink
Merge pull request #1 from lahm86/development
Browse files Browse the repository at this point in the history
Initial tool creation
  • Loading branch information
lahm86 authored Nov 19, 2022
2 parents 5dad3e6 + 9adb3fb commit e1de625
Show file tree
Hide file tree
Showing 61 changed files with 2,906 additions and 1 deletion.
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,28 @@
# tomb3_ConfigTool
# tomb3 Configuration Tool
_A GUI tool for modifying the settings for [tomb3](https://github.com/Trxyebeep/tomb3)._

![tomb3 Config Tool](resources/gui.png)


## Prerequisites
* [.NET Core 6.0](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)

## Usage
1. Download the latest release from https://github.com/lahm86/tomb3_ConfigTool/releases/latest.
2. Place the tomb3_ConfigTool.exe file in the same directory as your tomb3 installation.
3. Launch tomb3_ConfigTool.exe.
4. Change as many settings as desired. Press `Save` to write these values to disk so that tomb3 can read them.
5. Shortcut buttons are provided to launch the game:
* Use the `Launch Setup` button to open the original setup window.
* Use the `Launch tomb3` button to start the normal game.
* Use the `Launch Gold` button to start the gold edition of the game (The Lost Artefact).
6. Use the `Restore Defaults` button at any time to revert to the default settings.

Settings can also be exported and imported via the `Tools` menu options.

## Thanks
Thank you to:

* Trxyebeep, for guidance on requirements, and testing.
* rr-, for permission to use the [Tomb1Main](https://github.com/rr-/Tomb1Main) configuration tool as a basis for this project.
* Tomb of Ash, for making available the [Tomb Raider Classic Style Guide](https://www.tomb-of-ash.com/tomb-raider-classic-style-guides/); all graphics in this application come from this resource.
Binary file added resources/gui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions tomb3_ConfigTool.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32929.385
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "tomb3_ConfigTool", "tomb3_ConfigTool\tomb3_ConfigTool.csproj", "{8F847617-2B32-4A36-B4F0-44C5587DE54F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8F847617-2B32-4A36-B4F0-44C5587DE54F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8F847617-2B32-4A36-B4F0-44C5587DE54F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8F847617-2B32-4A36-B4F0-44C5587DE54F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8F847617-2B32-4A36-B4F0-44C5587DE54F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F8089E40-DA5E-4755-85AB-1C246F427185}
EndGlobalSection
EndGlobal
13 changes: 13 additions & 0 deletions tomb3_ConfigTool/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Application
x:Class="tomb3_ConfigTool.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="Controls/MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Resources/styles.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
17 changes: 17 additions & 0 deletions tomb3_ConfigTool/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System.Globalization;
using System.Windows;
using System.Windows.Markup;

namespace tomb3_ConfigTool;

public partial class App : Application
{
static App()
{
FrameworkElement.LanguageProperty.OverrideMetadata
(
typeof(FrameworkElement),
new FrameworkPropertyMetadata(XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.Name))
);
}
}
65 changes: 65 additions & 0 deletions tomb3_ConfigTool/Controls/AboutWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<Window
x:Class="tomb3_ConfigTool.Controls.AboutWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="{Binding ViewText[window_title_about]}"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
ResizeMode="NoResize"
ShowInTaskbar="False">

<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>

<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>

<Image
VerticalAlignment="Top"
Width="120"
HorizontalAlignment="Left"
Source="/Resources/tomb3.png"
Margin="10,10,10,0"/>

<StackPanel
Grid.Column="1"
Margin="10">
<TextBlock
FontSize="15"
FontWeight="Bold"
Margin="0,0,0,10"
Text="{Binding ViewText[window_title_main]}"/>

<TextBlock
Margin="0,0,0,4"
Text="{Binding ViewText[label_about_details]}"/>

<TextBlock>
<Hyperlink
Click="GitHubHyperlink_Click">
<Run Text="{Binding ViewText[link_github]}" />
</Hyperlink>
</TextBlock>
</StackPanel>

<StackPanel
Grid.Row="1"
Grid.ColumnSpan="2"
Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}">
<Button
Content="{Binding ViewText[command_close]}"
Style="{StaticResource ButtonStyle}"
Margin="10"
HorizontalAlignment="Right"
IsCancel="True"/>
</StackPanel>
</Grid>
</Window>
20 changes: 20 additions & 0 deletions tomb3_ConfigTool/Controls/AboutWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System.Windows;
using tomb3_ConfigTool.Models;
using tomb3_ConfigTool.Utils;

namespace tomb3_ConfigTool.Controls;

public partial class AboutWindow : Window
{
public AboutWindow()
{
InitializeComponent();
DataContext = new BaseLanguageViewModel();
Owner = Application.Current.MainWindow;
}

private void GitHubHyperlink_Click(object sender, RoutedEventArgs e)
{
ProcessUtils.Start(Tomb3Constants.GitHubURL);
}
}
40 changes: 40 additions & 0 deletions tomb3_ConfigTool/Controls/CategoryControl.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<UserControl
x:Class="tomb3_ConfigTool.Controls.CategoryControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="clr-namespace:tomb3_ConfigTool.Controls"
mc:Ignorable="d"
d:DesignHeight="450"
d:DesignWidth="800">

<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>

<Image
Margin="7,7,5,7"
Source="{Binding ImageSource}"/>

<ScrollViewer
Padding="7"
Grid.Column="1"
ScrollChanged="ScrollViewer_ScrollChanged"
VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Disabled">
<ItemsControl
ItemsSource="{Binding ItemsSource}"
AlternationCount="{Binding Items.Count, RelativeSource={RelativeSource Self}}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<controls:PropertyControl
Style="{StaticResource SeparatorBorderStyle}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</Grid>
</UserControl>
17 changes: 17 additions & 0 deletions tomb3_ConfigTool/Controls/CategoryControl.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System.Windows.Controls;
using tomb3_ConfigTool.Models;

namespace tomb3_ConfigTool.Controls;

public partial class CategoryControl : UserControl
{
public CategoryControl()
{
InitializeComponent();
}

private void ScrollViewer_ScrollChanged(object sender, ScrollChangedEventArgs e)
{
(DataContext as CategoryViewModel).ViewPosition = e.VerticalOffset;
}
}
Loading

0 comments on commit e1de625

Please sign in to comment.