-
Notifications
You must be signed in to change notification settings - Fork 0
input_system::key_bind
Paweł Waligóra edited this page Apr 25, 2024
·
2 revisions
Class made for binding key actions with function calls. One instance = one such bind.
Just declare input_system::key_bind
variable in a script scope and define it either on declaration or in script constructor.
namespace game {
class player : public scripts_system::script {
public:
player();
void update() override;
private:
void jump();
input_system::key_bind jump_key_bind = input_system::key_bind(std::bind(&game::player::jump, this), GLFW_KEY_SPACE, GLFW_PRESS);
};
}
In above example any time space is pressed jump fuction will be called.
- engine
- scripts_system
- scene_loader
- time_system
-
input_system
- input_system::key_held
- input_system::key_events
- input_system::subscribe() (deprecated)
- input_system::axis_state()
- input_system::key_bind
- input_system::axis
- input_system::double_axis
- input_system::triple_axis
- input_system::axis2
- input_system::double_axis2
- input_system::triple_axis2
- input_system::axis-choice
- renderer
- physics
- ui_system
- game