]> git.xonotic.org Git - xonotic/netradiant.git/blob - contrib/bobtoolz/dialogs/DoorDialog.cpp
transfer from internal tree r5311 branches/1.4-gpl
[xonotic/netradiant.git] / contrib / bobtoolz / dialogs / DoorDialog.cpp
1 /*\r
2 BobToolz plugin for GtkRadiant\r
3 Copyright (C) 2001 Gordon Biggans\r
4 \r
5 This library is free software; you can redistribute it and/or\r
6 modify it under the terms of the GNU Lesser General Public\r
7 License as published by the Free Software Foundation; either\r
8 version 2.1 of the License, or (at your option) any later version.\r
9 \r
10 This library is distributed in the hope that it will be useful,\r
11 but WITHOUT ANY WARRANTY; without even the implied warranty of\r
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
13 Lesser General Public License for more details.\r
14 \r
15 You should have received a copy of the GNU Lesser General Public\r
16 License along with this library; if not, write to the Free Software\r
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
18 */\r
19 \r
20 // DoorDialog.cpp : implementation file\r
21 //\r
22 \r
23 #include "../StdAfx.h"\r
24 #include "DoorDialog.h"\r
25 \r
26 #ifdef _DEBUG\r
27 #define new DEBUG_NEW\r
28 #undef THIS_FILE\r
29 static char THIS_FILE[] = __FILE__;\r
30 #endif\r
31 \r
32 /////////////////////////////////////////////////////////////////////////////\r
33 // CDoorDialog dialog\r
34 \r
35 \r
36 CDoorDialog::CDoorDialog(CWnd* pParent /*=NULL*/)\r
37         : CDialog(CDoorDialog::IDD, pParent)\r
38 {\r
39         //{{AFX_DATA_INIT(CDoorDialog)\r
40         m_fbTextureName = _T("");\r
41         m_bSclMainHor = TRUE;\r
42         m_bSclMainVert = TRUE;\r
43         m_bSclTrimHor = TRUE;\r
44         m_bSclTrimVert = FALSE;\r
45         m_trimTextureName = _T("");\r
46         m_trimTexSetBox = _T("");\r
47         m_mainTexSetBox = _T("");\r
48         m_doorDirection = -1;\r
49         //}}AFX_DATA_INIT\r
50 }\r
51 \r
52 \r
53 void CDoorDialog::DoDataExchange(CDataExchange* pDX)\r
54 {\r
55         CDialog::DoDataExchange(pDX);\r
56         //{{AFX_DATA_MAP(CDoorDialog)\r
57         DDX_Text(pDX, IDC_FBTEXTURE_EDIT, m_fbTextureName);\r
58         DDX_Check(pDX, IDC_TEXSCALE1_CHECK, m_bSclMainHor);\r
59         DDX_Check(pDX, IDC_TEXSCALE2_CHECK, m_bSclMainVert);\r
60         DDX_Check(pDX, IDC_TEXSCALE3_CHECK, m_bSclTrimHor);\r
61         DDX_Check(pDX, IDC_TEXSCALE4_CHECK, m_bSclTrimVert);\r
62         DDX_Text(pDX, IDC_TRIMTEXTURE_EDIT, m_trimTextureName);\r
63         DDX_CBString(pDX, IDC_TRIMTEX_COMBO, m_trimTexSetBox);\r
64         DDX_CBString(pDX, IDC_MAINTEX_COMBO, m_mainTexSetBox);\r
65         DDX_Radio(pDX, IDC_DIR_NS_RADIO, m_doorDirection);\r
66         //}}AFX_DATA_MAP\r
67 }\r
68 \r
69 \r
70 BEGIN_MESSAGE_MAP(CDoorDialog, CDialog)\r
71         //{{AFX_MSG_MAP(CDoorDialog)\r
72         ON_BN_CLICKED(IDC_SET_MAINTEX_BTN, OnSetMaintexBtn)\r
73         ON_BN_CLICKED(IDC_SET_TRIMTEX_BTN, OnSetTrimtexBtn)\r
74         //}}AFX_MSG_MAP\r
75 END_MESSAGE_MAP()\r
76 \r
77 /////////////////////////////////////////////////////////////////////////////\r
78 // CDoorDialog message handlers\r
79 \r
80 void CDoorDialog::OnSetMaintexBtn() \r
81 {\r
82         UpdateData(TRUE);\r
83         m_fbTextureName = m_mainTexSetBox;\r
84         UpdateData(FALSE);\r
85 }\r
86 \r
87 void CDoorDialog::OnSetTrimtexBtn() \r
88 {\r
89         UpdateData(TRUE);\r
90         m_trimTextureName = m_trimTexSetBox;\r
91         UpdateData(FALSE);      \r
92 }\r