mirror of
https://github.com/originalnicodr/CinematicUnityExplorer.git
synced 2025-07-18 17:38:01 +08:00
Added setting to toggle menu UI autoscaling off, and allow the timescale input field to accept values above the slider maximum.
This commit is contained in:
@ -29,6 +29,7 @@ namespace UnityExplorer.Config
|
||||
public static ConfigElement<string> CSConsole_Assembly_Blacklist;
|
||||
public static ConfigElement<string> Reflection_Signature_Blacklist;
|
||||
public static ConfigElement<bool> Reflection_Hide_NativeInfoPtrs;
|
||||
public static ConfigElement<bool> Auto_Scale_UI;
|
||||
|
||||
public static ConfigElement<bool> Default_Gameplay_Freecam;
|
||||
public static ConfigElement<KeyCode> Pause;
|
||||
@ -180,6 +181,10 @@ namespace UnityExplorer.Config
|
||||
"For example, this will hide 'Class.NativeFieldInfoPtr_value' for the field 'Class.value'.",
|
||||
false);
|
||||
|
||||
Auto_Scale_UI = new("Make the mod UI automatically scale with resolution",
|
||||
"Especially useful when running games in high resolutions and you are having a hard time reading the mods menu (requires restart).",
|
||||
true);
|
||||
|
||||
Default_Gameplay_Freecam = new("Default Gameplay Freecam",
|
||||
"Turn this on if you want the default gameplay freecam toggle on the Freecam panel to be on on startup.",
|
||||
false);
|
||||
|
@ -80,7 +80,7 @@ namespace UnityExplorer
|
||||
|
||||
KeypressListener.Setup();
|
||||
|
||||
MakeUEUIScale();
|
||||
if (ConfigManager.Auto_Scale_UI.Value) MakeUEUIScale();
|
||||
}
|
||||
|
||||
internal static void Update()
|
||||
|
@ -74,13 +74,21 @@ namespace UnityExplorer.UI.Widgets
|
||||
{
|
||||
if (float.TryParse(val, out float f))
|
||||
{
|
||||
if (f < slider.minValue || f > slider.maxValue){
|
||||
if (f < slider.minValue){
|
||||
ExplorerCore.LogWarning("Error, new time scale value outside of margins.");
|
||||
timeInput.Text = desiredTime.ToString("0.00");
|
||||
return;
|
||||
}
|
||||
|
||||
slider.value = f; // Will update the desiredTime value and extra things
|
||||
// Allow registering timescale values above the slider max value
|
||||
if (f > slider.maxValue) {
|
||||
desiredTime = f;
|
||||
pause = false;
|
||||
previousDesiredTime = desiredTime;
|
||||
}
|
||||
else {
|
||||
slider.value = f; // Will update the desiredTime value and extra things
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user