-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redo completely the Wiimote configuration dialog
Pretty much everything layout related changed. It is much more packed together and the window is much less wide as a result. Still need to redo the extensions dialog, that will come in the next commits.
- Loading branch information
Showing
4 changed files
with
123 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
// Copyright 2016 Dolphin Emulator Project | ||
// Licensed under GPLv2+ | ||
// Refer to the license.txt file included. | ||
|
||
#include "DolphinWX/WiimoteInputConfigDiag.h" | ||
|
||
#include "Core/HW/Wiimote.h" | ||
#include "Core/HW/WiimoteEmu/WiimoteEmu.h" | ||
|
||
WiimoteInputConfigDialog::WiimoteInputConfigDialog(wxWindow* const parent, InputConfig& config, | ||
const wxString& name, const int port_num) | ||
: InputConfigDialog(parent, config, name, port_num) | ||
{ | ||
const int space5 = FromDIP(5); | ||
|
||
wxBoxSizer* device_chooser = CreateDeviceChooserGroupBox(); | ||
wxBoxSizer* reset_sizer = CreaterResetGroupBox(wxHORIZONTAL); | ||
wxBoxSizer* profile_chooser = CreateProfileChooserGroupBox(); | ||
|
||
ControlGroupBox* group_box_buttons = | ||
new ControlGroupBox(Wiimote::GetGroup(port_num, WIIMOTEGP_BUTTONS), this, this); | ||
ControlGroupBox* group_box_dpad = | ||
new ControlGroupBox(Wiimote::GetGroup(port_num, WIIMOTEGP_DPAD), this, this); | ||
ControlGroupBox* group_box_shake = | ||
new ControlGroupBox(Wiimote::GetGroup(port_num, WIIMOTEGP_SHAKE), this, this); | ||
ControlGroupBox* group_box_ir = | ||
new ControlGroupBox(Wiimote::GetGroup(port_num, WIIMOTEGP_IR), this, this); | ||
ControlGroupBox* group_box_tilt = | ||
new ControlGroupBox(Wiimote::GetGroup(port_num, WIIMOTEGP_TILT), this, this); | ||
ControlGroupBox* group_box_swing = | ||
new ControlGroupBox(Wiimote::GetGroup(port_num, WIIMOTEGP_SWING), this, this); | ||
ControlGroupBox* group_box_rumble = | ||
new ControlGroupBox(Wiimote::GetGroup(port_num, WIIMOTEGP_RUMBLE), this, this); | ||
ControlGroupBox* group_box_extension = | ||
new ControlGroupBox(Wiimote::GetGroup(port_num, WIIMOTEGP_EXTENSION), this, this); | ||
|
||
wxBoxSizer* buttons_dpad_sizer = new wxBoxSizer(wxVERTICAL); | ||
|
||
buttons_dpad_sizer->Add(group_box_buttons, 0, wxEXPAND); | ||
buttons_dpad_sizer->AddSpacer(space5); | ||
buttons_dpad_sizer->Add(group_box_dpad, 0, wxEXPAND); | ||
|
||
wxBoxSizer* tilt_extension_sizer = new wxBoxSizer(wxVERTICAL); | ||
|
||
tilt_extension_sizer->Add(group_box_tilt, 0, wxEXPAND); | ||
tilt_extension_sizer->AddSpacer(space5); | ||
tilt_extension_sizer->Add(group_box_extension, 0, wxEXPAND); | ||
|
||
wxBoxSizer* swing_shake_rumble_sizer = new wxBoxSizer(wxVERTICAL); | ||
|
||
swing_shake_rumble_sizer->Add(group_box_swing, 0, wxEXPAND); | ||
swing_shake_rumble_sizer->AddSpacer(space5); | ||
swing_shake_rumble_sizer->Add(group_box_shake, 0, wxEXPAND); | ||
swing_shake_rumble_sizer->AddSpacer(space5); | ||
swing_shake_rumble_sizer->Add(group_box_rumble, 0, wxEXPAND); | ||
|
||
ControlGroupBox* group_box_options = | ||
new ControlGroupBox(Wiimote::GetGroup(port_num, WIIMOTEGP_OPTIONS), this, this); | ||
ControlGroupBox* group_box_hotkeys = | ||
new ControlGroupBox(Wiimote::GetGroup(port_num, WIIMOTEGP_HOTKEYS), this, this); | ||
|
||
wxBoxSizer* options_hotkeys_sizer = new wxBoxSizer(wxVERTICAL); | ||
|
||
options_hotkeys_sizer->Add(group_box_options, 0, wxEXPAND); | ||
options_hotkeys_sizer->Add(group_box_hotkeys, 0, wxEXPAND); | ||
|
||
wxBoxSizer* controls_sizer = new wxBoxSizer(wxHORIZONTAL); | ||
controls_sizer->AddSpacer(space5); | ||
controls_sizer->Add(buttons_dpad_sizer, 0, wxEXPAND | wxTOP, space5); | ||
controls_sizer->AddSpacer(space5); | ||
controls_sizer->Add(tilt_extension_sizer, 0, wxEXPAND | wxTOP, space5); | ||
controls_sizer->AddSpacer(space5); | ||
controls_sizer->Add(group_box_ir, 0, wxEXPAND | wxTOP, space5); | ||
controls_sizer->AddSpacer(space5); | ||
controls_sizer->Add(swing_shake_rumble_sizer, 0, wxEXPAND | wxTOP, space5); | ||
controls_sizer->AddSpacer(space5); | ||
controls_sizer->Add(options_hotkeys_sizer, 0, wxEXPAND | wxTOP, space5); | ||
controls_sizer->AddSpacer(space5); | ||
|
||
wxBoxSizer* const dio = new wxBoxSizer(wxHORIZONTAL); | ||
dio->AddSpacer(space5); | ||
dio->Add(device_chooser, 1, wxEXPAND); | ||
dio->AddSpacer(space5); | ||
dio->Add(reset_sizer, 1, wxEXPAND); | ||
dio->AddSpacer(space5); | ||
dio->Add(profile_chooser, 1, wxEXPAND); | ||
dio->AddSpacer(space5); | ||
|
||
wxBoxSizer* szr_main = new wxBoxSizer(wxVERTICAL); | ||
szr_main->AddSpacer(space5); | ||
szr_main->Add(dio); | ||
szr_main->AddSpacer(space5); | ||
szr_main->Add(controls_sizer, 1, wxEXPAND | wxLEFT | wxRIGHT, space5); | ||
szr_main->AddSpacer(space5); | ||
szr_main->Add(CreateButtonSizer(wxCLOSE | wxNO_DEFAULT), 0, wxEXPAND | wxLEFT | wxRIGHT, space5); | ||
szr_main->AddSpacer(space5); | ||
|
||
SetSizerAndFit(szr_main); | ||
Center(); | ||
|
||
UpdateDeviceComboBox(); | ||
UpdateProfileComboBox(); | ||
|
||
UpdateGUI(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright 2016 Dolphin Emulator Project | ||
// Licensed under GPLv2+ | ||
// Refer to the license.txt file included. | ||
|
||
#pragma once | ||
|
||
#include "DolphinWX/InputConfigDiag.h" | ||
|
||
class WiimoteInputConfigDialog : public InputConfigDialog | ||
{ | ||
public: | ||
WiimoteInputConfigDialog(wxWindow* const parent, InputConfig& config, const wxString& name, | ||
const int port_num = 0); | ||
}; |