DragonNest/Client/EtActionTool/ActionGlobal.cpp
2024-12-20 16:56:44 +08:00

52 lines
2.4 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include "StdAfx.h"
#include "ActionGlobal.h"
#include "RenderBase.h"
CActionGlobal::CActionGlobal()
{
}
CActionGlobal::~CActionGlobal()
{
}
void CActionGlobal::InitPropertyInfo()
{
SAFE_DELETE_PVEC( m_pVecPropertyList );
PropertyGridBaseDefine Default[] = {
{ "Common", "Grid", CUnionValueProperty::Boolean, "Grid Show/Hide", TRUE },
{ "Common", "Axis", CUnionValueProperty::Boolean, "Axis Show/Hide", TRUE },
NULL,
};
AddPropertyInfo( Default );
}
void CActionGlobal::OnSetPropertyValue( DWORD dwIndex, CUnionValueProperty *pVariable )
{
switch( dwIndex ) {
case 0:
pVariable->SetVariable( CRenderBase::GetInstance().IsShowGrid() );
break;
case 1:
pVariable->SetVariable( CRenderBase::GetInstance().IsShowAxis() );
break;
}
}
void CActionGlobal::OnChangePropertyValue( DWORD dwIndex, CUnionValueProperty *pVariable )
{
switch( dwIndex ) {
case 0:
CRenderBase::GetInstance().ShowGrid( pVariable->GetVariableBool() );
break;
case 1:
CRenderBase::GetInstance().ShowAxis( pVariable->GetVariableBool() );
break;
}
}
void CActionGlobal::OnSelectChangePropertyValue( DWORD dwIndex, CUnionValueProperty *pVariable )
{
}