mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2025-01-09 23:03:27 +08:00
Switched everything to new GTAFolder class and removed all direct references to Settings.Default.GTAFolder
This commit is contained in:
parent
d82c34c542
commit
6ae3b470f6
@ -41,9 +41,9 @@ namespace CodeWalker
|
||||
{
|
||||
Task.Run(() =>
|
||||
{
|
||||
GTA5Keys.LoadFromPath(Settings.Default.GTAFolder);
|
||||
GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder);
|
||||
RpfMan = new RpfManager();
|
||||
RpfMan.Init(Settings.Default.GTAFolder, UpdateStatus, UpdateStatus, false, false);
|
||||
RpfMan.Init(GTAFolder.CurrentGTAFolder, UpdateStatus, UpdateStatus, false, false);
|
||||
RPFScanComplete();
|
||||
});
|
||||
}
|
||||
|
2
BrowseForm.Designer.cs
generated
2
BrowseForm.Designer.cs
generated
@ -128,9 +128,9 @@
|
||||
//
|
||||
this.FolderTextBox.Location = new System.Drawing.Point(90, 6);
|
||||
this.FolderTextBox.Name = "FolderTextBox";
|
||||
this.FolderTextBox.ReadOnly = true;
|
||||
this.FolderTextBox.Size = new System.Drawing.Size(251, 20);
|
||||
this.FolderTextBox.TabIndex = 1;
|
||||
this.FolderTextBox.TextChanged += new System.EventHandler(this.FolderTextBox_TextChanged);
|
||||
//
|
||||
// ScanButton
|
||||
//
|
||||
|
@ -55,7 +55,7 @@ namespace CodeWalker
|
||||
}
|
||||
}
|
||||
|
||||
FolderTextBox.Text = Settings.Default.GTAFolder;
|
||||
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||
DataHexLineCombo.Text = "16";
|
||||
|
||||
DataTextBox.SetTabStopWidth(3);
|
||||
@ -64,7 +64,7 @@ namespace CodeWalker
|
||||
|
||||
try
|
||||
{
|
||||
GTA5Keys.LoadFromPath(Settings.Default.GTAFolder);
|
||||
GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder);
|
||||
KeysLoaded = true;
|
||||
UpdateStatus("Ready to scan...");
|
||||
}
|
||||
@ -82,19 +82,10 @@ namespace CodeWalker
|
||||
}
|
||||
}
|
||||
|
||||
private void FolderTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
Settings.Default.GTAFolder = FolderTextBox.Text;
|
||||
}
|
||||
|
||||
private void FolderBrowseButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
FolderBrowserDialog.SelectedPath = Settings.Default.GTAFolder;
|
||||
DialogResult res = FolderBrowserDialog.ShowDialog();
|
||||
if (res == DialogResult.OK)
|
||||
{
|
||||
FolderTextBox.Text = FolderBrowserDialog.SelectedPath;
|
||||
}
|
||||
GTAFolder.UpdateGTAFolder(false);
|
||||
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||
}
|
||||
|
||||
private void ScanButton_Click(object sender, EventArgs e)
|
||||
|
2
ExtractKeysForm.Designer.cs
generated
2
ExtractKeysForm.Designer.cs
generated
@ -77,9 +77,9 @@
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.FolderTextBox.Location = new System.Drawing.Point(98, 25);
|
||||
this.FolderTextBox.Name = "FolderTextBox";
|
||||
this.FolderTextBox.ReadOnly = true;
|
||||
this.FolderTextBox.Size = new System.Drawing.Size(345, 20);
|
||||
this.FolderTextBox.TabIndex = 57;
|
||||
this.FolderTextBox.TextChanged += new System.EventHandler(this.FolderTextBox_TextChanged);
|
||||
//
|
||||
// StatusLabel
|
||||
//
|
||||
|
@ -26,11 +26,11 @@ namespace CodeWalker
|
||||
|
||||
private void ExtractKeysForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
FolderTextBox.Text = Settings.Default.GTAFolder;
|
||||
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||
|
||||
try
|
||||
{
|
||||
GTA5Keys.LoadFromPath(Settings.Default.GTAFolder);
|
||||
GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder);
|
||||
KeysLoaded = true;
|
||||
UpdateStatus("Keys loaded. Nothing to do here!");
|
||||
}
|
||||
@ -41,20 +41,11 @@ namespace CodeWalker
|
||||
}
|
||||
}
|
||||
|
||||
private void FolderTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
Settings.Default.GTAFolder = FolderTextBox.Text;
|
||||
ExeTextBox.Text = FolderTextBox.Text + "\\" + "GTA5.exe";
|
||||
}
|
||||
|
||||
private void FolderBrowseButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
FolderBrowserDialog.SelectedPath = Settings.Default.GTAFolder;
|
||||
DialogResult res = FolderBrowserDialog.ShowDialog();
|
||||
if (res == DialogResult.OK)
|
||||
{
|
||||
FolderTextBox.Text = FolderBrowserDialog.SelectedPath;
|
||||
}
|
||||
GTAFolder.UpdateGTAFolder(false);
|
||||
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||
ExeTextBox.Text = GTAFolder.CurrentGTAFolder + @"\GTA5.exe";
|
||||
}
|
||||
|
||||
private void ExeBrowseButton_Click(object sender, EventArgs e)
|
||||
|
2
ExtractRawForm.Designer.cs
generated
2
ExtractRawForm.Designer.cs
generated
@ -127,9 +127,9 @@
|
||||
//
|
||||
this.FolderTextBox.Location = new System.Drawing.Point(91, 12);
|
||||
this.FolderTextBox.Name = "FolderTextBox";
|
||||
this.FolderTextBox.ReadOnly = true;
|
||||
this.FolderTextBox.Size = new System.Drawing.Size(251, 20);
|
||||
this.FolderTextBox.TabIndex = 64;
|
||||
this.FolderTextBox.TextChanged += new System.EventHandler(this.FolderTextBox_TextChanged);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
|
@ -26,12 +26,12 @@ namespace CodeWalker
|
||||
|
||||
private void ExtractRawForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
FolderTextBox.Text = Settings.Default.GTAFolder;
|
||||
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||
OutputFolderTextBox.Text = Settings.Default.ExtractedRawFilesFolder;
|
||||
|
||||
try
|
||||
{
|
||||
GTA5Keys.LoadFromPath(Settings.Default.GTAFolder);
|
||||
GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder);
|
||||
KeysLoaded = true;
|
||||
UpdateExtractStatus("Ready to extract.");
|
||||
}
|
||||
@ -58,11 +58,6 @@ namespace CodeWalker
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void FolderTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
Settings.Default.GTAFolder = FolderTextBox.Text;
|
||||
}
|
||||
|
||||
private void OutputFolderTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
Settings.Default.ExtractedRawFilesFolder = OutputFolderTextBox.Text;
|
||||
@ -70,12 +65,8 @@ namespace CodeWalker
|
||||
|
||||
private void FolderBrowseButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
FolderBrowserDialog.SelectedPath = Settings.Default.GTAFolder;
|
||||
DialogResult res = FolderBrowserDialog.ShowDialog();
|
||||
if (res == DialogResult.OK)
|
||||
{
|
||||
FolderTextBox.Text = FolderBrowserDialog.SelectedPath;
|
||||
}
|
||||
GTAFolder.UpdateGTAFolder(false);
|
||||
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||
}
|
||||
|
||||
private void OutputFolderBrowseButton_Click(object sender, EventArgs e)
|
||||
|
2
ExtractScriptsForm.Designer.cs
generated
2
ExtractScriptsForm.Designer.cs
generated
@ -188,9 +188,9 @@
|
||||
//
|
||||
this.FolderTextBox.Location = new System.Drawing.Point(98, 26);
|
||||
this.FolderTextBox.Name = "FolderTextBox";
|
||||
this.FolderTextBox.ReadOnly = true;
|
||||
this.FolderTextBox.Size = new System.Drawing.Size(251, 20);
|
||||
this.FolderTextBox.TabIndex = 42;
|
||||
this.FolderTextBox.TextChanged += new System.EventHandler(this.FolderTextBox_TextChanged);
|
||||
//
|
||||
// ExtractScriptsForm
|
||||
//
|
||||
|
@ -28,12 +28,12 @@ namespace CodeWalker
|
||||
private void ExtractForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
DumpTextBox.Text = Settings.Default.GTAExeDumpFile;
|
||||
FolderTextBox.Text = Settings.Default.GTAFolder;
|
||||
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||
OutputFolderTextBox.Text = Settings.Default.CompiledScriptFolder;
|
||||
|
||||
try
|
||||
{
|
||||
GTA5Keys.LoadFromPath(Settings.Default.GTAFolder);
|
||||
GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder);
|
||||
KeysLoaded = true;
|
||||
UpdateDumpStatus("Ready.");
|
||||
UpdateExtractStatus("Ready to extract.");
|
||||
@ -49,11 +49,6 @@ namespace CodeWalker
|
||||
Settings.Default.GTAExeDumpFile = DumpTextBox.Text;
|
||||
}
|
||||
|
||||
private void FolderTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
Settings.Default.GTAFolder = FolderTextBox.Text;
|
||||
}
|
||||
|
||||
private void OutputFolderTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
Settings.Default.CompiledScriptFolder = OutputFolderTextBox.Text;
|
||||
@ -61,12 +56,8 @@ namespace CodeWalker
|
||||
|
||||
private void FolderBrowseButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
FolderBrowserDialog.SelectedPath = Settings.Default.GTAFolder;
|
||||
DialogResult res = FolderBrowserDialog.ShowDialog();
|
||||
if (res == DialogResult.OK)
|
||||
{
|
||||
FolderTextBox.Text = FolderBrowserDialog.SelectedPath;
|
||||
}
|
||||
GTAFolder.UpdateGTAFolder(false);
|
||||
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||
}
|
||||
|
||||
private void OutputFolderBrowseButton_Click(object sender, EventArgs e)
|
||||
|
1
ExtractShadersForm.Designer.cs
generated
1
ExtractShadersForm.Designer.cs
generated
@ -127,6 +127,7 @@
|
||||
//
|
||||
this.FolderTextBox.Location = new System.Drawing.Point(93, 12);
|
||||
this.FolderTextBox.Name = "FolderTextBox";
|
||||
this.FolderTextBox.ReadOnly = true;
|
||||
this.FolderTextBox.Size = new System.Drawing.Size(251, 20);
|
||||
this.FolderTextBox.TabIndex = 64;
|
||||
this.FolderTextBox.TextChanged += new System.EventHandler(this.FolderTextBox_TextChanged);
|
||||
|
@ -26,12 +26,12 @@ namespace CodeWalker
|
||||
|
||||
private void ExtractShadersForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
FolderTextBox.Text = Settings.Default.GTAFolder;
|
||||
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||
OutputFolderTextBox.Text = Settings.Default.ExtractedShadersFolder;
|
||||
|
||||
try
|
||||
{
|
||||
GTA5Keys.LoadFromPath(Settings.Default.GTAFolder);
|
||||
GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder);
|
||||
KeysLoaded = true;
|
||||
UpdateExtractStatus("Ready to extract.");
|
||||
}
|
||||
@ -41,10 +41,7 @@ namespace CodeWalker
|
||||
}
|
||||
}
|
||||
|
||||
private void FolderTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
Settings.Default.GTAFolder = FolderTextBox.Text;
|
||||
}
|
||||
private void FolderTextBox_TextChanged(object sender, EventArgs e){}
|
||||
|
||||
private void OutputFolderTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@ -53,12 +50,8 @@ namespace CodeWalker
|
||||
|
||||
private void FolderBrowseButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
FolderBrowserDialog.SelectedPath = Settings.Default.GTAFolder;
|
||||
DialogResult res = FolderBrowserDialog.ShowDialog();
|
||||
if (res == DialogResult.OK)
|
||||
{
|
||||
FolderTextBox.Text = FolderBrowserDialog.SelectedPath;
|
||||
}
|
||||
GTAFolder.UpdateGTAFolder(false);
|
||||
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||
}
|
||||
|
||||
private void OutputFolderBrowseButton_Click(object sender, EventArgs e)
|
||||
|
2
ExtractTexForm.Designer.cs
generated
2
ExtractTexForm.Designer.cs
generated
@ -118,9 +118,9 @@
|
||||
//
|
||||
this.FolderTextBox.Location = new System.Drawing.Point(90, 6);
|
||||
this.FolderTextBox.Name = "FolderTextBox";
|
||||
this.FolderTextBox.ReadOnly = true;
|
||||
this.FolderTextBox.Size = new System.Drawing.Size(251, 20);
|
||||
this.FolderTextBox.TabIndex = 55;
|
||||
this.FolderTextBox.TextChanged += new System.EventHandler(this.FolderTextBox_TextChanged);
|
||||
//
|
||||
// AbortButton
|
||||
//
|
||||
|
@ -27,12 +27,12 @@ namespace CodeWalker
|
||||
|
||||
private void ExtractTexForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
FolderTextBox.Text = Settings.Default.GTAFolder;
|
||||
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||
OutputFolderTextBox.Text = Settings.Default.ExtractedTexturesFolder;
|
||||
|
||||
try
|
||||
{
|
||||
GTA5Keys.LoadFromPath(Settings.Default.GTAFolder);
|
||||
GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder);
|
||||
KeysLoaded = true;
|
||||
UpdateExtractStatus("Ready to extract.");
|
||||
}
|
||||
@ -42,11 +42,6 @@ namespace CodeWalker
|
||||
}
|
||||
}
|
||||
|
||||
private void FolderTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
Settings.Default.GTAFolder = FolderTextBox.Text;
|
||||
}
|
||||
|
||||
private void OutputFolderTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
Settings.Default.ExtractedTexturesFolder = OutputFolderTextBox.Text;
|
||||
@ -54,12 +49,8 @@ namespace CodeWalker
|
||||
|
||||
private void FolderBrowseButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
FolderBrowserDialog.SelectedPath = Settings.Default.GTAFolder;
|
||||
DialogResult res = FolderBrowserDialog.ShowDialog();
|
||||
if (res == DialogResult.OK)
|
||||
{
|
||||
FolderTextBox.Text = FolderBrowserDialog.SelectedPath;
|
||||
}
|
||||
GTAFolder.UpdateGTAFolder(false);
|
||||
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||
}
|
||||
|
||||
private void OutputFolderBrowseButton_Click(object sender, EventArgs e)
|
||||
|
@ -117,9 +117,6 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="FolderBrowserDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
|
@ -149,7 +149,7 @@ namespace CodeWalker.Forms
|
||||
{
|
||||
if (string.IsNullOrEmpty(FileName)) saveAs = true;
|
||||
if (string.IsNullOrEmpty(FilePath)) saveAs = true;
|
||||
else if ((FilePath.ToLowerInvariant().StartsWith(Settings.Default.GTAFolder.ToLowerInvariant()))) saveAs = true;
|
||||
else if ((FilePath.ToLowerInvariant().StartsWith(GTAFolder.CurrentGTAFolder.ToLowerInvariant()))) saveAs = true;
|
||||
if (!File.Exists(FilePath)) saveAs = true;
|
||||
|
||||
var fn = FilePath;
|
||||
|
@ -137,38 +137,11 @@ namespace CodeWalker.Forms
|
||||
|
||||
MouseWheel += ModelForm_MouseWheel;
|
||||
|
||||
string fldr = Settings.Default.GTAFolder;
|
||||
if (string.IsNullOrEmpty(fldr) || !Directory.Exists(fldr))
|
||||
if (!GTAFolder.UpdateGTAFolder(true))
|
||||
{
|
||||
SelectFolderForm f = new SelectFolderForm();
|
||||
f.ShowDialog();
|
||||
if (f.Result == DialogResult.OK)
|
||||
{
|
||||
fldr = f.SelectedFolder;
|
||||
}
|
||||
else
|
||||
{
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!Directory.Exists(fldr))
|
||||
{
|
||||
MessageBox.Show("The specified folder does not exist:\n" + fldr);
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
if (!File.Exists(fldr + "\\gta5.exe"))
|
||||
{
|
||||
MessageBox.Show("GTA5.exe not found in folder:\n" + fldr);
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
Settings.Default.GTAFolder = fldr; //seems ok, save it for later
|
||||
|
||||
|
||||
|
||||
|
||||
MetaName[] texsamplers = RenderableGeometry.GetTextureSamplerList();
|
||||
foreach (var texsampler in texsamplers)
|
||||
|
@ -130,7 +130,7 @@ namespace CodeWalker.Forms
|
||||
{
|
||||
if (string.IsNullOrEmpty(FileName)) saveAs = true;
|
||||
if (string.IsNullOrEmpty(FilePath)) saveAs = true;
|
||||
else if ((FilePath.ToLowerInvariant().StartsWith(Settings.Default.GTAFolder.ToLowerInvariant()))) saveAs = true;
|
||||
else if ((FilePath.ToLowerInvariant().StartsWith(GTAFolder.CurrentGTAFolder.ToLowerInvariant()))) saveAs = true;
|
||||
if (!File.Exists(FilePath)) saveAs = true;
|
||||
|
||||
var fn = FilePath;
|
||||
|
@ -155,7 +155,7 @@ namespace CodeWalker.Forms
|
||||
{
|
||||
if (string.IsNullOrEmpty(FileName)) saveAs = true;
|
||||
if (string.IsNullOrEmpty(FilePath)) saveAs = true;
|
||||
else if ((FilePath.ToLowerInvariant().StartsWith(Settings.Default.GTAFolder.ToLowerInvariant()))) saveAs = true;
|
||||
else if ((FilePath.ToLowerInvariant().StartsWith(GTAFolder.CurrentGTAFolder.ToLowerInvariant()))) saveAs = true;
|
||||
if (!File.Exists(FilePath)) saveAs = true;
|
||||
|
||||
var fn = FilePath;
|
||||
|
@ -121,7 +121,7 @@ namespace CodeWalker.GameFiles
|
||||
RpfMan = new RpfManager();
|
||||
RpfMan.ExcludePaths = GetExcludePaths();
|
||||
RpfMan.EnableMods = EnableMods;
|
||||
RpfMan.Init(Settings.Default.GTAFolder, UpdateStatus, ErrorLog);//, true);
|
||||
RpfMan.Init(GTAFolder.CurrentGTAFolder, UpdateStatus, ErrorLog);//, true);
|
||||
|
||||
//RE test area!
|
||||
//DecodeRelFiles();
|
||||
|
@ -36,7 +36,7 @@ namespace CodeWalker
|
||||
{
|
||||
Task.Run(() =>
|
||||
{
|
||||
GTA5Keys.LoadFromPath(Settings.Default.GTAFolder);
|
||||
GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder);
|
||||
GameFileCache gfc = new GameFileCache();
|
||||
gfc.DoFullStringIndex = true;
|
||||
gfc.Init(UpdateStatus, UpdateStatus);
|
||||
|
@ -40,7 +40,7 @@ namespace CodeWalker
|
||||
// Always check the GTA folder first thing
|
||||
if (!GTAFolder.UpdateGTAFolder(Properties.Settings.Default.RememberGTAFolder))
|
||||
{
|
||||
MessageBox.Show("Could not load CodeWalker because no GTA 5 folder was selected. CodeWalker will now exit.", "GTA 5 Folder Not Found", MessageBoxButtons.OK, MessageBoxIcon.Stop);
|
||||
MessageBox.Show("Could not load CodeWalker because no valid GTA 5 folder was selected. CodeWalker will now exit.", "GTA 5 Folder Not Found", MessageBoxButtons.OK, MessageBoxIcon.Stop);
|
||||
return;
|
||||
}
|
||||
#if !DEBUG
|
||||
|
@ -25,7 +25,7 @@ namespace CodeWalker
|
||||
|
||||
private void SelectFolderForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
FolderTextBox.Text = Settings.Default.GTAFolder;
|
||||
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||
RememberFolderCheckbox.Checked = Settings.Default.RememberGTAFolder;
|
||||
}
|
||||
|
||||
|
28
SettingsForm.Designer.cs
generated
28
SettingsForm.Designer.cs
generated
@ -32,6 +32,7 @@
|
||||
this.MainTabControl = new System.Windows.Forms.TabControl();
|
||||
this.ControlsTabPage = new System.Windows.Forms.TabPage();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.MouseInvertCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
@ -79,8 +80,6 @@
|
||||
this.DoneButton = new System.Windows.Forms.Button();
|
||||
this.SaveButton = new System.Windows.Forms.Button();
|
||||
this.ResetButton = new System.Windows.Forms.Button();
|
||||
this.FolderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog();
|
||||
this.MouseInvertCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.MainTabControl.SuspendLayout();
|
||||
this.ControlsTabPage.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
@ -140,6 +139,17 @@
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "Mouse settings";
|
||||
//
|
||||
// MouseInvertCheckBox
|
||||
//
|
||||
this.MouseInvertCheckBox.AutoSize = true;
|
||||
this.MouseInvertCheckBox.Location = new System.Drawing.Point(240, 55);
|
||||
this.MouseInvertCheckBox.Name = "MouseInvertCheckBox";
|
||||
this.MouseInvertCheckBox.Size = new System.Drawing.Size(118, 17);
|
||||
this.MouseInvertCheckBox.TabIndex = 9;
|
||||
this.MouseInvertCheckBox.Text = "Invert mouse Y axis";
|
||||
this.MouseInvertCheckBox.UseVisualStyleBackColor = true;
|
||||
this.MouseInvertCheckBox.CheckedChanged += new System.EventHandler(this.MouseInvertCheckBox_CheckedChanged);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
@ -739,9 +749,9 @@
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.FolderTextBox.Location = new System.Drawing.Point(110, 28);
|
||||
this.FolderTextBox.Name = "FolderTextBox";
|
||||
this.FolderTextBox.ReadOnly = true;
|
||||
this.FolderTextBox.Size = new System.Drawing.Size(303, 20);
|
||||
this.FolderTextBox.TabIndex = 48;
|
||||
this.FolderTextBox.TextChanged += new System.EventHandler(this.FolderTextBox_TextChanged);
|
||||
//
|
||||
// label5
|
||||
//
|
||||
@ -785,17 +795,6 @@
|
||||
this.ResetButton.UseVisualStyleBackColor = true;
|
||||
this.ResetButton.Click += new System.EventHandler(this.ResetButton_Click);
|
||||
//
|
||||
// MouseInvertCheckBox
|
||||
//
|
||||
this.MouseInvertCheckBox.AutoSize = true;
|
||||
this.MouseInvertCheckBox.Location = new System.Drawing.Point(240, 55);
|
||||
this.MouseInvertCheckBox.Name = "MouseInvertCheckBox";
|
||||
this.MouseInvertCheckBox.Size = new System.Drawing.Size(118, 17);
|
||||
this.MouseInvertCheckBox.TabIndex = 9;
|
||||
this.MouseInvertCheckBox.Text = "Invert mouse Y axis";
|
||||
this.MouseInvertCheckBox.UseVisualStyleBackColor = true;
|
||||
this.MouseInvertCheckBox.CheckedChanged += new System.EventHandler(this.MouseInvertCheckBox_CheckedChanged);
|
||||
//
|
||||
// SettingsForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@ -857,7 +856,6 @@
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Button FolderBrowseButton;
|
||||
private System.Windows.Forms.TextBox FolderTextBox;
|
||||
private System.Windows.Forms.FolderBrowserDialog FolderBrowserDialog;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.NumericUpDown ShadowCascadesUpDown;
|
||||
private System.Windows.Forms.Label label7;
|
||||
|
@ -71,7 +71,7 @@ namespace CodeWalker
|
||||
}
|
||||
private void LoadAdvancedSettings()
|
||||
{
|
||||
FolderTextBox.Text = Settings.Default.GTAFolder;
|
||||
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||
ExcludeFoldersTextBox.Text = Settings.Default.ExcludeFolders;
|
||||
ShadowCascadesUpDown.Value = Settings.Default.ShadowCascades;
|
||||
CacheSizeUpDown.Value = Math.Min(Math.Max(Settings.Default.CacheSize / 1048576, CacheSizeUpDown.Minimum), CacheSizeUpDown.Maximum);
|
||||
@ -270,21 +270,10 @@ namespace CodeWalker
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void FolderTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
Settings.Default.GTAFolder = FolderTextBox.Text;
|
||||
}
|
||||
|
||||
private void FolderBrowseButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
FolderBrowserDialog.SelectedPath = Settings.Default.GTAFolder;
|
||||
DialogResult res = FolderBrowserDialog.ShowDialog();
|
||||
if (res == DialogResult.OK)
|
||||
{
|
||||
FolderTextBox.Text = FolderBrowserDialog.SelectedPath;
|
||||
}
|
||||
GTAFolder.UpdateGTAFolder(false);
|
||||
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||
}
|
||||
|
||||
private void ExcludeFoldersTextBox_TextChanged(object sender, EventArgs e)
|
||||
|
@ -117,9 +117,6 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="FolderBrowserDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
|
@ -49,6 +49,7 @@ namespace CodeWalker
|
||||
return true;
|
||||
}
|
||||
|
||||
string origFolder = CurrentGTAFolder;
|
||||
string folder = CurrentGTAFolder;
|
||||
SelectFolderForm f = new SelectFolderForm();
|
||||
f.ShowDialog();
|
||||
@ -61,7 +62,10 @@ namespace CodeWalker
|
||||
if(ValidateGTAFolder(folder, out failReason))
|
||||
{
|
||||
SetGTAFolder(folder);
|
||||
MessageBox.Show($"Successfully set GTA Folder to \"{folder}\"", "Set GTA Folder", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
if(folder != origFolder)
|
||||
{
|
||||
MessageBox.Show($"Successfully changed GTA Folder to \"{folder}\"", "Set GTA Folder", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
return true;
|
||||
} else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user