]> icculus.org git repositories - taylor/freespace2.git/blob - src/fred2/prefsdlg.cpp
fix issue with looping audio streams
[taylor/freespace2.git] / src / fred2 / prefsdlg.cpp
1 /*
2  * Copyright (C) Volition, Inc. 1999.  All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell 
5  * or otherwise commercially exploit the source or things you created based on
6  * the source.
7  */
8
9 /*
10  * $Logfile: /Freespace2/code/FRED2/PrefsDlg.cpp $
11  * $Revision$
12  * $Date$
13  * $Author$
14  *
15  * Fred Preferences dialog box handling code
16  *
17  * $Log$
18  * Revision 1.3  2002/06/09 04:41:16  relnev
19  * added copyright header
20  *
21  * Revision 1.2  2002/05/07 03:16:44  theoddone33
22  * The Great Newline Fix
23  *
24  * Revision 1.1.1.1  2002/05/03 03:28:08  root
25  * Initial import.
26  *
27  * 
28  * 2     10/07/98 6:28p Dave
29  * Initial checkin. Renamed all relevant stuff to be Fred2 instead of
30  * Fred. Globalized mission and campaign file extensions. Removed Silent
31  * Threat specific code.
32  * 
33  * 1     10/07/98 3:01p Dave
34  * 
35  * 1     10/07/98 3:00p Dave
36  * 
37  * 3     2/17/97 5:28p Hoffoss
38  * Checked RCS headers, added them were missing, changing description to
39  * something better, etc where needed.
40  *
41  * $NoKeywords: $
42  */
43
44 #include "stdafx.h"
45 #include "fred.h"
46 #include "prefsdlg.h"
47 #include "freddoc.h"
48 #include "fredview.h"
49
50 #ifdef _DEBUG
51 #define new DEBUG_NEW
52 #undef THIS_FILE
53 static char THIS_FILE[] = __FILE__;
54 #endif
55
56 /////////////////////////////////////////////////////////////////////////////
57 // CPrefsDlg dialog
58
59
60
61 CPrefsDlg::CPrefsDlg(CWnd* pParent /*=NULL*/)
62         : CDialog(CPrefsDlg::IDD, pParent)
63 {
64         //{{AFX_DATA_INIT(CPrefsDlg)
65         m_ConfirmDeleting = TRUE;
66         m_ShowCapitalShips = TRUE;
67         m_ShowElevations = TRUE;
68         m_ShowFighters = TRUE;
69         m_ShowGrid = TRUE;
70         m_ShowMiscObjects = TRUE;
71         m_ShowPlanets = TRUE;
72         m_ShowWaypoints = TRUE;
73         m_ShowStarfield = FALSE;
74         //}}AFX_DATA_INIT
75 }
76
77 extern int Show_stars;
78
79 void CPrefsDlg::DoDataExchange(CDataExchange* pDX)
80 {
81         CDialog::DoDataExchange(pDX);
82         //{{AFX_DATA_MAP(CPrefsDlg)
83         DDX_Check(pDX, ID_CONFIRM_DELETING, m_ConfirmDeleting);
84         DDX_Check(pDX, ID_SHOW_CAPITALSHIPS, m_ShowCapitalShips);
85         DDX_Check(pDX, ID_SHOW_ELEVATIONS, m_ShowElevations);
86         DDX_Check(pDX, ID_SHOW_FIGHTERS, m_ShowFighters);
87         DDX_Check(pDX, ID_SHOW_GRID, m_ShowGrid);
88         DDX_Check(pDX, ID_SHOW_MISCOBJECTS, m_ShowMiscObjects);
89         DDX_Check(pDX, ID_SHOW_PLANETS, m_ShowPlanets);
90         DDX_Check(pDX, ID_SHOW_WAYPOINTS, m_ShowWaypoints);
91         DDX_Check(pDX, IDC_PREF_STARFIELD, m_ShowStarfield);
92         //}}AFX_DATA_MAP
93
94         Show_stars = m_ShowStarfield;
95         // CFREDView::SetViewParms(m_ConfirmDeleting);
96 }
97
98
99 BEGIN_MESSAGE_MAP(CPrefsDlg, CDialog)
100         //{{AFX_MSG_MAP(CPrefsDlg)
101         ON_BN_CLICKED(IDC_SAVE_DEFAULT_PREFS, OnSaveDefaultPrefs)
102         ON_WM_CLOSE()
103         //}}AFX_MSG_MAP
104 END_MESSAGE_MAP()
105
106 /////////////////////////////////////////////////////////////////////////////
107 // CPrefsDlg message handlers
108
109 void CPrefsDlg::OnSaveDefaultPrefs() 
110 {
111         // Put code to save user prefs here.
112         
113         m_ConfirmDeleting = 1;
114 }
115
116 void CPrefsDlg::OnClose() 
117 {
118         // MessageBeep((WORD) -1);
119         
120         CDialog::OnClose();
121 }
122
123 BOOL CPrefsDlg::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext) 
124 {
125         // MessageBeep((WORD) -1);
126         
127         return CDialog::Create(IDD, pParentWnd);
128 }
129