dofile('data/Lua/Screens/DialogOK.lua')

function SetCaptions(screen)
	text_title = CreateTextEntity("WindowText28", GetString("Q_ERROR_PROFILE_EXISTS"))
    text_title:AttachTo( screen:GetObject('YesNoScreen') )
	text_title:SetScale(1)
	text_title:SetZ(190)
	text_title:SetXY(-250, -80)
	text_title:SetBorderSize(500, 100)
	text_title:SetTextAlignment(HGETEXT_TOP + HGETEXT_CENTER)
end

function OnButtonPress(title)
    DefaultOnButtonPress(title)
    
    -- destroy this screen
    local current_screen = GetGameManager():GetCurrentScreen()
    current_screen:SetAllowInput(false)
    current_screen:ScreenDestroy()
    
    if title == 'ok' then
        if players_screen then
            players_screen:Go()
            players_screen:SetAllowInput(true)
        end
        if dialog_corrupted_file then
            dialog_corrupted_file:Go()
            dialog_corrupted_file:SetAllowInput(true)
        end
    end
end
