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