InGame keys: Go to mainMenu with M. Exit client with ESC. Fix drop in drop out correctly.
This commit is contained in:
parent
16ca665311
commit
934bc80b62
|
@ -153,19 +153,28 @@ void GameState::InitiatePlayer( int id, const std::string &modelName, const floa
|
|||
|
||||
GameClientState::ClientState GameState::Update( float deltaTime )
|
||||
{
|
||||
GameStateUI::UIState UIstate = this->currGameUI->Update( deltaTime );
|
||||
GameStateUI::UIState UIstate = this->gameUI->Update( deltaTime );
|
||||
switch (UIstate)
|
||||
{
|
||||
case DanBias::Client::GameStateUI::UIState_shut_down:
|
||||
{
|
||||
this->privData->nextState = ClientState_Quit;
|
||||
// disconnect
|
||||
}
|
||||
|
||||
break;
|
||||
case DanBias::Client::GameStateUI::UIState_same:
|
||||
break;
|
||||
case DanBias::Client::GameStateUI::UIState_gaming:
|
||||
break;
|
||||
case DanBias::Client::GameStateUI::UIState_main_menu:
|
||||
//this->privData->nextState =
|
||||
break;
|
||||
case DanBias::Client::GameStateUI::UIState_shut_down:
|
||||
this->privData->nextState = ClientState_Quit;
|
||||
{
|
||||
this->privData->nextState = ClientState_Main;
|
||||
// disconnect
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ GamingUI::GamingUI() :
|
|||
this->camera = nullptr;
|
||||
this->plane = nullptr;
|
||||
this->text = nullptr;
|
||||
this->nextState = GameStateUI::UIState_same;
|
||||
}
|
||||
|
||||
GamingUI::GamingUI( InputClass *input, NetworkClient *connection, Camera_FPSV2 *camera ) :
|
||||
|
@ -25,6 +26,7 @@ GamingUI::GamingUI( InputClass *input, NetworkClient *connection, Camera_FPSV2 *
|
|||
this->input = input;
|
||||
this->netClient = connection;
|
||||
this->camera = camera;
|
||||
this->nextState = GameStateUI::UIState_same;
|
||||
}
|
||||
|
||||
GamingUI::~GamingUI() { /* Do nothing */ }
|
||||
|
@ -169,6 +171,10 @@ void GamingUI::ReadKeyInput()
|
|||
{
|
||||
this->nextState = GameStateUI::UIState_shut_down;
|
||||
}
|
||||
if( this->input->IsKeyPressed(DIK_M) )
|
||||
{
|
||||
this->nextState = GameStateUI::UIState_main_menu;
|
||||
}
|
||||
// !DEGUG KEYS
|
||||
// TODO: implement sub-menu
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue