1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
#pragma once
#ifndef FS2_OPEN_CONTROLBINDING_H
#define FS2_OPEN_CONTROLBINDING_H
#include "scripting/ade_api.h"
#include "controlconfig/controlsconfig.h"
namespace scripting {
namespace api {
/**
* @brief A class wrapping the Control_config's ActionID to Lua
* @details A class wrapping the Control_Config's ActionID's to Lua. Lua can request a control-binding object by name and will get this class.
* This class, only holding the IoActionId as an identifier, can then be used to access and modify the control binding with this id.
*/
class cci_h {
private:
IoActionId idx; //!< The ActionId this lua object references.
public:
cci_h();
cci_h(int n_id);
/*
* @returns true if this object holds a valid IoActionId, false otherwise
*/
bool isValid() const;
IoActionId Get();
};
DECLARE_ADE_OBJ(l_ControlBinding, cci_h);
}
}
#endif // FS2_OPEN_CONTROLBINDING_H
|