This commit is contained in:
Daveo 2001-04-07 21:05:33 +00:00
parent 08c732c29a
commit aefdd396f8
51 changed files with 1467 additions and 682 deletions

View file

@ -5,6 +5,9 @@
#include "mapedit.h"
#include "GUILayerTrigger.h"
#include "MapEditDoc.h"
#include "MainFrm.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
@ -18,9 +21,10 @@ static char THIS_FILE[] = __FILE__;
CGUILayerTrigger::CGUILayerTrigger(CWnd* pParent /*=NULL*/)
: CDialog(CGUILayerTrigger::IDD, pParent)
{
DisableCallback(true);
//{{AFX_DATA_INIT(CGUILayerTrigger)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
DisableCallback(false);
}
@ -28,16 +32,42 @@ void CGUILayerTrigger::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CGUILayerTrigger)
// NOTE: the ClassWizard will add DDX and DDV calls here
DDX_Control(pDX, IDC_TRIGGER_WIDTH, m_Width);
DDX_Control(pDX, IDC_TRIGGER_HEIGHT, m_Height);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CGUILayerTrigger, CDialog)
//{{AFX_MSG_MAP(CGUILayerTrigger)
// NOTE: the ClassWizard will add message map macros here
ON_EN_CHANGE(IDC_TRIGGER_HEIGHT, OnParamChange)
ON_EN_CHANGE(IDC_TRIGGER_WIDTH, OnParamChange)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
void CGUILayerTrigger::SetVal(CEdit &Dlg,int Val)
{
CString Str;
if (!Dlg) return;
DisableCallback(true);
Str.Format("%i",Val);
Dlg.SetWindowText(Str);
DisableCallback(false);
}
/////////////////////////////////////////////////////////////////////////////
int CGUILayerTrigger::GetVal(CEdit &Dlg)
{
CString Str;
int Val=0;
if (!Dlg) return(0);
Dlg.GetWindowText(Str);
if (Str.GetLength())
Val=atoi(Str);
return(Val);
}
/////////////////////////////////////////////////////////////////////////////
// CGUILayerTrigger message handlers
void CGUILayerTrigger::OnParamChange() {if (!CallbackFlag) theApp.GetCurrent()->GUIChanged();}