mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 13:57:57 -07:00
e63b07f73b
The ControllerConfigDiag design was getting confusing, so more significant changes needed to be done. Firstly, the GC controller and the Wiimote section layouts have been aligned for consistency. The Balance Board source chooser is a checkbox. The "general settings" that affect the SYSCONF have been moved to the Wii pane in the Config dialog. It makes more sense because those affect the Wii's settings in the NAND, unlike the other options. Another reason for moving it is that the Controller Config Dialog was getting pretty crowded, and the whole section is disabled when emulation is running, which is wasted space. The Wiimotes section is now organised by two radio buttons. One is for the Passthrough Mode, with sync/reset buttons under it; the other is the emulated Bluetooth mode, which still has the regular Wiimote source choosers, the Continuous Scanning controls and the Enable Speaker Data option (which only applies to the emulated BT mode). Hopefully this should make things a bit clearer and look cleaner. (This is a monolithic commit because separating UI changes is hard)
80 lines
2.3 KiB
C++
80 lines
2.3 KiB
C++
// Copyright 2010 Dolphin Emulator Project
|
|
// Licensed under GPLv2+
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include <array>
|
|
#include <map>
|
|
|
|
#include <wx/dialog.h>
|
|
|
|
#include "Core/ConfigManager.h"
|
|
#include "Core/HW/Wiimote.h"
|
|
#include "InputCommon/GCAdapter.h"
|
|
|
|
class InputConfig;
|
|
class wxCheckBox;
|
|
class wxChoice;
|
|
class wxRadioButton;
|
|
class wxStaticBoxSizer;
|
|
class wxStaticText;
|
|
|
|
class ControllerConfigDiag final : public wxDialog
|
|
{
|
|
public:
|
|
ControllerConfigDiag(wxWindow* const parent);
|
|
|
|
private:
|
|
void UpdateUI();
|
|
|
|
wxStaticBoxSizer* CreateGamecubeSizer();
|
|
wxStaticBoxSizer* CreateWiimoteConfigSizer();
|
|
wxBoxSizer* CreatePassthroughBTConfigSizer();
|
|
wxBoxSizer* CreateEmulatedBTConfigSizer();
|
|
|
|
void OnClose(wxCloseEvent& event);
|
|
void OnCloseButton(wxCommandEvent& event);
|
|
|
|
void OnWiimoteSourceChanged(wxCommandEvent& event);
|
|
void OnWiimoteConfigButton(wxCommandEvent& event);
|
|
void OnWiimoteRefreshButton(wxCommandEvent& event);
|
|
void SaveWiimoteSource();
|
|
|
|
void OnGameCubePortChanged(wxCommandEvent& event);
|
|
void OnGameCubeConfigButton(wxCommandEvent& event);
|
|
|
|
void OnBluetoothModeChanged(wxCommandEvent& event);
|
|
|
|
void OnPassthroughScanButton(wxCommandEvent& event);
|
|
void OnPassthroughResetButton(wxCommandEvent& event);
|
|
void OnBalanceBoardChanged(wxCommandEvent& event);
|
|
void OnContinuousScanning(wxCommandEvent& event);
|
|
void OnEnableSpeaker(wxCommandEvent& event);
|
|
|
|
std::map<wxWindowID, unsigned int> m_gc_port_from_choice_id;
|
|
std::map<wxWindowID, unsigned int> m_gc_port_from_config_id;
|
|
std::array<wxButton*, 4> m_gc_port_configure_button;
|
|
std::array<wxString, 8> m_gc_pad_type_strs;
|
|
|
|
wxRadioButton* m_passthrough_bt_radio;
|
|
wxRadioButton* m_emulated_bt_radio;
|
|
|
|
wxStaticText* m_passthrough_sync_text;
|
|
wxButton* m_passthrough_sync_btn;
|
|
wxStaticText* m_passthrough_reset_text;
|
|
wxButton* m_passthrough_reset_btn;
|
|
|
|
std::map<wxWindowID, unsigned int> m_wiimote_index_from_choice_id;
|
|
std::map<wxWindowID, unsigned int> m_wiimote_index_from_config_id;
|
|
std::array<wxButton*, MAX_WIIMOTES> m_wiimote_configure_button;
|
|
std::array<wxStaticText*, MAX_WIIMOTES> m_wiimote_labels;
|
|
std::array<wxChoice*, MAX_WIIMOTES> m_wiimote_sources;
|
|
wxCheckBox* m_balance_board_checkbox;
|
|
|
|
wxCheckBox* m_enable_continuous_scanning;
|
|
wxButton* m_refresh_wm_button;
|
|
wxStaticText* m_unsupported_bt_text;
|
|
wxCheckBox* m_enable_speaker_data;
|
|
};
|