Skip to content

Commit 05a57b8

Browse files
committed
Use IsWrapped.
1 parent 82ead06 commit 05a57b8

5 files changed

Lines changed: 30 additions & 12 deletions

File tree

ReClass.NET/Nodes/BaseMatrixNode.cs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ protected Size DrawMatrixType(ViewInfo view, int x, int y, string type, DrawMatr
2222
Contract.Requires(type != null);
2323
Contract.Requires(drawValues != null);
2424

25-
if (IsHidden)
25+
if (IsHidden && !IsWrapped)
2626
{
2727
return DrawHidden(view, x, y);
2828
}
@@ -43,7 +43,10 @@ protected Size DrawMatrixType(ViewInfo view, int x, int y, string type, DrawMatr
4343
x = AddAddressOffset(view, x, y);
4444

4545
x = AddText(view, x, y, view.Settings.TypeColor, HotSpot.NoneId, type) + view.Font.Width;
46-
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NameId, Name);
46+
if (!IsWrapped)
47+
{
48+
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NameId, Name);
49+
}
4750
x = AddOpenClose(view, x, y);
4851

4952
x += view.Font.Width;
@@ -68,7 +71,7 @@ protected Size DrawVectorType(ViewInfo view, int x, int y, string type, DrawVect
6871
Contract.Requires(type != null);
6972
Contract.Requires(drawValues != null);
7073

71-
if (IsHidden)
74+
if (IsHidden && !IsWrapped)
7275
{
7376
return DrawHidden(view, x, y);
7477
}
@@ -86,7 +89,10 @@ protected Size DrawVectorType(ViewInfo view, int x, int y, string type, DrawVect
8689
x = AddAddressOffset(view, x, y);
8790

8891
x = AddText(view, x, y, view.Settings.TypeColor, HotSpot.NoneId, type) + view.Font.Width;
89-
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NameId, Name);
92+
if (!IsWrapped)
93+
{
94+
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NameId, Name);
95+
}
9096
x = AddOpenClose(view, x, y);
9197

9298
if (levelsOpen[view.Level])

ReClass.NET/Nodes/BitFieldNode.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ private string ConvertValueToBitString(MemoryBuffer memory)
9393

9494
public override Size Draw(ViewInfo view, int x, int y)
9595
{
96-
if (IsHidden)
96+
if (IsHidden && !IsWrapped)
9797
{
9898
return DrawHidden(view, x, y);
9999
}
@@ -110,7 +110,10 @@ public override Size Draw(ViewInfo view, int x, int y)
110110
x = AddAddressOffset(view, x, y);
111111

112112
x = AddText(view, x, y, view.Settings.TypeColor, HotSpot.NoneId, "Bits") + view.Font.Width;
113-
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NameId, Name) + view.Font.Width;
113+
if (!IsWrapped)
114+
{
115+
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NameId, Name) + view.Font.Width;
116+
}
114117

115118
x = AddOpenClose(view, x, y) + view.Font.Width;
116119

ReClass.NET/Nodes/BoolNode.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public override void GetUserInterfaceInfo(out string name, out Image icon)
1515

1616
public override Size Draw(ViewInfo view, int x, int y)
1717
{
18-
if (IsHidden)
18+
if (IsHidden && !IsWrapped)
1919
{
2020
return DrawHidden(view, x, y);
2121
}
@@ -31,7 +31,10 @@ public override Size Draw(ViewInfo view, int x, int y)
3131
x = AddAddressOffset(view, x, y);
3232

3333
x = AddText(view, x, y, view.Settings.TypeColor, HotSpot.NoneId, "Bool") + view.Font.Width;
34-
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NameId, Name) + view.Font.Width;
34+
if (!IsWrapped)
35+
{
36+
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NameId, Name) + view.Font.Width;
37+
}
3538
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, "=") + view.Font.Width;
3639

3740
var value = view.Memory.ReadUInt8(Offset);

ReClass.NET/Nodes/FunctionNode.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public override Size Draw(ViewInfo view, int x, int y)
3434
{
3535
Contract.Requires(view != null);
3636

37-
if (IsHidden)
37+
if (IsHidden && !IsWrapped)
3838
{
3939
return DrawHidden(view, x, y);
4040
}
@@ -54,7 +54,10 @@ public override Size Draw(ViewInfo view, int x, int y)
5454
x = AddAddressOffset(view, x, y);
5555

5656
x = AddText(view, x, y, view.Settings.TypeColor, HotSpot.NoneId, "Function") + view.Font.Width;
57-
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NameId, Name) + view.Font.Width;
57+
if (!IsWrapped)
58+
{
59+
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NameId, Name) + view.Font.Width;
60+
}
5861

5962
x = AddOpenClose(view, x, y) + view.Font.Width;
6063

ReClass.NET/Nodes/PointerNode.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public override bool CanChangeInnerNodeTo(BaseNode node)
3131

3232
public override Size Draw(ViewInfo view, int x, int y)
3333
{
34-
if (IsHidden)
34+
if (IsHidden && !IsWrapped)
3535
{
3636
return DrawHidden(view, x, y);
3737
}
@@ -57,7 +57,10 @@ public override Size Draw(ViewInfo view, int x, int y)
5757
x = AddAddressOffset(view, x, y);
5858

5959
x = AddText(view, x, y, view.Settings.TypeColor, HotSpot.NoneId, "Ptr") + view.Font.Width;
60-
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NameId, Name) + view.Font.Width;
60+
if (!IsWrapped)
61+
{
62+
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NameId, Name) + view.Font.Width;
63+
}
6164
if (InnerNode == null)
6265
{
6366
x = AddText(view, x, y, view.Settings.ValueColor, HotSpot.NoneId, "<void>") + view.Font.Width;

0 commit comments

Comments
 (0)