Base input class for polling input in the Fling Engine.
More...
#include <Input.h>
Inherits Fling::NonCopyable.
|
| static void | Init () |
| | Initialize the input instance on this platform. More...
|
| |
| static void | PreUpdate () |
| | PreUpdate is called before polling of input, and after Init. More...
|
| |
| static void | Shutdown () |
| | Shuts down input manager. More...
|
| |
| static void | Poll () |
| | Update any input polling that needs to happen on this platform. More...
|
| |
| static bool | IsKeyDown (const std::string &t_KeyName) |
| |
| static bool | IsKeyHeld (const std::string &t_KeyName) |
| |
| static bool | IsMouseButtonPressed (const std::string &t_KeyName) |
| |
| static bool | IsMouseDown (const std::string &t_KeyName) |
| |
| static MousePos | GetMousePos () |
| | Get the current mouse position in screen space. More...
|
| |
| template<auto Candidate, typename Type > |
| static void | BindKeyPress (const std::string &t_KeyName, Type &t_Instance) |
| | Bind a callback function to when a key is pressed. More...
|
| |
|
| static void | AddKeyMap (const std::string &t_Name, UINT32 t_KeyCode) |
| | Add a key mapping to this platform. More...
|
| |
Base input class for polling input in the Fling Engine.
◆ KeyDownMap
Key press delegate mappings.
◆ KeyDownMapPair
◆ KeyMap
◆ KeyPair
◆ AddKeyMap()
| static void Fling::Input::AddKeyMap |
( |
const std::string & |
t_Name, |
|
|
UINT32 |
t_KeyCode |
|
) |
| |
|
inlinestaticprotected |
Add a key mapping to this platform.
- Parameters
-
| t_Name | The name of this key |
| t_KeyCode | The KeyCode that maps this key to the current platform |
◆ BindKeyPress()
template<auto Candidate, typename Type >
| void Fling::Input::BindKeyPress |
( |
const std::string & |
t_KeyName, |
|
|
Type & |
t_Instance |
|
) |
| |
|
static |
◆ GetMousePos()
| static MousePos Fling::Input::GetMousePos |
( |
| ) |
|
|
inlinestatic |
Get the current mouse position in screen space.
◆ GetMousePosImpl()
| virtual MousePos Fling::Input::GetMousePosImpl |
( |
| ) |
|
|
protectedpure virtual |
◆ Init()
| static void Fling::Input::Init |
( |
| ) |
|
|
inlinestatic |
Initialize the input instance on this platform.
Handle and input mapping on this platform
◆ InitImpl()
| virtual void Fling::Input::InitImpl |
( |
| ) |
|
|
protectedpure virtual |
◆ InitKeyMap()
| virtual void Fling::Input::InitKeyMap |
( |
| ) |
|
|
protectedpure virtual |
◆ IsKeyDown()
| static bool Fling::Input::IsKeyDown |
( |
const std::string & |
t_KeyName | ) |
|
|
inlinestatic |
◆ IsKeyDownImpl()
| virtual bool Fling::Input::IsKeyDownImpl |
( |
const std::string & |
t_KeyName | ) |
|
|
protectedpure virtual |
◆ IsKeyHeld()
| static bool Fling::Input::IsKeyHeld |
( |
const std::string & |
t_KeyName | ) |
|
|
inlinestatic |
◆ IsKeyHelpImpl()
| virtual bool Fling::Input::IsKeyHelpImpl |
( |
const std::string & |
t_KeyName | ) |
|
|
protectedpure virtual |
◆ IsMouseButtonPressed()
| static bool Fling::Input::IsMouseButtonPressed |
( |
const std::string & |
t_KeyName | ) |
|
|
inlinestatic |
◆ IsMouseButtonPressedImpl()
| virtual bool Fling::Input::IsMouseButtonPressedImpl |
( |
const std::string & |
t_KeyName | ) |
|
|
protectedpure virtual |
◆ IsMouseDown()
| static bool Fling::Input::IsMouseDown |
( |
const std::string & |
t_KeyName | ) |
|
|
inlinestatic |
◆ IsMouseDownImpl()
| virtual bool Fling::Input::IsMouseDownImpl |
( |
const std::string & |
t_KeyName | ) |
|
|
protectedpure virtual |
◆ Poll()
| static void Fling::Input::Poll |
( |
| ) |
|
|
inlinestatic |
Update any input polling that needs to happen on this platform.
◆ PollImpl()
| virtual void Fling::Input::PollImpl |
( |
| ) |
|
|
protectedpure virtual |
Poll for input from the keyboard.
◆ PreUpdate()
| static void Fling::Input::PreUpdate |
( |
| ) |
|
|
inlinestatic |
PreUpdate is called before polling of input, and after Init.
Useful for anything that needs to happen after Window creation.
◆ PreUpdateImpl()
| virtual void Fling::Input::PreUpdateImpl |
( |
| ) |
|
|
protectedpure virtual |
◆ Shutdown()
| static void Fling::Input::Shutdown |
( |
| ) |
|
|
inlinestatic |
Shuts down input manager.
Deletes the input implementation pointer.
◆ ShutdownImpl()
| virtual void Fling::Input::ShutdownImpl |
( |
| ) |
|
|
protectedpure virtual |
◆ m_Instance
| Input* Fling::Input::m_Instance |
|
staticprotected |
Created by the implementation class.
- See also
- WindowInput
◆ m_KeyDownMap
◆ m_KeyMap
The documentation for this class was generated from the following files: