Integrate helper functions from VideoSoftware's VideoConfigDialog

into the shared VideoConfigDiag.

Clean up the list of hotkey defaults a little.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7148 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang
2011-02-12 09:10:11 +00:00
parent 94d02a23de
commit 7753937e31
5 changed files with 79 additions and 126 deletions

View File

@ -33,40 +33,6 @@
#include <wx/panel.h>
#include <wx/spinctrl.h>
template <typename W>
class _BoolSetting : public W
{
public:
_BoolSetting(wxWindow* parent, const wxString& label, bool &setting, bool reverse = false, long style = 0);
void UpdateValue(wxCommandEvent& ev)
{
m_setting = (ev.GetInt() != 0) ^ m_reverse;
ev.Skip();
}
private:
bool& m_setting;
const bool m_reverse;
};
template <typename T>
class IntegerSetting : public wxSpinCtrl
{
public:
IntegerSetting(wxWindow* parent, const wxString& label, T& setting, int minVal, int maxVal, long style = 0);
void UpdateValue(wxCommandEvent& ev)
{
m_setting = ev.GetInt();
ev.Skip();
}
private:
T& m_setting;
};
typedef _BoolSetting<wxCheckBox> SettingCheckBox;
typedef IntegerSetting<u32> U32Setting;
class VideoConfigDialog : public wxDialog
{
public: