This commit is contained in:
GenZmeY 2021-06-14 05:07:09 +03:00
parent 86568e4b92
commit 2d9d2a15a9
3 changed files with 547 additions and 32 deletions

View File

@ -585,7 +585,7 @@ final function DrawCornerSmart(out float X, float Y, int Edge, int CornerPositio
X += Edge; X += Edge;
return; return;
case ECS_VerticalCorner: case ECS_VerticalCorner:
Canvas.SetPos(X, Y); // X - Edge ? Canvas.SetPos(X, Y);
DrawCornerTex(Edge, 2); DrawCornerTex(Edge, 2);
X += Edge; X += Edge;
return; return;
@ -663,21 +663,129 @@ final function DrawRectBox(float X, float Y, float Width, float Height, int Edge
switch (Extrav) switch (Extrav)
{ {
case 1: case 100:
// _______ // ______
// / / // | |
// | | // | |
// \______\ // |______|
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_Corner, // TopLeft
ECS_Corner, // TopRight
ECS_Corner, // BottomLeft
ECS_Corner // BottomRight
);
break;
case 110:
DrawRectBoxSmart(X, Y, Width, Height, Edge, DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_BeveledCorner, // TopLeft ECS_BeveledCorner, // TopLeft
ECS_HorisontalCorner, // TopRight ECS_Corner, // TopRight
ECS_Corner, // BottomLeft
ECS_BeveledCorner // BottomRight
);
break;
case 111:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_Corner, // TopLeft
ECS_BeveledCorner, // TopRight
ECS_BeveledCorner, // BottomLeft ECS_BeveledCorner, // BottomLeft
ECS_Corner // BottomRight
);
break;
case 120:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_VerticalCorner, // TopLeft
ECS_VerticalCorner, // TopRight
ECS_VerticalCorner, // BottomLeft
ECS_VerticalCorner // BottomRight
);
break;
case 121:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_HorisontalCorner, // TopLeft
ECS_HorisontalCorner, // TopRight
ECS_HorisontalCorner, // BottomLeft
ECS_HorisontalCorner // BottomRight ECS_HorisontalCorner // BottomRight
); );
break; break;
case 2: case 130:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_Corner, // TopLeft
ECS_Corner, // TopRight
ECS_Corner, // BottomLeft
ECS_BeveledCorner // BottomRight
);
break;
case 131:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_Corner, // TopLeft
ECS_BeveledCorner, // TopRight
ECS_Corner, // BottomLeft
ECS_Corner // BottomRight
);
break;
case 132:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_BeveledCorner, // TopLeft
ECS_Corner, // TopRight
ECS_Corner, // BottomLeft
ECS_Corner // BottomRight
);
break;
case 133:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_Corner, // TopLeft
ECS_Corner, // TopRight
ECS_BeveledCorner, // BottomLeft
ECS_Corner // BottomRight
);
break;
case 140:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_BeveledCorner, // TopLeft
ECS_BeveledCorner, // TopRight
ECS_BeveledCorner, // BottomLeft
ECS_Corner // BottomRight
);
break;
case 141:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_BeveledCorner, // TopLeft
ECS_Corner, // TopRight
ECS_BeveledCorner, // BottomLeft
ECS_BeveledCorner // BottomRight
);
break;
case 142:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_Corner, // TopLeft
ECS_BeveledCorner, // TopRight
ECS_BeveledCorner, // BottomLeft
ECS_BeveledCorner // BottomRight
);
break;
case 143:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_BeveledCorner, // TopLeft
ECS_BeveledCorner, // TopRight
ECS_Corner, // BottomLeft
ECS_BeveledCorner // BottomRight
);
break;
case 150:
// ______ // ______
// / \ // / \
// | ____ | // | ____ |
@ -691,21 +799,21 @@ final function DrawRectBox(float X, float Y, float Width, float Height, int Edge
); );
break; break;
case 3: case 151:
// _______ // _______
// \ \ // / /
// | | // | |
// /______/ // \______\
DrawRectBoxSmart(X, Y, Width, Height, Edge, DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_HorisontalCorner, // TopLeft ECS_BeveledCorner, // TopLeft
ECS_BeveledCorner, // TopRight ECS_HorisontalCorner, // TopRight
ECS_HorisontalCorner, // BottomLeft ECS_BeveledCorner, // BottomLeft
ECS_BeveledCorner // BottomRight ECS_HorisontalCorner // BottomRight
); );
break; break;
case 4: case 152:
// //
// |\____/| // |\____/|
// | | // | |
@ -719,18 +827,344 @@ final function DrawRectBox(float X, float Y, float Width, float Height, int Edge
); );
break; break;
case 5: case 153:
// ______ // _______
// | | // \ \
// | | // | |
// |______| // /______/
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_HorisontalCorner, // TopLeft
ECS_BeveledCorner, // TopRight
ECS_HorisontalCorner, // BottomLeft
ECS_BeveledCorner // BottomRight
);
break;
case 160:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_BeveledCorner, // TopLeft
ECS_HorisontalCorner, // TopRight
ECS_BeveledCorner, // BottomLeft
ECS_BeveledCorner // BottomRight
);
break;
case 161:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_VerticalCorner, // TopLeft
ECS_BeveledCorner, // TopRight
ECS_BeveledCorner, // BottomLeft
ECS_BeveledCorner // BottomRight
);
break;
case 162:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_BeveledCorner, // TopLeft
ECS_BeveledCorner, // TopRight
ECS_HorisontalCorner, // BottomLeft
ECS_BeveledCorner // BottomRight
);
break;
case 163:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_BeveledCorner, // TopLeft
ECS_BeveledCorner, // TopRight
ECS_BeveledCorner, // BottomLeft
ECS_VerticalCorner // BottomRight
);
break;
case 170:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_BeveledCorner, // TopLeft
ECS_BeveledCorner, // TopRight
ECS_BeveledCorner, // BottomLeft
ECS_HorisontalCorner // BottomRight
);
break;
case 171:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_BeveledCorner, // TopLeft
ECS_VerticalCorner, // TopRight
ECS_BeveledCorner, // BottomLeft
ECS_BeveledCorner // BottomRight
);
break;
case 172:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_HorisontalCorner, // TopLeft
ECS_BeveledCorner, // TopRight
ECS_BeveledCorner, // BottomLeft
ECS_BeveledCorner // BottomRight
);
break;
case 173:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_BeveledCorner, // TopLeft
ECS_BeveledCorner, // TopRight
ECS_VerticalCorner, // BottomLeft
ECS_BeveledCorner // BottomRight
);
break;
case 180:
DrawRectBoxSmart(X, Y, Width, Height, Edge, DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_Corner, // TopLeft ECS_Corner, // TopLeft
ECS_HorisontalCorner, // TopRight
ECS_Corner, // BottomLeft
ECS_Corner // BottomRight
);
break;
case 181:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_VerticalCorner, // TopLeft
ECS_Corner, // TopRight ECS_Corner, // TopRight
ECS_Corner, // BottomLeft ECS_Corner, // BottomLeft
ECS_Corner // BottomRight ECS_Corner // BottomRight
); );
break;
case 182:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_Corner, // TopLeft
ECS_Corner, // TopRight
ECS_HorisontalCorner, // BottomLeft
ECS_Corner // BottomRight
);
break;
case 183:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_Corner, // TopLeft
ECS_Corner, // TopRight
ECS_Corner, // BottomLeft
ECS_VerticalCorner // BottomRight
);
break;
case 190:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_Corner, // TopLeft
ECS_Corner, // TopRight
ECS_Corner, // BottomLeft
ECS_HorisontalCorner // BottomRight
);
break;
case 191:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_Corner, // TopLeft
ECS_VerticalCorner, // TopRight
ECS_Corner, // BottomLeft
ECS_Corner // BottomRight
);
break;
case 192:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_HorisontalCorner, // TopLeft
ECS_Corner, // TopRight
ECS_Corner, // BottomLeft
ECS_Corner // BottomRight
);
break;
case 193:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_Corner, // TopLeft
ECS_Corner, // TopRight
ECS_VerticalCorner, // BottomLeft
ECS_Corner // BottomRight
);
break;
case 200:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_Corner, // TopLeft
ECS_Corner, // TopRight
ECS_VerticalCorner, // BottomLeft
ECS_VerticalCorner // BottomRight
);
break;
case 201:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_Corner, // TopLeft
ECS_HorisontalCorner, // TopRight
ECS_Corner, // BottomLeft
ECS_HorisontalCorner // BottomRight
);
break;
case 202:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_VerticalCorner, // TopLeft
ECS_VerticalCorner, // TopRight
ECS_Corner, // BottomLeft
ECS_Corner // BottomRight
);
break;
case 203:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_HorisontalCorner, // TopLeft
ECS_Corner, // TopRight
ECS_HorisontalCorner, // BottomLeft
ECS_Corner // BottomRight
);
break;
case 210:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_HorisontalCorner, // TopLeft
ECS_HorisontalCorner, // TopRight
ECS_BeveledCorner, // BottomLeft
ECS_BeveledCorner // BottomRight
);
break;
case 211:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_VerticalCorner, // TopLeft
ECS_BeveledCorner, // TopRight
ECS_VerticalCorner, // BottomLeft
ECS_BeveledCorner // BottomRight
);
break;
case 212:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_BeveledCorner, // TopLeft
ECS_BeveledCorner, // TopRight
ECS_HorisontalCorner, // BottomLeft
ECS_HorisontalCorner // BottomRight
);
break;
case 213:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_BeveledCorner, // TopLeft
ECS_VerticalCorner, // TopRight
ECS_BeveledCorner, // BottomLeft
ECS_VerticalCorner // BottomRight
);
break;
case 220:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_HorisontalCorner, // TopLeft
ECS_HorisontalCorner, // TopRight
ECS_Corner, // BottomLeft
ECS_Corner // BottomRight
);
break;
case 221:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_VerticalCorner, // TopLeft
ECS_Corner, // TopRight
ECS_VerticalCorner, // BottomLeft
ECS_Corner // BottomRight
);
break;
case 222:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_Corner, // TopLeft
ECS_Corner, // TopRight
ECS_HorisontalCorner, // BottomLeft
ECS_HorisontalCorner // BottomRight
);
break;
case 223:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_Corner, // TopLeft
ECS_VerticalCorner, // TopRight
ECS_Corner, // BottomLeft
ECS_VerticalCorner // BottomRight
);
break;
case 230:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_BeveledCorner, // TopLeft
ECS_HorisontalCorner, // TopRight
ECS_HorisontalCorner, // BottomLeft
ECS_BeveledCorner // BottomRight
);
break;
case 231:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_VerticalCorner, // TopLeft
ECS_BeveledCorner, // TopRight
ECS_BeveledCorner, // BottomLeft
ECS_VerticalCorner // BottomRight
);
break;
case 232:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_HorisontalCorner, // TopLeft
ECS_BeveledCorner, // TopRight
ECS_BeveledCorner, // BottomLeft
ECS_HorisontalCorner // BottomRight
);
break;
case 233:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_BeveledCorner, // TopLeft
ECS_VerticalCorner, // TopRight
ECS_VerticalCorner, // BottomLeft
ECS_BeveledCorner // BottomRight
);
break;
case 240:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_Corner, // TopLeft
ECS_HorisontalCorner, // TopRight
ECS_HorisontalCorner, // BottomLeft
ECS_Corner // BottomRight
);
break;
case 241:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_VerticalCorner, // TopLeft
ECS_Corner, // TopRight
ECS_Corner, // BottomLeft
ECS_VerticalCorner // BottomRight
);
break;
case 242:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_HorisontalCorner, // TopLeft
ECS_Corner, // TopRight
ECS_Corner, // BottomLeft
ECS_HorisontalCorner // BottomRight
);
break;
case 243:
DrawRectBoxSmart(X, Y, Width, Height, Edge,
ECS_Corner, // TopLeft
ECS_VerticalCorner, // TopRight
ECS_VerticalCorner, // BottomLeft
ECS_Corner // BottomRight
);
break;
default: // 0 default: // 0
// ______ // ______
// / \ // / \

