diff --git a/Code/Game/DanBiasGame/GameClientState/Buttons/TextField.h b/Code/Game/DanBiasGame/GameClientState/Buttons/TextField.h new file mode 100644 index 00000000..df3ff60e --- /dev/null +++ b/Code/Game/DanBiasGame/GameClientState/Buttons/TextField.h @@ -0,0 +1,30 @@ +/******************************************************************** + * Created by Dan Andersson, 2014 + ********************************************************************/ +#include +#include "EventButtonGUI.h" +#include "OysterMath.h" + +#ifndef DANBIAS_CLIENT_TEXT_FIELD_H +#define DANBIAS_CLIENT_TEXT_FIELD_H + +namespace DanBias { namespace Client +{ + template + class TextField : public EventButtonGUI + { + public: + ::std::wstring text; + + TextField( std::wstring textureName, Owner owner, ::Oyster::Math::Float3 centerPos, ::Oyster::Math::Float2 size ); + TextField(); + + + private: + ::Oyster::Math::Float3 center; + ::Oyster::Math::Float2 reach; + + }; +} } + +#endif \ No newline at end of file diff --git a/Code/Game/DanBiasGame/GameClientState/GameState.h b/Code/Game/DanBiasGame/GameClientState/GameState.h index c1ba7f8f..6366bb8c 100644 --- a/Code/Game/DanBiasGame/GameClientState/GameState.h +++ b/Code/Game/DanBiasGame/GameClientState/GameState.h @@ -10,18 +10,36 @@ #include "C_obj/C_DynamicObj.h" #include "C_obj/C_StaticObj.h" #include "DynamicArray.h" -namespace DanBias -{ -namespace Client + +namespace DanBias { namespace Client { class GameState : public GameClientState { + public: enum gameStateState { gameStateState_loading, gameStateState_playing, gameStateState_end, }; + + GameState(void); + ~GameState(void); + bool Init(Oyster::Network::NetworkClient* nwClient); + GameClientState::ClientState Update(float deltaTime, InputClass* KeyInput) override; + + bool LoadModels(std::string mapFile); + bool InitCamera(Oyster::Math::Float3 startPos) ; + void InitiatePlayer(int id, std::wstring modelName, Oyster::Math::Float4x4 world); + gameStateState LoadGame(); + void readKeyInput(InputClass* KeyInput); + + bool Render()override; + bool Release()override; + void ChangeState( ClientState next ); + + void DataRecieved( ::Oyster::Network::NetEvent<::Oyster::Network::NetworkClient*, ::Oyster::Network::NetworkClient::ClientEventArgs> e ); + private: struct MyData; ::Utility::DynamicMemory::UniquePointer privData; @@ -39,22 +57,6 @@ namespace Client Utility::DynamicMemory::DynamicArray> staticObjects; Utility::DynamicMemory::DynamicArray> dynamicObjects; //Utility::DynamicMemory::DynamicArray> playObjects; - public: - GameState(void); - ~GameState(void); - bool Init(Oyster::Network::NetworkClient* nwClient); - GameClientState::ClientState Update(float deltaTime, InputClass* KeyInput) override; - bool LoadModels(std::string mapFile); - bool InitCamera(Oyster::Math::Float3 startPos) ; - void InitiatePlayer(int id, std::wstring modelName, Oyster::Math::Float4x4 world); - gameStateState LoadGame(); - void readKeyInput(InputClass* KeyInput); - bool Render()override; - bool Release()override; - void ChangeState( ClientState next ); - - void DataRecieved( ::Oyster::Network::NetEvent<::Oyster::Network::NetworkClient*, ::Oyster::Network::NetworkClient::ClientEventArgs> e ); }; -} -} +} } #endif \ No newline at end of file