Hymn to Beauty
C++ 3D Engine
Input Class Reference

#include <Input.hpp>

Classes

struct  Button
 The information needed to identify a button. More...
 

Public Member Functions

void SetWindow (Utility::Window *window)
 Set the window to check for input against. More...
 
bool CheckButton (int index) const
 Check if a button was activated this frame. More...
 
Json::Value Save () const
 Save the buttons to a JSON value. More...
 
void Load (const Json::Value &buttonsNode)
 Load buttons from JSON node. More...
 

Static Public Member Functions

static InputGetInstance ()
 Get the input singleton instance. More...
 

Public Attributes

std::vector< Button * > buttons
 The buttons to register. More...
 

Detailed Description

Hold information about the hymn's inputs.

Todo:
Android

Member Function Documentation

◆ CheckButton()

bool Input::CheckButton ( int  index) const

Check if a button was activated this frame.

Parameters
indexThe index of the button in the buttons array.
Returns
Whether the button was activated this frame.

◆ GetInstance()

Input & Input::GetInstance ( )
static

Get the input singleton instance.

Returns
The input instance.

◆ Load()

void Input::Load ( const Json::Value &  buttonsNode)

Load buttons from JSON node.

Parameters
buttonsNodeThe JSON value to load.

◆ Save()

Json::Value Input::Save ( ) const

Save the buttons to a JSON value.

Returns
The saved JSON value.

◆ SetWindow()

void Input::SetWindow ( Utility::Window window)

Set the window to check for input against.

Parameters
windowThe window to get input from.

Member Data Documentation

◆ buttons

std::vector<Button*> Input::buttons

The buttons to register.


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