mirror of
https://github.com/Novetus/Novetus_src.git
synced 2025-01-31 17:53:01 +02:00
renamed some ini vars. make help messages global in asset sdk
This commit is contained in:
parent
2d7cca55d0
commit
e6564c4ac9
@ -56,7 +56,7 @@ public class FileFormat
|
||||
RobloxPort = 53640;
|
||||
PlayerLimit = 12;
|
||||
UPnP = false;
|
||||
DisabledItemMakerHelp = false;
|
||||
DisabledAssetSDKHelp = false;
|
||||
DiscordPresence = true;
|
||||
MapPath = "";
|
||||
MapPathSnip = "";
|
||||
@ -66,7 +66,7 @@ public class FileFormat
|
||||
LauncherStyle = Settings.Style.Stylish;
|
||||
ReShadeFPSDisplay = false;
|
||||
ReShadePerformanceMode = false;
|
||||
AssetLocalizerSaveBackups = true;
|
||||
AssetSDKFixerSaveBackups = true;
|
||||
AlternateServerIP = "";
|
||||
DisableReshadeDelete = false;
|
||||
ShowServerNotifications = true;
|
||||
@ -87,7 +87,7 @@ public class FileFormat
|
||||
public int RobloxPort { get; set; }
|
||||
public int PlayerLimit { get; set; }
|
||||
public bool UPnP { get; set; }
|
||||
public bool DisabledItemMakerHelp { get; set; }
|
||||
public bool DisabledAssetSDKHelp { get; set; }
|
||||
public bool DiscordPresence { get; set; }
|
||||
public string MapPath { get; set; }
|
||||
public string MapPathSnip { get; set; }
|
||||
@ -97,7 +97,7 @@ public class FileFormat
|
||||
public Settings.Style LauncherStyle { get; set; }
|
||||
public bool ReShadeFPSDisplay { get; set; }
|
||||
public bool ReShadePerformanceMode { get; set; }
|
||||
public bool AssetLocalizerSaveBackups { get; set; }
|
||||
public bool AssetSDKFixerSaveBackups { get; set; }
|
||||
public string AlternateServerIP { get; set; }
|
||||
public bool DisableReshadeDelete { get; set; }
|
||||
public bool ShowServerNotifications { get; set; }
|
||||
|
@ -1,5 +1,6 @@
|
||||
#region Usings
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
#endregion
|
||||
@ -38,7 +39,7 @@ public class INIFile
|
||||
/// Value Name
|
||||
public void IniWriteValue(string Section, string Key, string Value)
|
||||
{
|
||||
WritePrivateProfileString(Section, Key, Value, this.path);
|
||||
WritePrivateProfileString(Section, Key, Value, path);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -54,7 +55,7 @@ public class INIFile
|
||||
{
|
||||
StringBuilder temp = new StringBuilder(255);
|
||||
int i = GetPrivateProfileString(Section, Key, "", temp,
|
||||
255, this.path);
|
||||
255, path);
|
||||
return temp.ToString();
|
||||
}
|
||||
#if URI || LAUNCHER || CMD || BASICLAUNCHER
|
||||
@ -69,5 +70,33 @@ public class INIFile
|
||||
return IniReadValue(Section, Key);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IniValueExists(string SearchString)
|
||||
{
|
||||
try
|
||||
{
|
||||
string[] lines = File.ReadAllLines(path);
|
||||
|
||||
foreach(string line in lines)
|
||||
{
|
||||
if (line.Contains(SearchString))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#if URI || LAUNCHER || CMD || BASICLAUNCHER
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
#else
|
||||
catch (Exception)
|
||||
{
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
@ -122,6 +122,48 @@ public class GlobalFuncs
|
||||
}
|
||||
}
|
||||
|
||||
public static string ConfigUseOldValIfExists(INIFile ini, string section, string oldKey, string newKey, string val, bool write)
|
||||
{
|
||||
if (write)
|
||||
{
|
||||
if (!ini.IniValueExists(newKey))
|
||||
{
|
||||
if (GlobalVars.UserConfiguration.InitialBootup)
|
||||
{
|
||||
if (ini.IniValueExists(oldKey))
|
||||
{
|
||||
ini.IniWriteValue(section, oldKey, val);
|
||||
}
|
||||
else
|
||||
{
|
||||
ini.IniWriteValue(section, newKey, val);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ini.IniWriteValue(section, oldKey, val);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ini.IniWriteValue(section, newKey, val);
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ini.IniValueExists(newKey))
|
||||
{
|
||||
return ini.IniReadValue(section, newKey, val);
|
||||
}
|
||||
else
|
||||
{
|
||||
return ini.IniReadValue(section, oldKey, val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void Config(string cfgpath, bool write)
|
||||
{
|
||||
if (write)
|
||||
@ -139,7 +181,6 @@ public class GlobalFuncs
|
||||
ini.IniWriteValue(section, "RobloxPort", GlobalVars.UserConfiguration.RobloxPort.ToString());
|
||||
ini.IniWriteValue(section, "PlayerLimit", GlobalVars.UserConfiguration.PlayerLimit.ToString());
|
||||
ini.IniWriteValue(section, "UPnP", GlobalVars.UserConfiguration.UPnP.ToString());
|
||||
ini.IniWriteValue(section, "ItemMakerDisableHelpMessage", GlobalVars.UserConfiguration.DisabledItemMakerHelp.ToString());
|
||||
ini.IniWriteValue(section, "DiscordRichPresence", GlobalVars.UserConfiguration.DiscordPresence.ToString());
|
||||
ini.IniWriteValue(section, "MapPath", GlobalVars.UserConfiguration.MapPath.ToString());
|
||||
ini.IniWriteValue(section, "MapPathSnip", GlobalVars.UserConfiguration.MapPathSnip.ToString());
|
||||
@ -147,7 +188,6 @@ public class GlobalFuncs
|
||||
ini.IniWriteValue(section, "ReShade", GlobalVars.UserConfiguration.ReShade.ToString());
|
||||
ini.IniWriteValue(section, "QualityLevel", ((int)GlobalVars.UserConfiguration.QualityLevel).ToString());
|
||||
ini.IniWriteValue(section, "Style", ((int)GlobalVars.UserConfiguration.LauncherStyle).ToString());
|
||||
ini.IniWriteValue(section, "AssetLocalizerSaveBackups", GlobalVars.UserConfiguration.AssetLocalizerSaveBackups.ToString());
|
||||
ini.IniWriteValue(section, "AlternateServerIP", GlobalVars.UserConfiguration.AlternateServerIP.ToString());
|
||||
ini.IniWriteValue(section, "DisableReshadeDelete", GlobalVars.UserConfiguration.DisableReshadeDelete.ToString());
|
||||
ini.IniWriteValue(section, "ShowServerNotifications", GlobalVars.UserConfiguration.ShowServerNotifications.ToString());
|
||||
@ -157,6 +197,8 @@ public class GlobalFuncs
|
||||
ini.IniWriteValue(section, "InitialBootup", GlobalVars.UserConfiguration.InitialBootup.ToString());
|
||||
ini.IniWriteValue(section, "FirstServerLaunch", GlobalVars.UserConfiguration.FirstServerLaunch.ToString());
|
||||
ini.IniWriteValue(section, "NewGUI", GlobalVars.UserConfiguration.NewGUI.ToString());
|
||||
ConfigUseOldValIfExists(ini, section, "ItemMakerDisableHelpMessage", "AssetSDKDisableHelpMessage", GlobalVars.UserConfiguration.DisabledAssetSDKHelp.ToString(), write);
|
||||
ConfigUseOldValIfExists(ini, section, "AssetLocalizerSaveBackups", "AssetSDKFixerSaveBackups", GlobalVars.UserConfiguration.AssetSDKFixerSaveBackups.ToString(), write);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -182,7 +224,6 @@ public class GlobalFuncs
|
||||
port = ini.IniReadValue(section, "RobloxPort", GlobalVars.UserConfiguration.RobloxPort.ToString());
|
||||
limit = ini.IniReadValue(section, "PlayerLimit", GlobalVars.UserConfiguration.PlayerLimit.ToString());
|
||||
upnp = ini.IniReadValue(section, "UPnP", GlobalVars.UserConfiguration.UPnP.ToString());
|
||||
disablehelpmessage = ini.IniReadValue(section, "ItemMakerDisableHelpMessage", GlobalVars.UserConfiguration.DisabledItemMakerHelp.ToString());
|
||||
discord = ini.IniReadValue(section, "DiscordRichPresence", GlobalVars.UserConfiguration.DiscordPresence.ToString());
|
||||
mappath = ini.IniReadValue(section, "MapPath", GlobalVars.UserConfiguration.MapPath.ToString());
|
||||
mapsnip = ini.IniReadValue(section, "MapPathSnip", GlobalVars.UserConfiguration.MapPathSnip.ToString());
|
||||
@ -190,7 +231,6 @@ public class GlobalFuncs
|
||||
reshade = ini.IniReadValue(section, "ReShade", GlobalVars.UserConfiguration.ReShade.ToString());
|
||||
qualitylevel = ini.IniReadValue(section, "QualityLevel", ((int)GlobalVars.UserConfiguration.QualityLevel).ToString());
|
||||
style = ini.IniReadValue(section, "Style", ((int)GlobalVars.UserConfiguration.LauncherStyle).ToString());
|
||||
savebackups = ini.IniReadValue(section, "AssetLocalizerSaveBackups", GlobalVars.UserConfiguration.AssetLocalizerSaveBackups.ToString());
|
||||
altIP = ini.IniReadValue(section, "AlternateServerIP", GlobalVars.UserConfiguration.AlternateServerIP.ToString());
|
||||
disReshadeDel = ini.IniReadValue(section, "DisableReshadeDelete", GlobalVars.UserConfiguration.DisableReshadeDelete.ToString());
|
||||
showNotifs = ini.IniReadValue(section, "ShowServerNotifications", GlobalVars.UserConfiguration.ShowServerNotifications.ToString());
|
||||
@ -200,13 +240,15 @@ public class GlobalFuncs
|
||||
initialBootup = ini.IniReadValue(section, "InitialBootup", GlobalVars.UserConfiguration.InitialBootup.ToString());
|
||||
firstServerLaunch = ini.IniReadValue(section, "FirstServerLaunch", GlobalVars.UserConfiguration.FirstServerLaunch.ToString());
|
||||
newgui = ini.IniReadValue(section, "NewGUI", GlobalVars.UserConfiguration.NewGUI.ToString());
|
||||
disablehelpmessage = ConfigUseOldValIfExists(ini, section, "ItemMakerDisableHelpMessage", "AssetSDKDisableHelpMessage", GlobalVars.UserConfiguration.DisabledAssetSDKHelp.ToString(), write);
|
||||
savebackups = ConfigUseOldValIfExists(ini, section, "AssetLocalizerSaveBackups", "AssetSDKFixerSaveBackups", GlobalVars.UserConfiguration.AssetSDKFixerSaveBackups.ToString(), write);
|
||||
|
||||
GlobalVars.UserConfiguration.CloseOnLaunch = Convert.ToBoolean(closeonlaunch);
|
||||
|
||||
if (userid.Equals("0"))
|
||||
{
|
||||
GeneratePlayerID();
|
||||
Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true);
|
||||
Config(cfgpath, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -219,14 +261,14 @@ public class GlobalFuncs
|
||||
GlobalVars.UserConfiguration.RobloxPort = Convert.ToInt32(port);
|
||||
GlobalVars.UserConfiguration.PlayerLimit = Convert.ToInt32(limit);
|
||||
GlobalVars.UserConfiguration.UPnP = Convert.ToBoolean(upnp);
|
||||
GlobalVars.UserConfiguration.DisabledItemMakerHelp = Convert.ToBoolean(disablehelpmessage);
|
||||
GlobalVars.UserConfiguration.DisabledAssetSDKHelp = Convert.ToBoolean(disablehelpmessage);
|
||||
GlobalVars.UserConfiguration.DiscordPresence = Convert.ToBoolean(discord);
|
||||
GlobalVars.UserConfiguration.MapPathSnip = mapsnip;
|
||||
GlobalVars.UserConfiguration.GraphicsMode = (Settings.Mode)Convert.ToInt32(graphics);
|
||||
GlobalVars.UserConfiguration.ReShade = Convert.ToBoolean(reshade);
|
||||
GlobalVars.UserConfiguration.QualityLevel = (Settings.Level)Convert.ToInt32(qualitylevel);
|
||||
GlobalVars.UserConfiguration.LauncherStyle = (Settings.Style)Convert.ToInt32(style);
|
||||
GlobalVars.UserConfiguration.AssetLocalizerSaveBackups = Convert.ToBoolean(savebackups);
|
||||
GlobalVars.UserConfiguration.AssetSDKFixerSaveBackups = Convert.ToBoolean(savebackups);
|
||||
GlobalVars.UserConfiguration.AlternateServerIP = altIP;
|
||||
GlobalVars.UserConfiguration.DisableReshadeDelete = Convert.ToBoolean(disReshadeDel);
|
||||
GlobalVars.UserConfiguration.ShowServerNotifications = Convert.ToBoolean(showNotifs);
|
||||
|
@ -45,6 +45,7 @@
|
||||
this.URLListLabel = new System.Windows.Forms.Label();
|
||||
this.URLSelection = new System.Windows.Forms.ComboBox();
|
||||
this.AssetLocalization = new System.Windows.Forms.GroupBox();
|
||||
this.AssetLocalization_AssetLinks = new System.Windows.Forms.CheckBox();
|
||||
this.AssetLocalization_LocalizePermanentlyBox = new System.Windows.Forms.CheckBox();
|
||||
this.AssetLocalization_SaveBackups = new System.Windows.Forms.CheckBox();
|
||||
this.AssetLocalization_StatusBar = new System.Windows.Forms.ProgressBar();
|
||||
@ -63,7 +64,6 @@
|
||||
this.MeshConverter_CreditText = new System.Windows.Forms.Label();
|
||||
this.MeshConverter_ConvertButton = new System.Windows.Forms.Button();
|
||||
this.AssetLocalization_BackgroundWorker = new System.ComponentModel.BackgroundWorker();
|
||||
this.AssetLocalization_AssetLinks = new System.Windows.Forms.CheckBox();
|
||||
this.AssetDownloader.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.AssetDownloader_AssetVersionSelector)).BeginInit();
|
||||
this.AssetLocalization.SuspendLayout();
|
||||
@ -78,13 +78,12 @@
|
||||
this.AssetDownloader.Controls.Add(this.AssetDownloaderBatch_BatchIDBox);
|
||||
this.AssetDownloader.Controls.Add(this.AssetDownloader_AssetNameBox);
|
||||
this.AssetDownloader.Controls.Add(this.AssetDownloader_AssetNameText);
|
||||
this.AssetDownloader.Controls.Add(this.AssetDownloader_LoadHelpMessage);
|
||||
this.AssetDownloader.Controls.Add(this.AssetDownloader_AssetVersionText);
|
||||
this.AssetDownloader.Controls.Add(this.AssetDownloader_AssetIDText);
|
||||
this.AssetDownloader.Controls.Add(this.AssetDownloader_AssetVersionSelector);
|
||||
this.AssetDownloader.Controls.Add(this.AssetDownloader_AssetIDBox);
|
||||
this.AssetDownloader.Controls.Add(this.AssetDownloader_AssetDownloaderButton);
|
||||
this.AssetDownloader.Location = new System.Drawing.Point(12, 38);
|
||||
this.AssetDownloader.Location = new System.Drawing.Point(12, 62);
|
||||
this.AssetDownloader.Name = "AssetDownloader";
|
||||
this.AssetDownloader.Size = new System.Drawing.Size(260, 332);
|
||||
this.AssetDownloader.TabIndex = 0;
|
||||
@ -95,7 +94,7 @@
|
||||
//
|
||||
this.AssetDownloaderBatch_Note.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.AssetDownloaderBatch_Note.ForeColor = System.Drawing.Color.Red;
|
||||
this.AssetDownloaderBatch_Note.Location = new System.Drawing.Point(12, 113);
|
||||
this.AssetDownloaderBatch_Note.Location = new System.Drawing.Point(14, 85);
|
||||
this.AssetDownloaderBatch_Note.Name = "AssetDownloaderBatch_Note";
|
||||
this.AssetDownloaderBatch_Note.Size = new System.Drawing.Size(236, 42);
|
||||
this.AssetDownloaderBatch_Note.TabIndex = 23;
|
||||
@ -119,9 +118,9 @@
|
||||
//
|
||||
// AssetDownloader_BatchMode
|
||||
//
|
||||
this.AssetDownloader_BatchMode.Location = new System.Drawing.Point(163, 86);
|
||||
this.AssetDownloader_BatchMode.Location = new System.Drawing.Point(164, 57);
|
||||
this.AssetDownloader_BatchMode.Name = "AssetDownloader_BatchMode";
|
||||
this.AssetDownloader_BatchMode.Size = new System.Drawing.Size(96, 24);
|
||||
this.AssetDownloader_BatchMode.Size = new System.Drawing.Size(90, 23);
|
||||
this.AssetDownloader_BatchMode.TabIndex = 22;
|
||||
this.AssetDownloader_BatchMode.Text = "Batch Mode";
|
||||
this.AssetDownloader_BatchMode.UseVisualStyleBackColor = true;
|
||||
@ -130,11 +129,11 @@
|
||||
// AssetDownloaderBatch_BatchIDBox
|
||||
//
|
||||
this.AssetDownloaderBatch_BatchIDBox.Enabled = false;
|
||||
this.AssetDownloaderBatch_BatchIDBox.Location = new System.Drawing.Point(7, 161);
|
||||
this.AssetDownloaderBatch_BatchIDBox.Location = new System.Drawing.Point(8, 132);
|
||||
this.AssetDownloaderBatch_BatchIDBox.Multiline = true;
|
||||
this.AssetDownloaderBatch_BatchIDBox.Name = "AssetDownloaderBatch_BatchIDBox";
|
||||
this.AssetDownloaderBatch_BatchIDBox.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||
this.AssetDownloaderBatch_BatchIDBox.Size = new System.Drawing.Size(242, 151);
|
||||
this.AssetDownloaderBatch_BatchIDBox.Size = new System.Drawing.Size(242, 180);
|
||||
this.AssetDownloaderBatch_BatchIDBox.TabIndex = 0;
|
||||
//
|
||||
// AssetDownloader_AssetNameBox
|
||||
@ -154,7 +153,7 @@
|
||||
//
|
||||
// AssetDownloader_LoadHelpMessage
|
||||
//
|
||||
this.AssetDownloader_LoadHelpMessage.Location = new System.Drawing.Point(12, 86);
|
||||
this.AssetDownloader_LoadHelpMessage.Location = new System.Drawing.Point(204, 38);
|
||||
this.AssetDownloader_LoadHelpMessage.Name = "AssetDownloader_LoadHelpMessage";
|
||||
this.AssetDownloader_LoadHelpMessage.Size = new System.Drawing.Size(145, 24);
|
||||
this.AssetDownloader_LoadHelpMessage.TabIndex = 19;
|
||||
@ -202,7 +201,7 @@
|
||||
//
|
||||
this.AssetDownloader_AssetDownloaderButton.Location = new System.Drawing.Point(12, 57);
|
||||
this.AssetDownloader_AssetDownloaderButton.Name = "AssetDownloader_AssetDownloaderButton";
|
||||
this.AssetDownloader_AssetDownloaderButton.Size = new System.Drawing.Size(242, 23);
|
||||
this.AssetDownloader_AssetDownloaderButton.Size = new System.Drawing.Size(149, 23);
|
||||
this.AssetDownloader_AssetDownloaderButton.TabIndex = 13;
|
||||
this.AssetDownloader_AssetDownloaderButton.Text = "Download!";
|
||||
this.AssetDownloader_AssetDownloaderButton.UseVisualStyleBackColor = true;
|
||||
@ -260,13 +259,24 @@
|
||||
this.AssetLocalization.Controls.Add(this.AssetLocalization_StatusText);
|
||||
this.AssetLocalization.Controls.Add(this.AssetLocalization_AssetTypeBox);
|
||||
this.AssetLocalization.Controls.Add(this.AssetLocalization_LocalizeButton);
|
||||
this.AssetLocalization.Location = new System.Drawing.Point(278, 152);
|
||||
this.AssetLocalization.Location = new System.Drawing.Point(278, 176);
|
||||
this.AssetLocalization.Name = "AssetLocalization";
|
||||
this.AssetLocalization.Size = new System.Drawing.Size(267, 218);
|
||||
this.AssetLocalization.TabIndex = 1;
|
||||
this.AssetLocalization.TabStop = false;
|
||||
this.AssetLocalization.Text = "Asset Fixer";
|
||||
//
|
||||
// AssetLocalization_AssetLinks
|
||||
//
|
||||
this.AssetLocalization_AssetLinks.AutoSize = true;
|
||||
this.AssetLocalization_AssetLinks.Location = new System.Drawing.Point(22, 119);
|
||||
this.AssetLocalization_AssetLinks.Name = "AssetLocalization_AssetLinks";
|
||||
this.AssetLocalization_AssetLinks.Size = new System.Drawing.Size(215, 17);
|
||||
this.AssetLocalization_AssetLinks.TabIndex = 22;
|
||||
this.AssetLocalization_AssetLinks.Text = "Replace Asset Links with Selected URL";
|
||||
this.AssetLocalization_AssetLinks.UseVisualStyleBackColor = true;
|
||||
this.AssetLocalization_AssetLinks.CheckedChanged += new System.EventHandler(this.AssetLocalization_AssetLinks_CheckedChanged);
|
||||
//
|
||||
// AssetLocalization_LocalizePermanentlyBox
|
||||
//
|
||||
this.AssetLocalization_LocalizePermanentlyBox.AutoSize = true;
|
||||
@ -390,7 +400,7 @@
|
||||
this.MeshConverter.Controls.Add(this.MeshConverter_MeshVersionText);
|
||||
this.MeshConverter.Controls.Add(this.MeshConverter_CreditText);
|
||||
this.MeshConverter.Controls.Add(this.MeshConverter_ConvertButton);
|
||||
this.MeshConverter.Location = new System.Drawing.Point(278, 38);
|
||||
this.MeshConverter.Location = new System.Drawing.Point(278, 62);
|
||||
this.MeshConverter.Name = "MeshConverter";
|
||||
this.MeshConverter.Size = new System.Drawing.Size(262, 106);
|
||||
this.MeshConverter.TabIndex = 2;
|
||||
@ -456,29 +466,19 @@
|
||||
this.AssetLocalization_BackgroundWorker.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.AssetLocalization_BackgroundWorker_ProgressChanged);
|
||||
this.AssetLocalization_BackgroundWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.AssetLocalization_BackgroundWorker_RunWorkerCompleted);
|
||||
//
|
||||
// AssetLocalization_AssetLinks
|
||||
//
|
||||
this.AssetLocalization_AssetLinks.AutoSize = true;
|
||||
this.AssetLocalization_AssetLinks.Location = new System.Drawing.Point(22, 119);
|
||||
this.AssetLocalization_AssetLinks.Name = "AssetLocalization_AssetLinks";
|
||||
this.AssetLocalization_AssetLinks.Size = new System.Drawing.Size(215, 17);
|
||||
this.AssetLocalization_AssetLinks.TabIndex = 22;
|
||||
this.AssetLocalization_AssetLinks.Text = "Replace Asset Links with Selected URL";
|
||||
this.AssetLocalization_AssetLinks.UseVisualStyleBackColor = true;
|
||||
this.AssetLocalization_AssetLinks.CheckedChanged += new System.EventHandler(this.AssetLocalization_AssetLinks_CheckedChanged);
|
||||
//
|
||||
// AssetSDK
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
this.ClientSize = new System.Drawing.Size(557, 382);
|
||||
this.ClientSize = new System.Drawing.Size(557, 395);
|
||||
this.Controls.Add(this.URLOverrideBox);
|
||||
this.Controls.Add(this.CustomDLURLLabel);
|
||||
this.Controls.Add(this.MeshConverter);
|
||||
this.Controls.Add(this.AssetLocalization);
|
||||
this.Controls.Add(this.URLListLabel);
|
||||
this.Controls.Add(this.AssetDownloader);
|
||||
this.Controls.Add(this.AssetDownloader_LoadHelpMessage);
|
||||
this.Controls.Add(this.URLSelection);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
|
@ -72,10 +72,10 @@ public partial class AssetSDK : Form
|
||||
URLSelection.SelectedItem = URLSelection.Items[0];
|
||||
|
||||
//downloader
|
||||
AssetDownloader_LoadHelpMessage.Checked = GlobalVars.UserConfiguration.DisabledItemMakerHelp;
|
||||
AssetDownloader_LoadHelpMessage.Checked = GlobalVars.UserConfiguration.DisabledAssetSDKHelp;
|
||||
|
||||
//asset localizer
|
||||
AssetLocalization_SaveBackups.Checked = GlobalVars.UserConfiguration.AssetLocalizerSaveBackups;
|
||||
AssetLocalization_SaveBackups.Checked = GlobalVars.UserConfiguration.AssetSDKFixerSaveBackups;
|
||||
AssetLocalization_AssetTypeBox.SelectedItem = "RBXL";
|
||||
AssetLocalization_UsesHatMeshBox.SelectedItem = "None";
|
||||
|
||||
@ -117,7 +117,7 @@ public partial class AssetSDK : Form
|
||||
|
||||
private void URLOverrideBox_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (hasOverrideWarningOpenedOnce == false)
|
||||
if (hasOverrideWarningOpenedOnce == false && !GlobalVars.UserConfiguration.DisabledAssetSDKHelp)
|
||||
{
|
||||
MessageBox.Show("By using the custom URL setting, you will override any selected entry in the default URL list. Keep this in mind before downloading anything with this option.\n\nAlso, the URL must be a asset url with 'asset/?id=' at the end of it in order for the Asset Downloader to work smoothly.", "Novetus Asset SDK - URL Override Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
hasOverrideWarningOpenedOnce = true;
|
||||
@ -169,7 +169,7 @@ public partial class AssetSDK : Form
|
||||
|
||||
if (!iswebsite)
|
||||
{
|
||||
if (!GlobalVars.UserConfiguration.DisabledItemMakerHelp)
|
||||
if (!GlobalVars.UserConfiguration.DisabledAssetSDKHelp)
|
||||
{
|
||||
string helptext = "If you're trying to create a offline item, please use these file extension names when saving your files:\n.rbxm - Roblox Model/Item\n.rbxl - Roblox Place\n.mesh - Roblox Mesh\n.png - Texture/Icon\n.wav - Sound\n.lua - Lua Script";
|
||||
MessageBox.Show(helptext, "Novetus Asset SDK", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
@ -180,7 +180,7 @@ public partial class AssetSDK : Form
|
||||
try
|
||||
{
|
||||
string helptext = "In order for the item to work in Novetus, you'll need to find an icon for your item (it must be a .png file), then name it the same name as your item.\n\nIf you want to create a local (offline) item, use the Asset Localizer in the Asset SDK.\n\nIf you get a corrupted file, change the URL using the drop down box.";
|
||||
download.InitDownload((!GlobalVars.UserConfiguration.DisabledItemMakerHelp) ? helptext : "");
|
||||
download.InitDownload((!GlobalVars.UserConfiguration.DisabledAssetSDKHelp) ? helptext : "");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -323,7 +323,7 @@ public partial class AssetSDK : Form
|
||||
|
||||
private void AssetDownloader_LoadHelpMessage_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
GlobalVars.UserConfiguration.DisabledItemMakerHelp = AssetDownloader_LoadHelpMessage.Checked;
|
||||
GlobalVars.UserConfiguration.DisabledAssetSDKHelp = AssetDownloader_LoadHelpMessage.Checked;
|
||||
}
|
||||
private void AssetDownloader_BatchMode_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
@ -722,7 +722,7 @@ public partial class AssetSDK : Form
|
||||
//assume we're a script
|
||||
if (type == RobloxFileType.Script)
|
||||
{
|
||||
if (GlobalVars.UserConfiguration.AssetLocalizerSaveBackups)
|
||||
if (GlobalVars.UserConfiguration.AssetSDKFixerSaveBackups)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -753,7 +753,7 @@ public partial class AssetSDK : Form
|
||||
{
|
||||
case RobloxFileType.RBXL:
|
||||
//backup the original copy
|
||||
if (GlobalVars.UserConfiguration.AssetLocalizerSaveBackups)
|
||||
if (GlobalVars.UserConfiguration.AssetSDKFixerSaveBackups)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -814,7 +814,7 @@ public partial class AssetSDK : Form
|
||||
worker.ReportProgress(95);
|
||||
break;
|
||||
case RobloxFileType.RBXM:
|
||||
if (GlobalVars.UserConfiguration.AssetLocalizerSaveBackups)
|
||||
if (GlobalVars.UserConfiguration.AssetSDKFixerSaveBackups)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -874,7 +874,7 @@ public partial class AssetSDK : Form
|
||||
worker.ReportProgress(95);
|
||||
break;
|
||||
case RobloxFileType.Hat:
|
||||
if (GlobalVars.UserConfiguration.AssetLocalizerSaveBackups)
|
||||
if (GlobalVars.UserConfiguration.AssetSDKFixerSaveBackups)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -905,7 +905,7 @@ public partial class AssetSDK : Form
|
||||
worker.ReportProgress(95);
|
||||
break;
|
||||
case RobloxFileType.Head:
|
||||
if (GlobalVars.UserConfiguration.AssetLocalizerSaveBackups)
|
||||
if (GlobalVars.UserConfiguration.AssetSDKFixerSaveBackups)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -929,7 +929,7 @@ public partial class AssetSDK : Form
|
||||
worker.ReportProgress(95);
|
||||
break;
|
||||
case RobloxFileType.Face:
|
||||
if (GlobalVars.UserConfiguration.AssetLocalizerSaveBackups)
|
||||
if (GlobalVars.UserConfiguration.AssetSDKFixerSaveBackups)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -952,7 +952,7 @@ public partial class AssetSDK : Form
|
||||
worker.ReportProgress(95);
|
||||
break;
|
||||
case RobloxFileType.TShirt:
|
||||
if (GlobalVars.UserConfiguration.AssetLocalizerSaveBackups)
|
||||
if (GlobalVars.UserConfiguration.AssetSDKFixerSaveBackups)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -975,7 +975,7 @@ public partial class AssetSDK : Form
|
||||
worker.ReportProgress(95);
|
||||
break;
|
||||
case RobloxFileType.Shirt:
|
||||
if (GlobalVars.UserConfiguration.AssetLocalizerSaveBackups)
|
||||
if (GlobalVars.UserConfiguration.AssetSDKFixerSaveBackups)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -998,7 +998,7 @@ public partial class AssetSDK : Form
|
||||
worker.ReportProgress(95);
|
||||
break;
|
||||
case RobloxFileType.Pants:
|
||||
if (GlobalVars.UserConfiguration.AssetLocalizerSaveBackups)
|
||||
if (GlobalVars.UserConfiguration.AssetSDKFixerSaveBackups)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1114,7 +1114,7 @@ public partial class AssetSDK : Form
|
||||
|
||||
private void AssetLocalization_SaveBackups_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
GlobalVars.UserConfiguration.AssetLocalizerSaveBackups = AssetLocalization_SaveBackups.Checked;
|
||||
GlobalVars.UserConfiguration.AssetSDKFixerSaveBackups = AssetLocalization_SaveBackups.Checked;
|
||||
}
|
||||
|
||||
private void AssetLocalization_LocalizeButton_Click(object sender, EventArgs e)
|
||||
@ -1170,7 +1170,7 @@ public partial class AssetSDK : Form
|
||||
|
||||
private void AssetLocalization_LocalizePermanentlyBox_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (AssetLocalization_LocalizePermanentlyBox.Checked)
|
||||
if (AssetLocalization_LocalizePermanentlyBox.Checked && !GlobalVars.UserConfiguration.DisabledAssetSDKHelp)
|
||||
{
|
||||
DialogResult res = MessageBox.Show("If you toggle this option, the Asset SDK will download all localized files directly into your Novetus data, rather than into the Asset Cache. This means you won't be able to clear these files with the 'Clear Asset Cache' option in the Launcher.\n\nWould you like to continue with the option anyways?", "Novetus Asset SDK - Permanent Localization Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
|
||||
if (res == DialogResult.No)
|
||||
@ -1205,10 +1205,12 @@ public partial class AssetSDK : Form
|
||||
{
|
||||
if (AssetLocalization_LocalizePermanentlyBox.Checked)
|
||||
{
|
||||
AssetLocalization_AssetLinks.Enabled = false;
|
||||
SetAssetCachePaths(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
AssetLocalization_AssetLinks.Enabled = true;
|
||||
SetAssetCachePaths();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user