diff --git a/ScoreboardExt/Classes/GUIStyleBase.uc b/ScoreboardExt/Classes/GUIStyleBase.uc index 10a3929..0c92c20 100644 --- a/ScoreboardExt/Classes/GUIStyleBase.uc +++ b/ScoreboardExt/Classes/GUIStyleBase.uc @@ -585,7 +585,7 @@ final function DrawCornerSmart(out float X, float Y, int Edge, int CornerPositio X += Edge; return; case ECS_VerticalCorner: - Canvas.SetPos(X, Y); // X - Edge ? + Canvas.SetPos(X, Y); DrawCornerTex(Edge, 2); X += Edge; return; @@ -663,21 +663,129 @@ final function DrawRectBox(float X, float Y, float Width, float Height, int Edge 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, 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_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 ); 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; - case 3: + case 151: // _______ - // \ \ - // | | - // /______/ + // / / + // | | + // \______\ DrawRectBoxSmart(X, Y, Width, Height, Edge, - ECS_HorisontalCorner, // TopLeft - ECS_BeveledCorner, // TopRight - ECS_HorisontalCorner, // BottomLeft - ECS_BeveledCorner // BottomRight + ECS_BeveledCorner, // TopLeft + ECS_HorisontalCorner, // TopRight + ECS_BeveledCorner, // BottomLeft + ECS_HorisontalCorner // BottomRight ); break; - case 4: + case 152: // // |\____/| // | | @@ -719,18 +827,344 @@ final function DrawRectBox(float X, float Y, float Width, float Height, int Edge ); 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, 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, // BottomLeft 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 // ______ // / \ diff --git a/ScoreboardExt/Classes/KFScoreBoard.uc b/ScoreboardExt/Classes/KFScoreBoard.uc index 0c34e1a..adc7f72 100644 --- a/ScoreboardExt/Classes/KFScoreBoard.uc +++ b/ScoreboardExt/Classes/KFScoreBoard.uc @@ -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() { local string S; @@ -175,6 +250,12 @@ function DrawMenu() Canvas.TextSize("ABC", XL, YL, FontScalar, FontScalar); BorderSize = Owner.HUDOwner.ScaledBorderSize; + if (true) + { + DrawRectPreview(FontScalar); + return; + } + // Server Info XPosCenter = Canvas.ClipX * 0.5; Width = Canvas.ClipX * 0.4; // Full Box Width diff --git a/ScoreboardExt/Classes/Types.uc b/ScoreboardExt/Classes/Types.uc index 2768056..548376e 100644 --- a/ScoreboardExt/Classes/Types.uc +++ b/ScoreboardExt/Classes/Types.uc @@ -226,20 +226,20 @@ struct SCEStyle { EdgeSize = 8 - ShapeServerNameBox = 2 - ShapeGameInfoBox = 1 + ShapeServerNameBox = 150 + ShapeGameInfoBox = 151 ShapeWaveInfoBox = 0 - ShapePlayersCountBox = 4 - ShapeHeaderBox = 2 - ShapeLeftStateBoxTopPlayer = 1 - ShapeLeftStateBoxMidPlayer = 1 - ShapeLeftStateBoxBottomPlayer = 1 + ShapePlayersCountBox = 152 + ShapeHeaderBox = 150 + ShapeLeftStateBoxTopPlayer = 151 + ShapeLeftStateBoxMidPlayer = 151 + ShapeLeftStateBoxBottomPlayer = 151 ShapePlayerBoxTopPlayer = 0 ShapePlayerBoxMidPlayer = 0 ShapePlayerBoxBottomPlayer = 0 - ShapeStatsBoxTopPlayer = 3 - ShapeStatsBoxMidPlayer = 3 - ShapeStatsBoxBottomPlayer = 3 + ShapeStatsBoxTopPlayer = 153 + ShapeStatsBoxMidPlayer = 153 + ShapeStatsBoxBottomPlayer = 153 ServerNameBoxColor = (R=75, G=0, B=0, A=200) ServerNameTextColor = (R=250, G=250, B=250, A=255)