Skip to content

Commit

Permalink
Version 3.0.4 Release.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lumina committed Aug 23, 2023
1 parent eea57c7 commit 9ba0285
Show file tree
Hide file tree
Showing 15 changed files with 91 additions and 71 deletions.
Binary file modified Editor/Packages/Attributes.unitypackage
Binary file not shown.
Binary file modified Editor/Packages/Full Package.unitypackage
Binary file not shown.
Binary file added Editor/Packages/Helpers.unitypackage
Binary file not shown.
7 changes: 7 additions & 0 deletions Editor/Packages/Helpers.unitypackage.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Editor/Packages/Misc.unitypackage
Binary file not shown.
7 changes: 7 additions & 0 deletions Editor/Packages/Misc.unitypackage.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Editor/Packages/Sequencer.unitypackage
Binary file not shown.
Binary file added Editor/Packages/Shortcuts.unitypackage
Binary file not shown.
7 changes: 7 additions & 0 deletions Editor/Packages/Shortcuts.unitypackage.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Editor/UI/Imgs/Footer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Editor/UI/Imgs/Header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions Editor/UI/Utility Panel/Management/StartupChecks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ static void CheckForUpdatesAfterOneWeek()

internal static void DebugBuildWarning()
{
if (!VersionManager.DontShow_DebugBuildWarning && VersionManager.DebugVersion)
if (!VersionManager.SuppressDebugBuildAlert && VersionManager.DebugVersion)
if (EditorUtility.DisplayDialog
("Debug Version", "You are currently using a Debug Version of Lumina's Essentials. " + "\nThis means the application might not work as intended.", "OK"))
{
VersionManager.DontShow_DebugBuildWarning = true;
EditorPrefs.SetBool("DontShowAgain", VersionManager.DontShow_DebugBuildWarning);
VersionManager.SuppressDebugBuildAlert = true;
EditorPrefs.SetBool("DontShowAgain", VersionManager.SuppressDebugBuildAlert);
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions Editor/UI/Utility Panel/Management/VersionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ internal static class VersionManager
"LastOpenVersion",
"UpToDate",
"DebugVersion",
"DontShow_DebugBuildWarning",
"SuppressDebugBuildAlert",
"SetupRequired",
"SafeMode",
"AutoSaveEnabled",
Expand Down Expand Up @@ -45,10 +45,10 @@ internal static string LastOpenVersion

/// <summary> Whether or not the current version is a debug version. </summary>
internal static bool DebugVersion => CurrentVersion.Contains("Debug", StringComparison.OrdinalIgnoreCase);
internal static bool DontShow_DebugBuildWarning
internal static bool SuppressDebugBuildAlert
{
get => EditorPrefs.GetBool("DontShow_DebugBuildWarning");
set => EditorPrefs.SetBool("DontShow_DebugBuildWarning", value);
get => EditorPrefs.GetBool("SuppressDebugBuildAlert");
set => EditorPrefs.SetBool("SuppressDebugBuildAlert", value);
}

internal static void UpdatePrefs()
Expand Down
112 changes: 55 additions & 57 deletions Editor/UI/Utility Panel/Windows/SettingsTab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ void DrawSettingsHeader()
// Draw a horizontal line (separator)
EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);
}

// ReSharper disable Unity.PerformanceAnalysis

/// <summary>
/// Draws the ResetUtilityPanel button onto the Utility Window.
/// </summary>
Expand All @@ -80,16 +79,17 @@ void DrawResetSettingsButton()
if (GUILayout.Button(resetButtonContent, GUILayout.Width(100), GUILayout.Height(35), GUILayout.ExpandWidth(true)))
{
ProcessButtonAction();
return;

void ProcessButtonAction()
{
if (!SafeMode) ConfirmAndResetUtilityPanel();
else DisplaySafeModeWarning();
}
}
}
}

void ProcessButtonAction()
{
if (!SafeMode) ConfirmAndResetUtilityPanel();
else DisplaySafeModeWarning();
}

void ConfirmAndResetUtilityPanel()
{
bool userConfirmed = EditorUtility.DisplayDialog("Confirmation", "Are you sure you want to reset the Utility Window?", "Yes", "No");
Expand Down Expand Up @@ -123,19 +123,19 @@ void DisplaySafeModeWarning()
}

