| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include "DolphinQt/QtUtils/AspectRatioWidget.h" |
| 7 |
#include "DolphinQt/TAS/TASInputWindow.h" |
| 8 |
|
| 9 |
#include "Core/HW/WiimoteEmu/ExtensionPort.h" |
| 10 |
|
| 11 |
class QGroupBox; |
| 12 |
class QHideEvent; |
| 13 |
class QShowEvent; |
| 14 |
class QSpinBox; |
| 15 |
class TASCheckBox; |
| 16 |
class TASSpinBox; |
| 17 |
|
| 18 |
namespace WiimoteEmu |
| 19 |
{ |
| 20 |
class Extension; |
| 21 |
class Wiimote; |
| 22 |
} |
| 23 |
|
| 24 |
namespace ControllerEmu |
| 25 |
{ |
| 26 |
class Attachments; |
| 27 |
} |
| 28 |
|
| 29 |
class WiiTASInputWindow : public TASInputWindow |
| 30 |
{ |
| 31 |
Q_OBJECT |
| 32 |
public: |
| 33 |
explicit WiiTASInputWindow(QWidget* parent, int num); |
| 34 |
|
| 35 |
void hideEvent(QHideEvent* event) override; |
| 36 |
void showEvent(QShowEvent* event) override; |
| 37 |
|
| 38 |
void UpdateExtension(int extension); |
| 39 |
void UpdateMotionPlus(bool attached); |
| 40 |
|
| 41 |
private: |
| 42 |
WiimoteEmu::Wiimote* GetWiimote(); |
| 43 |
ControllerEmu::Attachments* GetAttachments(); |
| 44 |
WiimoteEmu::Extension* GetExtension(); |
| 45 |
|
| 46 |
void LoadExtensionAndMotionPlus(); |
| 47 |
void UpdateControlVisibility(); |
| 48 |
void UpdateInputOverrideFunction(); |
| 49 |
|
| 50 |
WiimoteEmu::ExtensionNumber m_active_extension; |
| 51 |
int m_attachment_callback_id = -1; |
| 52 |
bool m_is_motion_plus_attached; |
| 53 |
int m_motion_plus_callback_id = -1; |
| 54 |
int m_num; |
| 55 |
|
| 56 |
InputOverrider m_wiimote_overrider; |
| 57 |
InputOverrider m_nunchuk_overrider; |
| 58 |
InputOverrider m_classic_overrider; |
| 59 |
|
| 60 |
TASCheckBox* m_a_button; |
| 61 |
TASCheckBox* m_b_button; |
| 62 |
TASCheckBox* m_1_button; |
| 63 |
TASCheckBox* m_2_button; |
| 64 |
TASCheckBox* m_plus_button; |
| 65 |
TASCheckBox* m_minus_button; |
| 66 |
TASCheckBox* m_home_button; |
| 67 |
TASCheckBox* m_left_button; |
| 68 |
TASCheckBox* m_up_button; |
| 69 |
TASCheckBox* m_down_button; |
| 70 |
TASCheckBox* m_right_button; |
| 71 |
TASCheckBox* m_c_button; |
| 72 |
TASCheckBox* m_z_button; |
| 73 |
TASCheckBox* m_classic_a_button; |
| 74 |
TASCheckBox* m_classic_b_button; |
| 75 |
TASCheckBox* m_classic_x_button; |
| 76 |
TASCheckBox* m_classic_y_button; |
| 77 |
TASCheckBox* m_classic_plus_button; |
| 78 |
TASCheckBox* m_classic_minus_button; |
| 79 |
TASCheckBox* m_classic_l_button; |
| 80 |
TASCheckBox* m_classic_r_button; |
| 81 |
TASCheckBox* m_classic_zl_button; |
| 82 |
TASCheckBox* m_classic_zr_button; |
| 83 |
TASCheckBox* m_classic_home_button; |
| 84 |
TASCheckBox* m_classic_left_button; |
| 85 |
TASCheckBox* m_classic_up_button; |
| 86 |
TASCheckBox* m_classic_down_button; |
| 87 |
TASCheckBox* m_classic_right_button; |
| 88 |
TASSpinBox* m_ir_x_value; |
| 89 |
TASSpinBox* m_ir_y_value; |
| 90 |
QGroupBox* m_remote_accelerometer_box; |
| 91 |
QGroupBox* m_remote_gyroscope_box; |
| 92 |
QGroupBox* m_nunchuk_accelerometer_box; |
| 93 |
QGroupBox* m_remote_buttons_box; |
| 94 |
QGroupBox* m_nunchuk_buttons_box; |
| 95 |
QGroupBox* m_classic_buttons_box; |
| 96 |
QGroupBox* m_triggers_box; |
| 97 |
AspectRatioWidget* m_ir_box; |
| 98 |
AspectRatioWidget* m_nunchuk_stick_box; |
| 99 |
AspectRatioWidget* m_classic_left_stick_box; |
| 100 |
AspectRatioWidget* m_classic_right_stick_box; |
| 101 |
}; |