Files
firestorm/Gameleap/code/mw4/Tools/PixelWhipPro/ShapePanel.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

74 lines
1.8 KiB
C++

// ShapePanel.cpp : implementation file
//
#include "stdafx.h"
#include "pixelwhippro.h"
#include "ShapePanel.h"
#include <ElementRenderer\ElementRenderer.hpp>
extern CPixelWhipProApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CShapePanel dialog
CShapePanel::CShapePanel(CWnd* pParent /*=NULL*/)
: CDynaPanel(CShapePanel::IDD, pParent)
{
//{{AFX_DATA_INIT(CShapePanel)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CShapePanel::Set(void *dat)
{
ShapeSpec=(gosFX::Shape__Specification *)dat;
}
void CShapePanel::DoDataExchange(CDataExchange* pDX)
{
CDynaPanel::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CShapePanel)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CShapePanel, CDynaPanel)
//{{AFX_MSG_MAP(CShapePanel)
ON_BN_CLICKED(IDC_BROWSE, OnBrowse)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CShapePanel message handlers
void CShapePanel::OnBrowse()
{
CString doc_path=theApp.DocPath.Left(theApp.DocPath.ReverseFind('\\')),shape_path;
// if(doc_path.GetLength()==0) GetCurrentDirectory(doc_path);
SetCurrentDirectory(doc_path);
CFileDialog dlg1(TRUE,"mlr",NULL,OFN_NOCHANGEDIR,"MLR Geometry(*.mlr)|*.mlr||",this);
if(dlg1.DoModal()==IDOK)
{
shape_path=dlg1.GetPathName();
if(doc_path.GetLength()>shape_path.GetLength() ||
shape_path.Left(doc_path.GetLength()).CompareNoCase(doc_path)
)
{
MessageBox("Shape Path Error");
}
else
{
shape_path=shape_path.Mid(doc_path.GetLength()+1);
ShapeSpec->SetShape(MString(shape_path));
MidLevelRenderer::MLRTexturePool::Instance->LoadImages();
}
}
}