DolphinWX: Make some general UI functions/vars private
This commit is contained in:
parent
263e64e939
commit
899fd55ea8
|
@ -20,12 +20,14 @@ class ControllerConfigDiag : public wxDialog
|
|||
public:
|
||||
ControllerConfigDiag(wxWindow* const parent);
|
||||
|
||||
private:
|
||||
void RefreshRealWiimotes(wxCommandEvent& event);
|
||||
|
||||
void ConfigEmulatedWiimote(wxCommandEvent& event);
|
||||
|
||||
void SelectSource(wxCommandEvent& event);
|
||||
void RevertSource();
|
||||
|
||||
void ConfigEmulatedWiimote(wxCommandEvent& event);
|
||||
void Save(wxCommandEvent& event);
|
||||
|
||||
void OnSensorBarPos(wxCommandEvent& event)
|
||||
|
@ -33,39 +35,44 @@ public:
|
|||
SConfig::GetInstance().m_SYSCONF->SetData("BT.BAR", event.GetInt());
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void OnSensorBarSensitivity(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_SYSCONF->SetData("BT.SENS", event.GetInt());
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void OnSpeakerVolume(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_SYSCONF->SetData("BT.SPKV", event.GetInt());
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void OnMotor(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_SYSCONF->SetData("BT.MOT", event.GetInt());
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void OnContinuousScanning(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_WiimoteContinuousScanning = event.IsChecked();
|
||||
WiimoteReal::Initialize();
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void OnEnableSpeaker(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_WiimoteEnableSpeaker = event.IsChecked();
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void OnGameCubeAdapter(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_GameCubeAdapter = event.IsChecked();
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
private:
|
||||
wxStaticBoxSizer* CreateGamecubeSizer();
|
||||
wxStaticBoxSizer* CreateWiimoteConfigSizer();
|
||||
wxStaticBoxSizer* CreateBalanceBoardSizer();
|
||||
|
|
|
@ -216,6 +216,11 @@ void InputConfigDialog::ClickSave(wxCommandEvent& event)
|
|||
event.Skip();
|
||||
}
|
||||
|
||||
int ControlDialog::GetRangeSliderValue() const
|
||||
{
|
||||
return range_slider->GetValue();
|
||||
}
|
||||
|
||||
void ControlDialog::UpdateListContents()
|
||||
{
|
||||
control_lbox->Clear();
|
||||
|
@ -467,7 +472,7 @@ void GamepadPage::AdjustSettingUI(wxCommandEvent& event)
|
|||
|
||||
void GamepadPage::AdjustControlOption(wxCommandEvent&)
|
||||
{
|
||||
m_control_dialog->control_reference->range = (ControlState)(m_control_dialog->range_slider->GetValue()) / SLIDER_TICK_COUNT;
|
||||
m_control_dialog->control_reference->range = (ControlState)(m_control_dialog->GetRangeSliderValue()) / SLIDER_TICK_COUNT;
|
||||
}
|
||||
|
||||
void GamepadPage::ConfigControl(wxEvent& event)
|
||||
|
|
|
@ -98,35 +98,37 @@ class ControlDialog : public wxDialog
|
|||
public:
|
||||
ControlDialog(GamepadPage* const parent, InputConfig& config, ControllerInterface::ControlReference* const ref);
|
||||
|
||||
bool Validate() override;
|
||||
|
||||
int GetRangeSliderValue() const;
|
||||
|
||||
ControllerInterface::ControlReference* const control_reference;
|
||||
InputConfig& m_config;
|
||||
|
||||
private:
|
||||
wxStaticBoxSizer* CreateControlChooser(GamepadPage* const parent);
|
||||
|
||||
virtual bool Validate() override;
|
||||
|
||||
void DetectControl(wxCommandEvent& event);
|
||||
void ClearControl(wxCommandEvent& event);
|
||||
void SetDevice(wxCommandEvent& event);
|
||||
|
||||
void UpdateGUI();
|
||||
void UpdateListContents();
|
||||
void SelectControl(const std::string& name);
|
||||
|
||||
void DetectControl(wxCommandEvent& event);
|
||||
void ClearControl(wxCommandEvent& event);
|
||||
void SetDevice(wxCommandEvent& event);
|
||||
|
||||
void SetSelectedControl(wxCommandEvent& event);
|
||||
void AppendControl(wxCommandEvent& event);
|
||||
|
||||
ControllerInterface::ControlReference* const control_reference;
|
||||
InputConfig& m_config;
|
||||
wxComboBox* device_cbox;
|
||||
bool GetExpressionForSelectedControl(wxString &expr);
|
||||
|
||||
wxTextCtrl* textctrl;
|
||||
wxListBox* control_lbox;
|
||||
wxSlider* range_slider;
|
||||
|
||||
private:
|
||||
GamepadPage* const m_parent;
|
||||
wxComboBox* device_cbox;
|
||||
wxTextCtrl* textctrl;
|
||||
wxListBox* control_lbox;
|
||||
wxSlider* range_slider;
|
||||
wxStaticText* m_bound_label;
|
||||
wxStaticText* m_error_label;
|
||||
ciface::Core::DeviceQualifier m_devq;
|
||||
bool GetExpressionForSelectedControl(wxString &expr);
|
||||
ciface::Core::DeviceQualifier m_devq;
|
||||
};
|
||||
|
||||
class ExtensionButton : public wxButton
|
||||
|
|
Loading…
Reference in New Issue