Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

DialogTextures.cpp

Go to the documentation of this file.
00001 /*
00002 ===========================================================================
00003 Copyright (C) 1999-2005 Id Software, Inc.
00004 
00005 This file is part of Quake III Arena source code.
00006 
00007 Quake III Arena source code is free software; you can redistribute it
00008 and/or modify it under the terms of the GNU General Public License as
00009 published by the Free Software Foundation; either version 2 of the License,
00010 or (at your option) any later version.
00011 
00012 Quake III Arena source code is distributed in the hope that it will be
00013 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 GNU General Public License for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with Foobar; if not, write to the Free Software
00019 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020 ===========================================================================
00021 */
00022 // DialogTextures.cpp : implementation file
00023 //
00024 
00025 #include "stdafx.h"
00026 #include "Radiant.h"
00027 #include "DialogTextures.h"
00028 
00029 #ifdef _DEBUG
00030 #define new DEBUG_NEW
00031 #undef THIS_FILE
00032 static char THIS_FILE[] = __FILE__;
00033 #endif
00034 
00036 // CDialogTextures dialog
00037 
00038 
00039 CDialogTextures::CDialogTextures(CWnd* pParent /*=NULL*/)
00040     : CDialog(CDialogTextures::IDD, pParent)
00041 {
00042     //{{AFX_DATA_INIT(CDialogTextures)
00043         // NOTE: the ClassWizard will add member initialization here
00044     //}}AFX_DATA_INIT
00045 }
00046 
00047 
00048 void CDialogTextures::DoDataExchange(CDataExchange* pDX)
00049 {
00050     CDialog::DoDataExchange(pDX);
00051     //{{AFX_DATA_MAP(CDialogTextures)
00052     DDX_Control(pDX, IDC_LIST_TEXTURES, m_wndList);
00053     //}}AFX_DATA_MAP
00054 }
00055 
00056 
00057 BEGIN_MESSAGE_MAP(CDialogTextures, CDialog)
00058     //{{AFX_MSG_MAP(CDialogTextures)
00059     ON_LBN_DBLCLK(IDC_LIST_TEXTURES, OnDblclkListTextures)
00060     //}}AFX_MSG_MAP
00061 END_MESSAGE_MAP()
00062 
00064 // CDialogTextures message handlers
00065 
00066 void CDialogTextures::OnOK() 
00067 {
00068     m_nSelection = m_wndList.GetCurSel();
00069     CDialog::OnOK();
00070 }
00071 
00072 void CDialogTextures::OnDblclkListTextures() 
00073 {
00074   OnOK();
00075 }
00076 
00077 BOOL CDialogTextures::OnInitDialog() 
00078 {
00079     CDialog::OnInitDialog();
00080   CStringArray sa;
00081   FillTextureMenu(&sa);
00082   m_nSelection = -1;
00083   for (int i = 0; i < sa.GetSize(); i ++)
00084   {
00085     m_wndList.AddString(sa.GetAt(i));
00086   }
00087     return TRUE;  // return TRUE unless you set the focus to a control
00088                   // EXCEPTION: OCX Property Pages should return FALSE
00089 }

Generated on Thu Aug 25 12:38:28 2005 for Quake III Arena by  doxygen 1.3.9.1