Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

Commit

Permalink
1.7.0
Browse files Browse the repository at this point in the history
* Fix for GuiLayout.Space unstrip
* Cleanups
  • Loading branch information
sinai-dev committed Sep 11, 2020
1 parent 8d648fe commit de663f3
Show file tree
Hide file tree
Showing 19 changed files with 185 additions and 125 deletions.
6 changes: 3 additions & 3 deletions src/CachedObjects/CacheObjectBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ public void Draw(Rect window, float labelWidth = 215f)
}
else
{
GUILayout.Space(labelWidth);
GUIUnstrip.Space(labelWidth);
}

var cm = this as CacheMethod;
Expand Down Expand Up @@ -451,7 +451,7 @@ public void Draw(Rect window, float labelWidth = 215f)
// new line and space
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(null);
GUILayout.Space(labelWidth);
GUIUnstrip.Space(labelWidth);
}
else if (cm != null)
{
Expand All @@ -465,7 +465,7 @@ public void Draw(Rect window, float labelWidth = 215f)
// new line and space
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(null);
GUILayout.Space(labelWidth);
GUIUnstrip.Space(labelWidth);
}

if (!string.IsNullOrEmpty(ReflectionException))
Expand Down
8 changes: 4 additions & 4 deletions src/CachedObjects/Object/CacheDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public override void DrawValue(Rect window, float width)
}
GUI.skin.button.alignment = TextAnchor.MiddleCenter;

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

if (IsExpanded)
{
Expand All @@ -246,7 +246,7 @@ public override void DrawValue(Rect window, float width)
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(null);

GUILayout.Space(whitespace);
GUIUnstrip.Space(whitespace);

Pages.CurrentPageLabel();

Expand All @@ -262,7 +262,7 @@ public override void DrawValue(Rect window, float width)

Pages.DrawLimitInputArea();

GUILayout.Space(5);
GUIUnstrip.Space(5);
}

int offset = Pages.CalculateOffsetIndex();
Expand All @@ -276,7 +276,7 @@ public override void DrawValue(Rect window, float width)
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(null);

//GUILayout.Space(whitespace);
//GUIUnstrip.Space(whitespace);

if (key == null || val == null)
{
Expand Down
8 changes: 4 additions & 4 deletions src/CachedObjects/Object/CacheList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ public override void DrawValue(Rect window, float width)
}
GUI.skin.button.alignment = TextAnchor.MiddleCenter;

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

if (IsExpanded)
{
Expand All @@ -308,7 +308,7 @@ public override void DrawValue(Rect window, float width)
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(null);

GUILayout.Space(whitespace);
GUIUnstrip.Space(whitespace);

Pages.CurrentPageLabel();

Expand All @@ -324,7 +324,7 @@ public override void DrawValue(Rect window, float width)

Pages.DrawLimitInputArea();

GUILayout.Space(5);
GUIUnstrip.Space(5);
}

int offset = Pages.CalculateOffsetIndex();
Expand All @@ -337,7 +337,7 @@ public override void DrawValue(Rect window, float width)
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(null);

GUILayout.Space(whitespace);
GUIUnstrip.Space(whitespace);

