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

Commit de663f3

Browse files
committed
1.7.0
* Fix for GuiLayout.Space unstrip * Cleanups
1 parent 8d648fe commit de663f3

19 files changed

+185
-125
lines changed

src/CachedObjects/CacheObjectBase.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ public void Draw(Rect window, float labelWidth = 215f)
384384
}
385385
else
386386
{
387-
GUILayout.Space(labelWidth);
387+
GUIUnstrip.Space(labelWidth);
388388
}
389389

390390
var cm = this as CacheMethod;
@@ -451,7 +451,7 @@ public void Draw(Rect window, float labelWidth = 215f)
451451
// new line and space
452452
GUILayout.EndHorizontal();
453453
GUILayout.BeginHorizontal(null);
454-
GUILayout.Space(labelWidth);
454+
GUIUnstrip.Space(labelWidth);
455455
}
456456
else if (cm != null)
457457
{
@@ -465,7 +465,7 @@ public void Draw(Rect window, float labelWidth = 215f)
465465
// new line and space
466466
GUILayout.EndHorizontal();
467467
GUILayout.BeginHorizontal(null);
468-
GUILayout.Space(labelWidth);
468+
GUIUnstrip.Space(labelWidth);
469469
}
470470

471471
if (!string.IsNullOrEmpty(ReflectionException))

src/CachedObjects/Object/CacheDictionary.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ public override void DrawValue(Rect window, float width)
235235
}
236236
GUI.skin.button.alignment = TextAnchor.MiddleCenter;
237237

238-
GUILayout.Space(5);
238+
GUIUnstrip.Space(5);
239239

240240
if (IsExpanded)
241241
{
@@ -246,7 +246,7 @@ public override void DrawValue(Rect window, float width)
246246
GUILayout.EndHorizontal();
247247
GUILayout.BeginHorizontal(null);
248248

249-
GUILayout.Space(whitespace);
249+
GUIUnstrip.Space(whitespace);
250250

251251
Pages.CurrentPageLabel();
252252

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

263263
Pages.DrawLimitInputArea();
264264

265-
GUILayout.Space(5);
265+
GUIUnstrip.Space(5);
266266
}
267267

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

279-
//GUILayout.Space(whitespace);
279+
//GUIUnstrip.Space(whitespace);
280280

281281
if (key == null || val == null)
282282
{

src/CachedObjects/Object/CacheList.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ public override void DrawValue(Rect window, float width)
297297
}
298298
GUI.skin.button.alignment = TextAnchor.MiddleCenter;
299299

300-
GUILayout.Space(5);
300+
GUIUnstrip.Space(5);
301301

302302
if (IsExpanded)
303303
{
@@ -308,7 +308,7 @@ public override void DrawValue(Rect window, float width)
308308
GUILayout.EndHorizontal();
309309
GUILayout.BeginHorizontal(null);
310310

311-
GUILayout.Space(whitespace);
311+
GUIUnstrip.Space(whitespace);
312312

313313
Pages.CurrentPageLabel();
314314

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

325325
Pages.DrawLimitInputArea();
326326

327-
GUILayout.Space(5);
327+
GUIUnstrip.Space(5);
328328
}
329329

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

340-
GUILayout.Space(whitespace);
340+
GUIUnstrip.Space(whitespace);
341341

342342
if (entry == null || entry.Value == null)
343343
{

src/CachedObjects/Struct/CacheColor.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,32 +61,32 @@ public override void DrawValue(Rect window, float width)
6161
var whitespace = CalcWhitespace(window);
6262

6363
GUILayout.BeginHorizontal(null);
64-
GUILayout.Space(whitespace);
64+
GUIUnstrip.Space(whitespace);
6565
GUILayout.Label("R:", new GUILayoutOption[] { GUILayout.Width(30) });
6666
r = GUILayout.TextField(r, new GUILayoutOption[] { GUILayout.Width(120) });
6767
GUILayout.EndHorizontal();
6868

6969
GUILayout.BeginHorizontal(null);
70-
GUILayout.Space(whitespace);
70+
GUIUnstrip.Space(whitespace);
7171
GUILayout.Label("G:", new GUILayoutOption[] { GUILayout.Width(30) });
7272
g = GUILayout.TextField(g, new GUILayoutOption[] { GUILayout.Width(120) });
7373
GUILayout.EndHorizontal();
7474

7575
GUILayout.BeginHorizontal(null);
76-
GUILayout.Space(whitespace);
76+
GUIUnstrip.Space(whitespace);
7777
GUILayout.Label("B:", new GUILayoutOption[] { GUILayout.Width(30) });
7878
b = GUILayout.TextField(b, new GUILayoutOption[] { GUILayout.Width(120) });
7979
GUILayout.EndHorizontal();
8080

8181
GUILayout.BeginHorizontal(null);
82-
GUILayout.Space(whitespace);
82+
GUIUnstrip.Space(whitespace);
8383
GUILayout.Label("A:", new GUILayoutOption[] { GUILayout.Width(30) });
8484
a = GUILayout.TextField(a, new GUILayoutOption[] { GUILayout.Width(120) });
8585
GUILayout.EndHorizontal();
8686

8787
// draw set value button
8888
GUILayout.BeginHorizontal(null);
89-
GUILayout.Space(whitespace);
89+
GUIUnstrip.Space(whitespace);
9090
if (GUILayout.Button("<color=lime>Apply</color>", new GUILayoutOption[] { GUILayout.Width(155) }))
9191
{
9292
SetValueFromInput();

src/CachedObjects/Struct/CachePrimitive.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public override void DrawValue(Rect window, float width)
9292
}
9393
}
9494

