Files
Client/GameTools/WORLDCREATOR/DlgEditGCMDS.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

178 lines
4.6 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// DlgEditGCMDS.cpp : implementation file
//
#include "stdafx.h"
#include "worldcreator.h"
#include "DlgEditGCMDS.h"
#include "misc.h"
#include "BaseDataDefine.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDlgEditGCMDS dialog
CDlgEditGCMDS::CDlgEditGCMDS(CWnd* pParent /*=NULL*/)
: CDialog(CDlgEditGCMDS::IDD, pParent)
{
//{{AFX_DATA_INIT(CDlgEditGCMDS)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
m_pSheetEditGCMDS = NULL;
m_rpGCMDS = NULL;
m_pRealParent = NULL;
}
void CDlgEditGCMDS::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDlgEditGCMDS)
DDX_Control(pDX, IDC_EDIT_GCMDSFILENAME, m_ctrlGCMDSFileName);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDlgEditGCMDS, CDialog)
//{{AFX_MSG_MAP(CDlgEditGCMDS)
ON_WM_DESTROY()
ON_WM_CLOSE()
ON_BN_CLICKED(IDC_BUTTON_SAVE, OnButtonSave)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDlgEditGCMDS message handlers
BOOL CDlgEditGCMDS::Create(CWnd* pParentWnd)
{
// TODO: Add your specialized code here and/or call the base class
m_pRealParent = pParentWnd;
return CDialog::Create(IDD, pParentWnd);
}
void CDlgEditGCMDS::SetGCMDSFile(const char *szFilename)
{
CZ3DGCMDS* rpGCMDS = CZ3DGeneralChrModel::_GetGCMDSByName( szFilename );
if( NULL == rpGCMDS )
{
return;
}
m_rpGCMDS = rpGCMDS;
m_ctrlGCMDSFileName.SetWindowText( szFilename );
// cycle through all page to activate(create) each page
// °¢ ´ÙÀ̾ó·Î±× ³»¿ë refresh ºÎºÐ
m_pSheetEditGCMDS->SetActivePage( 0 );
CPageGCMDSProperty* pGCMDSProperty = (CPageGCMDSProperty*)m_pSheetEditGCMDS->GetPage(0);
pGCMDSProperty->UpdateDataByGCMDS( rpGCMDS );
m_pSheetEditGCMDS->SetActivePage( 1 );
CPageGCMDSSlots* pGCMDSlots = (CPageGCMDSSlots*)m_pSheetEditGCMDS->GetPage(1);
pGCMDSlots->UpdateDataByGCMDS( rpGCMDS );
m_pSheetEditGCMDS->SetActivePage( 2 );
CPageGCMDSMotionSheet* pGCMDSMotionSheet = (CPageGCMDSMotionSheet*)m_pSheetEditGCMDS->GetPage(2);
pGCMDSMotionSheet->UpdateDataByGCMDS( rpGCMDS );
m_pSheetEditGCMDS->SetActivePage( 3 );
CPageGCMDSOutfitSet* pGCMDSOutfitSet = (CPageGCMDSOutfitSet*)m_pSheetEditGCMDS->GetPage(3);
pGCMDSOutfitSet->UpdateDataByGCMDS( rpGCMDS );
m_pSheetEditGCMDS->SetActivePage( 4 );
CPageGCMDSAttachmentSet* pGCDSAttachmentSet = (CPageGCMDSAttachmentSet*)m_pSheetEditGCMDS->GetPage(4);
pGCDSAttachmentSet->UpdateDataByGCMDS( rpGCMDS );
m_pSheetEditGCMDS->SetActivePage( 5 );
CPageGCMDSEffectInfo* pGCMDSEffectInfo = (CPageGCMDSEffectInfo*)m_pSheetEditGCMDS->GetPage(5);
pGCMDSEffectInfo->UpdateDataByGCMDS( rpGCMDS );
m_pSheetEditGCMDS->SetActivePage( 0 );
}
void CDlgEditGCMDS::EndEditGCMDS()
{
CPageGCMDSOutfitSet* pGCMDSOutfitSet = (CPageGCMDSOutfitSet*)m_pSheetEditGCMDS->GetPage(3);
pGCMDSOutfitSet->Save();
CPageGCMDSAttachmentSet* pGCMDSAttachmentSet = (CPageGCMDSAttachmentSet*)m_pSheetEditGCMDS->GetPage(4);
pGCMDSAttachmentSet->Save();
}
BOOL CDlgEditGCMDS::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
m_pSheetEditGCMDS = new CSheetEditGCMDS( "GCMDS ÆíÁý" );
m_pSheetEditGCMDS->EnableStackedTabs( FALSE );
m_pSheetEditGCMDS->Create( this, WS_CHILD | WS_VISIBLE );
m_pSheetEditGCMDS->ModifyStyleEx(0,WS_EX_CONTROLPARENT);
m_pSheetEditGCMDS->ModifyStyle(0,WS_TABSTOP);
m_pSheetEditGCMDS->MoveWindow( 8, 32, 512, 284 );
CTabCtrl * pTabCtrl = m_pSheetEditGCMDS->GetTabControl();
pTabCtrl->SetWindowPos( NULL, 0,0,505,268, SWP_NOZORDER | SWP_NOMOVE );
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CDlgEditGCMDS::OnDestroy()
{
CDialog::OnDestroy();
// TODO: Add your message handler code here
SAFE_DELETE( m_pSheetEditGCMDS );
}
void CDlgEditGCMDS::OnClose()
{
// TODO: Add your message handler code here and/or call default
EndEditGCMDS();
if( m_pRealParent )
{
m_pRealParent->SendMessage( WM_CHILD_CLOSE, (WPARAM)this );
}
CDialog::OnClose();
}
void CDlgEditGCMDS::OnButtonSave()
{
// TODO: Add your control notification handler code here
if( NULL == m_rpGCMDS )
{
return;
}
if( NULL == m_rpGCMDS->GetFileName() )
{
MessageBox( "ºó GCMDSÆÄÀÏÀÔ´Ï´Ù.", "¿¡·¯À¯", MB_ICONERROR|MB_OK );
}
CString strTemp = m_rpGCMDS->GetFileName();
if( m_rpGCMDS->Save( NULL, CHARACTERDATAPATH ) )
{
strTemp += " ÀúÀå ¿Ï·á";
MessageBox( strTemp, "¹ÇÈî", MB_ICONINFORMATION|MB_OK );
}
else
{
strTemp += " ÀúÀå ½ÇÆÐ";
MessageBox( strTemp, "¿¡¶ó", MB_ICONERROR|MB_OK );
}
}