File: prefsdlg.cpp

package info (click to toggle)
freespace2 24.0.2%2Brepack-1
  • links: PTS, VCS
  • area: non-free
  • in suites: trixie
  • size: 43,188 kB
  • sloc: cpp: 583,107; ansic: 21,729; python: 1,174; sh: 464; makefile: 248; xml: 181
file content (95 lines) | stat: -rw-r--r-- 2,316 bytes parent folder | download | duplicates (5)
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
/*
 * Copyright (C) Volition, Inc. 1999.  All rights reserved.
 *
 * All source code herein is the property of Volition, Inc. You may not sell 
 * or otherwise commercially exploit the source or things you created based on the 
 * source.
 *
*/



#include "stdafx.h"
#include "FRED.h"
#include "PrefsDlg.h"
#include "FREDDoc.h"
#include "FREDView.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CPrefsDlg dialog



CPrefsDlg::CPrefsDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CPrefsDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CPrefsDlg)
	m_ConfirmDeleting = TRUE;
	m_ShowCapitalShips = TRUE;
	m_ShowElevations = TRUE;
	m_ShowFighters = TRUE;
	m_ShowGrid = TRUE;
	m_ShowMiscObjects = TRUE;
	m_ShowPlanets = TRUE;
	m_ShowWaypoints = TRUE;
	m_ShowStarfield = FALSE;
	//}}AFX_DATA_INIT
}

extern int Show_stars;

void CPrefsDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CPrefsDlg)
	DDX_Check(pDX, ID_CONFIRM_DELETING, m_ConfirmDeleting);
	DDX_Check(pDX, ID_SHOW_CAPITALSHIPS, m_ShowCapitalShips);
	DDX_Check(pDX, ID_SHOW_ELEVATIONS, m_ShowElevations);
	DDX_Check(pDX, ID_SHOW_FIGHTERS, m_ShowFighters);
	DDX_Check(pDX, ID_SHOW_GRID, m_ShowGrid);
	DDX_Check(pDX, ID_SHOW_MISCOBJECTS, m_ShowMiscObjects);
	DDX_Check(pDX, ID_SHOW_PLANETS, m_ShowPlanets);
	DDX_Check(pDX, ID_SHOW_WAYPOINTS, m_ShowWaypoints);
	DDX_Check(pDX, IDC_PREF_STARFIELD, m_ShowStarfield);
	//}}AFX_DATA_MAP

	Show_stars = m_ShowStarfield;
	// CFREDView::SetViewParms(m_ConfirmDeleting);
}


BEGIN_MESSAGE_MAP(CPrefsDlg, CDialog)
	//{{AFX_MSG_MAP(CPrefsDlg)
	ON_BN_CLICKED(IDC_SAVE_DEFAULT_PREFS, OnSaveDefaultPrefs)
	ON_WM_CLOSE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPrefsDlg message handlers

void CPrefsDlg::OnSaveDefaultPrefs() 
{
	// Put code to save user prefs here.
	
	m_ConfirmDeleting = 1;
}

void CPrefsDlg::OnClose() 
{
	// MessageBeep((WORD) -1);
	
	CDialog::OnClose();
}

BOOL CPrefsDlg::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext) 
{
	// MessageBeep((WORD) -1);
	
	return CDialog::Create(IDD, pParentWnd);
}