unstrip fixes
This commit is contained in:
sinaioutlander
2020-09-14 01:42:29 +10:00
parent 653b4a2304
commit dc2759c599
25 changed files with 305 additions and 224 deletions

View File

@ -91,7 +91,7 @@ namespace Explorer
else
GUI.color = Color.white;
if (GUILayout.Button(Pages[i].Name, null))
if (GUIUnstrip.Button(Pages[i].Name))
{
m_currentPage = i;
}
@ -100,13 +100,13 @@ namespace Explorer
GUIUnstrip.BeginHorizontal();
GUI.color = Color.white;
InspectUnderMouse.EnableInspect = GUILayout.Toggle(InspectUnderMouse.EnableInspect, "Inspect Under Mouse (Shift + RMB)", null);
InspectUnderMouse.EnableInspect = GUIUnstrip.Toggle(InspectUnderMouse.EnableInspect, "Inspect Under Mouse (Shift + RMB)");
bool mouseState = CursorControl.ForceUnlockMouse;
bool setMouse = GUILayout.Toggle(mouseState, "Force Unlock Mouse (Left Alt)", null);
bool setMouse = GUIUnstrip.Toggle(mouseState, "Force Unlock Mouse (Left Alt)");
if (setMouse != mouseState) CursorControl.ForceUnlockMouse = setMouse;
WindowManager.TabView = GUILayout.Toggle(WindowManager.TabView, "Tab View", null);
WindowManager.TabView = GUIUnstrip.Toggle(WindowManager.TabView, "Tab View");
GUIUnstrip.EndHorizontal();
//GUIUnstrip.Space(10);

View File

@ -123,19 +123,19 @@ MelonLogger.Log(""hello world"");";
public override void DrawWindow()
{
GUILayout.Label("<b><size=15><color=cyan>C# REPL Console</color></size></b>", null);
GUIUnstrip.Label("<b><size=15><color=cyan>C# REPL Console</color></size></b>");
GUI.skin.label.alignment = TextAnchor.UpperLeft;
GUILayout.Label("Enter code here as though it is a method body:", null);
GUIUnstrip.Label("Enter code here as though it is a method body:");
inputAreaScroll = GUIUnstrip.BeginScrollView(inputAreaScroll, new GUILayoutOption[] { GUILayout.Height(250) });
MethodInput = GUILayout.TextArea(MethodInput, new GUILayoutOption[] { GUILayout.ExpandHeight(true) });
MethodInput = GUIUnstrip.TextArea(MethodInput, new GUILayoutOption[] { GUILayout.ExpandHeight(true) });
GUIUnstrip.EndScrollView();
if (GUILayout.Button("<color=cyan><b>Execute</b></color>", null))
if (GUIUnstrip.Button("<color=cyan><b>Execute</b></color>"))
{
try
{
@ -157,16 +157,16 @@ MelonLogger.Log(""hello world"");";
}
}
GUILayout.Label("<b>Using directives:</b>", null);
GUIUnstrip.Label("<b>Using directives:</b>");
GUIUnstrip.BeginHorizontal();
GUILayout.Label("Add namespace:", new GUILayoutOption[] { GUILayout.Width(105) });
UsingInput = GUILayout.TextField(UsingInput, new GUILayoutOption[] { GUILayout.Width(150) });
if (GUILayout.Button("<b><color=lime>Add</color></b>", new GUILayoutOption[] { GUILayout.Width(120) }))
GUIUnstrip.Label("Add namespace:", new GUILayoutOption[] { GUILayout.Width(105) });
UsingInput = GUIUnstrip.TextField(UsingInput, new GUILayoutOption[] { GUILayout.Width(150) });
if (GUIUnstrip.Button("<b><color=lime>Add</color></b>", new GUILayoutOption[] { GUILayout.Width(120) }))
{
AddUsing(UsingInput);
}
if (GUILayout.Button("<b><color=red>Clear All</color></b>", new GUILayoutOption[] { GUILayout.Width(120) }))
if (GUIUnstrip.Button("<b><color=red>Clear All</color></b>", new GUILayoutOption[] { GUILayout.Width(120) }))
{
ResetConsole();
}
@ -174,7 +174,7 @@ MelonLogger.Log(""hello world"");";
foreach (var asm in UsingDirectives)
{
GUILayout.Label(AsmToUsing(asm, true), null);
GUIUnstrip.Label(AsmToUsing(asm, true));
}
}

View File

