1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
|
/*
Copyright (C) 2009-2010 wxLauncher Team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef BASICSETTINGSPAGE_H
#define BASICSETTINGSPAGE_H
#include <vector>
#include <wx/wx.h>
#include "controls/TruncatableChoice.h"
#include "global/ModDefaults.h"
class BasicSettingsPage : public wxPanel {
public:
BasicSettingsPage(wxWindow* parent);
~BasicSettingsPage();
void OnSelectTC(wxCommandEvent &event);
void OnTCChanged(wxCommandEvent &event);
void OnSelectExecutable(wxCommandEvent &event);
void OnPressExecutableChoiceRefreshButton(wxCommandEvent &event);
void OnSelectFredExecutable(wxCommandEvent &event);
void OnPressFredExecutableChoiceRefreshButton(wxCommandEvent &event);
void OnSelectVideoResolution(wxCommandEvent &event);
void OnSelectVideoDepth(wxCommandEvent &event);
void OnSelectVideoAnisotropic(wxCommandEvent &event);
void OnSelectVideoAntiAlias(wxCommandEvent &event);
void OnSelectVideoTextureFilter(wxCommandEvent &event);
void OnSelectSpeechVoice(wxCommandEvent &event);
void OnChangeSpeechVolume(wxCommandEvent &event);
void OnPlaySpeechText(wxCommandEvent &event);
void OnToggleSpeechInTechroom(wxCommandEvent &event);
void OnToggleSpeechInBriefing(wxCommandEvent &event);
void OnToggleSpeechInGame(wxCommandEvent &event);
void OnToggleSpeechInMulti(wxCommandEvent &event);
void OnGetMoreVoices(wxCommandEvent &event);
void OnSelectNetworkType(wxCommandEvent &event);
void OnSelectNetworkSpeed(wxCommandEvent &event);
void OnChangePort(wxCommandEvent &event);
void OnChangeIP(wxCommandEvent &event);
void OnSelectSoundDevice(wxCommandEvent &event);
void OnSelectCaptureDevice(wxCommandEvent &event);
void OnToggleEnableEFX(wxCommandEvent &event);
void OnChangeSampleRate(wxCommandEvent &event);
void OnDownloadOpenAL(wxCommandEvent& event);
void OnDetectOpenAL(wxCommandEvent& event);
void OnSelectJoystick(wxCommandEvent& event);
void OnCheckForceFeedback(wxCommandEvent& event);
void OnCheckDirectionalHit(wxCommandEvent& event);
void OnCalibrateJoystick(wxCommandEvent& event);
void OnDetectJoystick(wxCommandEvent& event);
void ProfileChanged(wxCommandEvent& event);
void OnFlagFileProcessingStatusChanged(wxCommandEvent& event);
void OnFREDEnabledChanged(wxCommandEvent& event);
void OnActiveModChanged(wxCommandEvent& event);
private:
static void FillFSOExecutableDropBox(wxChoice* exeChoice, wxFileName path);
static void FillFredExecutableDropBox(wxChoice* exeChoice, wxFileName path);
static void FillExecutableDropBox(wxChoice* exeChoice, wxArrayString exes);
void SetUpResolution(
long minHorizRes = DEFAULT_MOD_RESOLUTION_MIN_HORIZONTAL_RES,
long minVertRes = DEFAULT_MOD_RESOLUTION_MIN_VERTICAL_RES);
static void FillResolutionDropBox(wxChoice* resChoice, long minHorizRes, long minVertRes);
static int GetMaxSupportedResolution(const wxChoice& resChoice, long& width, long& height);
enum ReasonForExecutableDisabling {
MISSING_TC_ROOT_FOLDER,
NONEXISTENT_TC_ROOT_FOLDER,
INVALID_TC_ROOT_FOLDER
};
void InitializeMemberVariables();
void DisableExecutableChoiceControls(const ReasonForExecutableDisabling reason);
void OnCurrentBinaryChanged(wxCommandEvent& event);
void OnCurrentFredBinaryChanged(wxCommandEvent& event);
void ShowSettings(const bool showSettings);
void OpenNonSCPWebSite(wxString url);
enum SoundDeviceType {
PLAYBACK,
CAPTURE
};
void InitializeSoundDeviceDropDownBox(const SoundDeviceType deviceType);
void SetupOpenALSection();
void SetupJoystickSection();
void SetupControlsForJoystick(unsigned int i);
DECLARE_EVENT_TABLE();
private:
wxStaticText* soundDeviceText;
TruncatableChoice* soundDeviceCombo;
wxStaticText* captureDeviceText;
TruncatableChoice* captureDeviceCombo;
wxStaticText* openALVersion;
wxButton* downloadOpenALButton;
wxButton* detectOpenALButton;
wxSizer* audioButtonsSizer;
wxSizer* audioOldSoundSizer;
wxSizer* audioNewSoundSizer;
wxSizer* audioNewSoundDeviceSizer;
wxSizer* audioSizer;
wxChoice* joystickSelected;
#if IS_WIN32
wxCheckBox* joystickForceFeedback;
wxCheckBox* joystickDirectionalHit;
wxButton* joystickCalibrateButton;
wxButton* joystickDetectButton;
#endif
bool isTcRootFolderValid;
bool isCurrentBinaryValid;
bool isCurrentFredBinaryValid;
};
#endif
|