mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 15:40:29 +01:00
Extracted Settings class to separate file
This commit is contained in:
parent
028c80035a
commit
1cd719b076
3 changed files with 29 additions and 24 deletions
|
|
@ -10,30 +10,6 @@ namespace SceneManager
|
||||||
{
|
{
|
||||||
public class EntryPoint
|
public class EntryPoint
|
||||||
{
|
{
|
||||||
internal static class Settings
|
|
||||||
{
|
|
||||||
internal static Keys ToggleKey = Keys.T;
|
|
||||||
internal static Keys ModifierKey = Keys.LShiftKey;
|
|
||||||
internal static ControllerButtons ToggleButton = ControllerButtons.Y;
|
|
||||||
internal static ControllerButtons ModifierButton = ControllerButtons.A;
|
|
||||||
internal static bool EnableHints = true;
|
|
||||||
//internal static string id = Verification.passThrough(Verification.GetID());
|
|
||||||
//internal static string PatronKey = null; // This cannot reference VerifyUser because the file can just be shared and it will always work. Must be manually set to each user's ID
|
|
||||||
|
|
||||||
internal static void LoadSettings()
|
|
||||||
{
|
|
||||||
Game.LogTrivial("Loading SceneManager.ini settings");
|
|
||||||
InitializationFile ini = new InitializationFile("Plugins/SceneManager.ini");
|
|
||||||
ini.Create();
|
|
||||||
//PatronKey = ini.ReadString("Patreon","PatronKey", null);
|
|
||||||
ToggleKey = ini.ReadEnum("Keybindings", "ToggleKey", Keys.T);
|
|
||||||
ModifierKey = ini.ReadEnum("Keybindings", "ModifierKey", Keys.LShiftKey);
|
|
||||||
ToggleButton = ini.ReadEnum("Keybindings", "ToggleButton", ControllerButtons.A);
|
|
||||||
ModifierButton = ini.ReadEnum("Keybindings", "ModifierButton", ControllerButtons.DPadDown);
|
|
||||||
EnableHints = ini.ReadBoolean("Other Settings", "EnableHints", true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Main()
|
public static void Main()
|
||||||
{
|
{
|
||||||
AppDomain.CurrentDomain.DomainUnload += MyTerminationHandler;
|
AppDomain.CurrentDomain.DomainUnload += MyTerminationHandler;
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,7 @@
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Menus\PathMainMenu.cs" />
|
<Compile Include="Menus\PathMainMenu.cs" />
|
||||||
<Compile Include="Menus\SettingsMenu.cs" />
|
<Compile Include="Menus\SettingsMenu.cs" />
|
||||||
|
<Compile Include="Settings.cs" />
|
||||||
<Compile Include="VehicleCollector.cs" />
|
<Compile Include="VehicleCollector.cs" />
|
||||||
<Compile Include="Verification.cs" />
|
<Compile Include="Verification.cs" />
|
||||||
<Compile Include="Object Classes\Waypoint.cs" />
|
<Compile Include="Object Classes\Waypoint.cs" />
|
||||||
|
|
|
||||||
28
SceneManager/Settings.cs
Normal file
28
SceneManager/Settings.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
using Rage;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace SceneManager
|
||||||
|
{
|
||||||
|
internal static class Settings
|
||||||
|
{
|
||||||
|
internal static Keys ToggleKey = Keys.T;
|
||||||
|
internal static Keys ModifierKey = Keys.LShiftKey;
|
||||||
|
internal static ControllerButtons ToggleButton = ControllerButtons.Y;
|
||||||
|
internal static ControllerButtons ModifierButton = ControllerButtons.A;
|
||||||
|
internal static bool EnableHints = true;
|
||||||
|
internal static Object[] barriers;
|
||||||
|
|
||||||
|
internal static void LoadSettings()
|
||||||
|
{
|
||||||
|
Game.LogTrivial("Loading SceneManager.ini settings");
|
||||||
|
InitializationFile ini = new InitializationFile("Plugins/SceneManager.ini");
|
||||||
|
ini.Create();
|
||||||
|
|
||||||
|
ToggleKey = ini.ReadEnum("Keybindings", "ToggleKey", Keys.T);
|
||||||
|
ModifierKey = ini.ReadEnum("Keybindings", "ModifierKey", Keys.LShiftKey);
|
||||||
|
ToggleButton = ini.ReadEnum("Keybindings", "ToggleButton", ControllerButtons.A);
|
||||||
|
ModifierButton = ini.ReadEnum("Keybindings", "ModifierButton", ControllerButtons.DPadDown);
|
||||||
|
EnableHints = ini.ReadBoolean("Other Settings", "EnableHints", true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue