root/cafu/trunk/CaWE/DialogOptions.hpp

Revision 457, 4.0 KB (checked in by Carsten, 4 months ago)

Using UltraEdit's multi-line search-and-replace-in-files feature, replaced


^#ifndef _(CAFU|CF|CFS|CA)_(.*)_$
^#define _\1_\2_$

with

#ifndef CAFU_\2_INCLUDED
#define CAFU_\2_INCLUDED

and


^#ifndef _(.*)_HPP_$
^#define _\1_HPP_$

with

#ifndef CAFU_\1_HPP_INCLUDED
#define CAFU_\1_HPP_INCLUDED

Closes #91.

Line 
1/*
2=================================================================================
3This file is part of Cafu, the open-source game engine and graphics engine
4for multiplayer, cross-platform, real-time 3D action.
5Copyright (C) 2002-2012 Carsten Fuchs Software.
6
7Cafu is free software: you can redistribute it and/or modify it under the terms
8of the GNU General Public License as published by the Free Software Foundation,
9either version 3 of the License, or (at your option) any later version.
10
11Cafu is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13PURPOSE. See the GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with Cafu. If not, see <http://www.gnu.org/licenses/>.
17
18For support and more information about Cafu, visit us at <http://www.cafu.de>.
19=================================================================================
20*/
21
22#ifndef CAFU_DIALOG_OPTIONS_HPP_INCLUDED
23#define CAFU_DIALOG_OPTIONS_HPP_INCLUDED
24
25#include "wx/spinctrl.h"
26#include "wx/wx.h"
27
28
29class GameConfigT;
30
31
32class OptionsDialogT : public wxDialog
33{
34    public:
35
36    OptionsDialogT(wxWindow* Parent);
37
38
39    private:
40
41    wxChoice*    GameCfg_GameConfigChoice;      // In the "Game Configurations" tab, this is the "Game Config" choice ("combobox").
42    GameConfigT* GameCfg_LastSelConfig;         // In the "Game Configurations" tab, this points to the last selected config.
43    wxChoice*    GameCfg_DefaultPointEntity;
44    wxChoice*    GameCfg_DefaultBrushEntity;
45    wxTextCtrl*  GameCfg_DefaultTextureScale;
46    wxTextCtrl*  GameCfg_DefaultLightmapScale;
47    wxTextCtrl*  GameCfg_CordonTexture;
48    wxTextCtrl*  GameCfg_EngineExe;
49    wxTextCtrl*  GameCfg_BSPExe;
50    wxTextCtrl*  GameCfg_PVSExe;
51    wxTextCtrl*  GameCfg_LightExe;
52
53
54    // Helper functions for the constructor.
55    wxSizer* OptionsDialogInit        (wxWindow *parent, bool call_fit=true, bool set_sizer=true);
56    wxSizer* OptionsGameConfigsTabInit(wxWindow *parent, bool call_fit=true, bool set_sizer=true);
57    wxSizer* OptionsGeneralTabInit    (wxWindow *parent, bool call_fit=true, bool set_sizer=true);
58    wxSizer* Options2DViewsTabInit    (wxWindow *parent, bool call_fit=true, bool set_sizer=true);
59    wxSizer* Options3DViewsTabInit    (wxWindow *parent, bool call_fit=true, bool set_sizer=true);
60
61    // Helper functions for the event handlers of the GameConfigs tab.
62    void GameCfg_SaveInfo(GameConfigT* Config);     ///< Saves all data from the GameConfigs tab in the config pointed to by GameCfg.
63    void GameCfg_Update_ConfigsList();              ///< (Re-)Inits the entire "Game Configurations" tab. Needed on dialog init, and after game config edits.
64    void GameCfg_Update_EntityLists();              ///< (Re-)Inits the entity lists in the "Game Configurations" tab.
65
66    // Event handlers.
67    void OnOK(wxCommandEvent& Event);
68    void OnHelp(wxCommandEvent& Event);
69    void OnButton_General_BrowseCafuExe(wxCommandEvent& Event);
70    void OnButton_General_BrowseCaBSPExe(wxCommandEvent& Event);
71    void OnButton_General_BrowseCaPVSExe(wxCommandEvent& Event);
72    void OnButton_General_BrowseCaLightExe(wxCommandEvent& Event);
73    void OnChoice_GameCfg_GameConfigs(wxCommandEvent& Event);
74    void OnButton_GameCfg_PickCordonTexture(wxCommandEvent& Event);
75    void OnSpinCtrl_3DViews_MouseSensitivity(wxSpinDoubleEvent& Event);
76
77    // IDs for the controls whose events we are interested in.
78    enum
79    {
80        ID_CHECKBOX_GENERAL_INDEPENDENTWINDOWS=wxID_HIGHEST+1,
81        ID_BUTTON_GENERAL_BrowseCafuExe,
82        ID_BUTTON_GENERAL_BrowseCaBSPExe,
83        ID_BUTTON_GENERAL_BrowseCaPVSExe,
84        ID_BUTTON_GENERAL_BrowseCaLightExe,
85        ID_CHOICE_GAMECFG_GameConfigs,
86        ID_BUTTON_GAMECFG_PickCordonTexture,
87        ID_SPINCTRL_3DVIEWS_MouseSensitivity
88    };
89
90    DECLARE_EVENT_TABLE()
91};
92
93#endif
Note: See TracBrowser for help on using the browser.