95-
GUILayout.Space(10);
95+
GUIUnstrip.Space(10);
9696
}
9797
}
9898

src/CachedObjects/Struct/CacheQuaternion.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,26 +56,26 @@ public override void DrawValue(Rect window, float width)
5656
var whitespace = CalcWhitespace(window);
5757

5858
GUILayout.BeginHorizontal(null);
59-
GUILayout.Space(whitespace);
59+
GUIUnstrip.Space(whitespace);
6060
GUILayout.Label("X:", new GUILayoutOption[] { GUILayout.Width(30) });
6161
x = GUILayout.TextField(x, new GUILayoutOption[] { GUILayout.Width(120) });
6262
GUILayout.EndHorizontal();
6363

6464
GUILayout.BeginHorizontal(null);
65-
GUILayout.Space(whitespace);
65+
GUIUnstrip.Space(whitespace);
6666
GUILayout.Label("Y:", new GUILayoutOption[] { GUILayout.Width(30) });
6767
y = GUILayout.TextField(y, new GUILayoutOption[] { GUILayout.Width(120) });
6868
GUILayout.EndHorizontal();
6969

7070
GUILayout.BeginHorizontal(null);
71-
GUILayout.Space(whitespace);
71+
GUIUnstrip.Space(whitespace);
7272
GUILayout.Label("Z:", new GUILayoutOption[] { GUILayout.Width(30) });
7373
z = GUILayout.TextField(z, new GUILayoutOption[] { GUILayout.Width(120) });
7474
GUILayout.EndHorizontal();
7575

