33 lines
673 B
C++
33 lines
673 B
C++
#include "stdafx.h"
|
|
|
|
#include "SContents.h"
|
|
#include "SContentsManager.h"
|
|
#include "SGameMessage.h"
|
|
#include "SGameSystem.h"
|
|
|
|
extern SGameSystem* g_pCurrentGameSystem;
|
|
|
|
KObject SGuiObj::mNull;
|
|
|
|
SGuiObj::SGuiObj( SIMSG_TOGGLE_UIWINDOW::_UIWINDOW_TYPE objId ) : mObjId( objId ), mObj( 0 )
|
|
{
|
|
}
|
|
|
|
KObject* SGuiObj::operator -> ()
|
|
{
|
|
if( !mObj )
|
|
{
|
|
SIMSG_REQ_WINDOW_OBJECT reqWndObj( mObjId );
|
|
g_pCurrentGameSystem->GetContentsMgr().sendInterfaceMsg( reqWndObj );
|
|
mObj = reqWndObj.window;
|
|
assert( mObj || !"* SGuiObj : requested window object is null" );
|
|
if( !mObj )
|
|
return &mNull;
|
|
}
|
|
return mObj;
|
|
}
|
|
|
|
SGuiObj::operator bool () const
|
|
{
|
|
return mObj ? true : false;
|
|
} |