/
PreferencesDialog.cpp
98 lines (82 loc) · 3.66 KB
/
PreferencesDialog.cpp
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
/****************************************************************************************/
/* PreferencesDialog.cpp */
/* */
/* Author: Jim Mischel, Jeff Lomax */
/* Description: Preferences for grid and other stuff */
/* */
/* The contents of this file are subject to the Genesis3D Public License */
/* Version 1.01 (the "License"); you may not use this file except in */
/* compliance with the License. You may obtain a copy of the License at */
/* http://www.genesis3d.com */
/* */
/* Software distributed under the License is distributed on an "AS IS" */
/* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See */
/* the License for the specific language governing rights and limitations */
/* under the License. */
/* */
/* The Original Code is Genesis3D, released March 25, 1999. */
/* Genesis3D Version 1.1 released November 15, 1999 */
/* Copyright (C) 1999 WildTangent, Inc. All Rights Reserved */
/* */
/****************************************************************************************/
#include "stdafx.h"
#include "resource.h"
#include "PreferencesDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPreferencesDialog dialog
CPreferencesDialog::CPreferencesDialog(CWnd* pParent /*=NULL*/)
: CDialog(CPreferencesDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CPreferencesDialog)
//}}AFX_DATA_INIT
}
void CPreferencesDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPreferencesDialog)
// changed QD
// DDX_Control(pDX, IDC_PREFSSKY, m_Sky);
DDX_Control(pDX, IDC_PREFSSNAPGRID, m_SnapGrid);
DDX_Control(pDX, IDC_PREFSGRID, m_Grid);
DDX_Control(pDX, IDC_PREFSGRIDBG, m_GridBackground);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CPreferencesDialog, CDialog)
//{{AFX_MSG_MAP(CPreferencesDialog)
ON_BN_CLICKED(IDC_PATHPREFS, OnPathprefs)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPreferencesDialog message handlers
BOOL CPreferencesDialog::OnInitDialog()
{
CDialog::OnInitDialog();
m_GridBackground.SetColor( coBackground ) ;
m_Grid.SetColor( coGrid ) ;
m_SnapGrid.SetColor( coSnapGrid ) ;
// changed QD
// m_Sky.SetColor( coSky ) ;
// end change
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CPreferencesDialog::OnOK()
{
// TODO: Add extra validation here
coBackground = m_GridBackground.GetColor( ) ;
coSnapGrid = m_SnapGrid.GetColor( ) ;
coGrid = m_Grid.GetColor( ) ;
// changed QD
// coSky = m_Sky.GetColor( ) ;
// end change
CDialog::OnOK();
}
void CPreferencesDialog::OnPathprefs()
{
// TODO: Add your control notification handler code here
}