2015-09-30 02:56:11 +02:00
|
|
|
#ifndef _ENTITY_KEYBIND_HPP_
|
|
|
|
#define _ENTITY_KEYBIND_HPP_
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
#include "Entity.hpp"
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
namespace SqMod {
|
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------------------------------
|
2015-10-29 22:05:25 +01:00
|
|
|
* Class responsible for managing the referenced keybind instance.
|
2015-09-30 02:56:11 +02:00
|
|
|
*/
|
|
|
|
class CKeybind : public Reference< CKeybind >
|
|
|
|
{
|
|
|
|
public:
|
2015-10-29 22:06:20 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Import the constructors, destructors and assignment operators from the base class.
|
|
|
|
*/
|
2015-09-30 02:56:11 +02:00
|
|
|
using RefType::Reference;
|
2015-10-29 21:09:53 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2015-10-29 22:05:25 +01:00
|
|
|
* Retrieve the primary key code of the referenced keybind instance.
|
2015-10-29 21:09:53 +01:00
|
|
|
*/
|
|
|
|
SQInt32 GetPrimary() const noexcept;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2015-10-29 22:05:25 +01:00
|
|
|
* Retrieve the secondary key code of the referenced keybind instance.
|
2015-10-29 21:09:53 +01:00
|
|
|
*/
|
|
|
|
SQInt32 GetSecondary() const noexcept;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2015-10-29 22:05:25 +01:00
|
|
|
* Retrieve the alternative key code of the referenced keybind instance.
|
2015-10-29 21:09:53 +01:00
|
|
|
*/
|
|
|
|
SQInt32 GetAlternative() const noexcept;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2015-10-29 22:05:25 +01:00
|
|
|
* See whether the referenced keybind instance reacts to key press events.
|
2015-10-29 21:09:53 +01:00
|
|
|
*/
|
|
|
|
bool IsRelease() const noexcept;
|
2015-09-30 02:56:11 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
} // Namespace:: SqMod
|
|
|
|
|
|
|
|
#endif // _ENTITY_KEYBIND_HPP_
|