Dragonfly
4.20
A text-based game engine
v4.20
include
InputManager.h
1
///
2
/// The SFML input manager
3
///
4
5
#ifndef __INPUT_MANAGER_H__
6
#define __INPUT_MANAGER_H__
7
8
#include "Manager.h"
9
10
// Two-letter acronym for easier access to manager.
11
#define IM df::InputManager::getInstance()
12
13
namespace
df
{
14
15
class
InputManager
:
public
Manager
{
16
17
private
:
18
InputManager
();
///< Private since a singleton.
19
InputManager
(
InputManager
const
&);
///< Don't allow copy.
20
void
operator=
(
InputManager
const
&);
///< Don't allow assignment.
21
22
public
:
23
/// Get the one and only instance of the InputManager.
24
static
InputManager
&
getInstance
();
25
26
/// Input manager only accepts keyboard and mouse events.
27
/// Return false if not one of them.
28
bool
isValid
(std::string event_type)
const override
;
29
30
/// Get window ready to capture input.
31
/// Return 0 if ok, else return -1;
32
int
startUp
()
override
;
33
34
/// Revert back to normal window mode.
35
void
shutDown
()
override
;
36
37
/// Get input from the keyboard and mouse.
38
/// Pass event along to all interested Objects.
39
void
getInput
()
const
;
40
};
41
42
}
// end of namespace df
43
#endif
//__INPUT_MANAGER_H__
df::InputManager
Definition:
InputManager.h:15
df::InputManager::getInput
void getInput() const
Get input from the keyboard and mouse.
df::InputManager::shutDown
void shutDown() override
Revert back to normal window mode.
df::InputManager::InputManager
InputManager()
Private since a singleton.
df::InputManager::getInstance
static InputManager & getInstance()
Get the one and only instance of the InputManager.
df::InputManager::isValid
bool isValid(std::string event_type) const override
Input manager only accepts keyboard and mouse events.
df::InputManager::operator=
void operator=(InputManager const &)
Don't allow assignment.
df::InputManager::startUp
int startUp() override
Get window ready to capture input.
df::InputManager::InputManager
InputManager(InputManager const &)
Don't allow copy.
df::Manager
Definition:
Manager.h:24
df
An animation for a sprite.
Definition:
Animation.h:15
Generated by
1.9.4