Files
firestorm/Gameleap/code/mw4/Code/MW4GameEd2/SpotLightPanel.cpp
T
Cyd 2b8ca921cb Initial full mirror of c:\VWE (source + assets + toolchain + outputs) via Git LFS
Complete disaster-recovery snapshot: engine/game source, game data assets,
VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive.
Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false,
no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
2026-06-24 21:28:16 -05:00

63 lines
1.4 KiB
C++

// SpotLightPanel.cpp : implementation file
//
#include "stdafx.h"
#include "mw4gameed2.h"
#include "SpotLightPanel.h"
#include "GUILight.h"
/////////////////////////////////////////////////////////////////////////////
// CSpotLightPanel dialog
CSpotLightPanel::CSpotLightPanel(GUISpotLight *gobj,UndoCommand **cmd,CWnd* pParent)
: CPanelDlg(CSpotLightPanel::IDD, pParent)
{
MyObj=gobj;
CmdLst=cmd;
//{{AFX_DATA_INIT(CSpotLightPanel)
m_Spread = 0.0f;
//}}AFX_DATA_INIT
}
void CSpotLightPanel::DoDataExchange(CDataExchange* pDX)
{
CPanelDlg::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSpotLightPanel)
DDX_Text(pDX, IDC_SPREAD, m_Spread);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSpotLightPanel, CPanelDlg)
//{{AFX_MSG_MAP(CSpotLightPanel)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSpotLightPanel message handlers
void CSpotLightPanel::OnOK()
{
UpdateData(TRUE);
MyObj->SetSpreadAngle(m_Spread*Radians_Per_Degree);
//CPanelDlg::OnOK();
}
void CSpotLightPanel::OnCancel()
{
//CPanelDlg::OnOK();
}
BOOL CSpotLightPanel::OnInitDialog()
{
CPanelDlg::OnInitDialog();
m_Spread=Degrees_Per_Radian*MyObj->GetSpreadAngle();
UpdateData(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}