7676
// draw set value button
7777
GUILayout.BeginHorizontal(null);
78-
GUILayout.Space(whitespace);
78+
GUIUnstrip.Space(whitespace);
7979
if (GUILayout.Button("<color=lime>Apply</color>", new GUILayoutOption[] { GUILayout.Width(155) }))
8080
{
8181
SetValueFromInput();

src/CachedObjects/Struct/CacheRect.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,32 +58,32 @@ public override void DrawValue(Rect window, float width)
5858
var whitespace = CalcWhitespace(window);
5959

6060
GUILayout.BeginHorizontal(null);
61-
GUILayout.Space(whitespace);
61+
GUIUnstrip.Space(whitespace);
6262
GUILayout.Label("X:", new GUILayoutOption[] { GUILayout.Width(30) });
6363
x = GUILayout.TextField(x, new GUILayoutOption[] { GUILayout.Width(120) });
6464
GUILayout.EndHorizontal();
6565

6666
GUILayout.BeginHorizontal(null);
67-
GUILayout.Space(whitespace);
67+
GUIUnstrip.Space(whitespace);
6868
GUILayout.Label("Y:", new GUILayoutOption[] { GUILayout.Width(30) });
6969
y = GUILayout.TextField(y, new GUILayoutOption[] { GUILayout.Width(120) });
7070
GUILayout.EndHorizontal();
7171

7272
GUILayout.BeginHorizontal(null);
73-
GUILayout.Space(whitespace);
73+
GUIUnstrip.Space(whitespace);
7474
GUILayout.Label("W:", new GUILayoutOption[] { GUILayout.Width(30) });
7575
w = GUILayout.TextField(w, new GUILayoutOption[] { GUILayout.Width(120) });
7676
GUILayout.EndHorizontal();
7777

7878
GUILayout.BeginHorizontal(null);
79-
GUILayout.Space(whitespace);
79+
GUIUnstrip.Space(whitespace);
8080
GUILayout.Label("H:", new GUILayoutOption[] { GUILayout.Width(30) });
8181
h = GUILayout.TextField(h, new GUILayoutOption[] { GUILayout.Width(120) });
8282
GUILayout.EndHorizontal();
8383

8484
// draw set value button
8585
GUILayout.BeginHorizontal(null);
86-
GUILayout.Space(whitespace);
86+
GUIUnstrip.Space(whitespace);
8787
if (GUILayout.Button("<color=lime>Apply</color>", new GUILayoutOption[] { GUILayout.Width(155) }))
8888
{
8989
SetValueFromInput();

src/CachedObjects/Struct/CacheVector.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ public override void DrawValue(Rect window, float width)
9494

9595
// always draw x and y
9696
GUILayout.BeginHorizontal(null);
97-
GUILayout.Space(whitespace);
97+
GUIUnstrip.Space(whitespace);
9898
GUILayout.Label("X:", new GUILayoutOption[] { GUILayout.Width(30) });
9999
x = GUILayout.TextField(x, new GUILayoutOption[] { GUILayout.Width(120) });
100100
GUILayout.EndHorizontal();
101101

102102
GUILayout.BeginHorizontal(null);
103-
GUILayout.Space(whitespace);
103+
GUIUnstrip.Space(whitespace);
104104
GUILayout.Label("Y:", new GUILayoutOption[] { GUILayout.Width(30) });
105105
y = GUILayout.TextField(y, new GUILayoutOption[] { GUILayout.Width(120) });
106106
GUILayout.EndHorizontal();
@@ -109,7 +109,7 @@ public override void DrawValue(Rect window, float width)
109109
{
110110
// draw z
111111
GUILayout.BeginHorizontal(null);
112-
GUILayout.Space(whitespace);
112+
GUIUnstrip.Space(whitespace);
113113
GUILayout.Label("Z:", new GUILayoutOption[] { GUILayout.Width(30) });
114114
z = GUILayout.TextField(z, new GUILayoutOption[] { GUILayout.Width(120) });
115115
GUILayout.EndHorizontal();
@@ -118,15 +118,15 @@ public override void DrawValue(Rect window, float width)
118118
{
119119
// draw w
120120
GUILayout.BeginHorizontal(null);
121-
GUILayout.Space(whitespace);
121+
GUIUnstrip.Space(whitespace);
122122
GUILayout.Label("W:", new GUILayoutOption[] { GUILayout.Width(30) });
123123
w = GUILayout.TextField(w, new GUILayoutOption[] { GUILayout.Width(120) });
124124
GUILayout.EndHorizontal();
125125
}
126126

127127
// draw set value button
128128
GUILayout.BeginHorizontal(null);
129-
GUILayout.Space(whitespace);
129+
GUIUnstrip.Space(whitespace);
130130
if (GUILayout.Button("<color=lime>Apply</color>", new GUILayoutOption[] { GUILayout.Width(155) }))
131131
{
132132
SetValueFromInput();

src/CppExplorer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace Explorer
1313
public class CppExplorer : MelonMod
1414
{
1515
public const string NAME = "CppExplorer";
16-
public const string VERSION = "1.6.9";
16+
public const string VERSION = "1.7.0";
1717
public const string AUTHOR = "Sinai";
1818
public const string GUID = "com.sinai.cppexplorer";
1919

src/CppExplorer.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,14 @@
9696
<Compile Include="Menu\CursorControl.cs" />
9797
<Compile Include="Tests\TestClass.cs" />
9898
<Compile Include="UnstripFixes\GUIUnstrip.cs" />
99+
<Compile Include="UnstripFixes\LayoutUtilityUnstrip.cs" />
99100
<Compile Include="UnstripFixes\ScrollViewStateUnstrip.cs" />
100101
<Compile Include="Extensions\UnityExtensions.cs" />
101102
<Compile Include="Helpers\PageHelper.cs" />
102103
<Compile Include="Helpers\ReflectionHelpers.cs" />
103104
<Compile Include="Helpers\UIHelpers.cs" />
104105
<Compile Include="Helpers\UnityHelpers.cs" />
105-
<Compile Include="Menu\MainMenu\InspectUnderMouse.cs" />
106+
<Compile Include="Menu\InspectUnderMouse.cs" />
106107
<Compile Include="CachedObjects\CacheObjectBase.cs" />
107108
<Compile Include="UnstripFixes\SliderHandlerUnstrip.cs" />
108109
<Compile Include="UnstripFixes\UnstripExtensions.cs" />

0 commit comments

Comments
 (0)