2014-02-19 13:15:19 +01:00
|
|
|
#ifndef DANBIAS_CLIENT_GAMING_UI_H
|
|
|
|
#define DANBIAS_CLIENT_GAMING_UI_H
|
|
|
|
|
|
|
|
#include "GameStateUI.h"
|
2014-02-20 16:55:34 +01:00
|
|
|
#include "Input.h"
|
2014-02-19 13:15:19 +01:00
|
|
|
#include "Camera_FPSV2.h"
|
2014-02-20 16:35:49 +01:00
|
|
|
#include "Buttons\Text_UI.h"
|
|
|
|
#include "Buttons\Plane_UI.h"
|
2014-02-25 16:42:51 +01:00
|
|
|
#include "InputManager.h"
|
|
|
|
#include "SharedStateContent.h"
|
2014-02-19 13:15:19 +01:00
|
|
|
|
|
|
|
namespace DanBias { namespace Client
|
|
|
|
{
|
2014-02-27 11:41:17 +01:00
|
|
|
class GamingUI : public GameStateUI, Input::Mouse::MouseEvent, Input::Keyboard::KeyboardEvent
|
2014-02-19 13:15:19 +01:00
|
|
|
{
|
|
|
|
public:
|
2014-02-25 16:42:51 +01:00
|
|
|
GamingUI( SharedStateContent* shared, Camera_FPSV2 *camera );
|
2014-02-19 13:15:19 +01:00
|
|
|
virtual ~GamingUI();
|
2014-02-20 16:35:49 +01:00
|
|
|
bool Init();
|
2014-02-19 13:15:19 +01:00
|
|
|
|
|
|
|
UIState Update( float deltaTime );
|
|
|
|
bool HaveGUIRender() const;
|
|
|
|
bool HaveTextRender() const;
|
|
|
|
void RenderGUI() const;
|
|
|
|
void RenderText() const;
|
|
|
|
bool Release();
|
2014-02-21 10:49:02 +01:00
|
|
|
void SetHPtext( std::wstring hp );
|
2014-02-19 13:15:19 +01:00
|
|
|
|
2014-02-25 16:42:51 +01:00
|
|
|
private: /* Overidden mouse methods */
|
2014-02-27 11:41:17 +01:00
|
|
|
void OnMouse ( const Input::Struct::MouseEventData& eventData ) override { }
|
2014-02-26 16:57:32 +01:00
|
|
|
void OnMousePress ( Input::Enum::SAMI key, Input::Mouse* sender ) override;
|
2014-02-27 11:41:17 +01:00
|
|
|
void OnMouseDown ( Input::Enum::SAMI key, Input::Mouse* sender ) override { }
|
2014-02-26 16:57:32 +01:00
|
|
|
void OnMouseRelease ( Input::Enum::SAMI key, Input::Mouse* sender ) override;
|
2014-02-27 11:41:17 +01:00
|
|
|
void OnMouseMovePixelPos ( Input::Struct::SAIPointInt2D coordinate, Input::Mouse* sender ) override { }
|
2014-02-25 16:42:51 +01:00
|
|
|
void OnMouseMoveVelocity ( Input::Struct::SAIPointInt2D coordinate, Input::Mouse* sender ) override;
|
2014-02-27 11:41:17 +01:00
|
|
|
void OnMouseScroll ( int delta, Input::Mouse* sender ) override { }
|
|
|
|
|
|
|
|
void OnKeyEvent ( const Input::Struct::KeyboardEventData& eventData) override { }
|
|
|
|
void OnKeyPress ( Input::Enum::SAKI key, Input::Keyboard* sender) override;
|
|
|
|
void OnKeyDown ( Input::Enum::SAKI key, Input::Keyboard* sender) override { }
|
|
|
|
void OnKeyRelease ( Input::Enum::SAKI key, Input::Keyboard* sender) override;
|
2014-02-25 16:42:51 +01:00
|
|
|
|
2014-02-19 13:15:19 +01:00
|
|
|
private:
|
2014-02-25 16:42:51 +01:00
|
|
|
SharedStateContent *sharedData;
|
2014-02-19 13:15:19 +01:00
|
|
|
Camera_FPSV2 *camera;
|
2014-02-21 10:49:02 +01:00
|
|
|
|
|
|
|
// TODO add multiple UI elements
|
2014-02-20 16:35:49 +01:00
|
|
|
Text_UI* text;
|
|
|
|
Plane_UI* plane;
|
|
|
|
|
|
|
|
bool key_forward;
|
|
|
|
bool key_backward;
|
|
|
|
bool key_strafeRight;
|
|
|
|
bool key_strafeLeft;
|
2014-02-19 13:15:19 +01:00
|
|
|
|
|
|
|
GamingUI();
|
|
|
|
void ReadKeyInput();
|
|
|
|
};
|
|
|
|
} }
|
|
|
|
|
|
|
|
#endif
|