fix style to match the linters
This commit is contained in:
parent
74e90c84e6
commit
0974960556
@ -3,7 +3,7 @@ class BoxPainter extends BoxPainterBase;
|
|||||||
public final function DrawBox(float X, float Y, float Width, float Height, float Edge, optional byte Shape = 0)
|
public final function DrawBox(float X, float Y, float Width, float Height, float Edge, optional byte Shape = 0)
|
||||||
{
|
{
|
||||||
Edge = FMin(FMin(Edge, Width * 0.5), Height * 0.5);
|
Edge = FMin(FMin(Edge, Width * 0.5), Height * 0.5);
|
||||||
|
|
||||||
switch (Shape)
|
switch (Shape)
|
||||||
{
|
{
|
||||||
case 100:
|
case 100:
|
||||||
@ -15,7 +15,7 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_Corner // BottomRight //
|
ECS_Corner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 110:
|
case 110:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
@ -25,17 +25,17 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_BeveledCorner // BottomRight //
|
ECS_BeveledCorner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 111:
|
case 111:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
ECS_Corner, // TopLeft // | \
|
ECS_Corner, // TopLeft // | \
|
||||||
ECS_BeveledCorner, // TopRight // | |
|
ECS_BeveledCorner, // TopRight // | |
|
||||||
ECS_BeveledCorner, // BottomLeft // \______|
|
ECS_BeveledCorner, // BottomLeft // \______|
|
||||||
ECS_Corner // BottomRight //
|
ECS_Corner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 120:
|
case 120:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // |\____/|
|
X, Y, Width, Height, Edge, // |\____/|
|
||||||
@ -45,17 +45,17 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_VerticalCorner // BottomRight // |/ \|
|
ECS_VerticalCorner // BottomRight // |/ \|
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 121:
|
case 121:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // _______
|
X, Y, Width, Height, Edge, // _______
|
||||||
ECS_HorisontalCorner, // TopLeft // \ /
|
ECS_HorisontalCorner, // TopLeft // \ /
|
||||||
ECS_HorisontalCorner, // TopRight // | |
|
ECS_HorisontalCorner, // TopRight // | |
|
||||||
ECS_HorisontalCorner, // BottomLeft // | |
|
ECS_HorisontalCorner, // BottomLeft // | |
|
||||||
ECS_HorisontalCorner // BottomRight // /_____\
|
ECS_HorisontalCorner // BottomRight // /_____\
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 130:
|
case 130:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
@ -65,17 +65,17 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_BeveledCorner // BottomRight //
|
ECS_BeveledCorner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 131:
|
case 131:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
ECS_Corner, // TopLeft // | \
|
ECS_Corner, // TopLeft // | \
|
||||||
ECS_BeveledCorner, // TopRight // | |
|
ECS_BeveledCorner, // TopRight // | |
|
||||||
ECS_Corner, // BottomLeft // |______|
|
ECS_Corner, // BottomLeft // |______|
|
||||||
ECS_Corner // BottomRight //
|
ECS_Corner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 132:
|
case 132:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
@ -85,7 +85,7 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_Corner // BottomRight //
|
ECS_Corner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 133:
|
case 133:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
@ -95,17 +95,17 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_Corner // BottomRight //
|
ECS_Corner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 140:
|
case 140:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
ECS_BeveledCorner, // TopLeft // / \
|
ECS_BeveledCorner, // TopLeft // / \
|
||||||
ECS_BeveledCorner, // TopRight // | |
|
ECS_BeveledCorner, // TopRight // | |
|
||||||
ECS_BeveledCorner, // BottomLeft // \______|
|
ECS_BeveledCorner, // BottomLeft // \______|
|
||||||
ECS_Corner // BottomRight //
|
ECS_Corner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 141:
|
case 141:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
@ -115,47 +115,47 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_BeveledCorner // BottomRight //
|
ECS_BeveledCorner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 142:
|
case 142:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
ECS_Corner, // TopLeft // | \
|
ECS_Corner, // TopLeft // | \
|
||||||
ECS_BeveledCorner, // TopRight // | |
|
ECS_BeveledCorner, // TopRight // | |
|
||||||
ECS_BeveledCorner, // BottomLeft // \______/
|
ECS_BeveledCorner, // BottomLeft // \______/
|
||||||
ECS_BeveledCorner // BottomRight //
|
ECS_BeveledCorner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 143:
|
case 143:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
ECS_BeveledCorner, // TopLeft // / \
|
ECS_BeveledCorner, // TopLeft // / \
|
||||||
ECS_BeveledCorner, // TopRight // | |
|
ECS_BeveledCorner, // TopRight // | |
|
||||||
ECS_Corner, // BottomLeft // |______/
|
ECS_Corner, // BottomLeft // |______/
|
||||||
ECS_BeveledCorner // BottomRight //
|
ECS_BeveledCorner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 150:
|
case 150:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
ECS_BeveledCorner, // TopLeft // / \
|
ECS_BeveledCorner, // TopLeft // / \
|
||||||
ECS_BeveledCorner, // TopRight // | |
|
ECS_BeveledCorner, // TopRight // | |
|
||||||
ECS_VerticalCorner, // BottomLeft // | ____ |
|
ECS_VerticalCorner, // BottomLeft // | ____ |
|
||||||
ECS_VerticalCorner // BottomRight // |/ \|
|
ECS_VerticalCorner // BottomRight // |/ \|
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 151:
|
case 151:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // _______
|
X, Y, Width, Height, Edge, // _______
|
||||||
ECS_BeveledCorner, // TopLeft // / /
|
ECS_BeveledCorner, // TopLeft // / /
|
||||||
ECS_HorisontalCorner, // TopRight // | |
|
ECS_HorisontalCorner, // TopRight // | |
|
||||||
ECS_BeveledCorner, // BottomLeft // \______\
|
ECS_BeveledCorner, // BottomLeft // \______\
|
||||||
ECS_HorisontalCorner // BottomRight //
|
ECS_HorisontalCorner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 152:
|
case 152:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // |\____/|
|
X, Y, Width, Height, Edge, // |\____/|
|
||||||
@ -165,17 +165,17 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_BeveledCorner // BottomRight //
|
ECS_BeveledCorner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 153:
|
case 153:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // _______
|
X, Y, Width, Height, Edge, // _______
|
||||||
ECS_HorisontalCorner, // TopLeft // \ \
|
ECS_HorisontalCorner, // TopLeft // \ \
|
||||||
ECS_BeveledCorner, // TopRight // | |
|
ECS_BeveledCorner, // TopRight // | |
|
||||||
ECS_HorisontalCorner, // BottomLeft // /______/
|
ECS_HorisontalCorner, // BottomLeft // /______/
|
||||||
ECS_BeveledCorner // BottomRight //
|
ECS_BeveledCorner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 160:
|
case 160:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
@ -185,47 +185,47 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_BeveledCorner // BottomRight //
|
ECS_BeveledCorner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 161:
|
case 161:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // |\_____
|
X, Y, Width, Height, Edge, // |\_____
|
||||||
ECS_VerticalCorner, // TopLeft // | \
|
ECS_VerticalCorner, // TopLeft // | \
|
||||||
ECS_BeveledCorner, // TopRight // | |
|
ECS_BeveledCorner, // TopRight // | |
|
||||||
ECS_BeveledCorner, // BottomLeft // \______/
|
ECS_BeveledCorner, // BottomLeft // \______/
|
||||||
ECS_BeveledCorner // BottomRight //
|
ECS_BeveledCorner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 162:
|
case 162:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
ECS_BeveledCorner, // TopLeft // / \
|
ECS_BeveledCorner, // TopLeft // / \
|
||||||
ECS_BeveledCorner, // TopRight // | |
|
ECS_BeveledCorner, // TopRight // | |
|
||||||
ECS_HorisontalCorner, // BottomLeft // /______/
|
ECS_HorisontalCorner, // BottomLeft // /______/
|
||||||
ECS_BeveledCorner // BottomRight //
|
ECS_BeveledCorner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 163:
|
case 163:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
ECS_BeveledCorner, // TopLeft // / \
|
ECS_BeveledCorner, // TopLeft // / \
|
||||||
ECS_BeveledCorner, // TopRight // | |
|
ECS_BeveledCorner, // TopRight // | |
|
||||||
ECS_BeveledCorner, // BottomLeft // \_____ |
|
ECS_BeveledCorner, // BottomLeft // \_____ |
|
||||||
ECS_VerticalCorner // BottomRight // \|
|
ECS_VerticalCorner // BottomRight // \|
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 170:
|
case 170:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
ECS_BeveledCorner, // TopLeft // / \
|
ECS_BeveledCorner, // TopLeft // / \
|
||||||
ECS_BeveledCorner, // TopRight // | |
|
ECS_BeveledCorner, // TopRight // | |
|
||||||
ECS_BeveledCorner, // BottomLeft // \______\
|
ECS_BeveledCorner, // BottomLeft // \______\
|
||||||
ECS_HorisontalCorner // BottomRight //
|
ECS_HorisontalCorner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 171:
|
case 171:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // _____/|
|
X, Y, Width, Height, Edge, // _____/|
|
||||||
@ -235,27 +235,27 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_BeveledCorner // BottomRight //
|
ECS_BeveledCorner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 172:
|
case 172:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // _______
|
X, Y, Width, Height, Edge, // _______
|
||||||
ECS_HorisontalCorner, // TopLeft // \ \
|
ECS_HorisontalCorner, // TopLeft // \ \
|
||||||
ECS_BeveledCorner, // TopRight // | |
|
ECS_BeveledCorner, // TopRight // | |
|
||||||
ECS_BeveledCorner, // BottomLeft // \______/
|
ECS_BeveledCorner, // BottomLeft // \______/
|
||||||
ECS_BeveledCorner // BottomRight //
|
ECS_BeveledCorner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 173:
|
case 173:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
ECS_BeveledCorner, // TopLeft // / \
|
ECS_BeveledCorner, // TopLeft // / \
|
||||||
ECS_BeveledCorner, // TopRight // | |
|
ECS_BeveledCorner, // TopRight // | |
|
||||||
ECS_VerticalCorner, // BottomLeft // | _____/
|
ECS_VerticalCorner, // BottomLeft // | _____/
|
||||||
ECS_BeveledCorner // BottomRight // |/
|
ECS_BeveledCorner // BottomRight // |/
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 180:
|
case 180:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // _______
|
X, Y, Width, Height, Edge, // _______
|
||||||
@ -265,7 +265,7 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_Corner // BottomRight //
|
ECS_Corner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 181:
|
case 181:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // |\_____
|
X, Y, Width, Height, Edge, // |\_____
|
||||||
@ -275,7 +275,7 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_Corner // BottomRight //
|
ECS_Corner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 182:
|
case 182:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
@ -285,7 +285,7 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_Corner // BottomRight //
|
ECS_Corner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 183:
|
case 183:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
@ -295,17 +295,17 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_VerticalCorner // BottomRight // \|
|
ECS_VerticalCorner // BottomRight // \|
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 190:
|
case 190:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
ECS_Corner, // TopLeft // | |
|
ECS_Corner, // TopLeft // | |
|
||||||
ECS_Corner, // TopRight // | |
|
ECS_Corner, // TopRight // | |
|
||||||
ECS_Corner, // BottomLeft // |______\
|
ECS_Corner, // BottomLeft // |______\
|
||||||
ECS_HorisontalCorner // BottomRight //
|
ECS_HorisontalCorner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 191:
|
case 191:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // _____/|
|
X, Y, Width, Height, Edge, // _____/|
|
||||||
@ -315,7 +315,7 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_Corner // BottomRight //
|
ECS_Corner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 192:
|
case 192:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // _______
|
X, Y, Width, Height, Edge, // _______
|
||||||
@ -325,7 +325,7 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_Corner // BottomRight //
|
ECS_Corner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 193:
|
case 193:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
@ -335,7 +335,7 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_Corner // BottomRight // |/
|
ECS_Corner // BottomRight // |/
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 200:
|
case 200:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
@ -345,17 +345,17 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_VerticalCorner // BottomRight // |/ \|
|
ECS_VerticalCorner // BottomRight // |/ \|
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 201:
|
case 201:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // _______
|
X, Y, Width, Height, Edge, // _______
|
||||||
ECS_Corner, // TopLeft // | /
|
ECS_Corner, // TopLeft // | /
|
||||||
ECS_HorisontalCorner, // TopRight // | |
|
ECS_HorisontalCorner, // TopRight // | |
|
||||||
ECS_Corner, // BottomLeft // |______\
|
ECS_Corner, // BottomLeft // |______\
|
||||||
ECS_HorisontalCorner // BottomRight //
|
ECS_HorisontalCorner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 202:
|
case 202:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // |\____/|
|
X, Y, Width, Height, Edge, // |\____/|
|
||||||
@ -365,7 +365,7 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_Corner // BottomRight //
|
ECS_Corner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 203:
|
case 203:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // _______
|
X, Y, Width, Height, Edge, // _______
|
||||||
@ -375,7 +375,7 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_Corner // BottomRight //
|
ECS_Corner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 210:
|
case 210:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ________
|
X, Y, Width, Height, Edge, // ________
|
||||||
@ -385,27 +385,27 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_BeveledCorner // BottomRight //
|
ECS_BeveledCorner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 211:
|
case 211:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // |\_____
|
X, Y, Width, Height, Edge, // |\_____
|
||||||
ECS_VerticalCorner, // TopLeft // | \
|
ECS_VerticalCorner, // TopLeft // | \
|
||||||
ECS_BeveledCorner, // TopRight // | |
|
ECS_BeveledCorner, // TopRight // | |
|
||||||
ECS_VerticalCorner, // BottomLeft // | _____/
|
ECS_VerticalCorner, // BottomLeft // | _____/
|
||||||
ECS_BeveledCorner // BottomRight // |/
|
ECS_BeveledCorner // BottomRight // |/
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 212:
|
case 212:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
ECS_BeveledCorner, // TopLeft // / \
|
ECS_BeveledCorner, // TopLeft // / \
|
||||||
ECS_BeveledCorner, // TopRight // | |
|
ECS_BeveledCorner, // TopRight // | |
|
||||||
ECS_HorisontalCorner, // BottomLeft // /______\
|
ECS_HorisontalCorner, // BottomLeft // /______\
|
||||||
ECS_HorisontalCorner // BottomRight //
|
ECS_HorisontalCorner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 213:
|
case 213:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // _____/|
|
X, Y, Width, Height, Edge, // _____/|
|
||||||
@ -415,7 +415,7 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_VerticalCorner // BottomRight // \|
|
ECS_VerticalCorner // BottomRight // \|
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 220:
|
case 220:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ________
|
X, Y, Width, Height, Edge, // ________
|
||||||
@ -425,7 +425,7 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_Corner // BottomRight //
|
ECS_Corner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 221:
|
case 221:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // |\_____
|
X, Y, Width, Height, Edge, // |\_____
|
||||||
@ -435,17 +435,17 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_Corner // BottomRight // |/
|
ECS_Corner // BottomRight // |/
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 222:
|
case 222:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
ECS_Corner, // TopLeft // | |
|
ECS_Corner, // TopLeft // | |
|
||||||
ECS_Corner, // TopRight // | |
|
ECS_Corner, // TopRight // | |
|
||||||
ECS_HorisontalCorner, // BottomLeft // /______\
|
ECS_HorisontalCorner, // BottomLeft // /______\
|
||||||
ECS_HorisontalCorner // BottomRight //
|
ECS_HorisontalCorner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 223:
|
case 223:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // _____/|
|
X, Y, Width, Height, Edge, // _____/|
|
||||||
@ -455,37 +455,37 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_VerticalCorner // BottomRight // \|
|
ECS_VerticalCorner // BottomRight // \|
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 230:
|
case 230:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // _______
|
X, Y, Width, Height, Edge, // _______
|
||||||
ECS_BeveledCorner, // TopLeft // / /
|
ECS_BeveledCorner, // TopLeft // / /
|
||||||
ECS_HorisontalCorner, // TopRight // | |
|
ECS_HorisontalCorner, // TopRight // | |
|
||||||
ECS_HorisontalCorner, // BottomLeft // /______/
|
ECS_HorisontalCorner, // BottomLeft // /______/
|
||||||
ECS_BeveledCorner // BottomRight //
|
ECS_BeveledCorner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 231:
|
case 231:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // |\_____
|
X, Y, Width, Height, Edge, // |\_____
|
||||||
ECS_VerticalCorner, // TopLeft // | \
|
ECS_VerticalCorner, // TopLeft // | \
|
||||||
ECS_BeveledCorner, // TopRight // | |
|
ECS_BeveledCorner, // TopRight // | |
|
||||||
ECS_BeveledCorner, // BottomLeft // \_____ |
|
ECS_BeveledCorner, // BottomLeft // \_____ |
|
||||||
ECS_VerticalCorner // BottomRight // \|
|
ECS_VerticalCorner // BottomRight // \|
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 232:
|
case 232:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // _______
|
X, Y, Width, Height, Edge, // _______
|
||||||
ECS_HorisontalCorner, // TopLeft // \ \
|
ECS_HorisontalCorner, // TopLeft // \ \
|
||||||
ECS_BeveledCorner, // TopRight // | |
|
ECS_BeveledCorner, // TopRight // | |
|
||||||
ECS_BeveledCorner, // BottomLeft // \______\
|
ECS_BeveledCorner, // BottomLeft // \______\
|
||||||
ECS_HorisontalCorner // BottomRight //
|
ECS_HorisontalCorner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 233:
|
case 233:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // _____/|
|
X, Y, Width, Height, Edge, // _____/|
|
||||||
@ -495,17 +495,17 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_BeveledCorner // BottomRight // |/
|
ECS_BeveledCorner // BottomRight // |/
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 240:
|
case 240:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // _______
|
X, Y, Width, Height, Edge, // _______
|
||||||
ECS_Corner, // TopLeft // | /
|
ECS_Corner, // TopLeft // | /
|
||||||
ECS_HorisontalCorner, // TopRight // | |
|
ECS_HorisontalCorner, // TopRight // | |
|
||||||
ECS_HorisontalCorner, // BottomLeft // /______|
|
ECS_HorisontalCorner, // BottomLeft // /______|
|
||||||
ECS_Corner // BottomRight //
|
ECS_Corner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 241:
|
case 241:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // |\_____
|
X, Y, Width, Height, Edge, // |\_____
|
||||||
@ -515,37 +515,37 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_VerticalCorner // BottomRight // \|
|
ECS_VerticalCorner // BottomRight // \|
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 242:
|
case 242:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // _______
|
X, Y, Width, Height, Edge, // _______
|
||||||
ECS_HorisontalCorner, // TopLeft // \ |
|
ECS_HorisontalCorner, // TopLeft // \ |
|
||||||
ECS_Corner, // TopRight // | |
|
ECS_Corner, // TopRight // | |
|
||||||
ECS_Corner, // BottomLeft // |______\
|
ECS_Corner, // BottomLeft // |______\
|
||||||
ECS_HorisontalCorner // BottomRight //
|
ECS_HorisontalCorner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 243:
|
case 243:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // _____/|
|
X, Y, Width, Height, Edge, // _____/|
|
||||||
ECS_Corner, // TopLeft // | |
|
ECS_Corner, // TopLeft // | |
|
||||||
ECS_VerticalCorner, // TopRight // | |
|
ECS_VerticalCorner, // TopRight // | |
|
||||||
ECS_VerticalCorner, // BottomLeft // | _____|
|
ECS_VerticalCorner, // BottomLeft // | _____|
|
||||||
ECS_Corner // BottomRight // |/
|
ECS_Corner // BottomRight // |/
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 250:
|
case 250:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
ECS_BeveledCorner, // TopLeft // / \
|
ECS_BeveledCorner, // TopLeft // / \
|
||||||
ECS_BeveledCorner, // TopRight // | |
|
ECS_BeveledCorner, // TopRight // | |
|
||||||
ECS_Corner, // BottomLeft // |______|
|
ECS_Corner, // BottomLeft // |______|
|
||||||
ECS_Corner // BottomRight //
|
ECS_Corner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 251:
|
case 251:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
@ -555,7 +555,7 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_Corner // BottomRight //
|
ECS_Corner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 252:
|
case 252:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
@ -565,23 +565,23 @@ public final function DrawBox(float X, float Y, float Width, float Height, float
|
|||||||
ECS_BeveledCorner // BottomRight //
|
ECS_BeveledCorner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 253:
|
case 253:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, // ______
|
X, Y, Width, Height, Edge, // ______
|
||||||
ECS_Corner, // TopLeft // | \
|
ECS_Corner, // TopLeft // | \
|
||||||
ECS_BeveledCorner, // TopRight // | |
|
ECS_BeveledCorner, // TopRight // | |
|
||||||
ECS_Corner, // BottomLeft // |______/
|
ECS_Corner, // BottomLeft // |______/
|
||||||
ECS_BeveledCorner // BottomRight //
|
ECS_BeveledCorner // BottomRight //
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
default:
|
default:
|
||||||
DrawShapedBox(
|
DrawShapedBox(
|
||||||
X, Y, Width, Height, Edge, //
|
X, Y, Width, Height, Edge, //
|
||||||
ECS_BeveledCorner, // TopLeft // ______
|
ECS_BeveledCorner, // TopLeft // ______
|
||||||
ECS_BeveledCorner, // TopRight // / \
|
ECS_BeveledCorner, // TopRight // / \
|
||||||
ECS_BeveledCorner, // BottomLeft // | |
|
ECS_BeveledCorner, // BottomLeft // | |
|
||||||
ECS_BeveledCorner // BottomRight // \______/
|
ECS_BeveledCorner // BottomRight // \______/
|
||||||
);
|
);
|
||||||
|
@ -44,80 +44,80 @@ private final function DrawCorner(float X, float Y, float Edge, byte Position, b
|
|||||||
{
|
{
|
||||||
case ECS_Corner:
|
case ECS_Corner:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case ECS_BeveledCorner:
|
case ECS_BeveledCorner:
|
||||||
Canvas.SetPos(X, Y);
|
Canvas.SetPos(X, Y);
|
||||||
DrawCornerTexture(Edge, ECP_TopLeft);
|
DrawCornerTexture(Edge, ECP_TopLeft);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case ECS_VerticalCorner:
|
case ECS_VerticalCorner:
|
||||||
Canvas.SetPos(X, Y - Edge);
|
Canvas.SetPos(X, Y - Edge);
|
||||||
DrawCornerTexture(Edge, ECP_TopRight);
|
DrawCornerTexture(Edge, ECP_TopRight);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case ECS_HorisontalCorner:
|
case ECS_HorisontalCorner:
|
||||||
Canvas.SetPos(X - Edge, Y);
|
Canvas.SetPos(X - Edge, Y);
|
||||||
DrawCornerTexture(Edge, ECP_BottomLeft);
|
DrawCornerTexture(Edge, ECP_BottomLeft);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
case ECP_TopRight: switch (Shape)
|
case ECP_TopRight: switch (Shape)
|
||||||
{
|
{
|
||||||
case ECS_Corner:
|
case ECS_Corner:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case ECS_BeveledCorner:
|
case ECS_BeveledCorner:
|
||||||
Canvas.SetPos(X - Edge, Y);
|
Canvas.SetPos(X - Edge, Y);
|
||||||
DrawCornerTexture(Edge, ECP_TopRight);
|
DrawCornerTexture(Edge, ECP_TopRight);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case ECS_VerticalCorner:
|
case ECS_VerticalCorner:
|
||||||
Canvas.SetPos(X - Edge, Y - Edge);
|
Canvas.SetPos(X - Edge, Y - Edge);
|
||||||
DrawCornerTexture(Edge, ECP_TopLeft);
|
DrawCornerTexture(Edge, ECP_TopLeft);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case ECS_HorisontalCorner:
|
case ECS_HorisontalCorner:
|
||||||
Canvas.SetPos(X, Y);
|
Canvas.SetPos(X, Y);
|
||||||
DrawCornerTexture(Edge, ECP_BottomRight);
|
DrawCornerTexture(Edge, ECP_BottomRight);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
case ECP_BottomLeft: switch (Shape)
|
case ECP_BottomLeft: switch (Shape)
|
||||||
{
|
{
|
||||||
case ECS_Corner:
|
case ECS_Corner:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case ECS_BeveledCorner:
|
case ECS_BeveledCorner:
|
||||||
Canvas.SetPos(X, Y - Edge);
|
Canvas.SetPos(X, Y - Edge);
|
||||||
DrawCornerTexture(Edge, ECP_BottomLeft);
|
DrawCornerTexture(Edge, ECP_BottomLeft);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case ECS_VerticalCorner:
|
case ECS_VerticalCorner:
|
||||||
Canvas.SetPos(X, Y);
|
Canvas.SetPos(X, Y);
|
||||||
DrawCornerTexture(Edge, ECP_BottomRight);
|
DrawCornerTexture(Edge, ECP_BottomRight);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case ECS_HorisontalCorner:
|
case ECS_HorisontalCorner:
|
||||||
Canvas.SetPos(X - Edge, Y - Edge);
|
Canvas.SetPos(X - Edge, Y - Edge);
|
||||||
DrawCornerTexture(Edge, ECP_TopLeft);
|
DrawCornerTexture(Edge, ECP_TopLeft);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
case ECP_BottomRight: switch (Shape)
|
case ECP_BottomRight: switch (Shape)
|
||||||
{
|
{
|
||||||
case ECS_Corner:
|
case ECS_Corner:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case ECS_BeveledCorner:
|
case ECS_BeveledCorner:
|
||||||
Canvas.SetPos(X - Edge, Y - Edge);
|
Canvas.SetPos(X - Edge, Y - Edge);
|
||||||
DrawCornerTexture(Edge, ECP_BottomRight);
|
DrawCornerTexture(Edge, ECP_BottomRight);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case ECS_VerticalCorner:
|
case ECS_VerticalCorner:
|
||||||
Canvas.SetPos(X - Edge, Y);
|
Canvas.SetPos(X - Edge, Y);
|
||||||
DrawCornerTexture(Edge, ECP_BottomLeft);
|
DrawCornerTexture(Edge, ECP_BottomLeft);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case ECS_HorisontalCorner:
|
case ECS_HorisontalCorner:
|
||||||
Canvas.SetPos(X, Y - Edge);
|
Canvas.SetPos(X, Y - Edge);
|
||||||
DrawCornerTexture(Edge, ECP_TopRight);
|
DrawCornerTexture(Edge, ECP_TopRight);
|
||||||
@ -129,7 +129,7 @@ private final function DrawCorner(float X, float Y, float Edge, byte Position, b
|
|||||||
public final function DrawShapedBox(float X, float Y, float W, float H, float Edge, byte TopLeftShape, byte TopRightShape, byte BottomLeftShape, byte BottomRightShape)
|
public final function DrawShapedBox(float X, float Y, float W, float H, float Edge, byte TopLeftShape, byte TopRightShape, byte BottomLeftShape, byte BottomRightShape)
|
||||||
{
|
{
|
||||||
local float BoxX, BoxW;
|
local float BoxX, BoxW;
|
||||||
|
|
||||||
Canvas.PreOptimizeDrawTiles((
|
Canvas.PreOptimizeDrawTiles((
|
||||||
3 // x3 DrawBoxTexture(...) + x1..x4 DrawCornerTexture(...)
|
3 // x3 DrawBoxTexture(...) + x1..x4 DrawCornerTexture(...)
|
||||||
+ (TopLeftShape == ECS_Corner ? 0 : 1)
|
+ (TopLeftShape == ECS_Corner ? 0 : 1)
|
||||||
@ -137,10 +137,10 @@ public final function DrawShapedBox(float X, float Y, float W, float H, float Ed
|
|||||||
+ (BottomLeftShape == ECS_Corner ? 0 : 1)
|
+ (BottomLeftShape == ECS_Corner ? 0 : 1)
|
||||||
+ (BottomRightShape == ECS_Corner ? 0 : 1)
|
+ (BottomRightShape == ECS_Corner ? 0 : 1)
|
||||||
), Texture);
|
), Texture);
|
||||||
|
|
||||||
// Top Line
|
// Top Line
|
||||||
DrawCorner(X, Y, Edge, ECP_TopLeft, TopLeftShape);
|
DrawCorner(X, Y, Edge, ECP_TopLeft, TopLeftShape);
|
||||||
|
|
||||||
BoxX = X; BoxW = W;
|
BoxX = X; BoxW = W;
|
||||||
if (TopLeftShape == ECS_BeveledCorner)
|
if (TopLeftShape == ECS_BeveledCorner)
|
||||||
{
|
{
|
||||||
@ -153,16 +153,16 @@ public final function DrawShapedBox(float X, float Y, float W, float H, float Ed
|
|||||||
}
|
}
|
||||||
Canvas.SetPos(BoxX, Y);
|
Canvas.SetPos(BoxX, Y);
|
||||||
DrawBoxTexture(BoxW, Edge);
|
DrawBoxTexture(BoxW, Edge);
|
||||||
|
|
||||||
DrawCorner(X + W, Y, Edge, ECP_TopRight, TopRightShape);
|
DrawCorner(X + W, Y, Edge, ECP_TopRight, TopRightShape);
|
||||||
|
|
||||||
// Mid Line
|
// Mid Line
|
||||||
Canvas.SetPos(X, Y + Edge);
|
Canvas.SetPos(X, Y + Edge);
|
||||||
DrawBoxTexture(W, H - Edge * 2);
|
DrawBoxTexture(W, H - Edge * 2);
|
||||||
|
|
||||||
// Bottom Line
|
// Bottom Line
|
||||||
DrawCorner(X, Y + H, Edge, ECP_BottomLeft, BottomLeftShape);
|
DrawCorner(X, Y + H, Edge, ECP_BottomLeft, BottomLeftShape);
|
||||||
|
|
||||||
BoxX = X; BoxW = W;
|
BoxX = X; BoxW = W;
|
||||||
if (BottomLeftShape == ECS_BeveledCorner)
|
if (BottomLeftShape == ECS_BeveledCorner)
|
||||||
{
|
{
|
||||||
@ -175,7 +175,7 @@ public final function DrawShapedBox(float X, float Y, float W, float H, float Ed
|
|||||||
}
|
}
|
||||||
Canvas.SetPos(BoxX, Y + H - Edge);
|
Canvas.SetPos(BoxX, Y + H - Edge);
|
||||||
DrawBoxTexture(BoxW, Edge);
|
DrawBoxTexture(BoxW, Edge);
|
||||||
|
|
||||||
DrawCorner(X + W, Y + H, Edge, ECP_BottomRight, BottomRightShape);
|
DrawCorner(X + W, Y + H, Edge, ECP_BottomRight, BottomRightShape);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
20
README.md
20
README.md
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
**2D box drawing library**
|
**2D box drawing library**
|
||||||
|
|
||||||
# Add to your project
|
## Add to your project
|
||||||
There are two ways to add BoxPainterLib to your project:
|
There are two ways to add BoxPainterLib to your project:
|
||||||
### 1. As [git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
|
### 1. As [git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
|
||||||
Open git-bash and go to your project: `cd <your_project_path>`
|
Open git-bash and go to your project: `cd <your_project_path>`
|
||||||
@ -19,32 +19,32 @@ Commit the changes: `git add BoxPainterLib && git commit -m 'update box painter
|
|||||||
### 2. As standalone sources
|
### 2. As standalone sources
|
||||||
Create a `BoxPainterLib` folder and put [this repo](https://github.com/GenZmeY/KF2-BoxPainterLib) there.
|
Create a `BoxPainterLib` folder and put [this repo](https://github.com/GenZmeY/KF2-BoxPainterLib) there.
|
||||||
|
|
||||||
# Using
|
## Using
|
||||||
1. Create `BoxPainter` object: `BoxPainter = new class'BoxPainterLib.BoxPainter';`
|
1. Create `BoxPainter` object: `BoxPainter = new class'BoxPainterLib.BoxPainter';`
|
||||||
2. Initialize the canvas: `BoxPainter.Canvas = <REPLACE_THIS_WITH_YOUR_CANVAS_OBJECT>;`
|
2. Initialize the canvas: `BoxPainter.Canvas = <REPLACE_THIS_WITH_YOUR_CANVAS_OBJECT>;`
|
||||||
3. `BoxPainter` is ready! Use functions [DrawBox(...)](https://github.com/GenZmeY/KF2-BoxPainterLib/blob/master/Classes/BoxPainter.uc#L3) and [DrawShapedBox(...)](https://github.com/GenZmeY/KF2-BoxPainterLib/blob/master/Classes/BoxPainterBase.uc#L129) to draw cool interface boxes.
|
3. `BoxPainter` is ready! Use functions [DrawBox(...)](https://github.com/GenZmeY/KF2-BoxPainterLib/blob/master/Classes/BoxPainter.uc#L3) and [DrawShapedBox(...)](https://github.com/GenZmeY/KF2-BoxPainterLib/blob/master/Classes/BoxPainterBase.uc#L129) to draw cool interface boxes.
|
||||||
|
|
||||||
# Available Functions
|
## Available Functions
|
||||||
#### DrawShapedBox(float X, float Y, float W, float H, float Edge, byte TopLeftShape, byte TopRightShape, byte BottomLeftShape, byte BottomRightShape)
|
### DrawShapedBox(float X, float Y, float W, float H, float Edge, byte TopLeftShape, byte TopRightShape, byte BottomLeftShape, byte BottomRightShape)
|
||||||
Draws a box using the [shape code](https://github.com/GenZmeY/KF2-BoxPainterLib/blob/master/Classes/BoxPainterBase.uc#L13) for each corner:
|
Draws a box using the [shape code](https://github.com/GenZmeY/KF2-BoxPainterLib/blob/master/Classes/BoxPainterBase.uc#L13) for each corner:
|
||||||
- ECS_Corner
|
- ECS_Corner
|
||||||
- ECS_BeveledCorner
|
- ECS_BeveledCorner
|
||||||
- ECS_VerticalCorner
|
- ECS_VerticalCorner
|
||||||
- ECS_HorisontalCorner
|
- ECS_HorisontalCorner
|
||||||
|
|
||||||
#### DrawBox(float X, float Y, float Width, float Height, float Edge, optional byte Shape = 0)
|
### DrawBox(float X, float Y, float Width, float Height, float Edge, optional byte Shape = 0)
|
||||||
Draws a box using the shape code:
|
Draws a box using the shape code:
|
||||||
![](rect_shapes.png)
|
![codes_table](rect_shapes.png)
|
||||||
|
|
||||||
# Build
|
## Build
|
||||||
If you are using [KF2-BuildTools](https://github.com/GenZmeY/KF2-BuildTools) open `builder.cfg` and add `BoxPainterLib` **first** in `PackageBuildOrder` and `PackageUpload` parameters
|
If you are using [KF2-BuildTools](https://github.com/GenZmeY/KF2-BuildTools) open `builder.cfg` and add `BoxPainterLib` **first** in `PackageBuildOrder` and `PackageUpload` parameters
|
||||||
|
|
||||||
If you are building manually add line `ModPackages=BoxPainterLib` to your `KFEditor.ini` before all other `ModPackages`
|
If you are building manually add line `ModPackages=BoxPainterLib` to your `KFEditor.ini` before all other `ModPackages`
|
||||||
|
|
||||||
Now build the mod. `BoxPainterLib.u` library will be next to your `*.u` files
|
Now build the mod. `BoxPainterLib.u` library will be next to your `*.u` files
|
||||||
|
|
||||||
# Examples
|
## Examples
|
||||||
[KF2-YetAnotherScoreboard](https://github.com/GenZmeY/KF2-YetAnotherScoreboard)
|
[KF2-YetAnotherScoreboard](https://github.com/GenZmeY/KF2-YetAnotherScoreboard)
|
||||||
|
|
||||||
# License
|
## License
|
||||||
[GNU LGPLv3](LICENSE)
|
[![license](https://www.gnu.org/graphics/lgplv3-with-text-154x68.png)](LICENSE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user