blob: d8f2ed7b7e1df2f7b6b4a945818fcce0f4f644c5 (
plain)
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
|
#ifndef CLIENT_GAMEPAD_BUTTON_HH
#define CLIENT_GAMEPAD_BUTTON_HH 1
#pragma once
#include "core/config.hh"
struct GLFWgamepadstate;
class ConfigGamepadButton final : public IConfigValue {
public:
explicit ConfigGamepadButton(void);
explicit ConfigGamepadButton(int button);
virtual ~ConfigGamepadButton(void) = default;
virtual const char *get(void) const override;
virtual void set(const char *value) override;
int get_button(void) const;
void set_button(int button);
bool equals(int button) const;
bool is_pressed(const GLFWgamepadstate &state) const;
private:
int m_gamepad_button;
const char *m_name;
};
#endif /* CLIENT_GAMEPAD_BUTTON_HH */
|