function p.__get_name()
    return "Player Offset"
end

function p.round(x)
    local x2 = math.floor(x * 100)
    return x2 / 100
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.num_quads")
    local offset = ga_get_viewer_offset()
    local x = p.round(offset.x)
    local y = p.round(offset.y)
    local z = p.round(offset.z)
    local str = "Offset: " .. std.vec_to_str( std.vec(x,y,z) )
    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
