Files
Client/GameTools/WORLDCREATOR/DlgMakeFall.cpp
LGram16 dd97ddec92 Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code:
- Client: Game client source (moved to Client/Client/)
- Server: Game server source
- GameTools: Development tools
- CryptoSource: Encryption utilities
- database: Database scripts
- Script: Game scripts
- rylCoder_16.02.2008_src: Legacy coder tools
- GMFont, Game: Additional resources

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 20:17:20 +09:00

162 lines
4.6 KiB
C++

// DlgMakeFall.cpp : implementation file
//
#include "stdafx.h"
#include "worldcreator.h"
#include "DlgMakeFall.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDlgMakeFall dialog
CDlgMakeFall::CDlgMakeFall(CWnd* pParent /*=NULL*/)
: CDialog(CDlgMakeFall::IDD, pParent)
{
//{{AFX_DATA_INIT(CDlgMakeFall)
m_fFallAddX = 0.0f;
m_fFallHeight = 0.0f;
m_fFallLeft = 0.0f;
m_fFallPosX = 0.0f;
m_fFallPosY = 0.0f;
m_fFallRight = 0.0f;
m_fFallRot = 0.0f;
m_WaterFallAlpha = 0;
//}}AFX_DATA_INIT
}
void CDlgMakeFall::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDlgMakeFall)
DDX_Control(pDX, IDC_LIST_WATERFALL, m_WaterFallList);
DDX_Text(pDX, IDC_EDIT_FALLADDX, m_fFallAddX);
DDX_Text(pDX, IDC_EDIT_FALLHEIGHT, m_fFallHeight);
DDX_Text(pDX, IDC_EDIT_FALLLEFT, m_fFallLeft);
DDX_Text(pDX, IDC_EDIT_FALLPOSX, m_fFallPosX);
DDX_Text(pDX, IDC_EDIT_FALLPOSY, m_fFallPosY);
DDX_Text(pDX, IDC_EDIT_FALLRIGHT, m_fFallRight);
DDX_Text(pDX, IDC_EDIT_FALLROT, m_fFallRot);
DDX_Text(pDX, IDC_EDIT_WATERFALLALPHA, m_WaterFallAlpha);
DDX_Control(pDX, IDC_COLOR_WATERFALL, m_WaterFallColor);
DDV_MinMaxLong(pDX, m_WaterFallAlpha, 0, 255);
//}}AFX_DATA_MAP
DDX_ColourPicker(pDX, IDC_COLOR_WATERFALL, m_cWaterFallColor);
}
BEGIN_MESSAGE_MAP(CDlgMakeFall, CDialog)
//{{AFX_MSG_MAP(CDlgMakeFall)
ON_BN_CLICKED(IDC_BUTTON_FALLADD, OnButtonFalladd)
ON_BN_CLICKED(IDC_BUTTON_FALLEDIT, OnButtonFalledit)
ON_LBN_DBLCLK(IDC_LIST_WATERFALL, OnDblclkListWaterfall)
ON_EN_UPDATE(IDC_EDIT_FALLPOSX, OnUpdateEditFallposx)
ON_EN_UPDATE(IDC_EDIT_FALLPOSY, OnUpdateEditFallposy)
ON_EN_UPDATE(IDC_EDIT_FALLROT, OnUpdateEditFallrot)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDlgMakeFall message handlers
void CDlgMakeFall::OnButtonFalladd()
{
// TODO: Add your control notification handler code here
UpdateData();
m_FallAddXList.Add(m_fFallAddX);
m_FallLeftList.Add(m_fFallLeft);
m_FallRightList.Add(m_fFallRight);
m_FallHeightList.Add(m_fFallHeight);
color AddColor;
AddColor.r=GetRValue(m_cWaterFallColor);
AddColor.g=GetGValue(m_cWaterFallColor);
AddColor.b=GetBValue(m_cWaterFallColor);
AddColor.a=m_WaterFallAlpha;
m_FallColorList.Add(AddColor);
CString strAdd;
strAdd.Format(" %d WaterFall List",m_WaterFallList.GetCount());
m_WaterFallList.AddString(strAdd);
}
void CDlgMakeFall::OnButtonFalledit()
{
// TODO: Add your control notification handler code here
UpdateData();
int Sel=m_WaterFallList.GetCurSel();
if(Sel==-1)
return;
m_FallAddXList[Sel]=(m_fFallAddX);
m_FallLeftList[Sel]=(m_fFallLeft);
m_FallRightList[Sel]=(m_fFallRight);
m_FallHeightList[Sel]=(m_fFallHeight);
color AddColor;
AddColor.r=GetRValue(m_cWaterFallColor);
AddColor.g=GetGValue(m_cWaterFallColor);
AddColor.b=GetBValue(m_cWaterFallColor);
AddColor.a=m_WaterFallAlpha;
m_FallColorList[Sel]=AddColor;
}
void CDlgMakeFall::OnDblclkListWaterfall()
{
// TODO: Add your control notification handler code here
int Sel=m_WaterFallList.GetCurSel();
if(Sel==-1)
return;
m_fFallAddX=m_FallAddXList[Sel];
m_fFallLeft=m_FallLeftList[Sel];
m_fFallRight=m_FallRightList[Sel];
m_fFallHeight=m_FallHeightList[Sel];
m_cWaterFallColor=RGB(m_FallColorList[Sel].r,m_FallColorList[Sel].g,m_FallColorList[Sel].b);
m_WaterFallAlpha=m_FallColorList[Sel].a;
UpdateData(FALSE);
}
void CDlgMakeFall::OnUpdateEditFallposx()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_UPDATE flag ORed into the lParam mask.
// TODO: Add your control notification handler code here
UpdateData();
}
void CDlgMakeFall::OnUpdateEditFallposy()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_UPDATE flag ORed into the lParam mask.
// TODO: Add your control notification handler code here
UpdateData();
}
void CDlgMakeFall::OnUpdateEditFallrot()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_UPDATE flag ORed into the lParam mask.
// TODO: Add your control notification handler code here
UpdateData();
}