function GameScreen:InitScreen()
    self:LoadScreen()
    
    self.disable = false;
    
    self:FadeOut();
end

function GameScreen:OnClick(item_name)
    if(self.disable) then return end

    if("cancel" == item_name) then
        SoundPlay("sound/interface/button.ogg")
        self.disable = true;
        self:FadeIn(0.5);
        if(self.end_fun) then self:end_fun() end
        
        DelayedExec(0.7, function() 
            clScreenManager:remove_screen(self); 
        end)
    elseif("ok" == item_name)then
        SoundPlay("sound/interface/button.ogg")
        self:FadeIn(0.5);
        if(self.end_fun2) then self:end_fun2() end
        clApplication.curret_win = clScreenManager:add_screen("MainMenuScreen") 
        DelayedExec(0.7, function() 
            clScreenManager:remove_screen(self); 
        end)
    end
end

function GameScreen:LoadScreen()
    self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "quit_back_trigger_quit", "graphics/trigger", 0, 0, WINDOW_WIDTH, WINDOW_HEIGHT);
    ItemSetOpacity("quit_back_trigger_quit", 0.85)
    
    self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "quit", "graphics/interface/menu/quit", 267, 456);
    self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "cancel", "graphics/interface/menu/cancel", 286, 734);
    self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "ok", "graphics/interface/menu/ok", 802, 728);
end
