Skip to content

Commit

Permalink
Merge pull request #892 from UltraStar-Deluxe/remove-useless-color-fu…
Browse files Browse the repository at this point in the history
…nction

cleanup GetPlayerLightColor vs GetPlayerLightColorV2
  • Loading branch information
barbeque-squared authored Oct 7, 2024
2 parents d816e69 + d526a60 commit 2787941
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 68 deletions.
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

0 comments on commit 2787941

Please sign in to comment.