1234567891011121314151617181920212223242526 |
- #include "Game.h"
- #include "Initialisierung.h"
- #include "Globals.h"
- Game::Game( Bildschirm *zScreen )
- : Menu( zScreen )
- {
- logout = initKnopf( 10, 10, 200, 20, Knopf::Style::Normal, "Verlassen" );
- logout->setMausEreignis( [this]( void *p, void *o, MausEreignis me )
- {
- if( me.id == ME_RLinks )
- {
- logout->removeStyle( Knopf::Style::Erlaubt );
- if( network->leaveGame() )
- {
- currentGame->release();
- currentGame = 0;
- hide();
- menuRegister->get( "directConnect" )->show();
- }
- logout->addStyle( Knopf::Style::Erlaubt );
- }
- return 1;
- } );
- elements.add( logout );
- }
|