a few small fixes

* Fix InteractiveFlags toggles not being properly updated
* Fix cases where games that don't have Reflection.Emit would still have the C# Console available. Also added a "(disabled)" message to the tab button.
This commit is contained in:
Sinai
2021-04-06 01:01:46 +10:00
parent c748be7bcc
commit c2d9b9b59e
6 changed files with 12 additions and 9 deletions

View File

@ -94,7 +94,7 @@ namespace UnityExplorer.UI.InteractiveValues
{
base.RefreshUIForValue();
if (m_subContentConstructed)
if (m_subContentConstructed && !(this is InteractiveFlags))
{
m_dropdownText.text = Value?.ToString() ?? "<no value set>";
}

View File

@ -26,8 +26,6 @@ namespace UnityExplorer.UI.InteractiveValues
public override void OnValueUpdated()
{
base.OnValueUpdated();
if (Owner.CanWrite)
{
var enabledNames = new List<string>();
@ -37,10 +35,10 @@ namespace UnityExplorer.UI.InteractiveValues
enabledNames.AddRange(enabled);
for (int i = 0; i < m_values.Length; i++)
{
m_enabledFlags[i] = enabledNames.Contains(m_values[i].Value);
}
}
base.OnValueUpdated();
}
public override void RefreshUIForValue()

View File

@ -59,7 +59,7 @@ namespace UnityExplorer.UI.Main.CSConsole
ResetConsole(false);
// Make sure compiler is supported on this platform
Evaluator.Compile("");
Evaluator.Compile("new object();");
return true;
}
@ -73,6 +73,8 @@ namespace UnityExplorer.UI.Main.CSConsole
ExplorerCore.LogWarning(info);
this.RefNavbarButton.GetComponentInChildren<Text>().text += " (disabled)";
return false;
}
}