--Helper function.
--May want to put in a centralized location
--somewhere in the base package.
-- function p.add_commas(num)
--     local ones_rem = math.floor(num) % 1000
--     local thousands = math.floor( (num - ones_rem) / 1000 )
--     if( thousands == 0 ) then return tostring(num) end
--     return tostring(thousands) .. "," .. side_display_game_time.make_3_digit(ones_rem)
-- end

function p.__get_name()
    return "In DPS"
end

function p.__render(wid, min_x, min_y, max_x, max_y)
    local diff_y = max_y - min_y
    local char_h = diff_y * 0.75
    local char_w = char_h * 0.5
    local value = ga_get_sys_i("stats.last_in_dps")
    local str = "In DPS: " .. base_local_str.add_commas(value)
    local green = std.vec(0.0, 1.0, 0.0)

    ga_win_set_front_color(wid, green)
    ga_win_set_char_size(wid, char_w, char_h)
    ga_win_txt(wid, min_x, min_y, str)
end
