Skip to content

Commit 777f473

Browse files
author
Awbugl
committed
Update Code
1 parent 7f28d0b commit 777f473

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

Model/Side.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ namespace ImageGenerator.Model;
33
internal enum Side
44
{
55
Hikari,
6-
Tairitsu
7-
}
6+
Tairitsu,
7+
Achromic
8+
}

Path.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ internal static Path ArcaeaRating(short potential)
7575
{
7676
var img = potential switch
7777
{
78+
>= 1300 => "7",
7879
>= 1250 => "6",
7980
>= 1200 => "5",
8081
>= 1100 => "4",

UI/Color.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ internal static class Color
55
{
66
internal static readonly System.Drawing.Color White = System.Drawing.Color.White,
77
Black = System.Drawing.Color.Black,
8-
Light = FromArgb(150, 100, 200, 225),
9-
Conflict = FromArgb(150, 50, 20, 75),
8+
Hikari = FromArgb(150, 100, 200, 225),
9+
Tairitsu = FromArgb(150, 50, 20, 75),
10+
Achromic = FromArgb(150, 180, 180, 180),
1011
PmColor = FromArgb(150, 180, 200), ArcGray = FromArgb(60, 60, 60),
1112
ArcPurple = FromArgb(31, 30, 51), GnaqGray = FromArgb(110, 110, 110),
1213
AzusaGray = FromArgb(90, 90, 90);
@@ -18,4 +19,14 @@ internal static System.Drawing.Color FromArgb(int alpha, System.Drawing.Color ba
1819

1920
internal static System.Drawing.Color FromArgb(int a, int r, int g, int b) =>
2021
System.Drawing.Color.FromArgb(a, r, g, b);
22+
23+
24+
internal static System.Drawing.Color GetBySide(int side) =>
25+
side switch
26+
{
27+
0 => Hikari,
28+
1 => Tairitsu,
29+
2 => Achromic,
30+
_ => White
31+
};
2132
}

UI/ImageGenerator/ArcBackgroundGenerator.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ private async Task<BackGround> GenerateArcV2(Path path)
6363
new LineModel(Color.White, 3, new(0, 920), new(1920, 920)),
6464
new LineModel(Color.White, 1, new(0, 705), new(1920, 705)),
6565
new LineModel(Color.White, 1, new(0, 955), new(1920, 955)),
66-
new RectangleModel(_info.Side == (int)Side.Hikari
67-
? Color.Light
68-
: Color.Conflict, new(145, 685, 320, 320)),
66+
new RectangleModel(Color.GetBySide(_info.Side), new(145, 685, 320, 320)),
6967
new ImageModel(song, 130, 670, 320, 320),
7068
new TextWithShadowModel(_info.GetSongName(50), Font.Andrea56, 510, 750));
7169
background.SaveAsPng(path);

0 commit comments

Comments
 (0)