function GameScreen:RestoreScene()
end

function GameScreen:InitScreen()
    self:LoadScreen()
    
    self.disable = false;
    
    self:RestoreScene();
    
    PlayMenuMusic("sound/music/plagium.ogg", false)
    
    DelayedExec(4.0, function()
        self:GoToNext()
    end, 204)
end

function GameScreen:GoToNext()
    local last_level = "000_before"
    --[[if(start_level) then
        last_level = start_level;
    elseif(GetState("GLOBAL", "last_screen") ~= "") then
        --last_level = GetState("GLOBAL", "last_screen");
    else
    end--]]
  
    CURRENT_SCREEN = "screen_"..last_level;   
    CurrentScreen = clScreenManager:add_screen(last_level)   
    if(SHOW_MAIN_MENU) then
        CurrentScreen:PauseScreen()
        clScreenManager:remove_screen(self)
        local main_menu = clScreenManager:add_screen("MainMenuScreen") 
        if(SHOW_LOGO) then
            main_menu:ShowLogo()
        end
    end
end 

function GameScreen:OnClick(item_name)
    if(self.disable) then return end
    self.disable = true
    ItemChangeOpacity("company_logo", 0.0, 0.5)
    StopRequests(204)
    DelayedExec(0.5, function()
        self:GoToNext()
    end)
end

function GameScreen:LoadScreen()
    self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "company_logo", "graphics/interface/company_logo", 0, 0);
    ItemSetOpacity("company_logo", 0.0)
    ItemChangeOpacity("company_logo", 1.0, 0.5)
    DelayedExec(3.5, function()
        self.disable = true
        ItemChangeOpacity("company_logo", 0.0, 0.5)
    end, 204)
end
