-
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 the Guitar input configuration dialog
Stacked 2 sets of group together.
- Loading branch information
Showing
6 changed files
with
85 additions
and
0 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
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,59 @@ | ||
// Copyright 2016 Dolphin Emulator Project | ||
// Licensed under GPLv2+ | ||
// Refer to the license.txt file included. | ||
|
||
#include "DolphinWX/GuitarInputConfigDiag.h" | ||
|
||
#include "Core/HW/Wiimote.h" | ||
#include "Core/HW/WiimoteEmu/Attachment/Guitar.h" | ||
#include "Core/HW/WiimoteEmu/WiimoteEmu.h" | ||
|
||
GuitarInputConfigDialog::GuitarInputConfigDialog(wxWindow* const parent, InputConfig& config, | ||
const wxString& name, const int port_num) | ||
: InputConfigDialog(parent, config, name, port_num) | ||
{ | ||
const int space5 = FromDIP(5); | ||
|
||
ControlGroupBox* group_box_buttons = | ||
new ControlGroupBox(Wiimote::GetGuitarGroup(port_num, GUITARGP_BUTTONS), this, this); | ||
ControlGroupBox* group_left_strum = | ||
new ControlGroupBox(Wiimote::GetGuitarGroup(port_num, GUITARGP_STRUM), this, this); | ||
|
||
wxBoxSizer* buttons_strum_sizer = new wxBoxSizer(wxVERTICAL); | ||
buttons_strum_sizer->Add(group_box_buttons, 0, wxEXPAND); | ||
buttons_strum_sizer->AddSpacer(space5); | ||
buttons_strum_sizer->Add(group_left_strum, 0, wxEXPAND); | ||
|
||
ControlGroupBox* group_box_frets = | ||
new ControlGroupBox(Wiimote::GetGuitarGroup(port_num, GUITARGP_FRETS), this, this); | ||
ControlGroupBox* group_box_whammy = | ||
new ControlGroupBox(Wiimote::GetGuitarGroup(port_num, GUITARGP_WHAMMY), this, this); | ||
|
||
wxBoxSizer* frets_whammy_sizer = new wxBoxSizer(wxVERTICAL); | ||
frets_whammy_sizer->Add(group_box_frets, 0, wxEXPAND); | ||
frets_whammy_sizer->AddSpacer(space5); | ||
frets_whammy_sizer->Add(group_box_whammy, 0, wxEXPAND); | ||
|
||
ControlGroupBox* group_box_stick = | ||
new ControlGroupBox(Wiimote::GetGuitarGroup(port_num, GUITARGP_STICK), this, this); | ||
|
||
wxBoxSizer* controls_sizer = new wxBoxSizer(wxHORIZONTAL); | ||
controls_sizer->AddSpacer(space5); | ||
controls_sizer->Add(buttons_strum_sizer, 0, wxEXPAND); | ||
controls_sizer->AddSpacer(space5); | ||
controls_sizer->Add(frets_whammy_sizer, 0, wxEXPAND); | ||
controls_sizer->AddSpacer(space5); | ||
controls_sizer->Add(group_box_stick, 0, wxEXPAND); | ||
controls_sizer->AddSpacer(space5); | ||
|
||
wxBoxSizer* szr_main = new wxBoxSizer(wxVERTICAL); | ||
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(); | ||
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 GuitarInputConfigDialog : public InputConfigDialog | ||
{ | ||
public: | ||
GuitarInputConfigDialog(wxWindow* const parent, InputConfig& config, const wxString& name, | ||
const int port_num = 0); | ||
}; |
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