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

Commit 9bb3c77

Browse files
committed
1.7.3
* Reverted some unstrip fixes from 1.7.2 because it was causing more problems than it solved.
1 parent 477a685 commit 9bb3c77

26 files changed

+428
-620
lines changed

src/CachedObjects/CacheObjectBase.cs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ public void Draw(Rect window, float labelWidth = 215f)
379379

380380
if (MemInfo != null)
381381
{
382-
GUIUnstrip.Label(RichTextName, new GUILayoutOption[] { GUILayout.Width(labelWidth) });
382+
GUILayout.Label(RichTextName, new GUILayoutOption[] { GUILayout.Width(labelWidth) });
383383
}
384384
else
385385
{
@@ -390,7 +390,7 @@ public void Draw(Rect window, float labelWidth = 215f)
390390

391391
if (HasParameters)
392392
{
393-
GUIUnstrip.BeginVertical();
393+
GUILayout.BeginVertical(null);
394394

395395
if (m_isEvaluating)
396396
{
@@ -406,17 +406,17 @@ public void Draw(Rect window, float labelWidth = 215f)
406406
label = $"<i>[{label} = {m_arguments[i].DefaultValue}]</i>";
407407
}
408408

409-
GUIUnstrip.BeginHorizontal();
409+
GUILayout.BeginHorizontal(null);
410410

411-
GUIUnstrip.Label(i.ToString(), new GUILayoutOption[] { GUILayout.Width(20) });
412-
m_argumentInput[i] = GUIUnstrip.TextField(input, new GUILayoutOption[] { GUILayout.Width(150) });
413-
GUIUnstrip.Label(label);
411+
GUILayout.Label(i.ToString(), new GUILayoutOption[] { GUILayout.Width(20) });
412+
m_argumentInput[i] = GUILayout.TextField(input, new GUILayoutOption[] { GUILayout.Width(150) });
413+
GUILayout.Label(label, null);
414414

415-
GUIUnstrip.EndHorizontal();
415+
GUILayout.EndHorizontal();
416416
}
417417

418-
GUIUnstrip.BeginHorizontal();
419-
if (GUIUnstrip.Button(EVALUATE_LABEL, new GUILayoutOption[] { GUILayout.Width(70) }))
418+
GUILayout.BeginHorizontal(null);
419+
if (GUILayout.Button(EVALUATE_LABEL, new GUILayoutOption[] { GUILayout.Width(70) }))
420420
{
421421
if (cm != null)
422422
{
@@ -427,53 +427,53 @@ public void Draw(Rect window, float labelWidth = 215f)
427427
UpdateValue();
428428
}
429429
}
430-
if (GUIUnstrip.Button("Cancel", new GUILayoutOption[] { GUILayout.Width(70) }))
430+
if (GUILayout.Button("Cancel", new GUILayoutOption[] { GUILayout.Width(70) }))
431431
{
432432
m_isEvaluating = false;
433433
}
434-
GUIUnstrip.EndHorizontal();
434+
GUILayout.EndHorizontal();
435435
}
436436
else
437437
{
438-
if (GUIUnstrip.Button($"Evaluate ({m_arguments.Length} params)", new GUILayoutOption[] { GUILayout.Width(150) }))
438+
if (GUILayout.Button($"Evaluate ({m_arguments.Length} params)", new GUILayoutOption[] { GUILayout.Width(150) }))
439439
{
440440
m_isEvaluating = true;
441441
}
442442
}
443443

444-
GUIUnstrip.EndVertical();
444+
GUILayout.EndVertical();
445445

446446
// new line and space
447-
GUIUnstrip.EndHorizontal();
448-
GUIUnstrip.BeginHorizontal();
447+
GUILayout.EndHorizontal();
448+
GUILayout.BeginHorizontal(null);
449449
GUIUnstrip.Space(labelWidth);
450450
}
451451
else if (cm != null)
452452
{
453-
//GUIUnstrip.BeginHorizontal();
453+
//GUILayout.BeginHorizontal(null);
454454

455-
if (GUIUnstrip.Button(EVALUATE_LABEL, new GUILayoutOption[] { GUILayout.Width(70) }))
455+
if (GUILayout.Button(EVALUATE_LABEL, new GUILayoutOption[] { GUILayout.Width(70) }))
456456
{
457457
cm.Evaluate();
458458
}
459459

460460
// new line and space
461-
GUIUnstrip.EndHorizontal();
462-
GUIUnstrip.BeginHorizontal();
461+
GUILayout.EndHorizontal();
462+
GUILayout.BeginHorizontal(null);
463463
GUIUnstrip.Space(labelWidth);
464464
}
465465