@ -226,19 +226,19 @@ namespace Explorer
GUIUnstrip.BeginHorizontal();
// Current Scene label
GUILayout.Label("Current Scene:", new GUILayoutOption[] { GUILayout.Width(120) });
GUIUnstrip.Label("Current Scene:", new GUILayoutOption[] { GUILayout.Width(120) });
SceneChangeButtons();
GUILayout.Label("<color=cyan>" + m_currentScene + "</color>", null); //new GUILayoutOption[] { GUILayout.Width(250) });
GUIUnstrip.Label("<color=cyan>" + m_currentScene + "</color>");
GUIUnstrip.EndHorizontal();
// ----- GameObject Search -----
GUIUnstrip.BeginHorizontal(GUI.skin.box, null);
GUILayout.Label("<b>Search Scene:</b>", new GUILayoutOption[] { GUILayout.Width(100) });
GUIUnstrip.Label("<b>Search Scene:</b>", new GUILayoutOption[] { GUILayout.Width(100) });
m_searchInput = GUILayout.TextField(m_searchInput, null);
m_searchInput = GUIUnstrip.TextField(m_searchInput);
if (GUILayout.Button("Search", new GUILayoutOption[] { GUILayout.Width(80) }))
if (GUIUnstrip.Button("Search", new GUILayoutOption[] { GUILayout.Width(80) }))
{
Search();
}
@ -255,11 +255,11 @@ namespace Explorer
if (scenes.Count > 1)
{
int changeWanted = 0;
if (GUILayout.Button("<", new GUILayoutOption[] { GUILayout.Width(30) }))
if (GUIUnstrip.Button("<", new GUILayoutOption[] { GUILayout.Width(30) }))
{
changeWanted = -1;
}
if (GUILayout.Button(">", new GUILayoutOption[] { GUILayout.Width(30) }))
if (GUIUnstrip.Button(">", new GUILayoutOption[] { GUILayout.Width(30) }))
{
changeWanted = 1;
}
@ -288,7 +288,7 @@ namespace Explorer
if (Pages.ItemCount > Pages.ItemsPerPage)
{
if (GUILayout.Button("< Prev", new GUILayoutOption[] { GUILayout.Width(80) }))
if (GUIUnstrip.Button("< Prev", new GUILayoutOption[] { GUILayout.Width(80) }))
{
Pages.TurnPage(Turn.Left, ref this.scroll);
@ -297,7 +297,7 @@ namespace Explorer
Pages.CurrentPageLabel();
if (GUILayout.Button("Next >", new GUILayoutOption[] { GUILayout.Width(80) }))
if (GUIUnstrip.Button("Next >", new GUILayoutOption[] { GUILayout.Width(80) }))
{
Pages.TurnPage(Turn.Right, ref this.scroll);
@ -314,13 +314,13 @@ namespace Explorer
if (m_currentTransform != null)
{
GUIUnstrip.BeginHorizontal();
if (GUILayout.Button("<-", new GUILayoutOption[] { GUILayout.Width(35) }))
if (GUIUnstrip.Button("<-", new GUILayoutOption[] { GUILayout.Width(35) }))
{
TraverseUp();
}
else
{
GUILayout.Label("<color=cyan>" + m_currentTransform.GetGameObjectPath() + "</color>",
GUIUnstrip.Label("<color=cyan>" + m_currentTransform.GetGameObjectPath() + "</color>",
new GUILayoutOption[] { GUILayout.Width(MainMenu.MainRect.width - 187f) });
}
@ -330,11 +330,11 @@ namespace Explorer
}
else
{
GUILayout.Label("Scene Root GameObjects:", null);
GUIUnstrip.Label("Scene Root GameObjects:");
if (m_getRootObjectsFailed)
{
if (GUILayout.Button("Update Root Object List (auto-update failed!)", null))
if (GUIUnstrip.Button("Update Root Object List (auto-update failed!)"))
{
Update_Impl(true);
}
@ -359,7 +359,7 @@ namespace Explorer
}
label += "</i></color>";
GUILayout.Label(label, null);
GUIUnstrip.Label(label);
}
else
{
@ -377,12 +377,12 @@ namespace Explorer
private void DrawSearchResultsList()
{
if (GUILayout.Button("<- Cancel Search", new GUILayoutOption[] { GUILayout.Width(150) }))
if (GUIUnstrip.Button("<- Cancel Search", new GUILayoutOption[] { GUILayout.Width(150) }))
{
CancelSearch();
}
GUILayout.Label("Search Results:", null);
GUIUnstrip.Label("Search Results:");
if (m_searchResults.Count > 0)
{
@ -404,13 +404,13 @@ namespace Explorer
}
else
{
GUILayout.Label("<i><color=red>Null or destroyed!</color></i>", null);
GUIUnstrip.Label("<i><color=red>Null or destroyed!</color></i>");
}
}
}
else
{
GUILayout.Label("<color=red><i>No results found!</i></color>", null);
GUIUnstrip.Label("<color=red><i>No results found!</i></color>");
}
}

View File

@ -85,8 +85,8 @@ namespace Explorer
{
// helpers
GUIUnstrip.BeginHorizontal(GUI.skin.box, null);
GUILayout.Label("<b><color=orange>Helpers</color></b>", new GUILayoutOption[] { GUILayout.Width(70) });
if (GUILayout.Button("Find Static Instances", new GUILayoutOption[] { GUILayout.Width(180) }))
GUIUnstrip.Label("<b><color=orange>Helpers</color></b>", new GUILayoutOption[] { GUILayout.Width(70) });
if (GUIUnstrip.Button("Find Static Instances", new GUILayoutOption[] { GUILayout.Width(180) }))
{
//m_searchResults = GetInstanceClassScanner().ToList();
CacheResults(GetInstanceClassScanner());
@ -100,7 +100,7 @@ namespace Explorer
GUIUnstrip.BeginVertical(GUI.skin.box, null);
GUI.skin.label.alignment = TextAnchor.MiddleCenter;
GUILayout.Label("<b><color=orange>Results </color></b>" + " (" + m_searchResults.Count + ")", null);
GUIUnstrip.Label("<b><color=orange>Results </color></b>" + " (" + m_searchResults.Count + ")");
GUI.skin.label.alignment = TextAnchor.UpperLeft;
int count = m_searchResults.Count;
@ -115,14 +115,14 @@ namespace Explorer
if (Pages.ItemCount > Pages.ItemsPerPage)
{
if (GUILayout.Button("< Prev", new GUILayoutOption[] { GUILayout.Width(80) }))
if (GUIUnstrip.Button("< Prev", new GUILayoutOption[] { GUILayout.Width(80) }))
{
Pages.TurnPage(Turn.Left, ref this.resultsScroll);
}
Pages.CurrentPageLabel();
if (GUILayout.Button("Next >", new GUILayoutOption[] { GUILayout.Width(80) }))
if (GUIUnstrip.Button("Next >", new GUILayoutOption[] { GUILayout.Width(80) }))
{
Pages.TurnPage(Turn.Right, ref this.resultsScroll);
}
@ -146,7 +146,7 @@ namespace Explorer
}
else
{
GUILayout.Label("<color=red><i>No results found!</i></color>", null);
GUIUnstrip.Label("<color=red><i>No results found!</i></color>");
}
GUIUnstrip.EndScrollView();
@ -164,19 +164,19 @@ namespace Explorer
// ----- GameObject Search -----
GUI.skin.label.alignment = TextAnchor.MiddleCenter;
GUILayout.Label("<b><color=orange>Search</color></b>", null);
GUIUnstrip.Label("<b><color=orange>Search</color></b>");
GUI.skin.label.alignment = TextAnchor.UpperLeft;
GUIUnstrip.BeginHorizontal();
GUILayout.Label("Name Contains:", new GUILayoutOption[] { GUILayout.Width(100) });
m_searchInput = GUILayout.TextField(m_searchInput, new GUILayoutOption[] { GUILayout.Width(200) });
GUIUnstrip.Label("Name Contains:", new GUILayoutOption[] { GUILayout.Width(100) });
m_searchInput = GUIUnstrip.TextField(m_searchInput, new GUILayoutOption[] { GUILayout.Width(200) });
GUIUnstrip.EndHorizontal();
GUIUnstrip.BeginHorizontal();
GUILayout.Label("Class Filter:", new GUILayoutOption[] { GUILayout.Width(100) });
GUIUnstrip.Label("Class Filter:", new GUILayoutOption[] { GUILayout.Width(100) });
ClassFilterToggle(TypeFilter.Object, "Object");
ClassFilterToggle(TypeFilter.GameObject, "GameObject");
ClassFilterToggle(TypeFilter.Component, "Component");
@ -186,21 +186,21 @@ namespace Explorer
{
GUIUnstrip.BeginHorizontal();
GUI.skin.label.alignment = TextAnchor.MiddleRight;
GUILayout.Label("Custom Class:", new GUILayoutOption[] { GUILayout.Width(250) });
GUIUnstrip.Label("Custom Class:", new GUILayoutOption[] { GUILayout.Width(250) });
GUI.skin.label.alignment = TextAnchor.UpperLeft;
m_typeInput = GUILayout.TextField(m_typeInput, new GUILayoutOption[] { GUILayout.Width(250) });
m_typeInput = GUIUnstrip.TextField(m_typeInput, new GUILayoutOption[] { GUILayout.Width(250) });
GUIUnstrip.EndHorizontal();
}
GUIUnstrip.BeginHorizontal();
GUILayout.Label("Scene Filter:", new GUILayoutOption[] { GUILayout.Width(100) });
GUIUnstrip.Label("Scene Filter:", new GUILayoutOption[] { GUILayout.Width(100) });
SceneFilterToggle(SceneFilter.Any, "Any", 60);
SceneFilterToggle(SceneFilter.This, "This Scene", 100);
SceneFilterToggle(SceneFilter.DontDestroy, "DontDestroyOnLoad", 140);
SceneFilterToggle(SceneFilter.None, "No Scene", 80);
GUIUnstrip.EndHorizontal();
if (GUILayout.Button("<b><color=cyan>Search</color></b>", null))
if (GUIUnstrip.Button("<b><color=cyan>Search</color></b>"))
{
Search();
}
@ -218,7 +218,7 @@ namespace Explorer
{
GUI.color = Color.white;
}
if (GUILayout.Button(label, new GUILayoutOption[] { GUILayout.Width(100) }))
if (GUIUnstrip.Button(label, new GUILayoutOption[] { GUILayout.Width(100) }))
{
TypeMode = mode;
}
@ -235,7 +235,7 @@ namespace Explorer
{
GUI.color = Color.white;
}
if (GUILayout.Button(label, new GUILayoutOption[] { GUILayout.Width(width) }))
if (GUIUnstrip.Button(label, new GUILayoutOption[] { GUILayout.Width(width) }))
{
SceneMode = mode;
}