--win_main_menu_camera.lua

function p.__on_start(wid)
    --Nothing to do.
end

function p.__on_end(wid)
    --Nothing to do.
end

function p.__render(wid)
    ga_win_set_background(wid, std.vec(0.0, 0.0, 0.0), 0.95)

    ga_win_set_char_size(wid, 0.03, 0.06)
    ga_win_txt_center(wid, 0.85, "CAMERA")

    use_true_up = ga_get_sys_b("game.player.move.fly.use_true_up")
    if use_true_up then
        ga_win_txt_center(wid, 0.6, "USING TRUE UP: YES")
    else
        ga_win_txt_center(wid, 0.6, "USING TRUE UP: NO")
    end

    ga_win_set_char_size(wid, 0.02, 0.04)

    ga_win_txt_center(wid, 0.35, "USE TRUE UP?")
    ga_win_txt_center(wid, 0.25, "Y / N")

    ga_win_set_char_size(wid, 0.02, 0.04)
    ga_win_txt_center(wid, 0.06, "Go Back (ESC)")
end

function p.__process_input(wid)
    if ga_win_key_pressed(wid, "Y") then
        ga_play_sound("menu_select")
        p.set_true_up(true)
    end
    if ga_win_key_pressed(wid, "N") then
        ga_play_sound("menu_select")
        p.set_true_up(false)
    end
    if ga_win_key_pressed(wid, "ESC") then
        ga_play_sound("menu_back")
        ga_main_menu_pop()
    end
end

function p.set_true_up(use_true_up)
    trans = std.vec(0.0, 0.0, 0.0)
    radius = ga_get_sys_f("game.player.move.fly.radius")
    ga_move_set_body_fly(trans, radius, use_true_up)
end