void ResetUtilityPanel()
{ // ResetUtilityPanel the EditorPrefs
{
foreach (string pref in VersionManager.EssentialsPrefs)
{
if (EditorPrefs.HasKey(pref)) EditorPrefs.DeleteKey(pref);
else if (VersionManager.DebugVersion) EssentialsDebugger.LogWarning($"Couldn't find Key: {pref}");
}

// ResetUtilityPanel all Utility Panel variables.
SafeMode = true;
EssentialsDebugger.LogBehaviour = EssentialsDebugger.LogLevel.Verbose;
SetupRequired = !InstalledModules.Values.Any(module => module);
VersionManager.DontShow_DebugBuildWarning = false;
imageConverterPath = string.Empty;
SafeMode = true;
EssentialsDebugger.LogBehaviour = EssentialsDebugger.LogLevel.Verbose;
SetupRequired = !InstalledModules.Values.Any(module => module);
VersionManager.SuppressDebugBuildAlert = false;
imageConverterPath = string.Empty;

EssentialsDebugger.LogWarning("Settings and EditorPrefs have been reset.");

Expand All @@ -154,62 +154,59 @@ void ResetUtilityPanel()
/// </summary>
void DrawAdvancedSettingsGUI()
{ // Displays all the advanced settings.
if (advancedSettings)
{
GUILayout.Label("Debug Options", centerLabelStyle);
GUILayout.Label("Various buttons and settings for debugging.", subLabelStyle);
GUILayout.Space(5);

if (GUILayout.Button("Show All EditorPrefs", GUILayout.Height(30))) ShowAllEditorPrefs();
if (!advancedSettings) return;

GUILayout.Label("Debug Options", centerLabelStyle);
GUILayout.Label("Various buttons and settings for debugging.", subLabelStyle);
GUILayout.Space(5);

#region Deprecated
if (GUILayout.Button("Update Module Packages", GUILayout.Height(30)) && advancedSettings && !SafeMode)
EssentialsDebugger.LogWarning("This feature is deprecated and will be removed in a future update. \n It was once used to update the modules individually.");
if (GUILayout.Button("Show All EditorPrefs", GUILayout.Height(30))) ShowAllEditorPrefs();

//UpdateModulePackages(); // Kept for reference.
#endregion
#region Deprecated
if (GUILayout.Button("Update Module Packages", GUILayout.Height(30)) && advancedSettings && !SafeMode)
EssentialsDebugger.LogWarning("This feature is deprecated and will be removed in a future update. \n It was once used to update the modules individually.");
#endregion

// Draw a horizontal line (separator)
EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);
// Draw a horizontal line (separator)
EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);

// Display the image configuration options
GUILayout.Label("Read-only values", centerLabelStyle);
GUILayout.Label("These are only here for debugging purposes.", subLabelStyle);
GUILayout.Space(5);
// Display the image configuration options
GUILayout.Label("Read-only values", centerLabelStyle);
GUILayout.Label("These are only here for debugging purposes.", subLabelStyle);
GUILayout.Space(5);

// Group of view only fields
EditorGUI.BeginDisabledGroup(true);
// Group of view only fields
EditorGUI.BeginDisabledGroup(true);

// Box view the SetupRequired bool
SetupRequired = EditorGUILayout.Toggle("Setup Required", SetupRequired);
VersionManager.DontShow_DebugBuildWarning = EditorGUILayout.Toggle("Don't Show Debug Alert", VersionManager.DontShow_DebugBuildWarning);
// Box view the SetupRequired bool
SetupRequired = EditorGUILayout.Toggle("Setup Required", SetupRequired);
VersionManager.SuppressDebugBuildAlert = EditorGUILayout.Toggle("SuppressDebugBuildAlert", VersionManager.SuppressDebugBuildAlert);

// Draw a horizontal line (separator)
EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);
// Draw a horizontal line (separator)
EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);

GUILayout.Space(3);
GUILayout.Space(3);