if (entry == null || entry.Value == null)
{
Expand Down
10 changes: 5 additions & 5 deletions src/CachedObjects/Struct/CacheColor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,32 +61,32 @@ public override void DrawValue(Rect window, float width)
var whitespace = CalcWhitespace(window);

GUILayout.BeginHorizontal(null);
GUILayout.Space(whitespace);
GUIUnstrip.Space(whitespace);
GUILayout.Label("R:", new GUILayoutOption[] { GUILayout.Width(30) });
r = GUILayout.TextField(r, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();

GUILayout.BeginHorizontal(null);
GUILayout.Space(whitespace);
GUIUnstrip.Space(whitespace);
GUILayout.Label("G:", new GUILayoutOption[] { GUILayout.Width(30) });
g = GUILayout.TextField(g, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();

GUILayout.BeginHorizontal(null);
GUILayout.Space(whitespace);
GUIUnstrip.Space(whitespace);
GUILayout.Label("B:", new GUILayoutOption[] { GUILayout.Width(30) });
b = GUILayout.TextField(b, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();

GUILayout.BeginHorizontal(null);
GUILayout.Space(whitespace);
GUIUnstrip.Space(whitespace);
GUILayout.Label("A:", new GUILayoutOption[] { GUILayout.Width(30) });
a = GUILayout.TextField(a, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();

// draw set value button
GUILayout.BeginHorizontal(null);
GUILayout.Space(whitespace);
GUIUnstrip.Space(whitespace);
if (GUILayout.Button("<color=lime>Apply</color>", new GUILayoutOption[] { GUILayout.Width(155) }))
{
SetValueFromInput();
Expand Down
2 changes: 1 addition & 1 deletion src/CachedObjects/Struct/CachePrimitive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public override void DrawValue(Rect window, float width)
}
}

GUILayout.Space(10);
GUIUnstrip.Space(10);
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/CachedObjects/Struct/CacheQuaternion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,26 +56,26 @@ public override void DrawValue(Rect window, float width)
var whitespace = CalcWhitespace(window);

GUILayout.BeginHorizontal(null);
GUILayout.Space(whitespace);
GUIUnstrip.Space(whitespace);
GUILayout.Label("X:", new GUILayoutOption[] { GUILayout.Width(30) });
x = GUILayout.TextField(x, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();

GUILayout.BeginHorizontal(null);
GUILayout.Space(whitespace);
GUIUnstrip.Space(whitespace);
GUILayout.Label("Y:", new GUILayoutOption[] { GUILayout.Width(30) });
y = GUILayout.TextField(y, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();

GUILayout.BeginHorizontal(null);
GUILayout.Space(whitespace);
GUIUnstrip.Space(whitespace);
GUILayout.Label("Z:", new GUILayoutOption[] { GUILayout.Width(30) });
z = GUILayout.TextField(z, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();

// draw set value button
GUILayout.BeginHorizontal(null);
GUILayout.Space(whitespace);
GUIUnstrip.Space(whitespace);
if (GUILayout.Button("<color=lime>Apply</color>", new GUILayoutOption[] { GUILayout.Width(155) }))
{
SetValueFromInput();
Expand Down
10 changes: 5 additions & 5 deletions src/CachedObjects/Struct/CacheRect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,32 +58,32 @@ public override void DrawValue(Rect window, float width)
var whitespace = CalcWhitespace(window);

GUILayout.BeginHorizontal(null);
GUILayout.Space(whitespace);
GUIUnstrip.Space(whitespace);
GUILayout.Label("X:", new GUILayoutOption[] { GUILayout.Width(30) });
x = GUILayout.TextField(x, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();

GUILayout.BeginHorizontal(null);
GUILayout.Space(whitespace);
GUIUnstrip.Space(whitespace);
GUILayout.Label("Y:", new GUILayoutOption[] { GUILayout.Width(30) });
y = GUILayout.TextField(y, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();

GUILayout.BeginHorizontal(null);
GUILayout.Space(whitespace);
GUIUnstrip.Space(whitespace);
GUILayout.Label("W:", new GUILayoutOption[] { GUILayout.Width(30) });
w = GUILayout.TextField(w, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();

GUILayout.BeginHorizontal(null);
GUILayout.Space(whitespace);
GUIUnstrip.Space(whitespace);
GUILayout.Label("H:", new GUILayoutOption[] { GUILayout.Width(30) });
h = GUILayout.TextField(h, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();

// draw set value button
GUILayout.BeginHorizontal(null);
GUILayout.Space(whitespace);
GUIUnstrip.Space(whitespace);
if (GUILayout.Button("<color=lime>Apply</color>", new GUILayoutOption[] { GUILayout.Width(155) }))
{
SetValueFromInput();
Expand Down
10 changes: 5 additions & 5 deletions src/CachedObjects/Struct/CacheVector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ public override void DrawValue(Rect window, float width)

// always draw x and y
GUILayout.BeginHorizontal(null);
GUILayout.Space(whitespace);
GUIUnstrip.Space(whitespace);
GUILayout.Label("X:", new GUILayoutOption[] { GUILayout.Width(30) });
x = GUILayout.TextField(x, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();

GUILayout.BeginHorizontal(null);
GUILayout.Space(whitespace);
GUIUnstrip.Space(whitespace);
GUILayout.Label("Y:", new GUILayoutOption[] { GUILayout.Width(30) });
y = GUILayout.TextField(y, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();
Expand All @@ -109,7 +109,7 @@ public override void DrawValue(Rect window, float width)
{
// draw z
GUILayout.BeginHorizontal(null);
GUILayout.Space(whitespace);
GUIUnstrip.Space(whitespace);
GUILayout.Label("Z:", new GUILayoutOption[] { GUILayout.Width(30) });
z = GUILayout.TextField(z, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();
Expand All @@ -118,15 +118,15 @@ public override void DrawValue(Rect window, float width)
{
// draw w
GUILayout.BeginHorizontal(null);
GUILayout.Space(whitespace);
GUIUnstrip.Space(whitespace);
GUILayout.Label("W:", new GUILayoutOption[] { GUILayout.Width(30) });
w = GUILayout.TextField(w, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();
}

// draw set value button
GUILayout.BeginHorizontal(null);
GUILayout.Space(whitespace);
GUIUnstrip.Space(whitespace);
if (GUILayout.Button("<color=lime>Apply</color>", new GUILayoutOption[] { GUILayout.Width(155) }))
{
SetValueFromInput();
Expand Down
2 changes: 1 addition & 1 deletion src/CppExplorer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Explorer
public class CppExplorer : MelonMod
{
public const string NAME = "CppExplorer";
public const string VERSION = "1.6.9";
public const string VERSION = "1.7.0";
public const string AUTHOR = "Sinai";
public const string GUID = "com.sinai.cppexplorer";

Expand Down
3 changes: 2 additions & 1 deletion src/CppExplorer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,14 @@
<Compile Include="Menu\CursorControl.cs" />
<Compile Include="Tests\TestClass.cs" />
<Compile Include="UnstripFixes\GUIUnstrip.cs" />
<Compile Include="UnstripFixes\LayoutUtilityUnstrip.cs" />
<Compile Include="UnstripFixes\ScrollViewStateUnstrip.cs" />
<Compile Include="Extensions\UnityExtensions.cs" />
<Compile Include="Helpers\PageHelper.cs" />
<Compile Include="Helpers\ReflectionHelpers.cs" />
<Compile Include="Helpers\UIHelpers.cs" />
<Compile Include="Helpers\UnityHelpers.cs" />
<Compile Include="Menu\MainMenu\InspectUnderMouse.cs" />
<Compile Include="Menu\InspectUnderMouse.cs" />
<Compile Include="CachedObjects\CacheObjectBase.cs" />
<Compile Include="UnstripFixes\SliderHandlerUnstrip.cs" />
<Compile Include="UnstripFixes\UnstripExtensions.cs" />
Expand Down
Loading

0 comments on commit de663f3

Please sign in to comment.