2022-03-20 04:19:43 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Runtime/GCNTypes.hpp"
|
|
|
|
|
|
|
|
namespace metaforce {
|
|
|
|
enum class EButton {
|
|
|
|
A,
|
|
|
|
B,
|
|
|
|
X,
|
|
|
|
Y,
|
|
|
|
Start,
|
|
|
|
Z,
|
|
|
|
Up,
|
|
|
|
Right,
|
|
|
|
Down,
|
|
|
|
Left,
|
|
|
|
L,
|
|
|
|
R,
|
|
|
|
MAX,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class EAnalogButton {
|
|
|
|
Left,
|
|
|
|
Right
|
|
|
|
};
|
|
|
|
|
|
|
|
class CControllerButton {
|
2022-03-21 00:30:47 +00:00
|
|
|
bool x0_pressed = false;
|
|
|
|
bool x1_pressEvent = false;
|
|
|
|
bool x2_releaseEvent = false;
|
2022-03-20 04:19:43 +00:00
|
|
|
|
|
|
|
public:
|
2022-03-20 20:14:08 +00:00
|
|
|
void SetIsPressed(bool pressed) { x0_pressed = pressed; }
|
|
|
|
[[nodiscard]] bool GetIsPressed() const { return x0_pressed; }
|
|
|
|
void SetPressEvent(bool press){ x1_pressEvent = press; }
|
|
|
|
[[nodiscard]] bool GetPressEvent() const{ return x1_pressEvent; }
|
|
|
|
void SetReleaseEvent(bool release) { x2_releaseEvent = release;};
|
|
|
|
[[nodiscard]] bool GetReleaseEvent() const { return x2_releaseEvent; }
|
2022-03-20 04:19:43 +00:00
|
|
|
};
|
|
|
|
} // namespace metaforce
|