1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #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 );
- debug = initTextFeld( 10, 40, 500, 20, TextFeld::Style::Text, "" );
- elements.add( debug );
- }
- void Game::updatePositionAndFace( Vec3<float> position, Vec2<float> face )
- {
- Text txt = "Position: (";
- txt.setPrecision( 2 );
- txt += position.x;
- txt += ", ";
- txt += position.y;
- txt += ", ";
- txt += position.z;
- txt += ") Face: (";
- txt += face.x;
- txt += ", ";
- txt += face.y;
- txt += ")";
- debug->setText( txt );
- }
|