View File

@ -103,6 +103,81 @@ function string WaveText()
} }
} }
function DrawRectPreviewWithText(float X, float Y, float WH, int Shape, float FontScalar)
{
local float TextWidth;
local float TextHeight;
Canvas.SetDrawColor(150, 150, 150, 200);
Owner.CurrentStyle.DrawRectBox(X, Y, WH, WH, 16, Shape);
Canvas.SetDrawColor(250, 250, 250, 255);
Canvas.TextSize(String(Shape), TextWidth, TextHeight, FontScalar, FontScalar);
Owner.CurrentStyle.DrawTextShadow(String(Shape), X + (WH - TextWidth)/2, Y + (WH - TextHeight)/2, 1, FontScalar);
}
function DrawRectPreview(float FontScalar)
{
local float BoxWH, BoxWHD;
local float XPos, YPos, X, Y;
local float Width, Height;
local float XPosCenter, YPosCenter;
local int Shape;
local int i, j;
XPosCenter = Canvas.ClipX * 0.5;
YPosCenter = Canvas.ClipY * 0.5;
Width = Canvas.ClipX * 0.4;
Height = Canvas.ClipY * 0.4;
BoxWH = Width / 13;
BoxWHD = BoxWH * 0.3;
X = XPosCenter - Width * 0.5;
Y = YPosCenter - Height * 0.5;
XPos = X;
YPos = Y;
Shape = 0;
DrawRectPreviewWithText(XPos, YPos, BoxWH, Shape, FontScalar);
XPos += BoxWH + BoxWHD;
Shape = 100;
DrawRectPreviewWithText(XPos, YPos, BoxWH, Shape, FontScalar);
XPos += BoxWH + BoxWHD;
Shape = 110;
DrawRectPreviewWithText(XPos, YPos, BoxWH, Shape, FontScalar);
XPos += BoxWH + BoxWHD;
Shape = 111;
DrawRectPreviewWithText(XPos, YPos, BoxWH, Shape, FontScalar);
XPos += BoxWH + BoxWHD;
Shape = 120;
DrawRectPreviewWithText(XPos, YPos, BoxWH, Shape, FontScalar);
XPos += BoxWH + BoxWHD;
Shape = 121;
DrawRectPreviewWithText(XPos, YPos, BoxWH, Shape, FontScalar);
XPos += BoxWH + BoxWHD;
YPos += BoxWH + BoxWHD;
XPos = X;
for (i = 130; i <= 240; i += 10)
{
for (j = 0; j < 4; ++j)
{
DrawRectPreviewWithText(XPos, YPos, BoxWH, i + j, FontScalar);
YPos += BoxWH + BoxWHD;
}
YPos = Y + BoxWH + BoxWHD;
XPos += BoxWH + BoxWHD;
}
}
function DrawMenu() function DrawMenu()
{ {
local string S; local string S;
@ -175,6 +250,12 @@ function DrawMenu()
Canvas.TextSize("ABC", XL, YL, FontScalar, FontScalar); Canvas.TextSize("ABC", XL, YL, FontScalar, FontScalar);
BorderSize = Owner.HUDOwner.ScaledBorderSize; BorderSize = Owner.HUDOwner.ScaledBorderSize;
if (true)
{
DrawRectPreview(FontScalar);
return;
}
// Server Info // Server Info
XPosCenter = Canvas.ClipX * 0.5; XPosCenter = Canvas.ClipX * 0.5;
Width = Canvas.ClipX * 0.4; // Full Box Width Width = Canvas.ClipX * 0.4; // Full Box Width

View File

@ -226,20 +226,20 @@ struct SCEStyle
{ {
EdgeSize = 8 EdgeSize = 8
ShapeServerNameBox = 2 ShapeServerNameBox = 150
ShapeGameInfoBox = 1 ShapeGameInfoBox = 151
ShapeWaveInfoBox = 0 ShapeWaveInfoBox = 0
ShapePlayersCountBox = 4 ShapePlayersCountBox = 152
ShapeHeaderBox = 2 ShapeHeaderBox = 150
ShapeLeftStateBoxTopPlayer = 1 ShapeLeftStateBoxTopPlayer = 151
ShapeLeftStateBoxMidPlayer = 1 ShapeLeftStateBoxMidPlayer = 151
ShapeLeftStateBoxBottomPlayer = 1 ShapeLeftStateBoxBottomPlayer = 151
ShapePlayerBoxTopPlayer = 0 ShapePlayerBoxTopPlayer = 0
ShapePlayerBoxMidPlayer = 0 ShapePlayerBoxMidPlayer = 0
ShapePlayerBoxBottomPlayer = 0 ShapePlayerBoxBottomPlayer = 0
ShapeStatsBoxTopPlayer = 3 ShapeStatsBoxTopPlayer = 153
ShapeStatsBoxMidPlayer = 3 ShapeStatsBoxMidPlayer = 153
ShapeStatsBoxBottomPlayer = 3 ShapeStatsBoxBottomPlayer = 153
ServerNameBoxColor = (R=75, G=0, B=0, A=200) ServerNameBoxColor = (R=75, G=0, B=0, A=200)
ServerNameTextColor = (R=250, G=250, B=250, A=255) ServerNameTextColor = (R=250, G=250, B=250, A=255)