|
libscratchcpp
A library for C++ based Scratch project players
|
The KeyEvent class represents a Scratch key event. More...
#include <scratchcpp/keyevent.h>
Public Types | |
| enum class | Type { Any , Space , Left , Up , Right , Down , Enter } |
Public Member Functions | |
| KeyEvent (Type type=Type::Any) | |
| KeyEvent (const std::string &name) | |
| Type | type () const |
| const std::string & | name () const |
Friends | |
| bool | operator== (const KeyEvent &ev1, const KeyEvent &ev2) |
The KeyEvent class represents a Scratch key event.
|
strong |
| libscratchcpp::KeyEvent::KeyEvent | ( | const std::string & | name | ) |
Constructs KeyEvent from a key name.
| const std::string & libscratchcpp::KeyEvent::name | ( | ) | const |
Returns the name of the key.
| KeyEvent::Type libscratchcpp::KeyEvent::type | ( | ) | const |
Returns the type of the key.