| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <QDialog> |
| 7 |
|
| 8 |
#include "Core/NetPlayProto.h" |
| 9 |
|
| 10 |
class QCheckBox; |
| 11 |
class QGridLayout; |
| 12 |
class QComboBox; |
| 13 |
class QDialogButtonBox; |
| 14 |
|
| 15 |
namespace NetPlay |
| 16 |
{ |
| 17 |
class Player; |
| 18 |
} |
| 19 |
|
| 20 |
class PadMappingDialog : public QDialog |
| 21 |
{ |
| 22 |
Q_OBJECT |
| 23 |
public: |
| 24 |
explicit PadMappingDialog(QWidget* widget); |
| 25 |
|
| 26 |
int exec() override; |
| 27 |
|
| 28 |
NetPlay::PadMappingArray GetGCPadArray(); |
| 29 |
NetPlay::GBAConfigArray GetGBAArray(); |
| 30 |
NetPlay::PadMappingArray GetWiimoteArray(); |
| 31 |
|
| 32 |
private: |
| 33 |
void CreateWidgets(); |
| 34 |
void ConnectWidgets(); |
| 35 |
|
| 36 |
void OnMappingChanged(); |
| 37 |
|
| 38 |
NetPlay::PadMappingArray m_pad_mapping; |
| 39 |
NetPlay::GBAConfigArray m_gba_config; |
| 40 |
NetPlay::PadMappingArray m_wii_mapping; |
| 41 |
|
| 42 |
QGridLayout* m_main_layout; |
| 43 |
std::array<QComboBox*, 4> m_gc_boxes; |
| 44 |
std::array<QCheckBox*, 4> m_gba_boxes; |
| 45 |
std::array<QComboBox*, 4> m_wii_boxes; |
| 46 |
std::vector<const NetPlay::Player*> m_players; |
| 47 |
QDialogButtonBox* m_button_box; |
| 48 |
}; |