DETAIL.CPP
资源名称:tc3d.zip [点击查看]
上传用户:abcdshs
上传日期:2007-01-07
资源大小:1858k
文件大小:3k
源码类别:
游戏
开发平台:
Visual C++
- // detail.cpp : implementation file
- //
- #include "stdafx.h"
- #include "dudes.h"
- #include "detail.h"
- #include "3dwrap.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // ChangeDetail dialog
- ChangeDetail::ChangeDetail(CWnd* pParent /*=NULL*/)
- : CDialog(ChangeDetail::IDD, pParent)
- {
- m_init = TRUE;
- }
- void ChangeDetail::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(ChangeDetail)
- DDX_Control(pDX, IDC_SLIDER1, m_slider);
- //}}AFX_DATA_MAP
- if (m_init)
- {
- m_slider.SetRange(0,100);
- m_slider.SetPos(Game->Detail());
- m_init = FALSE;
- }
- }
- BEGIN_MESSAGE_MAP(ChangeDetail, CDialog)
- //{{AFX_MSG_MAP(ChangeDetail)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // ChangeDetail message handlers
- void ChangeDetail::OnOK()
- {
- CDialog::OnOK();
- Game->SetDetail((short)m_slider.GetPos());
- }
- /////////////////////////////////////////////////////////////////////////////
- // SpeedDiag dialog
- SpeedDiag::SpeedDiag(CWnd* pParent /*=NULL*/)
- : CDialog(SpeedDiag::IDD, pParent)
- {
- //{{AFX_DATA_INIT(SpeedDiag)
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
- }
- void SpeedDiag::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(SpeedDiag)
- DDX_Control(pDX, IDC_SLIDER1, m_slider);
- //}}AFX_DATA_MAP
- if (m_init)
- {
- m_slider.SetRange(0,100);
- m_slider.SetPos(50);
- m_init = FALSE;
- }
- }
- BEGIN_MESSAGE_MAP(SpeedDiag, CDialog)
- //{{AFX_MSG_MAP(SpeedDiag)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- void SpeedDiag::OnOK()
- {
- CDialog::OnOK();
- m_pos = (short)m_slider.GetPos();
- }
- /////////////////////////////////////////////////////////////////////////////
- // CTeleportDiag dialog
- CTeleportDiag::CTeleportDiag(CWnd* pParent /*=NULL*/)
- : CDialog(CTeleportDiag::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CTeleportDiag)
- m_LevelNum = 0;
- //}}AFX_DATA_INIT
- m_LevelNum = Game->LevelNum()+1;
- }
- void CTeleportDiag::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CTeleportDiag)
- DDX_Text(pDX, IDC_EDIT1, m_LevelNum);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CTeleportDiag, CDialog)
- //{{AFX_MSG_MAP(CTeleportDiag)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()