Mountain  1.0.0
Simple C++ 2D Game Framework
Mountain::Input Class Reference

Used to fetch inputs from the current Window. More...

#include <input.hpp>

Static Public Member Functions

static MOUNTAIN_API bool_t GetKey (Key key, KeyStatus status=KeyStatus::Down)
 Check if a specified key is of the specified status. More...
 
static MOUNTAIN_API bool_t GetMouseButton (MouseButton mouseButton, MouseButtonStatus status=MouseButtonStatus::Down)
 Check if a specified mouse button is of the specified status. More...
 
static MOUNTAIN_API const GamepadInputGetGamepad (uint32_t gamepadId)
 Get a gamepad input. More...
 
static MOUNTAIN_API uint32_t GetGamepadsConnected ()
 Get how many controllers are currently connected.
 
static MOUNTAIN_API bool_t IsGamepadConnected (uint32_t index)
 Get whether a gamepad is currently connected.
 
static MOUNTAIN_API Vector2 GetMousePosition ()
 Get the mouse position. More...
 
static MOUNTAIN_API Vector2 GetMouseDelta ()
 Get how much the mouse moved last frame.
 
static MOUNTAIN_API Vector2 GetMouseWheel ()
 Get how much the mouse wheel moved last frame.
 

Static Public Attributes

static constexpr size_t GamepadMax = 15
 

Friends

class Window
 
class Game
 

Detailed Description

Used to fetch inputs from the current Window.

Definition at line 17 of file input.hpp.

Member Function Documentation

◆ GetGamepad()

static MOUNTAIN_API const GamepadInput& Mountain::Input::GetGamepad ( uint32_t  gamepadId)
static

Get a gamepad input.

Parameters
gamepadIdGamepad id
Returns
Result

◆ GetKey()

static MOUNTAIN_API bool_t Mountain::Input::GetKey ( Key  key,
KeyStatus  status = KeyStatus::Down 
)
static

Check if a specified key is of the specified status.

Parameters
keyKey to check
statusKey status
Returns
Result

◆ GetMouseButton()

static MOUNTAIN_API bool_t Mountain::Input::GetMouseButton ( MouseButton  mouseButton,
MouseButtonStatus  status = MouseButtonStatus::Down 
)
static

Check if a specified mouse button is of the specified status.

Parameters
mouseButtonMouse button to check
statusMouse button status
Returns
Result

◆ GetMousePosition()

static MOUNTAIN_API Vector2 Mountain::Input::GetMousePosition ( )
static

Get the mouse position.

Returns
Mouse position

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