Simulant  21.12-574
A portable game engine for Windows, OSX, Linux, Dreamcast, and PSP
Classes | Public Member Functions | List of all members
smlt::InputManager Class Reference
Inheritance diagram for smlt::InputManager:
smlt::RefCounted< InputManager > smlt::TwoPhaseConstructed

Public Member Functions

 InputManager (const InputManager &)=delete
InputManageroperator= (const InputManager &)=delete
 InputManager (InputState *controller)
InputAxisnew_axis (const std::string &name)
AxisList axises (const std::string &name)
void each_axis (EachAxisCallback callback)
void destroy_axises (const std::string &name)
void destroy_axis (InputAxis *axis)
std::size_t axis_count (const std::string &name) const
float axis_value (const std::string &name) const
int8_t axis_value_hard (const std::string &name) const
void update (float dt)
bool axis_was_pressed (const std::string &name) const
bool axis_was_released (const std::string &name) const
bool start_text_input (bool force_onscreen=false)
unicode stop_text_input ()
bool text_input_active () const
bool onscreen_keyboard_active () const
 S_DEFINE_PROPERTY (state, &InputManager::controller_)
 S_DEFINE_PROPERTY (onscreen_keyboard, &InputManager::keyboard_)
- Public Member Functions inherited from smlt::TwoPhaseConstructed
virtual bool init ()
virtual void clean_up ()

Additional Inherited Members

- Public Types inherited from smlt::RefCounted< InputManager >
typedef std::shared_ptr< InputManagerptr
typedef std::weak_ptr< InputManagerwptr
- Static Public Member Functions inherited from smlt::RefCounted< InputManager >
static RefCounted< InputManager >::ptr create (Args &&... args)
static RefCounted< InputManager >::ptr create ()
- Protected Member Functions inherited from smlt::RefCounted< InputManager >
 RefCounted (Args &&...)

Member Function Documentation

◆ start_text_input()

bool smlt::InputManager::start_text_input ( bool  force_onscreen = false)

Starts reading text input from the user. This will return true if an onscreen keyboard was displayed, and false if it wasn't. An onscreen keyboard will be displayed if no physical keyboard is present

◆ stop_text_input()

unicode smlt::InputManager::stop_text_input ( )

Stops gathering user input. If an onscreen keyboard is visible, this will hide it and return the text that was entered.

◆ text_input_active()

bool smlt::InputManager::text_input_active ( ) const

Returns true if the text input is currently active. While text input is active the signal_text_input_received signal will receive characters that are entered

The documentation for this class was generated from the following files: