File: control_binding.h

package info (click to toggle)
freespace2 24.2.0%2Brepack-1
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid
  • size: 43,716 kB
  • sloc: cpp: 595,001; ansic: 21,741; python: 1,174; sh: 457; makefile: 248; xml: 181
file content (37 lines) | stat: -rw-r--r-- 882 bytes parent folder | download
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