GUILayout.Label("Installed Modules", centerLabelStyle);
GUILayout.Label("These are the modules that are installed.", subLabelStyle);
GUILayout.Label("Installed Modules", centerLabelStyle);
GUILayout.Label("These are the modules that are installed.", subLabelStyle);

GUILayout.Space(5);
GUILayout.Space(5);

// Display the installed modules from the dictionary
foreach (KeyValuePair<string, bool> module in InstalledModules)
{
EditorGUILayout.Toggle(module.Key, module.Value);
// Display the installed modules from the dictionary
foreach (KeyValuePair<string, bool> module in InstalledModules)
{
EditorGUILayout.Toggle(module.Key, module.Value);

if (module.Key == "Full Package")
using (new EditorGUI.DisabledScope(true)) { EditorGUILayout.LabelField("└ Extras"); }
}
if (module.Key != "Full Package") continue;
using (new EditorGUI.DisabledScope(true)) { EditorGUILayout.LabelField("└ Extras"); }
}

EditorGUI.EndDisabledGroup();
EditorGUI.EndDisabledGroup();

GUILayout.Space(10);
GUILayout.Space(10);

// Draw a horizontal line (separator)
EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);
}
// Draw a horizontal line (separator)
EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);
}

/// <summary>
Expand All @@ -229,11 +226,12 @@ void DrawSettingsLabels()

GUILayout.Space(3);

// Displays whether the user is up to date or not
EditorGUILayout.LabelField("Up To Date", EditorPrefs.GetBool("UpToDate").ToString());

// Displays the last version of the Essentials package that was opened
EditorGUILayout.LabelField("Last Open Version", VersionManager.LastOpenVersion);

// Displays whether the user is up to date or not
EditorGUILayout.LabelField("Up To Date", EditorPrefs.GetBool("UpToDate").ToString());

// Displays if this is a debug build or not
EditorGUILayout.LabelField("Debug Version", VersionManager.DebugVersion.ToString());
Expand Down
15 changes: 8 additions & 7 deletions Editor/UI/Utility Panel/Windows/UtilityPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ internal sealed partial class UtilityPanel : EditorWindow
/// <summary> Used to invoke the setup panel when necessary. (Not the main panel) </summary>
Action currentPanel;

/// <summary> Used to determine the tooltip message. </summary>
static bool showTooltip;
/// <summary> Used to determine if the user has checked for updates. Used for the tooltip. </summary>
static bool checkedForUpdates;

/// <summary> Shows the various tooltip messages. </summary>
static string Tooltip
{
Expand Down Expand Up @@ -60,10 +65,6 @@ static string Tooltip
return message;
}
}

/// <summary> Used to determine the tooltip message. </summary>
static bool showTooltip;
static bool checkedForUpdates;
#endregion

[MenuItem("Tools/Lumina/Open Utility Panel")]
Expand Down Expand Up @@ -105,8 +106,8 @@ void Initialization()
currentPanel = DisplayToolbar;

// Displays the header and footer images.
const string headerGUID = "7a1204763dac9b142b9cd974c88fdc8d";
const string footerGUID = "22cbfe0e1e5aa9a46a9bd08709fdcac6";
const string headerGUID = "7a1204763dac9b142b9cd974c88fdc8d"; // grabbed from .meta file in project folder.
const string footerGUID = "22cbfe0e1e5aa9a46a9bd08709fdcac6"; // grabbed from .meta file in project folder.
string headerPath = AssetDatabase.GUIDToAssetPath(headerGUID);
string footerPath = AssetDatabase.GUIDToAssetPath(footerGUID);

Expand Down Expand Up @@ -210,7 +211,7 @@ void DrawSetupGUI()
#region Main Labels (Version, Update Check, etc.)
GUILayout.Label($" Essentials Version: {CurrentVersion}", mainLabelStyle);
GUILayout.Label($" Latest Version: {LatestVersion}", mainLabelStyle);
GUILayout.Label($" Last Update Check: {VersionUpdater.LastUpdateCheck}", mainLabelStyle);
GUILayout.Label($" Last Update Check: {VersionUpdater.LastUpdateCheck}", mainLabelStyle);

// End of Main Labels
#endregion
Expand Down

0 comments on commit 9ba0285

Please sign in to comment.