#ifndef _CONFIG_DIAG_H_ #define _CONFIG_DIAG_H_ #include #include #include "VideoConfig.h" #include #include #include #include #include #include #include #include #include template 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; } private: bool &m_setting; const bool m_reverse; }; class SettingChoice : public wxChoice { public: SettingChoice(wxWindow* parent, int &setting, int num = 0, const wxString choices[] = NULL); void UpdateValue(wxCommandEvent& ev); private: int &m_setting; }; class VideoConfigDiag : public wxDialog { public: VideoConfigDiag(wxWindow* parent, const std::string &title, const std::vector &adapters = std::vector(), const std::vector &aamodes = std::vector(), const std::vector &ppshader = std::vector()); VideoConfig &vconfig; protected: void Event_StcSafe(wxCommandEvent &) { vconfig.iSafeTextureCache_ColorSamples = 0; } void Event_StcNormal(wxCommandEvent &) { vconfig.iSafeTextureCache_ColorSamples = 512; } void Event_StcFast(wxCommandEvent &) { vconfig.iSafeTextureCache_ColorSamples = 128; } void Event_PPShader(wxCommandEvent &ev) { const int sel = ev.GetInt(); if (sel) vconfig.sPostProcessingShader = ev.GetString().mb_str(); else vconfig.sPostProcessingShader.clear(); } void CloseDiag(wxCommandEvent&); }; #endif