コード例 #1
0
ファイル: MainMenu.cpp プロジェクト: okosan/lincity-xg
void
MainMenu::optionsBackButtonClicked(Button* )
{
    getConfig()->save();
    if( getConfig()->videoX != SDL_GetVideoSurface()->w || getConfig()->videoY != SDL_GetVideoSurface()->h)
    {
        if( getConfig()->restartOnChangeScreen )
        {
            quitState = RESTART;
            running = false;
        }
        else
        {
            //SDL_IGNORE to avoid forth and back jumping resolution
            SDL_EventState(SDL_VIDEORESIZE, SDL_IGNORE);
            initVideo( getConfig()->videoX, getConfig()->videoY);
            currentMenu->resize(getConfig()->videoX, getConfig()->videoY);
            SDL_EventState(SDL_VIDEORESIZE, SDL_ENABLE);
            gotoMainMenu();
        }
    }
    else if( currentLanguage != getConfig()->language )
    {
        unsetenv("LINCITY_LANG");
        quitState = RESTART;
        running = false;
    }
    else
    {
        gotoMainMenu();
    }
}
コード例 #2
0
ファイル: PlayManager.cpp プロジェクト: mcmonkey/cglory
void PlayManager::init()
{
	gotoMainMenu();
}
コード例 #3
0
ファイル: qtitlebar.cpp プロジェクト: 80Z/Stealth
void QTitleBar::slotBtnHomeIsClicked()
{
    emit gotoMainMenu();
}