Danbias/Into The Void client/MainMenu.h

46 lines
804 B
C
Raw Normal View History

2013-10-23 00:09:17 +02:00
#pragma once
#include <string>
#include "GameState.h"
#include "OysterMath.h"
#include "RenderEngine.h"
struct Overlay
{
ID3D11ShaderResourceView *texture;
Oyster::Math::Float3 position;
Oyster::Math::Float2 size;
};
bool IntersectsOverlay(const Overlay &overlay, Oyster::Math::Float2 point);
class MainMenu : public GameState
{
public:
MainMenu();
virtual ~MainMenu();
void Enter(GameStateStack *stateStack);
void Exit();
void Suspend();
void Resume();
void Update(float timeDelta);
void Render() const;
private:
GameStateStack *m_stateStack;
NetworkConnection *m_connection;
float m_connectTimer;
ID3D11ShaderResourceView *m_connectTextures[2];
ID3D11ShaderResourceView *m_quitTextures[2];
Overlay m_backgroundOverlay;
Overlay m_connectOverlay;
Overlay m_quitOverlay;
};