New module: Platform - Split window management from Utility module (#128)
* New module: Platform - Split window management from Utility module Final touch * NDK/SDK: Bring back initialization of Utility
This commit is contained in:
committed by
Jérôme Leclercq
parent
41a1b5d493
commit
5aa072cee3
33
tests/Engine/Platform/EventHandler/MouseClickState.hpp
Normal file
33
tests/Engine/Platform/EventHandler/MouseClickState.hpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#ifndef __MOUSECLICKSTATE_HPP__
|
||||
#define __MOUSECLICKSTATE_HPP__
|
||||
|
||||
#include "BaseState.hpp"
|
||||
|
||||
class StateContext;
|
||||
|
||||
enum class MouseStatus
|
||||
{
|
||||
DoubleClick,
|
||||
Pressed,
|
||||
Released
|
||||
};
|
||||
|
||||
class MouseClickState : public BaseState
|
||||
{
|
||||
public:
|
||||
MouseClickState(StateContext& stateContext);
|
||||
|
||||
void Enter(Ndk::StateMachine& fsm) override;
|
||||
|
||||
private:
|
||||
void DrawMenu() override;
|
||||
|
||||
void ManageInput(MouseStatus mouseStatus, const Nz::WindowEvent::MouseButtonEvent& mouse, Ndk::StateMachine& fsm);
|
||||
|
||||
NazaraSlot(Nz::EventHandler, OnKeyPressed, m_keyPressedSlot);
|
||||
NazaraSlot(Nz::EventHandler, OnMouseButtonDoubleClicked, m_mouseButtonDoubleClickedSlot);
|
||||
NazaraSlot(Nz::EventHandler, OnMouseButtonPressed, m_mouseButtonPressedSlot);
|
||||
NazaraSlot(Nz::EventHandler, OnMouseButtonReleased, m_mouseButtonReleasedSlot);
|
||||
};
|
||||
|
||||
#endif // __MOUSECLICKSTATE_HPP__
|
||||
Reference in New Issue
Block a user