mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-24 01:12:41 +08:00
2.0.7
* More unstripping fixes. Explorer now works 100% on a blank Unity project (so should therefore work on any Unity game, regardless of stripping). * Some cleanups
This commit is contained in:
@ -224,12 +224,12 @@ namespace Explorer.UI.Inspectors
|
||||
if (!WindowManager.TabView)
|
||||
{
|
||||
Header();
|
||||
GUIUnstrip.BeginArea(new Rect(5, 25, rect.width - 10, rect.height - 35), GUI.skin.box);
|
||||
GUIHelper.BeginArea(new Rect(5, 25, rect.width - 10, rect.height - 35), GUI.skin.box);
|
||||
}
|
||||
|
||||
scroll = GUIUnstrip.BeginScrollView(scroll);
|
||||
scroll = GUIHelper.BeginScrollView(scroll);
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUILayout.Label("Scene: <color=cyan>" + (m_scene == "" ? "n/a" : m_scene) + "</color>", new GUILayoutOption[0]);
|
||||
if (m_scene == UnityHelpers.ActiveSceneName)
|
||||
{
|
||||
@ -245,7 +245,7 @@ namespace Explorer.UI.Inspectors
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUILayout.Label("Path:", new GUILayoutOption[] { GUILayout.Width(50) });
|
||||
string pathlabel = TargetGO.transform.GetGameObjectPath();
|
||||
if (TargetGO.transform.parent != null)
|
||||
@ -255,24 +255,24 @@ namespace Explorer.UI.Inspectors
|
||||
InspectGameObject(TargetGO.transform.parent);
|
||||
}
|
||||
}
|
||||
GUIUnstrip.TextArea(pathlabel, new GUILayoutOption[0]);
|
||||
GUIHelper.TextArea(pathlabel, new GUILayoutOption[0]);
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUILayout.Label("Name:", new GUILayoutOption[] { GUILayout.Width(50) });
|
||||
GUIUnstrip.TextArea(m_name, new GUILayoutOption[0]);
|
||||
GUIHelper.TextArea(m_name, new GUILayoutOption[0]);
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
LayerControls();
|
||||
|
||||
// --- Horizontal Columns section ---
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
|
||||
GUIUnstrip.BeginVertical(new GUILayoutOption[] { GUILayout.Width(rect.width / 2 - 17) });
|
||||
GUIHelper.BeginVertical(new GUILayoutOption[] { GUILayout.Width(rect.width / 2 - 17) });
|
||||
TransformList(rect);
|
||||
GUILayout.EndVertical();
|
||||
|
||||
GUIUnstrip.BeginVertical(new GUILayoutOption[] { GUILayout.Width(rect.width / 2 - 17) });
|
||||
GUIHelper.BeginVertical(new GUILayoutOption[] { GUILayout.Width(rect.width / 2 - 17) });
|
||||
ComponentList(rect);
|
||||
GUILayout.EndVertical();
|
||||
|
||||
@ -280,13 +280,13 @@ namespace Explorer.UI.Inspectors
|
||||
|
||||
GameObjectControls();
|
||||
|
||||
GUIUnstrip.EndScrollView();
|
||||
GUIHelper.EndScrollView();
|
||||
|
||||
if (!WindowManager.TabView)
|
||||
{
|
||||
m_rect = ResizeDrag.ResizeWindow(rect, windowID);
|
||||
|
||||
GUIUnstrip.EndArea();
|
||||
GUIHelper.EndArea();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@ -297,7 +297,7 @@ namespace Explorer.UI.Inspectors
|
||||
|
||||
private void LayerControls()
|
||||
{
|
||||
GUIUnstrip.BeginHorizontal();
|
||||
GUIHelper.BeginHorizontal();
|
||||
GUILayout.Label("Layer:", new GUILayoutOption[] { GUILayout.Width(50) });
|
||||
|
||||
if (GUILayout.Button("<", new GUILayoutOption[] { GUILayout.Width(30) }))
|
||||
@ -325,12 +325,12 @@ namespace Explorer.UI.Inspectors
|
||||
|
||||
private void TransformList(Rect m_rect)
|
||||
{
|
||||
GUIUnstrip.BeginVertical(GUIContent.none, GUI.skin.box, null);
|
||||
m_transformScroll = GUIUnstrip.BeginScrollView(m_transformScroll);
|
||||
GUIHelper.BeginVertical(GUIContent.none, GUI.skin.box, null);
|
||||
m_transformScroll = GUIHelper.BeginScrollView(m_transformScroll);
|
||||
|
||||
GUILayout.Label("<b><size=15>Children</size></b>", new GUILayoutOption[0]);
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
ChildPages.DrawLimitInputArea();
|
||||
|
||||
if (ChildPages.ItemCount > ChildPages.ItemsPerPage)
|
||||
@ -338,7 +338,7 @@ namespace Explorer.UI.Inspectors
|
||||
ChildPages.CurrentPageLabel();
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
|
||||
if (GUILayout.Button("< Prev", new GUILayoutOption[] { GUILayout.Width(80) }))
|
||||
{
|
||||
@ -373,17 +373,17 @@ namespace Explorer.UI.Inspectors
|
||||
GUILayout.Label("<i>None</i>", new GUILayoutOption[0]);
|
||||
}
|
||||
|
||||
GUIUnstrip.EndScrollView();
|
||||
GUIHelper.EndScrollView();
|
||||
GUILayout.EndVertical();
|
||||
}
|
||||
|
||||
private void ComponentList(Rect m_rect)
|
||||
{
|
||||
GUIUnstrip.BeginVertical(GUIContent.none, GUI.skin.box, null);
|
||||
m_compScroll = GUIUnstrip.BeginScrollView(m_compScroll);
|
||||
GUIHelper.BeginVertical(GUIContent.none, GUI.skin.box, null);
|
||||
m_compScroll = GUIHelper.BeginScrollView(m_compScroll);
|
||||
GUILayout.Label("<b><size=15>Components</size></b>", new GUILayoutOption[0]);
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
CompPages.DrawLimitInputArea();
|
||||
|
||||
if (CompPages.ItemCount > CompPages.ItemsPerPage)
|
||||
@ -391,7 +391,7 @@ namespace Explorer.UI.Inspectors
|
||||
CompPages.CurrentPageLabel();
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
|
||||
if (GUILayout.Button("< Prev", new GUILayoutOption[] { GUILayout.Width(80) }))
|
||||
{
|
||||
@ -404,9 +404,9 @@ namespace Explorer.UI.Inspectors
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
var width = m_rect.width / 2 - 135f;
|
||||
m_addComponentInput = GUIUnstrip.TextField(m_addComponentInput, new GUILayoutOption[] { GUILayout.Width(width) });
|
||||
m_addComponentInput = GUIHelper.TextField(m_addComponentInput, new GUILayoutOption[] { GUILayout.Width(width) });
|
||||
if (GUILayout.Button("Add Comp", new GUILayoutOption[0]))
|
||||
{
|
||||
if (ReflectionHelpers.GetTypeByName(m_addComponentInput) is Type compType)
|
||||
@ -453,7 +453,7 @@ namespace Explorer.UI.Inspectors
|
||||
#else
|
||||
component.GetType();
|
||||
#endif
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
if (ReflectionHelpers.BehaviourType.IsAssignableFrom(type))
|
||||
{
|
||||
#if CPP
|
||||
@ -464,7 +464,7 @@ namespace Explorer.UI.Inspectors
|
||||
}
|
||||
else
|
||||
{
|
||||
GUIUnstrip.Space(26);
|
||||
GUIHelper.Space(26);
|
||||
}
|
||||
if (GUILayout.Button("<color=cyan>" + type.Name + "</color>", new GUILayoutOption[] { GUILayout.Width(m_rect.width / 2 - 100) }))
|
||||
{
|
||||
@ -488,7 +488,7 @@ namespace Explorer.UI.Inspectors
|
||||
}
|
||||
}
|
||||
|
||||
GUIUnstrip.EndScrollView();
|
||||
GUIHelper.EndScrollView();
|
||||
|
||||
GUILayout.EndVertical();
|
||||
}
|
||||
@ -520,7 +520,7 @@ namespace Explorer.UI.Inspectors
|
||||
{
|
||||
if (m_hideControls)
|
||||
{
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUILayout.Label("<b><size=15>GameObject Controls</size></b>", new GUILayoutOption[] { GUILayout.Width(200) });
|
||||
if (GUILayout.Button("^ Show ^", new GUILayoutOption[] { GUILayout.Width(75) }))
|
||||
{
|
||||
@ -531,9 +531,9 @@ namespace Explorer.UI.Inspectors
|
||||
return;
|
||||
}
|
||||
|
||||
GUIUnstrip.BeginVertical(GUIContent.none, GUI.skin.box, new GUILayoutOption[] { GUILayout.Width(520) });
|
||||
GUIHelper.BeginVertical(GUIContent.none, GUI.skin.box, new GUILayoutOption[] { GUILayout.Width(520) });
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUILayout.Label("<b><size=15>GameObject Controls</size></b>", new GUILayoutOption[] { GUILayout.Width(200) });
|
||||
if (GUILayout.Button("v Hide v", new GUILayoutOption[] { GUILayout.Width(75) }))
|
||||
{
|
||||
@ -541,7 +541,7 @@ namespace Explorer.UI.Inspectors
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
bool m_active = TargetGO.activeSelf;
|
||||
m_active = GUILayout.Toggle(m_active, (m_active ? "<color=lime>Enabled " : "<color=red>Disabled") + "</color>",
|
||||
new GUILayoutOption[] { GUILayout.Width(80) });
|
||||
@ -566,9 +566,9 @@ namespace Explorer.UI.Inspectors
|
||||
}
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
|
||||
m_setParentInput = GUIUnstrip.TextField(m_setParentInput, new GUILayoutOption[0]);
|
||||
m_setParentInput = GUIHelper.TextField(m_setParentInput, new GUILayoutOption[0]);
|
||||
if (GUILayout.Button("Set Parent", new GUILayoutOption[] { GUILayout.Width(80) }))
|
||||
{
|
||||
if (GameObject.Find(m_setParentInput) is GameObject newparent)
|
||||
@ -587,13 +587,13 @@ namespace Explorer.UI.Inspectors
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUIUnstrip.BeginVertical(GUIContent.none, GUI.skin.box, null);
|
||||
GUIHelper.BeginVertical(GUIContent.none, GUI.skin.box, null);
|
||||
|
||||
m_cachedInput[0] = TranslateControl(TranslateType.Position, ref m_translateAmount, false);
|
||||
m_cachedInput[1] = TranslateControl(TranslateType.Rotation, ref m_rotateAmount, true);
|
||||
m_cachedInput[2] = TranslateControl(TranslateType.Scale, ref m_scaleAmount, false);
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
if (GUILayout.Button("<color=lime>Apply to Transform</color>", new GUILayoutOption[0]) || m_autoApplyTransform)
|
||||
{
|
||||
if (m_localContext)
|
||||
@ -619,7 +619,7 @@ namespace Explorer.UI.Inspectors
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
BoolToggle(ref m_autoApplyTransform, "Auto-apply to Transform?");
|
||||
BoolToggle(ref m_autoUpdateTransform, "Auto-update from transform?");
|
||||
GUILayout.EndHorizontal();
|
||||
@ -681,7 +681,7 @@ namespace Explorer.UI.Inspectors
|
||||
|
||||
private Vector3 TranslateControl(TranslateType mode, ref float amount, bool multByTime)
|
||||
{
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUILayout.Label($"<color=cyan><b>{(m_localContext ? "Local " : "")}{mode}</b></color>:",
|
||||
new GUILayoutOption[] { GUILayout.Width(m_localContext ? 110 : 65) });
|
||||
|
||||
@ -704,7 +704,7 @@ namespace Explorer.UI.Inspectors
|
||||
|
||||
Vector3 input = m_cachedInput[(int)mode];
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUI.skin.label.alignment = TextAnchor.MiddleRight;
|
||||
|
||||
GUILayout.Label("<color=cyan>X:</color>", new GUILayoutOption[] { GUILayout.Width(20) });
|
||||
@ -718,7 +718,7 @@ namespace Explorer.UI.Inspectors
|
||||
|
||||
GUILayout.Label("+/-:", new GUILayoutOption[] { GUILayout.Width(30) });
|
||||
var amountInput = amount.ToString("F3");
|
||||
amountInput = GUIUnstrip.TextField(amountInput, new GUILayoutOption[] { GUILayout.Width(60) });
|
||||
amountInput = GUIHelper.TextField(amountInput, new GUILayoutOption[] { GUILayout.Width(60) });
|
||||
if (float.TryParse(amountInput, out float f))
|
||||
{
|
||||
amount = f;
|
||||
@ -733,16 +733,16 @@ namespace Explorer.UI.Inspectors
|
||||
private void PlusMinusFloat(ref float f, float amount, bool multByTime)
|
||||
{
|
||||
string s = f.ToString("F3");
|
||||
s = GUIUnstrip.TextField(s, new GUILayoutOption[] { GUILayout.Width(60) });
|
||||
s = GUIHelper.TextField(s, new GUILayoutOption[] { GUILayout.Width(60) });
|
||||
if (float.TryParse(s, out float f2))
|
||||
{
|
||||
f = f2;
|
||||
}
|
||||
if (GUIUnstrip.RepeatButton("-", new GUILayoutOption[] { GUILayout.Width(20) }))
|
||||
if (GUIHelper.RepeatButton("-", new GUILayoutOption[] { GUILayout.Width(20) }))
|
||||
{
|
||||
f -= multByTime ? amount * Time.deltaTime : amount;
|
||||
}
|
||||
if (GUIUnstrip.RepeatButton("+", new GUILayoutOption[] { GUILayout.Width(20) }))
|
||||
if (GUIHelper.RepeatButton("+", new GUILayoutOption[] { GUILayout.Width(20) }))
|
||||
{
|
||||
f += multByTime ? amount * Time.deltaTime : amount;
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ namespace Explorer.UI.Inspectors
|
||||
|
||||
if (m_uObj)
|
||||
{
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUILayout.Label("<b>Tools:</b>", new GUILayoutOption[] { GUILayout.Width(80) });
|
||||
Buttons.InstantiateButton(m_uObj);
|
||||
if (m_component && m_component.gameObject is GameObject obj)
|
||||
|
@ -254,12 +254,12 @@ namespace Explorer.UI.Inspectors
|
||||
if (!WindowManager.TabView)
|
||||
{
|
||||
Header();
|
||||
GUIUnstrip.BeginArea(new Rect(5, 25, rect.width - 10, rect.height - 35), GUI.skin.box);
|
||||
GUIHelper.BeginArea(new Rect(5, 25, rect.width - 10, rect.height - 35), GUI.skin.box);
|
||||
}
|
||||
|
||||
var asInstance = this as InstanceInspector;
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
var labelWidth = (asInstance != null && asInstance.m_uObj)
|
||||
? new GUILayoutOption[] { GUILayout.Width(245f) }
|
||||
: new GUILayoutOption[0];
|
||||
@ -273,12 +273,12 @@ namespace Explorer.UI.Inspectors
|
||||
|
||||
UIStyles.HorizontalLine(Color.grey);
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUILayout.Label("<b>Search:</b>", new GUILayoutOption[] { GUILayout.Width(75) });
|
||||
m_search = GUIUnstrip.TextField(m_search, new GUILayoutOption[0]);
|
||||
m_search = GUIHelper.TextField(m_search, new GUILayoutOption[0]);
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUILayout.Label("<b>Filter:</b>", new GUILayoutOption[] { GUILayout.Width(75) });
|
||||
FilterTypeToggle(MemberTypes.All, "All");
|
||||
FilterTypeToggle(MemberTypes.Property, "Properties");
|
||||
@ -288,7 +288,7 @@ namespace Explorer.UI.Inspectors
|
||||
|
||||
if (this is InstanceInspector)
|
||||
{
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUILayout.Label("<b>Scope:</b>", new GUILayoutOption[] { GUILayout.Width(75) });
|
||||
FilterScopeToggle(MemberScopes.Both, "Both");
|
||||
FilterScopeToggle(MemberScopes.Instance, "Instance");
|
||||
@ -296,7 +296,7 @@ namespace Explorer.UI.Inspectors
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUILayout.Label("<b>Values:</b>", new GUILayoutOption[] { GUILayout.Width(75) });
|
||||
if (GUILayout.Button("Update", new GUILayoutOption[] { GUILayout.Width(100) }))
|
||||
{
|
||||
@ -309,12 +309,12 @@ namespace Explorer.UI.Inspectors
|
||||
GUI.color = Color.white;
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUIUnstrip.Space(10);
|
||||
GUIHelper.Space(10);
|
||||
|
||||
Pages.ItemCount = m_cachedMembersFiltered.Length;
|
||||
|
||||
// prev/next page buttons
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
|
||||
Pages.DrawLimitInputArea();
|
||||
|
||||
@ -336,13 +336,13 @@ namespace Explorer.UI.Inspectors
|
||||
|
||||
// ====== BODY ======
|
||||
|
||||
scroll = GUIUnstrip.BeginScrollView(scroll);
|
||||
scroll = GUIHelper.BeginScrollView(scroll);
|
||||
|
||||
GUIUnstrip.Space(10);
|
||||
GUIHelper.Space(10);
|
||||
|
||||
UIStyles.HorizontalLine(Color.grey);
|
||||
|
||||
GUIUnstrip.BeginVertical(GUIContent.none, GUI.skin.box, null);
|
||||
GUIHelper.BeginVertical(GUIContent.none, GUI.skin.box, null);
|
||||
|
||||
var members = this.m_cachedMembersFiltered;
|
||||
int start = Pages.CalculateOffsetIndex();
|
||||
@ -351,7 +351,7 @@ namespace Explorer.UI.Inspectors
|
||||
{
|
||||
var holder = members[j];
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[] { GUILayout.Height(25) });
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[] { GUILayout.Height(25) });
|
||||
try
|
||||
{
|
||||
holder.Draw(rect, 180f);
|
||||
@ -369,13 +369,13 @@ namespace Explorer.UI.Inspectors
|
||||
}
|
||||
|
||||
GUILayout.EndVertical();
|
||||
GUIUnstrip.EndScrollView();
|
||||
GUIHelper.EndScrollView();
|
||||
|
||||
if (!WindowManager.TabView)
|
||||
{
|
||||
m_rect = ResizeDrag.ResizeWindow(rect, windowID);
|
||||
|
||||
GUIUnstrip.EndArea();
|
||||
GUIHelper.EndArea();
|
||||
}
|
||||
}
|
||||
catch (Exception e) when (e.Message.Contains("in a group with only"))
|
||||
|
@ -71,14 +71,14 @@ namespace Explorer.UI
|
||||
}
|
||||
else
|
||||
{
|
||||
GUIUnstrip.Space(labelWidth);
|
||||
GUIHelper.Space(labelWidth);
|
||||
}
|
||||
|
||||
var cacheMethod = OwnerCacheObject as CacheMethod;
|
||||
|
||||
if (cacheMember != null && cacheMember.HasParameters)
|
||||
{
|
||||
GUIUnstrip.BeginVertical(new GUILayoutOption[] { GUILayout.ExpandHeight(true) } );
|
||||
GUIHelper.BeginVertical(new GUILayoutOption[] { GUILayout.ExpandHeight(true) } );
|
||||
|
||||
if (cacheMember.m_isEvaluating)
|
||||
{
|
||||
@ -92,7 +92,7 @@ namespace Explorer.UI
|
||||
cacheMember.DrawArgsInput();
|
||||
}
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
if (GUILayout.Button(EVALUATE_LABEL, new GUILayoutOption[] { GUILayout.Width(70) }))
|
||||
{
|
||||
if (cacheMethod != null)
|
||||
@ -122,8 +122,8 @@ namespace Explorer.UI
|
||||
GUILayout.EndVertical();
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIUnstrip.Space(labelWidth);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.Space(labelWidth);
|
||||
}
|
||||
else if (cacheMethod != null)
|
||||
{
|
||||
@ -133,8 +133,8 @@ namespace Explorer.UI
|
||||
}
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIUnstrip.Space(labelWidth);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.Space(labelWidth);
|
||||
}
|
||||
|
||||
string typeName = $"<color={Syntax.Class_Instance}>{ValueType.FullName}</color>";
|
||||
|
@ -237,7 +237,7 @@ namespace Explorer.UI
|
||||
}
|
||||
GUI.skin.button.alignment = TextAnchor.MiddleCenter;
|
||||
|
||||
GUIUnstrip.Space(5);
|
||||
GUIHelper.Space(5);
|
||||
|
||||
if (IsExpanded)
|
||||
{
|
||||
@ -246,9 +246,9 @@ namespace Explorer.UI
|
||||
if (count > Pages.ItemsPerPage)
|
||||
{
|
||||
GUILayout.EndHorizontal();
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
|
||||
GUIUnstrip.Space(whitespace);
|
||||
GUIHelper.Space(whitespace);
|
||||
|
||||
Pages.CurrentPageLabel();
|
||||
|
||||
@ -264,7 +264,7 @@ namespace Explorer.UI
|
||||
|
||||
Pages.DrawLimitInputArea();
|
||||
|
||||
GUIUnstrip.Space(5);
|
||||
GUIHelper.Space(5);
|
||||
}
|
||||
|
||||
int offset = Pages.CalculateOffsetIndex();
|
||||
@ -276,7 +276,7 @@ namespace Explorer.UI
|
||||
|
||||
//collapsing the BeginHorizontal called from ReflectionWindow.WindowFunction or previous array entry
|
||||
GUILayout.EndHorizontal();
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
|
||||
//GUIUnstrip.Space(whitespace);
|
||||
|
||||
|
@ -298,7 +298,7 @@ namespace Explorer.UI
|
||||
}
|
||||
GUI.skin.button.alignment = TextAnchor.MiddleCenter;
|
||||
|
||||
GUIUnstrip.Space(5);
|
||||
GUIHelper.Space(5);
|
||||
|
||||
if (IsExpanded)
|
||||
{
|
||||
@ -307,9 +307,9 @@ namespace Explorer.UI
|
||||
if (count > Pages.ItemsPerPage)
|
||||
{
|
||||
GUILayout.EndHorizontal();
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
|
||||
GUIUnstrip.Space(whitespace);
|
||||
GUIHelper.Space(whitespace);
|
||||
|
||||
Pages.CurrentPageLabel();
|
||||
|
||||
@ -325,7 +325,7 @@ namespace Explorer.UI
|
||||
|
||||
Pages.DrawLimitInputArea();
|
||||
|
||||
GUIUnstrip.Space(5);
|
||||
GUIHelper.Space(5);
|
||||
}
|
||||
|
||||
int offset = Pages.CalculateOffsetIndex();
|
||||
@ -336,9 +336,9 @@ namespace Explorer.UI
|
||||
|
||||
//collapsing the BeginHorizontal called from ReflectionWindow.WindowFunction or previous array entry
|
||||
GUILayout.EndHorizontal();
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
|
||||
GUIUnstrip.Space(whitespace);
|
||||
GUIHelper.Space(whitespace);
|
||||
|
||||
if (entry == null || entry.IValue == null)
|
||||
{
|
||||
|
@ -57,9 +57,9 @@ namespace Explorer.UI
|
||||
|
||||
public override void DrawValue(Rect window, float width)
|
||||
{
|
||||
GUIUnstrip.BeginVertical();
|
||||
GUIHelper.BeginVertical();
|
||||
|
||||
GUIUnstrip.BeginHorizontal();
|
||||
GUIHelper.BeginHorizontal();
|
||||
|
||||
if (currentTex && !IsExpanded)
|
||||
{
|
||||
@ -105,11 +105,11 @@ namespace Explorer.UI
|
||||
|
||||
private void DrawTextureControls()
|
||||
{
|
||||
GUIUnstrip.BeginHorizontal();
|
||||
GUIHelper.BeginHorizontal();
|
||||
|
||||
GUILayout.Label("Save folder:", new GUILayoutOption[] { GUILayout.Width(80f) });
|
||||
saveFolder = GUIUnstrip.TextField(saveFolder, new GUILayoutOption[0]);
|
||||
GUIUnstrip.Space(10f);
|
||||
saveFolder = GUIHelper.TextField(saveFolder, new GUILayoutOption[0]);
|
||||
GUIHelper.Space(10f);
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
|
@ -63,40 +63,40 @@ namespace Explorer.UI
|
||||
|
||||
var whitespace = CalcWhitespace(window);
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIUnstrip.Space(whitespace);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.Space(whitespace);
|
||||
GUILayout.Label("R:", new GUILayoutOption[] { GUILayout.Width(30) });
|
||||
r = GUIUnstrip.TextField(r, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
r = GUIHelper.TextField(r, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIUnstrip.Space(whitespace);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.Space(whitespace);
|
||||
GUILayout.Label("G:", new GUILayoutOption[] { GUILayout.Width(30) });
|
||||
g = GUIUnstrip.TextField(g, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
g = GUIHelper.TextField(g, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIUnstrip.Space(whitespace);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.Space(whitespace);
|
||||
GUILayout.Label("B:", new GUILayoutOption[] { GUILayout.Width(30) });
|
||||
b = GUIUnstrip.TextField(b, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
b = GUIHelper.TextField(b, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIUnstrip.Space(whitespace);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.Space(whitespace);
|
||||
GUILayout.Label("A:", new GUILayoutOption[] { GUILayout.Width(30) });
|
||||
a = GUIUnstrip.TextField(a, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
a = GUIHelper.TextField(a, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
// draw set value button
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIUnstrip.Space(whitespace);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.Space(whitespace);
|
||||
if (GUILayout.Button("<color=lime>Apply</color>", new GUILayoutOption[] { GUILayout.Width(155) }))
|
||||
{
|
||||
SetValueFromInput();
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -75,23 +75,23 @@ namespace Explorer.UI
|
||||
|
||||
for (int i = 0; i < EnumNames.Length; i++)
|
||||
{
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIUnstrip.Space(whitespace);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.Space(whitespace);
|
||||
|
||||
m_enabledFlags[i] = GUILayout.Toggle(m_enabledFlags[i], EnumNames[i], new GUILayoutOption[0]);
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIUnstrip.Space(whitespace);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.Space(whitespace);
|
||||
if (GUILayout.Button("<color=lime>Apply</color>", new GUILayoutOption[] { GUILayout.Width(155) }))
|
||||
{
|
||||
SetFlagsFromInput();
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -98,13 +98,13 @@ namespace Explorer.UI
|
||||
|
||||
// all other non-bool values use TextField
|
||||
|
||||
GUIUnstrip.BeginVertical(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginVertical(new GUILayoutOption[0]);
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
|
||||
GUILayout.Label("<color=#2df7b2><i>" + ValueType.Name + "</i></color>", new GUILayoutOption[] { GUILayout.Width(50) });
|
||||
|
||||
m_valueToString = GUIUnstrip.TextArea(m_valueToString, new GUILayoutOption[] { GUILayout.ExpandWidth(true) });
|
||||
m_valueToString = GUIHelper.TextArea(m_valueToString, new GUILayoutOption[] { GUILayout.ExpandWidth(true) });
|
||||
|
||||
DrawApplyButton();
|
||||
|
||||
@ -113,7 +113,7 @@ namespace Explorer.UI
|
||||
m_inBitwiseMode = GUILayout.Toggle(m_inBitwiseMode, "Bitwise?", new GUILayoutOption[0]);
|
||||
}
|
||||
|
||||
GUIUnstrip.Space(10);
|
||||
GUIHelper.Space(10);
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
@ -147,7 +147,7 @@ namespace Explorer.UI
|
||||
{
|
||||
if (OwnerCacheObject.CanWrite)
|
||||
{
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
|
||||
GUI.skin.label.alignment = TextAnchor.MiddleRight;
|
||||
GUILayout.Label("RHS:", new GUILayoutOption[] { GUILayout.Width(35) });
|
||||
@ -203,14 +203,14 @@ namespace Explorer.UI
|
||||
}
|
||||
}
|
||||
|
||||
m_bitwiseOperatorInput = GUIUnstrip.TextField(m_bitwiseOperatorInput, new GUILayoutOption[] { GUILayout.Width(55) });
|
||||
m_bitwiseOperatorInput = GUIHelper.TextField(m_bitwiseOperatorInput, new GUILayoutOption[] { GUILayout.Width(55) });
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUILayout.Label($"<color=cyan>Binary:</color>", new GUILayoutOption[] { GUILayout.Width(60) });
|
||||
m_binaryInput = GUIUnstrip.TextField(m_binaryInput, new GUILayoutOption[0]);
|
||||
m_binaryInput = GUIHelper.TextField(m_binaryInput, new GUILayoutOption[0]);
|
||||
if (OwnerCacheObject.CanWrite)
|
||||
{
|
||||
if (GUILayout.Button("Apply", new GUILayoutOption[0]))
|
||||
|
@ -58,34 +58,34 @@ namespace Explorer.UI
|
||||
|
||||
var whitespace = CalcWhitespace(window);
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIUnstrip.Space(whitespace);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.Space(whitespace);
|
||||
GUILayout.Label("X:", new GUILayoutOption[] { GUILayout.Width(30) });
|
||||
x = GUIUnstrip.TextField(x, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
x = GUIHelper.TextField(x, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIUnstrip.Space(whitespace);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.Space(whitespace);
|
||||
GUILayout.Label("Y:", new GUILayoutOption[] { GUILayout.Width(30) });
|
||||
y = GUIUnstrip.TextField(y, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
y = GUIHelper.TextField(y, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIUnstrip.Space(whitespace);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.Space(whitespace);
|
||||
GUILayout.Label("Z:", new GUILayoutOption[] { GUILayout.Width(30) });
|
||||
z = GUIUnstrip.TextField(z, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
z = GUIHelper.TextField(z, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
// draw set value button
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIUnstrip.Space(whitespace);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.Space(whitespace);
|
||||
if (GUILayout.Button("<color=lime>Apply</color>", new GUILayoutOption[] { GUILayout.Width(155) }))
|
||||
{
|
||||
SetValueFromInput();
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -60,40 +60,40 @@ namespace Explorer.UI
|
||||
|
||||
var whitespace = CalcWhitespace(window);
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIUnstrip.Space(whitespace);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.Space(whitespace);
|
||||
GUILayout.Label("X:", new GUILayoutOption[] { GUILayout.Width(30) });
|
||||
x = GUIUnstrip.TextField(x, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
x = GUIHelper.TextField(x, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIUnstrip.Space(whitespace);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.Space(whitespace);
|
||||
GUILayout.Label("Y:", new GUILayoutOption[] { GUILayout.Width(30) });
|
||||
y = GUIUnstrip.TextField(y, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
y = GUIHelper.TextField(y, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIUnstrip.Space(whitespace);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.Space(whitespace);
|
||||
GUILayout.Label("W:", new GUILayoutOption[] { GUILayout.Width(30) });
|
||||
w = GUIUnstrip.TextField(w, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
w = GUIHelper.TextField(w, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIUnstrip.Space(whitespace);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.Space(whitespace);
|
||||
GUILayout.Label("H:", new GUILayoutOption[] { GUILayout.Width(30) });
|
||||
h = GUIUnstrip.TextField(h, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
h = GUIHelper.TextField(h, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
// draw set value button
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIUnstrip.Space(whitespace);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.Space(whitespace);
|
||||
if (GUILayout.Button("<color=lime>Apply</color>", new GUILayoutOption[] { GUILayout.Width(155) }))
|
||||
{
|
||||
SetValueFromInput();
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -100,47 +100,47 @@ namespace Explorer.UI
|
||||
var whitespace = CalcWhitespace(window);
|
||||
|
||||
// always draw x and y
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIUnstrip.Space(whitespace);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.Space(whitespace);
|
||||
GUILayout.Label("X:", new GUILayoutOption[] { GUILayout.Width(30) });
|
||||
x = GUIUnstrip.TextField(x, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
x = GUIHelper.TextField(x, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIUnstrip.Space(whitespace);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.Space(whitespace);
|
||||
GUILayout.Label("Y:", new GUILayoutOption[] { GUILayout.Width(30) });
|
||||
y = GUIUnstrip.TextField(y, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
y = GUIHelper.TextField(y, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
if (VectorSize > 2)
|
||||
{
|
||||
// draw z
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIUnstrip.Space(whitespace);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.Space(whitespace);
|
||||
GUILayout.Label("Z:", new GUILayoutOption[] { GUILayout.Width(30) });
|
||||
z = GUIUnstrip.TextField(z, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
z = GUIHelper.TextField(z, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
if (VectorSize > 3)
|
||||
{
|
||||
// draw w
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIUnstrip.Space(whitespace);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.Space(whitespace);
|
||||
GUILayout.Label("W:", new GUILayoutOption[] { GUILayout.Width(30) });
|
||||
w = GUIUnstrip.TextField(w, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
w = GUIHelper.TextField(w, new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
// draw set value button
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIUnstrip.Space(whitespace);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.Space(whitespace);
|
||||
if (GUILayout.Button("<color=lime>Apply</color>", new GUILayoutOption[] { GUILayout.Width(155) }))
|
||||
{
|
||||
SetValueFromInput();
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,8 @@ using System.Reflection;
|
||||
using System.IO;
|
||||
#if CPP
|
||||
using UnhollowerRuntimeLib;
|
||||
using TextEditor = Explorer.Unstrip.IMGUI.TextEditorUnstrip;
|
||||
using Explorer.Unstrip.IMGUI;
|
||||
#endif
|
||||
|
||||
namespace Explorer.UI.Main
|
||||
@ -140,15 +142,15 @@ Help();";
|
||||
|
||||
GUILayout.Label("Enter code here as though it is a method body:", new GUILayoutOption[0]);
|
||||
|
||||
inputAreaScroll = GUIUnstrip.BeginScrollView(
|
||||
inputAreaScroll = GUIHelper.BeginScrollView(
|
||||
inputAreaScroll,
|
||||
new GUILayoutOption[] { GUILayout.Height(250), GUILayout.ExpandHeight(true) }
|
||||
new GUILayoutOption[] { GUILayout.Height(250), GUIHelper.ExpandHeight(true) }
|
||||
);
|
||||
|
||||
GUI.SetNextControlName(INPUT_CONTROL_NAME);
|
||||
m_input = GUIUnstrip.TextArea(m_input, new GUILayoutOption[] { GUILayout.ExpandHeight(true) });
|
||||
m_input = GUIHelper.TextArea(m_input, new GUILayoutOption[] { GUIHelper.ExpandHeight(true) });
|
||||
|
||||
GUIUnstrip.EndScrollView();
|
||||
GUIHelper.EndScrollView();
|
||||
|
||||
// EXECUTE BUTTON
|
||||
|
||||
@ -179,7 +181,7 @@ Help();";
|
||||
// SUGGESTIONS
|
||||
if (AutoCompletes.Count > 0)
|
||||
{
|
||||
autocompleteScroll = GUIUnstrip.BeginScrollView(autocompleteScroll, new GUILayoutOption[] { GUILayout.Height(150) });
|
||||
autocompleteScroll = GUIHelper.BeginScrollView(autocompleteScroll, new GUILayoutOption[] { GUILayout.Height(150) });
|
||||
|
||||
var origSkin = GUI.skin.button;
|
||||
GUI.skin.button = AutocompleteStyle;
|
||||
@ -196,7 +198,7 @@ Help();";
|
||||
|
||||
GUI.skin.button = origSkin;
|
||||
|
||||
GUIUnstrip.EndScrollView();
|
||||
GUIHelper.EndScrollView();
|
||||
}
|
||||
|
||||
if (shouldRefocus)
|
||||
@ -209,9 +211,9 @@ Help();";
|
||||
|
||||
GUILayout.Label("<b>Using directives:</b>", new GUILayoutOption[0]);
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUILayout.Label("Add namespace:", new GUILayoutOption[] { GUILayout.Width(105) });
|
||||
m_usingInput = GUIUnstrip.TextField(m_usingInput, new GUILayoutOption[] { GUILayout.Width(150) });
|
||||
m_usingInput = GUIHelper.TextField(m_usingInput, new GUILayoutOption[] { GUILayout.Width(150) });
|
||||
if (GUILayout.Button("<b><color=lime>Add</color></b>", new GUILayoutOption[] { GUILayout.Width(120) }))
|
||||
{
|
||||
AddUsing(m_usingInput);
|
||||
@ -245,7 +247,8 @@ Help();";
|
||||
#endif
|
||||
|
||||
#if CPP
|
||||
textEditor = GUIUtility.GetStateObject(Il2CppType.Of<TextEditor>(), GUIUtility.keyboardControl).TryCast<TextEditor>();
|
||||
//textEditor = GUIUtility.GetStateObject(Il2CppType.Of<TextEditor>(), GUIUtility.keyboardControl).TryCast<TextEditor>();
|
||||
textEditor = (TextEditor)GUIUtilityUnstrip.GetMonoStateObject(typeof(TextEditor), GUIUtility.keyboardControl);
|
||||
#else
|
||||
textEditor = (TextEditor)GUIUtility.GetStateObject(typeof(TextEditor), GUIUtility.keyboardControl);
|
||||
#endif
|
||||
@ -346,9 +349,9 @@ Help();";
|
||||
{
|
||||
var style = new GUIStyle
|
||||
{
|
||||
border = new RectOffset(0, 0, 0, 0),
|
||||
margin = new RectOffset(0, 0, 0, 0),
|
||||
padding = new RectOffset(0, 0, 0, 0),
|
||||
border = new RectOffset(),
|
||||
margin = new RectOffset(),
|
||||
padding = new RectOffset(),
|
||||
hover = { background = Texture2D.whiteTexture, textColor = Color.black },
|
||||
normal = { background = null },
|
||||
focused = { background = Texture2D.whiteTexture, textColor = Color.black },
|
||||
|
@ -56,44 +56,44 @@ namespace Explorer.UI.Main
|
||||
GUILayout.Label("<color=orange><size=16><b>Options</b></size></color>", new GUILayoutOption[0]);
|
||||
GUI.skin.label.alignment = TextAnchor.MiddleLeft;
|
||||
|
||||
GUIUnstrip.BeginVertical(GUIContent.none, GUI.skin.box, new GUILayoutOption[0]);
|
||||
GUIHelper.BeginVertical(GUIContent.none, GUI.skin.box, new GUILayoutOption[0]);
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUILayout.Label($"Menu Toggle Key:", new GUILayoutOption[] { GUILayout.Width(215f) });
|
||||
toggleKeyInput.IValue.DrawValue(MainMenu.MainRect, MainMenu.MainRect.width - 215f);
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
UIStyles.HorizontalLine(Color.black, true);
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUILayout.Label($"Default Window Size:", new GUILayoutOption[] { GUILayout.Width(215f) });
|
||||
defaultSizeInput.IValue.DrawValue(MainMenu.MainRect, MainMenu.MainRect.width - 215f);
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
UIStyles.HorizontalLine(Color.black, true);
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUILayout.Label($"Default Items per Page:", new GUILayoutOption[] { GUILayout.Width(215f) });
|
||||
defaultPageLimitInput.IValue.DrawValue(MainMenu.MainRect, MainMenu.MainRect.width - 215f);
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
UIStyles.HorizontalLine(Color.black, true);
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUILayout.Label($"Enable Bitwise Editing:", new GUILayoutOption[] { GUILayout.Width(215f) });
|
||||
bitwiseSupportInput.IValue.DrawValue(MainMenu.MainRect, MainMenu.MainRect.width - 215f);
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
UIStyles.HorizontalLine(Color.black, true);
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUILayout.Label($"Enable Tab View:", new GUILayoutOption[] { GUILayout.Width(215f) });
|
||||
tabViewInput.IValue.DrawValue(MainMenu.MainRect, MainMenu.MainRect.width - 215f);
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
UIStyles.HorizontalLine(Color.black, true);
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUILayout.Label($"Default Output Path:", new GUILayoutOption[] { GUILayout.Width(215f) });
|
||||
defaultOutputPathInput.IValue.DrawValue(MainMenu.MainRect, MainMenu.MainRect.width - 215f);
|
||||
GUILayout.EndHorizontal();
|
||||
@ -105,13 +105,13 @@ namespace Explorer.UI.Main
|
||||
|
||||
GUILayout.EndVertical();
|
||||
|
||||
GUIUnstrip.Space(10f);
|
||||
GUIHelper.Space(10f);
|
||||
|
||||
GUI.skin.label.alignment = TextAnchor.MiddleCenter;
|
||||
GUILayout.Label("<color=orange><size=16><b>Other</b></size></color>", new GUILayoutOption[0]);
|
||||
GUI.skin.label.alignment = TextAnchor.MiddleLeft;
|
||||
|
||||
GUIUnstrip.BeginVertical(GUIContent.none, GUI.skin.box, new GUILayoutOption[0]);
|
||||
GUIHelper.BeginVertical(GUIContent.none, GUI.skin.box, new GUILayoutOption[0]);
|
||||
|
||||
if (GUILayout.Button("Inspect Test Class", new GUILayoutOption[0]))
|
||||
{
|
||||
|
@ -6,6 +6,7 @@ using UnityEngine.SceneManagement;
|
||||
using Explorer.UI.Shared;
|
||||
using Explorer.CacheObject;
|
||||
using Explorer.Helpers;
|
||||
using Explorer.Unstrip.Resources;
|
||||
|
||||
namespace Explorer.UI.Main
|
||||
{
|
||||
@ -80,7 +81,7 @@ namespace Explorer.UI.Main
|
||||
{
|
||||
var matches = new List<CacheObjectBase>();
|
||||
|
||||
foreach (var obj in Resources.FindObjectsOfTypeAll(ReflectionHelpers.GameObjectType))
|
||||
foreach (var obj in ResourcesUnstrip.FindObjectsOfTypeAll(ReflectionHelpers.GameObjectType))
|
||||
{
|
||||
#if CPP
|
||||
var go = obj.TryCast<GameObject>();
|
||||
@ -164,7 +165,7 @@ namespace Explorer.UI.Main
|
||||
{
|
||||
DrawHeaderArea();
|
||||
|
||||
GUIUnstrip.BeginVertical(GUIContent.none, GUI.skin.box, null);
|
||||
GUIHelper.BeginVertical(GUIContent.none, GUI.skin.box, null);
|
||||
|
||||
DrawPageButtons();
|
||||
|
||||
@ -190,7 +191,7 @@ namespace Explorer.UI.Main
|
||||
|
||||
private void DrawHeaderArea()
|
||||
{
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
|
||||
// Current Scene label
|
||||
GUILayout.Label("Current Scene:", new GUILayoutOption[] { GUILayout.Width(120) });
|
||||
@ -200,10 +201,10 @@ namespace Explorer.UI.Main
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
// ----- GameObject Search -----
|
||||
GUIUnstrip.BeginHorizontal(GUIContent.none, GUI.skin.box, null);
|
||||
GUIHelper.BeginHorizontal(GUIContent.none, GUI.skin.box, null);
|
||||
GUILayout.Label("<b>Search Scene:</b>", new GUILayoutOption[] { GUILayout.Width(100) });
|
||||
|
||||
m_searchInput = GUIUnstrip.TextField(m_searchInput, new GUILayoutOption[0]);
|
||||
m_searchInput = GUIHelper.TextField(m_searchInput, new GUILayoutOption[0]);
|
||||
|
||||
if (GUILayout.Button("Search", new GUILayoutOption[] { GUILayout.Width(80) }))
|
||||
{
|
||||
@ -211,7 +212,7 @@ namespace Explorer.UI.Main
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUIUnstrip.Space(5);
|
||||
GUIHelper.Space(5);
|
||||
}
|
||||
|
||||
private void SceneChangeButtons()
|
||||
@ -252,7 +253,7 @@ namespace Explorer.UI.Main
|
||||
|
||||
private void DrawPageButtons()
|
||||
{
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
|
||||
Pages.DrawLimitInputArea();
|
||||
|
||||
@ -283,7 +284,7 @@ namespace Explorer.UI.Main
|
||||
{
|
||||
if (m_currentTransform != null)
|
||||
{
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
if (GUILayout.Button("<-", new GUILayoutOption[] { GUILayout.Width(35) }))
|
||||
{
|
||||
TraverseUp();
|
||||
|
@ -7,6 +7,7 @@ using UnityEngine;
|
||||
using Explorer.UI.Shared;
|
||||
using Explorer.CacheObject;
|
||||
using Explorer.Helpers;
|
||||
using Explorer.Unstrip.Resources;
|
||||
|
||||
namespace Explorer.UI.Main
|
||||
{
|
||||
@ -163,7 +164,7 @@ namespace Explorer.UI.Main
|
||||
|
||||
var matches = new List<object>();
|
||||
|
||||
var allObjectsOfType = Resources.FindObjectsOfTypeAll(searchType);
|
||||
var allObjectsOfType = ResourcesUnstrip.FindObjectsOfTypeAll(searchType);
|
||||
|
||||
//ExplorerCore.Log("Found count: " + allObjectsOfType.Length);
|
||||
|
||||
@ -350,7 +351,7 @@ namespace Explorer.UI.Main
|
||||
try
|
||||
{
|
||||
// helpers
|
||||
GUIUnstrip.BeginHorizontal(GUIContent.none, GUI.skin.box, null);
|
||||
GUIHelper.BeginHorizontal(GUIContent.none, 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) }))
|
||||
{
|
||||
@ -366,7 +367,7 @@ namespace Explorer.UI.Main
|
||||
SearchBox();
|
||||
|
||||
// results
|
||||
GUIUnstrip.BeginVertical(GUIContent.none, GUI.skin.box, null);
|
||||
GUIHelper.BeginVertical(GUIContent.none, GUI.skin.box, null);
|
||||
|
||||
GUI.skin.label.alignment = TextAnchor.MiddleCenter;
|
||||
GUILayout.Label("<b><color=orange>Results </color></b>" + " (" + m_searchResults.Count + ")", new GUILayoutOption[0]);
|
||||
@ -374,7 +375,7 @@ namespace Explorer.UI.Main
|
||||
|
||||
int count = m_searchResults.Count;
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
|
||||
Pages.DrawLimitInputArea();
|
||||
|
||||
@ -400,7 +401,7 @@ namespace Explorer.UI.Main
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
resultsScroll = GUIUnstrip.BeginScrollView(resultsScroll);
|
||||
resultsScroll = GUIHelper.BeginScrollView(resultsScroll);
|
||||
|
||||
var _temprect = new Rect(MainMenu.MainRect.x, MainMenu.MainRect.y, MainMenu.MainRect.width + 160, MainMenu.MainRect.height);
|
||||
|
||||
@ -420,7 +421,7 @@ namespace Explorer.UI.Main
|
||||
GUILayout.Label("<color=red><i>No results found!</i></color>", new GUILayoutOption[0]);
|
||||
}
|
||||
|
||||
GUIUnstrip.EndScrollView();
|
||||
GUIHelper.EndScrollView();
|
||||
GUILayout.EndVertical();
|
||||
}
|
||||
catch (Exception e)
|
||||
@ -440,28 +441,28 @@ namespace Explorer.UI.Main
|
||||
|
||||
private void SearchBox()
|
||||
{
|
||||
GUIUnstrip.BeginVertical(GUIContent.none, GUI.skin.box, null);
|
||||
GUIHelper.BeginVertical(GUIContent.none, GUI.skin.box, null);
|
||||
|
||||
// ----- GameObject Search -----
|
||||
GUI.skin.label.alignment = TextAnchor.MiddleCenter;
|
||||
GUILayout.Label("<b><color=orange>Search</color></b>", new GUILayoutOption[0]);
|
||||
GUI.skin.label.alignment = TextAnchor.UpperLeft;
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
|
||||
GUILayout.Label("Name Contains:", new GUILayoutOption[] { GUILayout.Width(100) });
|
||||
m_searchInput = GUIUnstrip.TextField(m_searchInput, new GUILayoutOption[] { GUILayout.Width(200) });
|
||||
m_searchInput = GUIHelper.TextField(m_searchInput, new GUILayoutOption[] { GUILayout.Width(200) });
|
||||
|
||||
GUILayout.Label("Max Results:", new GUILayoutOption[] { GUILayout.Width(100) });
|
||||
var s = MaxSearchResults.ToString();
|
||||
s = GUIUnstrip.TextField(s, new GUILayoutOption[] { GUILayout.Width(80) });
|
||||
s = GUIHelper.TextField(s, new GUILayoutOption[] { GUILayout.Width(80) });
|
||||
if (int.TryParse(s, out int i))
|
||||
{
|
||||
MaxSearchResults = i;
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
|
||||
GUILayout.Label("Class Filter:", new GUILayoutOption[] { GUILayout.Width(100) });
|
||||
ClassFilterToggle(TypeFilter.Object, "Object");
|
||||
@ -471,15 +472,15 @@ namespace Explorer.UI.Main
|
||||
GUILayout.EndHorizontal();
|
||||
if (TypeMode == TypeFilter.Custom)
|
||||
{
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUI.skin.label.alignment = TextAnchor.MiddleRight;
|
||||
GUILayout.Label("Custom Class:", new GUILayoutOption[] { GUILayout.Width(250) });
|
||||
GUI.skin.label.alignment = TextAnchor.UpperLeft;
|
||||
m_typeInput = GUIUnstrip.TextField(m_typeInput, new GUILayoutOption[] { GUILayout.Width(250) });
|
||||
m_typeInput = GUIHelper.TextField(m_typeInput, new GUILayoutOption[] { GUILayout.Width(250) });
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUILayout.Label("Scene Filter:", new GUILayoutOption[] { GUILayout.Width(100) });
|
||||
SceneFilterToggle(SceneFilter.Any, "Any", 60);
|
||||
SceneFilterToggle(SceneFilter.This, "This Scene", 100);
|
||||
|
@ -47,7 +47,7 @@ namespace Explorer.UI
|
||||
return;
|
||||
}
|
||||
m_currentPage = index;
|
||||
GUIUnstrip.BringWindowToFront(MainWindowID);
|
||||
GUIHelper.BringWindowToFront(MainWindowID);
|
||||
GUI.FocusWindow(MainWindowID);
|
||||
}
|
||||
|
||||
@ -58,39 +58,39 @@ namespace Explorer.UI
|
||||
|
||||
public void OnGUI()
|
||||
{
|
||||
MainRect = GUIUnstrip.Window(MainWindowID, MainRect, (GUI.WindowFunction)MainWindow, ExplorerCore.NAME);
|
||||
MainRect = GUIHelper.Window(MainWindowID, MainRect, (GUI.WindowFunction)MainWindow, ExplorerCore.NAME);
|
||||
}
|
||||
|
||||
private void MainWindow(int id)
|
||||
{
|
||||
GUI.DragWindow(new Rect(0, 0, MainRect.width - 90, 20));
|
||||
|
||||
if (GUIUnstrip.Button(new Rect(MainRect.width - 90, 2, 80, 20), $"Hide ({ModConfig.Instance.Main_Menu_Toggle})"))
|
||||
if (GUIHelper.Button(new Rect(MainRect.width - 90, 2, 80, 20), $"Hide ({ModConfig.Instance.Main_Menu_Toggle})"))
|
||||
{
|
||||
ExplorerCore.ShowMenu = false;
|
||||
return;
|
||||
}
|
||||
|
||||
GUIUnstrip.BeginArea(new Rect(5, 25, MainRect.width - 10, MainRect.height - 35), GUI.skin.box);
|
||||
GUIHelper.BeginArea(new Rect(5, 25, MainRect.width - 10, MainRect.height - 35), GUI.skin.box);
|
||||
|
||||
MainHeader();
|
||||
|
||||
var page = Pages[m_currentPage];
|
||||
|
||||
page.scroll = GUIUnstrip.BeginScrollView(page.scroll);
|
||||
page.scroll = GUIHelper.BeginScrollView(page.scroll);
|
||||
|
||||
page.DrawWindow();
|
||||
|
||||
GUIUnstrip.EndScrollView();
|
||||
GUIHelper.EndScrollView();
|
||||
|
||||
MainRect = ResizeDrag.ResizeWindow(MainRect, MainWindowID);
|
||||
|
||||
GUIUnstrip.EndArea();
|
||||
GUIHelper.EndArea();
|
||||
}
|
||||
|
||||
private void MainHeader()
|
||||
{
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
for (int i = 0; i < Pages.Count; i++)
|
||||
{
|
||||
if (m_currentPage == i)
|
||||
@ -105,7 +105,7 @@ namespace Explorer.UI
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUI.color = Color.white;
|
||||
InspectUnderMouse.EnableInspect = GUILayout.Toggle(InspectUnderMouse.EnableInspect, "Inspect Under Mouse (Shift + RMB)", new GUILayoutOption[0]);
|
||||
|
||||
@ -117,7 +117,7 @@ namespace Explorer.UI
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
//GUIUnstrip.Space(10);
|
||||
GUIUnstrip.Space(10);
|
||||
GUIHelper.Space(10);
|
||||
|
||||
GUI.color = Color.white;
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ namespace Explorer.UI.Shared
|
||||
|
||||
// ------ toggle active button ------
|
||||
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUI.skin.button.alignment = TextAnchor.UpperLeft;
|
||||
|
||||
GUI.color = color;
|
||||
|
@ -94,7 +94,7 @@ namespace Explorer.UI.Shared
|
||||
{
|
||||
GUILayout.Label("Limit: ", new GUILayoutOption[] { GUILayout.Width(50) });
|
||||
var limit = this.ItemsPerPage.ToString();
|
||||
limit = GUIUnstrip.TextField(limit, new GUILayoutOption[] { GUILayout.Width(50) });
|
||||
limit = GUIHelper.TextField(limit, new GUILayoutOption[] { GUILayout.Width(50) });
|
||||
if (limit != ItemsPerPage.ToString() && int.TryParse(limit, out int i))
|
||||
{
|
||||
ItemsPerPage = i;
|
||||
|
@ -25,7 +25,7 @@ namespace Explorer.UI.Shared
|
||||
|
||||
try
|
||||
{
|
||||
GUIUnstrip.BeginHorizontal(GUIContent.none, GUI.skin.box, null);
|
||||
GUIHelper.BeginHorizontal(GUIContent.none, GUI.skin.box, null);
|
||||
|
||||
GUI.skin.label.alignment = TextAnchor.MiddleCenter;
|
||||
#if BIE
|
||||
@ -38,12 +38,12 @@ namespace Explorer.UI.Shared
|
||||
GUILayout.Button(gcDrag, GUI.skin.label, new GUILayoutOption[] { GUILayout.Height(15) });
|
||||
#endif
|
||||
|
||||
var resizeDragArea = GUIUnstrip.GetLastRect();
|
||||
var resizeDragArea = GUIHelper.GetLastRect();
|
||||
var mousePos = InputManager.MousePosition;
|
||||
|
||||
try
|
||||
{
|
||||
var mouse = GUIUnstrip.ScreenToGUIPoint(new Vector2(mousePos.x, Screen.height - mousePos.y));
|
||||
var mouse = GUIHelper.ScreenToGUIPoint(new Vector2(mousePos.x, Screen.height - mousePos.y));
|
||||
if (resizeDragArea.Contains(mouse))
|
||||
{
|
||||
IsMouseInResizeArea = true;
|
||||
@ -92,26 +92,26 @@ namespace Explorer.UI.Shared
|
||||
}
|
||||
else
|
||||
{
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
|
||||
GUILayout.Label("Resize window:", new GUILayoutOption[] { GUILayout.Width(100) });
|
||||
|
||||
GUI.skin.label.alignment = TextAnchor.MiddleRight;
|
||||
GUILayout.Label("<color=cyan>Width:</color>", new GUILayoutOption[] { GUILayout.Width(60) });
|
||||
if (GUIUnstrip.RepeatButton("-", new GUILayoutOption[] { GUILayout.Width(20) }))
|
||||
if (GUIHelper.RepeatButton("-", new GUILayoutOption[] { GUILayout.Width(20) }))
|
||||
{
|
||||
_rect.width -= 5f;
|
||||
}
|
||||
if (GUIUnstrip.RepeatButton("+", new GUILayoutOption[] { GUILayout.Width(20) }))
|
||||
if (GUIHelper.RepeatButton("+", new GUILayoutOption[] { GUILayout.Width(20) }))
|
||||
{
|
||||
_rect.width += 5f;
|
||||
}
|
||||
GUILayout.Label("<color=cyan>Height:</color>", new GUILayoutOption[] { GUILayout.Width(60) });
|
||||
if (GUIUnstrip.RepeatButton("-", new GUILayoutOption[] { GUILayout.Width(20) }))
|
||||
if (GUIHelper.RepeatButton("-", new GUILayoutOption[] { GUILayout.Width(20) }))
|
||||
{
|
||||
_rect.height -= 5f;
|
||||
}
|
||||
if (GUIUnstrip.RepeatButton("+", new GUILayoutOption[] { GUILayout.Width(20) }))
|
||||
if (GUIHelper.RepeatButton("+", new GUILayoutOption[] { GUILayout.Width(20) }))
|
||||
{
|
||||
_rect.height += 5f;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ namespace Explorer.UI
|
||||
try
|
||||
{
|
||||
GUI.DragWindow(new Rect(0, 0, m_rect.width - 90, 20));
|
||||
if (GUIUnstrip.Button(new Rect(m_rect.width - 90, 2, 80, 20), "<color=red>Close All</color>"))
|
||||
if (GUIHelper.Button(new Rect(m_rect.width - 90, 2, 80, 20), "<color=red>Close All</color>"))
|
||||
{
|
||||
foreach (var window in WindowManager.Windows)
|
||||
{
|
||||
@ -61,10 +61,10 @@ namespace Explorer.UI
|
||||
return;
|
||||
}
|
||||
|
||||
GUIUnstrip.BeginArea(new Rect(5, 25, m_rect.width - 10, m_rect.height - 35), GUI.skin.box);
|
||||
GUIHelper.BeginArea(new Rect(5, 25, m_rect.width - 10, m_rect.height - 35), GUI.skin.box);
|
||||
|
||||
GUIUnstrip.BeginVertical(GUIContent.none, GUI.skin.box, null);
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginVertical(GUIContent.none, GUI.skin.box, null);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUI.skin.button.alignment = TextAnchor.MiddleLeft;
|
||||
int tabPerRow = (int)Math.Floor(m_rect.width / 238);
|
||||
int rowCount = 0;
|
||||
@ -83,7 +83,7 @@ namespace Explorer.UI
|
||||
{
|
||||
rowCount = 0;
|
||||
GUILayout.EndHorizontal();
|
||||
GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
|
||||
GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
|
||||
}
|
||||
rowCount++;
|
||||
|
||||
@ -109,7 +109,7 @@ namespace Explorer.UI
|
||||
|
||||
m_rect = ResizeDrag.ResizeWindow(m_rect, windowID);
|
||||
|
||||
GUIUnstrip.EndArea();
|
||||
GUIHelper.EndArea();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -110,7 +110,7 @@ namespace Explorer.UI
|
||||
{
|
||||
if (!TabView)
|
||||
{
|
||||
GUIUnstrip.BringWindowToFront(window.windowID);
|
||||
GUIHelper.BringWindowToFront(window.windowID);
|
||||
GUI.FocusWindow(window.windowID);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user