466466
if (!string.IsNullOrEmpty(ReflectionException))
467467
{
468-
GUIUnstrip.Label("<color=red>Reflection failed!</color> (" + ReflectionException + ")");
468+
GUILayout.Label("<color=red>Reflection failed!</color> (" + ReflectionException + ")", null);
469469
}
470470
else if ((HasParameters || this is CacheMethod) && !m_evaluated)
471471
{
472-
GUIUnstrip.Label($"<color=grey><i>Not yet evaluated</i></color> (<color=#2df7b2>{ValueTypeName}</color>)");
472+
GUILayout.Label($"<color=grey><i>Not yet evaluated</i></color> (<color=#2df7b2>{ValueTypeName}</color>)", null);
473473
}
474474
else if (Value == null && !(this is CacheMethod))
475475
{
476-
GUIUnstrip.Label("<i>null (" + ValueTypeName + ")</i>");
476+
GUILayout.Label("<i>null (" + ValueTypeName + ")</i>", null);
477477
}
478478
else
479479
{

src/CachedObjects/Object/CacheDictionary.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public override void DrawValue(Rect window, float width)
202202
{
203203
if (m_cachedKeys == null || m_cachedValues == null)
204204
{
205-
GUIUnstrip.Label("Cached keys or values is null!");
205+
GUILayout.Label("Cached keys or values is null!", null);
206206
return;
207207
}
208208

@@ -212,14 +212,14 @@ public override void DrawValue(Rect window, float width)
212212

213213
if (!IsExpanded)
214214
{
215-
if (GUIUnstrip.Button("v", new GUILayoutOption[] { GUILayout.Width(25) }))
215+
if (GUILayout.Button("v", new GUILayoutOption[] { GUILayout.Width(25) }))
216216
{
217217
IsExpanded = true;
218218
}
219219
}
220220
else
221221
{
222-
if (GUIUnstrip.Button("^", new GUILayoutOption[] { GUILayout.Width(25) }))
222+
if (GUILayout.Button("^", new GUILayoutOption[] { GUILayout.Width(25) }))
223223
{
224224
IsExpanded = false;
225225
}
@@ -229,7 +229,7 @@ public override void DrawValue(Rect window, float width)
229229

230230
GUI.skin.button.alignment = TextAnchor.MiddleLeft;
231231
string btnLabel = $"[{count}] <color=#2df7b2>Dictionary<{TypeOfKeys.FullName}, {TypeOfValues.FullName}></color>";
232-
if (GUIUnstrip.Button(btnLabel, new GUILayoutOption[] { GUILayout.Width(negativeWhitespace) }))
232+
if (GUILayout.Button(btnLabel, new GUILayoutOption[] { GUILayout.Width(negativeWhitespace) }))
233233
{
234234
WindowManager.InspectObject(Value, out bool _);
235235
}
@@ -243,19 +243,19 @@ public override void DrawValue(Rect window, float width)
243243

244244
if (count > Pages.ItemsPerPage)
245245
{
246-
GUIUnstrip.EndHorizontal();
247-
GUIUnstrip.BeginHorizontal();
246+
GUILayout.EndHorizontal();
247+
GUILayout.BeginHorizontal(null);
248248

249249
GUIUnstrip.Space(whitespace);
250250

251251
Pages.CurrentPageLabel();
252252

253253
// prev/next page buttons
254-
if (GUIUnstrip.Button("< Prev", new GUILayoutOption[] { GUILayout.Width(60) }))
254+
if (GUILayout.Button("< Prev", new GUILayoutOption[] { GUILayout.Width(60) }))
255255
{
256256
Pages.TurnPage(Turn.Left);
257257
}
258-
if (GUIUnstrip.Button("Next >", new GUILayoutOption[] { GUILayout.Width(60) }))
258+
if (GUILayout.Button("Next >", new GUILayoutOption[] { GUILayout.Width(60) }))
259259
{
260260
Pages.TurnPage(Turn.Right);
261261
}
@@ -273,24 +273,24 @@ public override void DrawValue(Rect window, float width)
273273
var val = m_cachedValues[i];
274274

275275
//collapsing the BeginHorizontal called from ReflectionWindow.WindowFunction or previous array entry
276-
GUIUnstrip.EndHorizontal();
277-
GUIUnstrip.BeginHorizontal();
276+
GUILayout.EndHorizontal();
277+
GUILayout.BeginHorizontal(null);
278278

279279
//GUIUnstrip.Space(whitespace);
280280

281281
if (key == null || val == null)
282282
{
283-
GUIUnstrip.Label($"[{i}] <i><color=grey>(null)</color></i>");
283+
GUILayout.Label($"[{i}] <i><color=grey>(null)</color></i>", null);
284284
}
285285
else
286286
{
287287
GUI.skin.label.alignment = TextAnchor.MiddleCenter;
288-
GUIUnstrip.Label($"[{i}]", new GUILayoutOption[] { GUILayout.Width(30) });
288+
GUILayout.Label($"[{i}]", new GUILayoutOption[] { GUILayout.Width(30) });
289289

290-
GUIUnstrip.Label("Key:", new GUILayoutOption[] { GUILayout.Width(40) });
290+
GUILayout.Label("Key:", new GUILayoutOption[] { GUILayout.Width(40) });
291291
key.DrawValue(window, (window.width / 2) - 30f);
292292

293-
GUIUnstrip.Label("Value:", new GUILayoutOption[] { GUILayout.Width(40) });
293+
GUILayout.Label("Value:", new GUILayoutOption[] { GUILayout.Width(40) });
294294
val.DrawValue(window, (window.width / 2) - 30f);
295295
}
296296

src/CachedObjects/Object/CacheList.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ public override void DrawValue(Rect window, float width)
264264
{
265265
if (m_cachedEntries == null)
266266
{
267-
GUIUnstrip.Label("m_cachedEntries is null!");
267+
GUILayout.Label("m_cachedEntries is null!", null);
268268
return;
269269
}
270270

@@ -274,14 +274,14 @@ public override void DrawValue(Rect window, float width)
274274

275275
if (!IsExpanded)
276276
{
277-
if (GUIUnstrip.Button("v", new GUILayoutOption[] { GUILayout.Width(25) }))
277+
if (GUILayout.Button("v", new GUILayoutOption[] { GUILayout.Width(25) }))
278278
{
279279
IsExpanded = true;
280280
}
281281
}
282282
else
283283
{
284-
if (GUIUnstrip.Button("^", new GUILayoutOption[] { GUILayout.Width(25) }))
284+
if (GUILayout.Button("^", new GUILayoutOption[] { GUILayout.Width(25) }))
285285
{
286286
IsExpanded = false;
287287
}
@@ -291,7 +291,7 @@ public override void DrawValue(Rect window, float width)
291291

292292
GUI.skin.button.alignment = TextAnchor.MiddleLeft;
293293
string btnLabel = $"[{count}] <color=#2df7b2>{EntryType.FullName}</color>";
294-
if (GUIUnstrip.Button(btnLabel, new GUILayoutOption[] { GUILayout.MaxWidth(negativeWhitespace) }))
294+
if (GUILayout.Button(btnLabel, new GUILayoutOption[] { GUILayout.MaxWidth(negativeWhitespace) }))
295295
{
296296
WindowManager.InspectObject(Value, out bool _);
297297
}
@@ -305,19 +305,19 @@ public override void DrawValue(Rect window, float width)
305305

306306
if (count > Pages.ItemsPerPage)
307307
{
308-
GUIUnstrip.EndHorizontal();
309-
GUIUnstrip.BeginHorizontal();
308+
GUILayout.EndHorizontal();
309+
GUILayout.BeginHorizontal(null);
310310

311311
GUIUnstrip.Space(whitespace);
312312

313313
Pages.CurrentPageLabel();
314314

315315
// prev/next page buttons
316-
if (GUIUnstrip.Button("< Prev", new GUILayoutOption[] { GUILayout.Width(60) }))
316+
if (GUILayout.Button("< Prev", new GUILayoutOption[] { GUILayout.Width(60) }))
317317
{
318318
Pages.TurnPage(Turn.Left);
319319
}
320-
if (GUIUnstrip.Button("Next >", new GUILayoutOption[] { GUILayout.Width(60) }))
320+
if (GUILayout.Button("Next >", new GUILayoutOption[] { GUILayout.Width(60) }))
321321
{
322322
Pages.TurnPage(Turn.Right);
323323
}
@@ -334,19 +334,19 @@ public override void DrawValue(Rect window, float width)
334334
var entry = m_cachedEntries[i];
335335

336336
//collapsing the BeginHorizontal called from ReflectionWindow.WindowFunction or previous array entry
337-
GUIUnstrip.EndHorizontal();
338-
GUIUnstrip.BeginHorizontal();
337+
GUILayout.EndHorizontal();
338+
GUILayout.BeginHorizontal(null);
339339

340340
GUIUnstrip.Space(whitespace);
341341

342342
if (entry == null || entry.Value == null)
343343
{
344-
GUIUnstrip.Label($"[{i}] <i><color=grey>(null)</color></i>");
344+
GUILayout.Label($"[{i}] <i><color=grey>(null)</color></i>", null);
345345
}
346346
else
347347
{
348348
GUI.skin.label.alignment = TextAnchor.MiddleCenter;
349-
GUIUnstrip.Label($"[{i}]", new GUILayoutOption[] { GUILayout.Width(30) });
349+
GUILayout.Label($"[{i}]", new GUILayoutOption[] { GUILayout.Width(30) });
350350

351351
entry.DrawValue(window, window.width - (whitespace + 85));
352352
}

src/CachedObjects/Other/CacheMethod.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ public override void DrawValue(Rect window, float width)
7878
}
7979
else
8080
{
81-
GUIUnstrip.Label($"null (<color=#2df7b2>{ValueTypeName}</color>)");
81+
GUILayout.Label($"null (<color=#2df7b2>{ValueTypeName}</color>)", null);
8282
}
8383
}
8484
else
8585
{
86-
GUIUnstrip.Label($"<color=grey><i>Not yet evaluated</i></color> (<color=#2df7b2>{ValueTypeName}</color>)");
86+
GUILayout.Label($"<color=grey><i>Not yet evaluated</i></color> (<color=#2df7b2>{ValueTypeName}</color>)", null);
8787
}
8888
}
8989
}

src/CachedObjects/Other/CacheOther.cs

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

5757
GUI.skin.button.alignment = TextAnchor.MiddleLeft;
58-
if (GUIUnstrip.Button(label, new GUILayoutOption[] { GUILayout.Width(width - 15) }))
58+
if (GUILayout.Button(label, new GUILayoutOption[] { GUILayout.Width(width - 15) }))
5959
{
6060
WindowManager.InspectObject(Value, out bool _);
6161
}

src/CachedObjects/Struct/CacheColor.cs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ public override void DrawValue(Rect window, float width)
3535
{
3636
if (!IsExpanded)
3737
{
38-
if (GUIUnstrip.Button("v", new GUILayoutOption[] { GUILayout.Width(25) }))
38+
if (GUILayout.Button("v", new GUILayoutOption[] { GUILayout.Width(25) }))
3939
{
4040
IsExpanded = true;
4141
}
4242
}
4343
else
4444
{
45-
if (GUIUnstrip.Button("^", new GUILayoutOption[] { GUILayout.Width(25) }))
45+
if (GUILayout.Button("^", new GUILayoutOption[] { GUILayout.Width(25) }))
4646
{
4747
IsExpanded = false;
4848
}
@@ -51,49 +51,49 @@ public override void DrawValue(Rect window, float width)
5151

5252
//var c = (Color)Value;
5353
//GUI.color = c;
54-
GUIUnstrip.Label($"<color=#2df7b2>Color:</color> {((Color)Value).ToString()}");
54+
GUILayout.Label($"<color=#2df7b2>Color:</color> {((Color)Value).ToString()}", null);
5555
//GUI.color = Color.white;
5656

5757
if (CanWrite && IsExpanded)
5858
{
59-
GUIUnstrip.EndHorizontal();
59+
GUILayout.EndHorizontal();
6060

6161
var whitespace = CalcWhitespace(window);
6262

63-
GUIUnstrip.BeginHorizontal();
63+
GUILayout.BeginHorizontal(null);
6464
GUIUnstrip.Space(whitespace);
65-
GUIUnstrip.Label("R:", new GUILayoutOption[] { GUILayout.Width(30) });
66-
r = GUIUnstrip.TextField(r, new GUILayoutOption[] { GUILayout.Width(120) });
67-
GUIUnstrip.EndHorizontal();
65+
GUILayout.Label("R:", new GUILayoutOption[] { GUILayout.Width(30) });
66+
r = GUILayout.TextField(r, new GUILayoutOption[] { GUILayout.Width(120) });
67+
GUILayout.EndHorizontal();
6868

69-
GUIUnstrip.BeginHorizontal();
69+
GUILayout.BeginHorizontal(null);
7070
GUIUnstrip.Space(whitespace);
71-
GUIUnstrip.Label("G:", new GUILayoutOption[] { GUILayout.Width(30) });
72-
g = GUIUnstrip.TextField(g, new GUILayoutOption[] { GUILayout.Width(120) });
73-
GUIUnstrip.EndHorizontal();
71+
GUILayout.Label("G:", new GUILayoutOption[] { GUILayout.Width(30) });
72+
g = GUILayout.TextField(g, new GUILayoutOption[] { GUILayout.Width(120) });
73+
GUILayout.EndHorizontal();
7474

75-
GUIUnstrip.BeginHorizontal();
75+
GUILayout.BeginHorizontal(null);
7676
GUIUnstrip.Space(whitespace);
77-
GUIUnstrip.Label("B:", new GUILayoutOption[] { GUILayout.Width(30) });
78-
b = GUIUnstrip.TextField(b, new GUILayoutOption[] { GUILayout.Width(120) });
79-
GUIUnstrip.EndHorizontal();
77+
GUILayout.Label("B:", new GUILayoutOption[] { GUILayout.Width(30) });
78+
b = GUILayout.TextField(b, new GUILayoutOption[] { GUILayout.Width(120) });
79+
GUILayout.EndHorizontal();
8080

81-
GUIUnstrip.BeginHorizontal();
81+
GUILayout.BeginHorizontal(null);
8282
GUIUnstrip.Space(whitespace);
83-
GUIUnstrip.Label("A:", new GUILayoutOption[] { GUILayout.Width(30) });
84-
a = GUIUnstrip.TextField(a, new GUILayoutOption[] { GUILayout.Width(120) });
85-
GUIUnstrip.EndHorizontal();
83+
GUILayout.Label("A:", new GUILayoutOption[] { GUILayout.Width(30) });
84+
a = GUILayout.TextField(a, new GUILayoutOption[] { GUILayout.Width(120) });
85+
GUILayout.EndHorizontal();
8686

8787
// draw set value button
88-
GUIUnstrip.BeginHorizontal();
88+
GUILayout.BeginHorizontal(null);
8989
GUIUnstrip.Space(whitespace);
90-
if (GUIUnstrip.Button("<color=lime>Apply</color>", new GUILayoutOption[] { GUILayout.Width(155) }))
90+
if (GUILayout.Button("<color=lime>Apply</color>", new GUILayoutOption[] { GUILayout.Width(155) }))
9191
{
9292
SetValueFromInput();
9393
}
94-
GUIUnstrip.EndHorizontal();
94+
GUILayout.EndHorizontal();
9595

96-
GUIUnstrip.BeginHorizontal();
96+
GUILayout.BeginHorizontal(null);
9797
}
9898
}
9999

0 commit comments

Comments
 (0)