mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
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:
@ -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:
|
||||
|
Reference in New Issue
Block a user