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

function SetCaptions(screen)
	text = CreateTextEntity("WindowText28", GetString("Q_QUIT"))
	text:AttachTo( screen:GetObject('YesNoScreen') )
	text:SetScale(1)
	text:SetZ(190)
	text:SetXY(10, -70)
end

function OnButtonPress(title)
    DefaultOnButtonPress(title)
    
    -- destroy this screen
    dialog:SetAllowInput(false)
    dialog:ScreenDestroy()
    dialog = nil
    
    if title == 'yes' then
        GetGameApp():DoExit(true)
    end
    
    if title == 'no' then
        menu:SetAllowInput(true)
        menu:Go()
    end    
end
