Cafu Engine
DialogOptions.hpp
1 /*
2 Cafu Engine, http://www.cafu.de/
3 Copyright (c) Carsten Fuchs and other contributors.
4 This project is licensed under the terms of the MIT license.
5 */
6 
7 #ifndef CAFU_DIALOG_OPTIONS_HPP_INCLUDED
8 #define CAFU_DIALOG_OPTIONS_HPP_INCLUDED
9 
10 #include "wx/wx.h"
11 
12 
13 class GameConfigT;
14 class wxSpinDoubleEvent;
15 
16 
17 class OptionsDialogT : public wxDialog
18 {
19  public:
20 
21  OptionsDialogT(wxWindow* Parent);
22 
23 
24  private:
25 
26  wxChoice* GameCfg_GameConfigChoice; // In the "Game Configurations" tab, this is the "Game Config" choice ("combobox").
27  GameConfigT* GameCfg_LastSelConfig; // In the "Game Configurations" tab, this points to the last selected config.
28  wxTextCtrl* GameCfg_DefaultTextureScale;
29  wxTextCtrl* GameCfg_DefaultLightmapScale;
30  wxTextCtrl* GameCfg_CordonTexture;
31  wxTextCtrl* GameCfg_EngineExe;
32  wxTextCtrl* GameCfg_BSPExe;
33  wxTextCtrl* GameCfg_PVSExe;
34  wxTextCtrl* GameCfg_LightExe;
35 
36 
37  // Helper functions for the constructor.
38  wxSizer* OptionsDialogInit (wxWindow *parent, bool call_fit=true, bool set_sizer=true);
39  wxSizer* OptionsGameConfigsTabInit(wxWindow *parent, bool call_fit=true, bool set_sizer=true);
40  wxSizer* OptionsGeneralTabInit (wxWindow *parent, bool call_fit=true, bool set_sizer=true);
41  wxSizer* Options2DViewsTabInit (wxWindow *parent, bool call_fit=true, bool set_sizer=true);
42  wxSizer* Options3DViewsTabInit (wxWindow *parent, bool call_fit=true, bool set_sizer=true);
43 
44  // Helper functions for the event handlers of the GameConfigs tab.
45  void GameCfg_SaveInfo(GameConfigT* Config); ///< Saves all data from the GameConfigs tab in the config pointed to by GameCfg.
46  void GameCfg_Update_ConfigsList(); ///< (Re-)Inits the entire "Game Configurations" tab. Needed on dialog init, and after game config edits.
47 
48  // Event handlers.
49  void OnOK(wxCommandEvent& Event);
50  void OnHelp(wxCommandEvent& Event);
51  void OnButton_General_BrowseCafuExe(wxCommandEvent& Event);
52  void OnButton_General_BrowseCaBSPExe(wxCommandEvent& Event);
53  void OnButton_General_BrowseCaPVSExe(wxCommandEvent& Event);
54  void OnButton_General_BrowseCaLightExe(wxCommandEvent& Event);
55  void OnChoice_GameCfg_GameConfigs(wxCommandEvent& Event);
56  void OnButton_GameCfg_PickCordonTexture(wxCommandEvent& Event);
57  void OnSpinCtrl_3DViews_MouseSensitivity(wxSpinDoubleEvent& Event);
58 
59  // IDs for the controls whose events we are interested in.
60  enum
61  {
62  ID_CHECKBOX_GENERAL_INDEPENDENTWINDOWS=wxID_HIGHEST+1,
63  ID_BUTTON_GENERAL_BrowseCafuExe,
64  ID_BUTTON_GENERAL_BrowseCaBSPExe,
65  ID_BUTTON_GENERAL_BrowseCaPVSExe,
66  ID_BUTTON_GENERAL_BrowseCaLightExe,
67  ID_CHOICE_GAMECFG_GameConfigs,
68  ID_BUTTON_GAMECFG_PickCordonTexture,
69  ID_SPINCTRL_3DVIEWS_MouseSensitivity
70  };
71 
72  DECLARE_EVENT_TABLE()
73 };
74 
75 #endif
Definition: DialogOptions.hpp:17
The class describes the settings for a game/MOD.
Definition: GameConfig.hpp:32