Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup GetPlayerLightColor vs GetPlayerLightColorV2 #892

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 0 additions & 67 deletions src/base/UThemes.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,6 @@ function GetLyricBarColor(Color: integer): TRGB;

function GetPlayerColor(Color: integer): TRGB;
function GetPlayerLightColor(Color: integer): TRGB;
function GetPlayerLightColorV2(Color: integer): TRGB;
procedure LoadPlayersColors;
procedure LoadTeamsColors;

Expand Down Expand Up @@ -3273,72 +3272,6 @@ function GetPlayerColor(Color: integer): TRGB;
end;

function GetPlayerLightColor(Color: integer): TRGB;
begin
case (Color) of
1://blue
begin
Result.R := 145/255;
Result.G := 215/255;
Result.B := 240/255;
end;
2: //red
begin
Result.R := 245/255;
Result.G := 162/255;
Result.B := 162/255;
end;
3: //green
begin
Result.R := 152/255;
Result.G := 250/255;
Result.B := 153/255;
end;
4: //yellow
begin
Result.R := 255/255;
Result.G := 246/255;
Result.B := 143/255;
end;
5: //orange
begin
Result.R := 255/255;
Result.G := 204/255;
Result.B := 156/255;
end;
6: //pink
begin
Result.R := 255/255;
Result.G := 192/255;
Result.B := 205/255;
end;
7: //purple
begin
Result.R := 240/255;
Result.G := 170/255;
Result.B := 255/255;
end;
8: //gold
begin
Result.R := 255/255;
Result.G := 214/255;
Result.B := 118/255;
end;
9: //gray
begin
Result.R := 220/255;
Result.G := 220/255;
Result.B := 220/255;
end;
else
begin
Result.R := 145/255;
Result.G := 215/255;
Result.B := 240/255;
end;
end;
end;

function GetPlayerLightColorV2(Color: integer): TRGB;
begin
case (Color) of
1://blue
Expand Down
2 changes: 1 addition & 1 deletion src/screens/UScreenName.pas
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ procedure TScreenName.PlayerColorButton(K: integer);
Col, DesCol: TRGB;
begin

Col := GetPlayerLightColorV2(K);
Col := GetPlayerLightColor(K);

Button[PlayerName].SelectColR:= Col.R;
Button[PlayerName].SelectColG:= Col.G;
Expand Down