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, "TRACKING MARKER")

    ga_win_set_char_size(wid, 0.015, 0.03)

    local marker_exists = game_tracking_marker.exists()
    if( marker_exists ) then
        local enabled = game_tracking_marker.exists_and_enabled()
        if( enabled ) then     
            local dist = game_tracking_marker.get_dist()
            local dist_str = game_str.make_3_digit_big(dist)
            ga_win_txt_center(wid, 0.5, "YOUR TRACKING MARKER IS " .. dist_str .. " BLOCKS AWAY")
            ga_win_txt_center(wid, 0.4, "PRESS N TO TURN OFF YOUR TRACKING MARKER")
        else
            ga_win_txt_center(wid, 0.5, "YOU HAVE A TRACKING MARKER BUT IT IS TURNED OFF")
            ga_win_txt_center(wid, 0.4, "PRESS Y TO TURN ON YOUR TRACKING MARKER")
        end

    else
        ga_win_txt_center(wid, 0.5, "YOU DO NOT HAVE A TRACKING MARKER")
    end

    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, "N") ) then
        game_tracking_marker.hide()
        ga_main_menu_pop_all(true)
        return
    end
    if( ga_win_key_pressed(wid, "Y") ) then
        game_tracking_marker.unhide()
        ga_main_menu_pop_all(true)
        return
    end
    if ga_win_key_pressed(wid, "ESC") then
        ga_play_sound("menu_back")
        ga_main_menu_pop()
        return
    end
end
