local function MakePercentScore(pn)
    local Percent =  LoadFont("System") .. {
        Text="0.00%";
        OnCommand=cmd(shadowlength,0;diffuse,PlayerColor(pn););
        JudgmentMessageCommand=function(self,params)
            local UsePercentage = PREFSMAN:GetPreference("PercentageScoring")
            local Stats = STATSMAN:GetCurStageStats():GetPlayerStageStats(pn);
            local fScorePercent = FormatPercentScore( Stats:GetPercentDancePoints() );
            local fScoreDancePoints = Stats:GetActualDancePoints();
            local fScoreDancePointsPossible = Stats:GetPossibleDancePoints();
--[[             if UsePercentage then
                self:settext(fScorePercent);
            else
                self:settext(fScoreDancePoints .. ":" .. fScoreDancePointsPossible );
            end --]]
            self:settext(fScorePercent);
        end
    };
    return Percent
end

local TopFrame = Def.ActorFrame {
    MakePercentScore(PLAYER_1) .. {
        InitCommand=cmd(x,math.floor(scale(0.25,0,1,SCREEN_LEFT,SCREEN_RIGHT) - 52);y,SCREEN_TOP+18;player,PLAYER_1);
    };
    MakePercentScore(PLAYER_2) .. {
        InitCommand=cmd(x,math.floor(scale(0.75,0,1,SCREEN_LEFT,SCREEN_RIGHT) + 52);y,SCREEN_TOP+18;player,PLAYER_2);
    };
};

return TopFrame
