Esempio n. 1
0
//------------------------------------------------------------------------------
void TMenu::Init()
{
    TMenuItem* item = AddMenuItem(new TMenuItem(
            Images->GetImage("menu-connect"),
            Images->GetImage("menu-connect-h"),
            QPoint(0, -50),
            this));
//    connect(item, SIGNAL(Clicked()), Application()->GetNetwork(), SLOT(Connect()));
    connect(item, SIGNAL(Clicked()), Application(), SLOT(SetConnectingState()));

    item = AddMenuItem(new TMenuItem(
            Images->GetImage("menu-exit"),
            Images->GetImage("menu-exit-h"),
            QPoint(0, 50),
            this));
    connect(item, SIGNAL(Clicked()), Application(), SLOT(GameClose()));
}
Esempio n. 2
0
int main(int argc, char** argv)
{
	//int result;
	OS_Init();
	LoggerCreate(TRUE,"log.txt",LOGGER_APPEND,LOGGER_LEVEL_ALL,LOGGER_FORMAT_C);
	LoggerInfo("Initializing game");
	if(SDL_Init(SDL_INIT_EVERYTHING))
		GameCrash("Initialized SDL failed");
	LoggerInfo("SDL initialized");
	MathInit();
	RM_InitResourceManager();
	PMD_Init();
	RE_InitWindow(WINDOW_WIDTH,WINDOW_HEIGHT);
	IN_InitInput();	
	InitEntities();
	InitAttributes();
	GameMainLoop();
	GameClose();
	return 0;
}
Esempio n. 3
0
void GameCrash(char* cause)
{
	LoggerFatal(cause);
	GameClose();
	exit(EXIT_FAILURE);
}