Add tests for event handling, use NazaraUnitTests [EventHandler]

This commit is contained in:
Gawaboumga
2016-10-12 21:08:02 +02:00
parent f19100d179
commit d4e569c09e
26 changed files with 1165 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
#ifndef __MENUSTATE_HPP__
#define __MENUSTATE_HPP__
#include "Text.hpp"
#include <Nazara/Utility/EventHandler.hpp>
#include <NDK/State.hpp>
class StateContext;
class MenuState : public Ndk::State
{
public:
MenuState(StateContext& stateContext);
void Enter(Ndk::StateMachine& fsm) override;
void Leave(Ndk::StateMachine& fsm) override;
bool Update(Ndk::StateMachine& fsm, float elapsedTime) override;
private:
void DrawMenu();
StateContext& m_context;
Text m_text;
NazaraSlot(Nz::EventHandler, OnKeyPressed, m_keyPressedSlot);
int m_selectedNextState;
};
#endif // __MENUSTATE_HPP__