thify_number replicates FormatPercentScore; use that instead.
This commit is contained in:
@@ -43,7 +43,7 @@ for i=1,#statList do
|
|||||||
OnCommand=cmd(zoomto,80,18;diffuse,Color.Black;diffusealpha,0.5;fadeleft,0.5);
|
OnCommand=cmd(zoomto,80,18;diffuse,Color.Black;diffusealpha,0.5;fadeleft,0.5);
|
||||||
};
|
};
|
||||||
LoadFont("Common Normal") .. {
|
LoadFont("Common Normal") .. {
|
||||||
Text=thify_number(statList[j]:GetStageIndex()+1);
|
Text=FormatNumberAndSuffix(statList[j]:GetStageIndex()+1);
|
||||||
InitCommand=cmd(x,128-4;y,40-4;horizalign,right;vertalign,bottom);
|
InitCommand=cmd(x,128-4;y,40-4;horizalign,right;vertalign,bottom);
|
||||||
OnCommand=cmd(diffuse,StageToColor(statList[j]:GetStage());zoom,0.675;shadowlength,1);
|
OnCommand=cmd(diffuse,StageToColor(statList[j]:GetStage());zoom,0.675;shadowlength,1);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -19,13 +19,6 @@ function SongMeterDisplayCommand(pn)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function thify_number(n)
|
|
||||||
if n >= 10 and n < 20 then return n .. "th" end
|
|
||||||
local th_suffixes= {"st", "nd", "rd"}
|
|
||||||
local end_digit= n % 10
|
|
||||||
return n .. (th_suffixes[end_digit] or "th")
|
|
||||||
end
|
|
||||||
|
|
||||||
local numbered_stages= {
|
local numbered_stages= {
|
||||||
Stage_1st= true,
|
Stage_1st= true,
|
||||||
Stage_2nd= true,
|
Stage_2nd= true,
|
||||||
@@ -45,7 +38,7 @@ function thified_curstage_index(on_eval)
|
|||||||
adjust= 0
|
adjust= 0
|
||||||
end
|
end
|
||||||
if numbered_stages[cur_stage] then
|
if numbered_stages[cur_stage] then
|
||||||
return thify_number(GAMESTATE:GetCurrentStageIndex() + adjust)
|
return FormatNumberAndSuffix(GAMESTATE:GetCurrentStageIndex() + adjust)
|
||||||
else
|
else
|
||||||
return ToEnumShortString(cur_stage)
|
return ToEnumShortString(cur_stage)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user