summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2015-04-27 20:48:04 -0400
committerLioncash <mathew1800@gmail.com>2015-04-27 21:04:05 -0400
commit899fd55ea81551c54f4502f342b152d5c2415245 (patch)
tree0a55777f379e6caf23c1c6d37f27f311bc8fc1e7 /Source/Core
parent263e64e939a8261d856acc2794a8113376542d6a (diff)
DolphinWX: Make some general UI functions/vars private
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DolphinWX/ControllerConfigDiag.h11
-rw-r--r--Source/Core/DolphinWX/InputConfigDiag.cpp7
-rw-r--r--Source/Core/DolphinWX/InputConfigDiag.h32
3 files changed, 32 insertions, 18 deletions
diff --git a/Source/Core/DolphinWX/ControllerConfigDiag.h b/Source/Core/DolphinWX/ControllerConfigDiag.h
index ea31226359..2f846d310e 100644
--- a/Source/Core/DolphinWX/ControllerConfigDiag.h
+++ b/Source/Core/DolphinWX/ControllerConfigDiag.h
@@ -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();
diff --git a/Source/Core/DolphinWX/InputConfigDiag.cpp b/Source/Core/DolphinWX/InputConfigDiag.cpp
index 591287959d..0db723cfc8 100644
--- a/Source/Core/DolphinWX/InputConfigDiag.cpp
+++ b/Source/Core/DolphinWX/InputConfigDiag.cpp
@@ -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)
diff --git a/Source/Core/DolphinWX/InputConfigDiag.h b/Source/Core/DolphinWX/InputConfigDiag.h
index d75fe45989..87dfe08a7c 100644
--- a/Source/Core/DolphinWX/InputConfigDiag.h
+++ b/Source/Core/DolphinWX/InputConfigDiag.h
@@ -98,35 +98,37 @@ class ControlDialog : public wxDialog
public:
ControlDialog(GamepadPage* const parent, InputConfig& config, ControllerInterface::ControlReference* const ref);
- wxStaticBoxSizer* CreateControlChooser(GamepadPage* const parent);
+ bool Validate() override;
- virtual bool Validate() override;
+ int GetRangeSliderValue() const;
- void DetectControl(wxCommandEvent& event);
- void ClearControl(wxCommandEvent& event);
- void SetDevice(wxCommandEvent& event);
+ ControllerInterface::ControlReference* const control_reference;
+ InputConfig& m_config;
+
+private:
+ wxStaticBoxSizer* CreateControlChooser(GamepadPage* const parent);
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;
-
- wxTextCtrl* textctrl;
- wxListBox* control_lbox;
- wxSlider* range_slider;
+ bool GetExpressionForSelectedControl(wxString &expr);
-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