mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-15 16:59:18 +01:00
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:
|
public:
|
||||||
ControllerConfigDiag(wxWindow* const parent);
|
ControllerConfigDiag(wxWindow* const parent);
|
||||||
|
|
||||||
|
private:
|
||||||
void RefreshRealWiimotes(wxCommandEvent& event);
|
void RefreshRealWiimotes(wxCommandEvent& event);
|
||||||
|
|
||||||
|
void ConfigEmulatedWiimote(wxCommandEvent& event);
|
||||||
|
|
||||||
void SelectSource(wxCommandEvent& event);
|
void SelectSource(wxCommandEvent& event);
|
||||||
void RevertSource();
|
void RevertSource();
|
||||||
|
|
||||||
void ConfigEmulatedWiimote(wxCommandEvent& event);
|
|
||||||
void Save(wxCommandEvent& event);
|
void Save(wxCommandEvent& event);
|
||||||
|
|
||||||
void OnSensorBarPos(wxCommandEvent& event)
|
void OnSensorBarPos(wxCommandEvent& event)
|
||||||
@ -33,39 +35,44 @@ public:
|
|||||||
SConfig::GetInstance().m_SYSCONF->SetData("BT.BAR", event.GetInt());
|
SConfig::GetInstance().m_SYSCONF->SetData("BT.BAR", event.GetInt());
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnSensorBarSensitivity(wxCommandEvent& event)
|
void OnSensorBarSensitivity(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
SConfig::GetInstance().m_SYSCONF->SetData("BT.SENS", event.GetInt());
|
SConfig::GetInstance().m_SYSCONF->SetData("BT.SENS", event.GetInt());
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnSpeakerVolume(wxCommandEvent& event)
|
void OnSpeakerVolume(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
SConfig::GetInstance().m_SYSCONF->SetData("BT.SPKV", event.GetInt());
|
SConfig::GetInstance().m_SYSCONF->SetData("BT.SPKV", event.GetInt());
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnMotor(wxCommandEvent& event)
|
void OnMotor(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
SConfig::GetInstance().m_SYSCONF->SetData("BT.MOT", event.GetInt());
|
SConfig::GetInstance().m_SYSCONF->SetData("BT.MOT", event.GetInt());
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnContinuousScanning(wxCommandEvent& event)
|
void OnContinuousScanning(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
SConfig::GetInstance().m_WiimoteContinuousScanning = event.IsChecked();
|
SConfig::GetInstance().m_WiimoteContinuousScanning = event.IsChecked();
|
||||||
WiimoteReal::Initialize();
|
WiimoteReal::Initialize();
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnEnableSpeaker(wxCommandEvent& event)
|
void OnEnableSpeaker(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
SConfig::GetInstance().m_WiimoteEnableSpeaker = event.IsChecked();
|
SConfig::GetInstance().m_WiimoteEnableSpeaker = event.IsChecked();
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnGameCubeAdapter(wxCommandEvent& event)
|
void OnGameCubeAdapter(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
SConfig::GetInstance().m_GameCubeAdapter = event.IsChecked();
|
SConfig::GetInstance().m_GameCubeAdapter = event.IsChecked();
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
wxStaticBoxSizer* CreateGamecubeSizer();
|
wxStaticBoxSizer* CreateGamecubeSizer();
|
||||||
wxStaticBoxSizer* CreateWiimoteConfigSizer();
|
wxStaticBoxSizer* CreateWiimoteConfigSizer();
|
||||||
wxStaticBoxSizer* CreateBalanceBoardSizer();
|
wxStaticBoxSizer* CreateBalanceBoardSizer();
|
||||||
|
@ -216,6 +216,11 @@ void InputConfigDialog::ClickSave(wxCommandEvent& event)
|
|||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ControlDialog::GetRangeSliderValue() const
|
||||||
|
{
|
||||||
|
return range_slider->GetValue();
|
||||||
|
}
|
||||||
|
|
||||||
void ControlDialog::UpdateListContents()
|
void ControlDialog::UpdateListContents()
|
||||||
{
|
{
|
||||||
control_lbox->Clear();
|
control_lbox->Clear();
|
||||||
@ -467,7 +472,7 @@ void GamepadPage::AdjustSettingUI(wxCommandEvent& event)
|
|||||||
|
|
||||||
void GamepadPage::AdjustControlOption(wxCommandEvent&)
|
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)
|
void GamepadPage::ConfigControl(wxEvent& event)
|
||||||
|
@ -98,35 +98,37 @@ class ControlDialog : public wxDialog
|
|||||||
public:
|
public:
|
||||||
ControlDialog(GamepadPage* const parent, InputConfig& config, ControllerInterface::ControlReference* const ref);
|
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);
|
wxStaticBoxSizer* CreateControlChooser(GamepadPage* const parent);
|
||||||
|
|
||||||
virtual bool Validate() override;
|
|
||||||
|
|
||||||
void DetectControl(wxCommandEvent& event);
|
|
||||||
void ClearControl(wxCommandEvent& event);
|
|
||||||
void SetDevice(wxCommandEvent& event);
|
|
||||||
|
|
||||||
void UpdateGUI();
|
void UpdateGUI();
|
||||||
void UpdateListContents();
|
void UpdateListContents();
|
||||||
void SelectControl(const std::string& name);
|
void SelectControl(const std::string& name);
|
||||||
|
|
||||||
|
void DetectControl(wxCommandEvent& event);
|
||||||
|
void ClearControl(wxCommandEvent& event);
|
||||||
|
void SetDevice(wxCommandEvent& event);
|
||||||
|
|
||||||
void SetSelectedControl(wxCommandEvent& event);
|
void SetSelectedControl(wxCommandEvent& event);
|
||||||
void AppendControl(wxCommandEvent& event);
|
void AppendControl(wxCommandEvent& event);
|
||||||
|
|
||||||
ControllerInterface::ControlReference* const control_reference;
|
bool GetExpressionForSelectedControl(wxString &expr);
|
||||||
InputConfig& m_config;
|
|
||||||
wxComboBox* device_cbox;
|
|
||||||
|
|
||||||
wxTextCtrl* textctrl;
|
|
||||||
wxListBox* control_lbox;
|
|
||||||
wxSlider* range_slider;
|
|
||||||
|
|
||||||
private:
|
|
||||||
GamepadPage* const m_parent;
|
GamepadPage* const m_parent;
|
||||||
|
wxComboBox* device_cbox;
|
||||||
|
wxTextCtrl* textctrl;
|
||||||
|
wxListBox* control_lbox;
|
||||||
|
wxSlider* range_slider;
|
||||||
wxStaticText* m_bound_label;
|
wxStaticText* m_bound_label;
|
||||||
wxStaticText* m_error_label;
|
wxStaticText* m_error_label;
|
||||||
ciface::Core::DeviceQualifier m_devq;
|
ciface::Core::DeviceQualifier m_devq;
|
||||||
bool GetExpressionForSelectedControl(wxString &expr);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class ExtensionButton : public wxButton
|
class ExtensionButton : public wxButton
|
||||||
|
Loading…
x
Reference in New Issue
Block a user