|
|
|
@ -29,11 +29,14 @@
|
|
|
|
|
using namespace std;
|
|
|
|
|
using namespace NLMISC;
|
|
|
|
|
|
|
|
|
|
CStringMapper *_UIStringMapper = NULL;
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
CInterfaceElement::~CInterfaceElement()
|
|
|
|
|
namespace NLGUI
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
CStringMapper *_UIStringMapper = NULL;
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
CInterfaceElement::~CInterfaceElement()
|
|
|
|
|
{
|
|
|
|
|
if (_Links) // remove any link that point to that element
|
|
|
|
|
{
|
|
|
|
|
for(TLinkVect::iterator it = _Links->begin(); it != _Links->end(); ++it)
|
|
|
|
@ -42,38 +45,38 @@ CInterfaceElement::~CInterfaceElement()
|
|
|
|
|
}
|
|
|
|
|
delete _Links;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::parseError(CInterfaceGroup * parentGroup, const char *reason)
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::parseError(CInterfaceGroup * parentGroup, const char *reason)
|
|
|
|
|
{
|
|
|
|
|
string tmp = string("cannot parse view:")+getId()+", parent:"+parentGroup->getId();
|
|
|
|
|
nlinfo(tmp.c_str());
|
|
|
|
|
if (reason)
|
|
|
|
|
nlinfo("reason : %s", reason);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CInterfaceElement::setIdRecurse(const std::string &newID)
|
|
|
|
|
{
|
|
|
|
|
void CInterfaceElement::setIdRecurse(const std::string &newID)
|
|
|
|
|
{
|
|
|
|
|
std::string baseId = _Parent ? _Parent->getId() : "ui";
|
|
|
|
|
setId(baseId + ":" + newID);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
std::string CInterfaceElement::getShortId() const
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
std::string CInterfaceElement::getShortId() const
|
|
|
|
|
{
|
|
|
|
|
std::string::size_type last = _Id.find_last_of(':');
|
|
|
|
|
if (last != std::string::npos)
|
|
|
|
|
{
|
|
|
|
|
return _Id.substr(last + 1);
|
|
|
|
|
}
|
|
|
|
|
return _Id;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
bool CInterfaceElement::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
bool CInterfaceElement::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
|
|
|
|
{
|
|
|
|
|
// parse the basic properties
|
|
|
|
|
CXMLAutoPtr ptr((const char*) xmlGetProp( cur, (xmlChar*)"id" ));
|
|
|
|
|
if (ptr)
|
|
|
|
@ -125,15 +128,15 @@ bool CInterfaceElement::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
|
|
|
|
if (ptr) fromString((const char*)ptr, _H);
|
|
|
|
|
|
|
|
|
|
// snapping
|
|
|
|
|
// ptr = (char*) xmlGetProp( cur, (xmlChar*)"snap" );
|
|
|
|
|
// _Snap = 1;
|
|
|
|
|
// if (ptr)
|
|
|
|
|
// fromString((const char*)ptr, _Snap);
|
|
|
|
|
// if (_Snap <= 0)
|
|
|
|
|
// {
|
|
|
|
|
// parseError(parentGroup, "snap must be > 0" );
|
|
|
|
|
// return false;
|
|
|
|
|
// }
|
|
|
|
|
// ptr = (char*) xmlGetProp( cur, (xmlChar*)"snap" );
|
|
|
|
|
// _Snap = 1;
|
|
|
|
|
// if (ptr)
|
|
|
|
|
// fromString((const char*)ptr, _Snap);
|
|
|
|
|
// if (_Snap <= 0)
|
|
|
|
|
// {
|
|
|
|
|
// parseError(parentGroup, "snap must be > 0" );
|
|
|
|
|
// return false;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
ptr = (char*) xmlGetProp( cur, (xmlChar*) "posref" );
|
|
|
|
|
_ParentPosRef = Hotspot_BL;
|
|
|
|
@ -215,7 +218,7 @@ bool CInterfaceElement::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// snapSize();
|
|
|
|
|
// snapSize();
|
|
|
|
|
|
|
|
|
|
ptr= (char*) xmlGetProp (cur, (xmlChar*)"global_color");
|
|
|
|
|
if(ptr)
|
|
|
|
@ -230,31 +233,31 @@ bool CInterfaceElement::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
|
|
|
|
if(ptr) _AvoidResizeParent= convertBool(ptr);
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::setSizeRef(const std::string &sizeref)
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::setSizeRef(const std::string &sizeref)
|
|
|
|
|
{
|
|
|
|
|
parseSizeRef(sizeref.c_str());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
std::string CInterfaceElement::getSizeRefAsString() const
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
std::string CInterfaceElement::getSizeRefAsString() const
|
|
|
|
|
{
|
|
|
|
|
return "IMPLEMENT ME!";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::parseSizeRef(const char *sizeRefStr)
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::parseSizeRef(const char *sizeRefStr)
|
|
|
|
|
{
|
|
|
|
|
parseSizeRef(sizeRefStr, _SizeRef, _SizeDivW, _SizeDivH);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::parseSizeRef(const char *sizeRefStr, sint32 &sizeRef, sint32 &sizeDivW, sint32 &sizeDivH)
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::parseSizeRef(const char *sizeRefStr, sint32 &sizeRef, sint32 &sizeDivW, sint32 &sizeDivH)
|
|
|
|
|
{
|
|
|
|
|
nlassert(sizeRefStr);
|
|
|
|
|
|
|
|
|
|
sizeRef = 0;
|
|
|
|
@ -289,11 +292,11 @@ void CInterfaceElement::parseSizeRef(const char *sizeRefStr, sint32 &sizeRef, si
|
|
|
|
|
|
|
|
|
|
++seekPtr;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::updateCoords()
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::updateCoords()
|
|
|
|
|
{
|
|
|
|
|
_XReal = _X;
|
|
|
|
|
_YReal = _Y;
|
|
|
|
|
_WReal = getW();
|
|
|
|
@ -356,33 +359,33 @@ void CInterfaceElement::updateCoords()
|
|
|
|
|
_XReal -= _WReal/2;
|
|
|
|
|
if (hs & Hotspot_xR)
|
|
|
|
|
_XReal -= _WReal;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::getCorner(sint32 &px, sint32 &py, THotSpot hs)
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::getCorner(sint32 &px, sint32 &py, THotSpot hs)
|
|
|
|
|
{
|
|
|
|
|
px = _XReal;
|
|
|
|
|
py = _YReal;
|
|
|
|
|
if (hs & 1) px += _WReal;
|
|
|
|
|
if (hs & 2) px += _WReal >> 1;
|
|
|
|
|
if (hs & 8) py += _HReal;
|
|
|
|
|
if (hs & 16) py += _HReal >> 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::move (sint32 dx, sint32 dy)
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::move (sint32 dx, sint32 dy)
|
|
|
|
|
{
|
|
|
|
|
_X += dx;
|
|
|
|
|
_Y += dy;
|
|
|
|
|
invalidateCoords();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
/*void CInterfaceElement::resizeBR (sint32 sizeW, sint32 sizeH)
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
/*void CInterfaceElement::resizeBR (sint32 sizeW, sint32 sizeH)
|
|
|
|
|
{
|
|
|
|
|
uint32 i = i / 0;
|
|
|
|
|
THotSpot hs = _PosRef;
|
|
|
|
|
|
|
|
|
@ -427,12 +430,12 @@ void CInterfaceElement::move (sint32 dx, sint32 dy)
|
|
|
|
|
// DO NOT TREAT THE MIDDLE HOTSPOT CASE
|
|
|
|
|
|
|
|
|
|
invalidateCoords();
|
|
|
|
|
}*/
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
/*void CInterfaceElement::snapSize()
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
/*void CInterfaceElement::snapSize()
|
|
|
|
|
{
|
|
|
|
|
sint32 snap = _Snap;
|
|
|
|
|
nlassert(snap > 0);
|
|
|
|
|
if (snap > 1)
|
|
|
|
@ -440,48 +443,48 @@ void CInterfaceElement::move (sint32 dx, sint32 dy)
|
|
|
|
|
_W = _W - (_W % snap);
|
|
|
|
|
_H = _H - (_H % snap);
|
|
|
|
|
}
|
|
|
|
|
}*/
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::setW (sint32 w)
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::setW (sint32 w)
|
|
|
|
|
{
|
|
|
|
|
_W = w;
|
|
|
|
|
// sint32 snap = _Snap;
|
|
|
|
|
// nlassert(snap > 0);
|
|
|
|
|
// if (snap > 1)
|
|
|
|
|
// {
|
|
|
|
|
// _W = _W - (_W % snap);
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
// sint32 snap = _Snap;
|
|
|
|
|
// nlassert(snap > 0);
|
|
|
|
|
// if (snap > 1)
|
|
|
|
|
// {
|
|
|
|
|
// _W = _W - (_W % snap);
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::setH (sint32 h)
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::setH (sint32 h)
|
|
|
|
|
{
|
|
|
|
|
_H = h;
|
|
|
|
|
// sint32 snap = _Snap;
|
|
|
|
|
// nlassert(snap > 0);
|
|
|
|
|
// if (snap > 1)
|
|
|
|
|
// {
|
|
|
|
|
// _H = _H - (_H % snap);
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
// sint32 snap = _Snap;
|
|
|
|
|
// nlassert(snap > 0);
|
|
|
|
|
// if (snap > 1)
|
|
|
|
|
// {
|
|
|
|
|
// _H = _H - (_H % snap);
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
CInterfaceGroup* CInterfaceElement::getRootWindow ()
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
CInterfaceGroup* CInterfaceElement::getRootWindow ()
|
|
|
|
|
{
|
|
|
|
|
if (_Parent == NULL)
|
|
|
|
|
return NULL;
|
|
|
|
|
if (_Parent->getParent() == NULL)
|
|
|
|
|
return dynamic_cast<CInterfaceGroup*>(this);
|
|
|
|
|
return _Parent->getRootWindow();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
uint CInterfaceElement::getParentDepth() const
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
uint CInterfaceElement::getParentDepth() const
|
|
|
|
|
{
|
|
|
|
|
uint depth= 0;
|
|
|
|
|
CInterfaceGroup *parent= _Parent;
|
|
|
|
|
while(parent!=NULL)
|
|
|
|
@ -490,11 +493,11 @@ uint CInterfaceElement::getParentDepth() const
|
|
|
|
|
depth++;
|
|
|
|
|
}
|
|
|
|
|
return depth;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
bool CInterfaceElement::isActiveThroughParents() const
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
bool CInterfaceElement::isActiveThroughParents() const
|
|
|
|
|
{
|
|
|
|
|
if(!getActive())
|
|
|
|
|
return false;
|
|
|
|
|
if(_Parent == NULL)
|
|
|
|
@ -505,12 +508,12 @@ bool CInterfaceElement::isActiveThroughParents() const
|
|
|
|
|
return true;
|
|
|
|
|
else
|
|
|
|
|
return _Parent->isActiveThroughParents();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::relativeSInt64Read (CInterfaceProperty &rIP, const string &prop, const char *val,
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::relativeSInt64Read (CInterfaceProperty &rIP, const string &prop, const char *val,
|
|
|
|
|
const string &defVal)
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
if (val == NULL)
|
|
|
|
|
{
|
|
|
|
|
rIP.readSInt64 (defVal.c_str(), _Id+":"+prop);
|
|
|
|
@ -550,13 +553,13 @@ void CInterfaceElement::relativeSInt64Read (CInterfaceProperty &rIP, const strin
|
|
|
|
|
rIP.readSInt64 (val+decal, _Id+":"+prop);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::relativeSInt32Read (CInterfaceProperty &rIP, const string &prop, const char *val,
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::relativeSInt32Read (CInterfaceProperty &rIP, const string &prop, const char *val,
|
|
|
|
|
const string &defVal)
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
if (val == NULL)
|
|
|
|
|
{
|
|
|
|
|
rIP.readSInt32 (defVal.c_str(), _Id+":"+prop);
|
|
|
|
@ -596,13 +599,13 @@ void CInterfaceElement::relativeSInt32Read (CInterfaceProperty &rIP, const strin
|
|
|
|
|
rIP.readSInt32 (val+decal, _Id+":"+prop);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::relativeBoolRead (CInterfaceProperty &rIP, const string &prop, const char *val,
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::relativeBoolRead (CInterfaceProperty &rIP, const string &prop, const char *val,
|
|
|
|
|
const string &defVal)
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
if (val == NULL)
|
|
|
|
|
{
|
|
|
|
|
rIP.readBool (defVal.c_str(), _Id+":"+prop);
|
|
|
|
@ -636,12 +639,12 @@ void CInterfaceElement::relativeBoolRead (CInterfaceProperty &rIP, const string
|
|
|
|
|
rIP.readBool (val+decal, _Id+":"+prop);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::relativeRGBARead(CInterfaceProperty &rIP,const std::string &prop,const char *val,const std::string &defVal)
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::relativeRGBARead(CInterfaceProperty &rIP,const std::string &prop,const char *val,const std::string &defVal)
|
|
|
|
|
{
|
|
|
|
|
if (val == NULL)
|
|
|
|
|
{
|
|
|
|
|
rIP.readRGBA (defVal.c_str(), _Id+":"+prop);
|
|
|
|
@ -681,12 +684,12 @@ void CInterfaceElement::relativeRGBARead(CInterfaceProperty &rIP,const std::stri
|
|
|
|
|
rIP.readRGBA (val+decal, _Id+":"+prop);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
THotSpot CInterfaceElement::convertHotSpot (const char *ptr)
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
THotSpot CInterfaceElement::convertHotSpot (const char *ptr)
|
|
|
|
|
{
|
|
|
|
|
if ( !strnicmp(ptr,"TL",2) )
|
|
|
|
|
{
|
|
|
|
|
return Hotspot_TL;
|
|
|
|
@ -725,11 +728,11 @@ THotSpot CInterfaceElement::convertHotSpot (const char *ptr)
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
return Hotspot_BL;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::convertHotSpotCouple (const char *ptr, THotSpot &parentPosRef, THotSpot &posRef)
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::convertHotSpotCouple (const char *ptr, THotSpot &parentPosRef, THotSpot &posRef)
|
|
|
|
|
{
|
|
|
|
|
nlassert(ptr);
|
|
|
|
|
|
|
|
|
|
// *** first hotspot
|
|
|
|
@ -748,35 +751,35 @@ void CInterfaceElement::convertHotSpotCouple (const char *ptr, THotSpot &parent
|
|
|
|
|
ptr++;
|
|
|
|
|
// convert second
|
|
|
|
|
posRef = convertHotSpot (ptr);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
NLMISC::CRGBA CInterfaceElement::convertColor (const char *ptr)
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
NLMISC::CRGBA CInterfaceElement::convertColor (const char *ptr)
|
|
|
|
|
{
|
|
|
|
|
return NLMISC::CRGBA::stringToRGBA(ptr);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
bool CInterfaceElement::convertBool (const char *ptr)
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
bool CInterfaceElement::convertBool (const char *ptr)
|
|
|
|
|
{
|
|
|
|
|
string str= ptr;
|
|
|
|
|
NLMISC::strlwr(str);
|
|
|
|
|
return str=="true"?true:false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
NLMISC::CVector CInterfaceElement::convertVector (const char *ptr)
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
NLMISC::CVector CInterfaceElement::convertVector (const char *ptr)
|
|
|
|
|
{
|
|
|
|
|
float x = 0.0f, y = 0.0f, z = 0.0f;
|
|
|
|
|
|
|
|
|
|
sscanf (ptr, "%f %f %f", &x, &y, &z);
|
|
|
|
|
|
|
|
|
|
return CVector(x,y,z);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::convertPixelsOrRatio(const char *ptr, sint32 &pixels, float &ratio)
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::convertPixelsOrRatio(const char *ptr, sint32 &pixels, float &ratio)
|
|
|
|
|
{
|
|
|
|
|
std::string value = ptr;
|
|
|
|
|
if (!value.empty())
|
|
|
|
|
{
|
|
|
|
@ -792,12 +795,12 @@ void CInterfaceElement::convertPixelsOrRatio(const char *ptr, sint32 &pixels, fl
|
|
|
|
|
fromString(value, pixels);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::addLink(CInterfaceLink *link)
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::addLink(CInterfaceLink *link)
|
|
|
|
|
{
|
|
|
|
|
nlassert(link != NULL);
|
|
|
|
|
if (!_Links)
|
|
|
|
|
{
|
|
|
|
@ -814,12 +817,12 @@ void CInterfaceElement::addLink(CInterfaceLink *link)
|
|
|
|
|
{
|
|
|
|
|
_Links->push_back(linkPtr);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::removeLink(CInterfaceLink *link)
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::removeLink(CInterfaceLink *link)
|
|
|
|
|
{
|
|
|
|
|
nlassert(link != NULL);
|
|
|
|
|
if (!_Links)
|
|
|
|
|
{
|
|
|
|
@ -838,21 +841,21 @@ void CInterfaceElement::removeLink(CInterfaceLink *link)
|
|
|
|
|
delete _Links;
|
|
|
|
|
_Links = NULL;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
CInterfaceElement* CInterfaceElement::getMasterGroup() const
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
CInterfaceElement* CInterfaceElement::getMasterGroup() const
|
|
|
|
|
{
|
|
|
|
|
if(getParent()==NULL)
|
|
|
|
|
return const_cast<CInterfaceElement*>(this);
|
|
|
|
|
else
|
|
|
|
|
return getParent()->getMasterGroup();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
CInterfaceGroup* CInterfaceElement::getParentContainer()
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
CInterfaceGroup* CInterfaceElement::getParentContainer()
|
|
|
|
|
{
|
|
|
|
|
CInterfaceElement *parent = this;
|
|
|
|
|
while (parent)
|
|
|
|
|
{
|
|
|
|
@ -863,46 +866,46 @@ CInterfaceGroup* CInterfaceElement::getParentContainer()
|
|
|
|
|
parent = parent->getParent();
|
|
|
|
|
}
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
bool CInterfaceElement::isIn(sint x, sint y) const
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
bool CInterfaceElement::isIn(sint x, sint y) const
|
|
|
|
|
{
|
|
|
|
|
return (x >= _XReal) &&
|
|
|
|
|
(x < (_XReal + _WReal))&&
|
|
|
|
|
(y > _YReal) &&
|
|
|
|
|
(y <= (_YReal+ _HReal));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
bool CInterfaceElement::isIn(sint x, sint y, uint width, uint height) const
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
bool CInterfaceElement::isIn(sint x, sint y, uint width, uint height) const
|
|
|
|
|
{
|
|
|
|
|
return (x + (sint) width) >= _XReal &&
|
|
|
|
|
(y + (sint) height) > _YReal &&
|
|
|
|
|
x < (_XReal + _WReal) &&
|
|
|
|
|
y <= (_YReal + _HReal);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
bool CInterfaceElement::isIn(const CInterfaceElement &other) const
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
bool CInterfaceElement::isIn(const CInterfaceElement &other) const
|
|
|
|
|
{
|
|
|
|
|
return isIn(other._XReal, other._YReal, other._WReal, other._HReal);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::setActive (bool state)
|
|
|
|
|
{
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceElement::setActive (bool state)
|
|
|
|
|
{
|
|
|
|
|
if (_Active != state)
|
|
|
|
|
{
|
|
|
|
|
_Active = state;
|
|
|
|
|
invalidateCoords();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::invalidateCoords(uint8 numPass)
|
|
|
|
|
{
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::invalidateCoords(uint8 numPass)
|
|
|
|
|
{
|
|
|
|
|
// Get the "Root Group" ie the 1st son of the master group of us (eg "ui:interface:rootgroup" )
|
|
|
|
|
CInterfaceGroup *parent= getParent();
|
|
|
|
|
// if our parent is NULL, then we are the master group (error!)
|
|
|
|
@ -928,17 +931,17 @@ void CInterfaceElement::invalidateCoords(uint8 numPass)
|
|
|
|
|
uint8 &val= static_cast<CInterfaceElement*>(parent)->_InvalidCoords;
|
|
|
|
|
val= max(val, numPass);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::checkCoords()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::checkCoords()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
bool CInterfaceElement::isSonOf(const CInterfaceElement *other) const
|
|
|
|
|
{
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
bool CInterfaceElement::isSonOf(const CInterfaceElement *other) const
|
|
|
|
|
{
|
|
|
|
|
const CInterfaceElement *currElem = this;
|
|
|
|
|
do
|
|
|
|
|
{
|
|
|
|
@ -947,17 +950,17 @@ bool CInterfaceElement::isSonOf(const CInterfaceElement *other) const
|
|
|
|
|
}
|
|
|
|
|
while (currElem);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::resetInvalidCoords()
|
|
|
|
|
{
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::resetInvalidCoords()
|
|
|
|
|
{
|
|
|
|
|
_InvalidCoords= 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::updateAllLinks()
|
|
|
|
|
{
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::updateAllLinks()
|
|
|
|
|
{
|
|
|
|
|
if (_Links)
|
|
|
|
|
{
|
|
|
|
|
for(TLinkVect::iterator it = _Links->begin(); it != _Links->end(); ++it)
|
|
|
|
@ -965,11 +968,11 @@ void CInterfaceElement::updateAllLinks()
|
|
|
|
|
(*it)->update();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::copyOptionFrom(const CInterfaceElement &other)
|
|
|
|
|
{
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::copyOptionFrom(const CInterfaceElement &other)
|
|
|
|
|
{
|
|
|
|
|
_Active = other._Active;
|
|
|
|
|
_InvalidCoords = other._InvalidCoords;
|
|
|
|
|
_XReal = other._XReal;
|
|
|
|
@ -988,22 +991,22 @@ void CInterfaceElement::copyOptionFrom(const CInterfaceElement &other)
|
|
|
|
|
_ModulateGlobalColor = other._ModulateGlobalColor;
|
|
|
|
|
_RenderLayer = other._RenderLayer;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::center()
|
|
|
|
|
{
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::center()
|
|
|
|
|
{
|
|
|
|
|
// center the pc
|
|
|
|
|
CViewRenderer &vr = *CViewRenderer::getInstance();
|
|
|
|
|
uint32 sw, sh;
|
|
|
|
|
vr.getScreenSize(sw, sh);
|
|
|
|
|
setX(sw / 2 - getWReal() / 2);
|
|
|
|
|
setY(sh / 2 + getHReal() / 2);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::renderWiredQuads(TRenderWired type, const std::string &uiFilter)
|
|
|
|
|
{
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::renderWiredQuads(TRenderWired type, const std::string &uiFilter)
|
|
|
|
|
{
|
|
|
|
|
CCtrlBase *ctrlBase = dynamic_cast<CCtrlBase*>(this);
|
|
|
|
|
CInterfaceGroup *groupBase = dynamic_cast<CInterfaceGroup*>(this);
|
|
|
|
|
if (
|
|
|
|
@ -1022,11 +1025,11 @@ void CInterfaceElement::renderWiredQuads(TRenderWired type, const std::string &u
|
|
|
|
|
drawHotSpot(_PosRef, CRGBA::Red);
|
|
|
|
|
if (_Parent) _Parent->drawHotSpot(_ParentPosRef, CRGBA::Blue);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::drawHotSpot(THotSpot hs, CRGBA col)
|
|
|
|
|
{
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::drawHotSpot(THotSpot hs, CRGBA col)
|
|
|
|
|
{
|
|
|
|
|
const sint32 radius = 2;
|
|
|
|
|
sint32 px, py;
|
|
|
|
|
//
|
|
|
|
@ -1058,11 +1061,11 @@ void CInterfaceElement::drawHotSpot(THotSpot hs, CRGBA col)
|
|
|
|
|
CViewRenderer &vr = *CViewRenderer::getInstance();
|
|
|
|
|
vr.drawFilledQuad(px - radius, py - radius, radius * 2, radius * 2, col);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::invalidateContent()
|
|
|
|
|
{
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::invalidateContent()
|
|
|
|
|
{
|
|
|
|
|
CInterfaceElement *elm = this;
|
|
|
|
|
while (elm)
|
|
|
|
|
{
|
|
|
|
@ -1072,79 +1075,79 @@ void CInterfaceElement::invalidateContent()
|
|
|
|
|
// Get the parent
|
|
|
|
|
elm = elm->getParent();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::visit(CInterfaceElementVisitor *visitor)
|
|
|
|
|
{
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::visit(CInterfaceElementVisitor *visitor)
|
|
|
|
|
{
|
|
|
|
|
nlassert(visitor);
|
|
|
|
|
visitor->visit(this);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::serialConfig(NLMISC::IStream &f)
|
|
|
|
|
{
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::serialConfig(NLMISC::IStream &f)
|
|
|
|
|
{
|
|
|
|
|
if (f.isReading())
|
|
|
|
|
{
|
|
|
|
|
throw NLMISC::ENewerStream(f);
|
|
|
|
|
nlassert(0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::onFrameUpdateWindowPos(sint dx, sint dy)
|
|
|
|
|
{
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::onFrameUpdateWindowPos(sint dx, sint dy)
|
|
|
|
|
{
|
|
|
|
|
_XReal+= dx;
|
|
|
|
|
_YReal+= dy;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::dummySet(sint32 /* value */)
|
|
|
|
|
{
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::dummySet(sint32 /* value */)
|
|
|
|
|
{
|
|
|
|
|
nlwarning("Element can't be written.");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::dummySet(const std::string &/* value */)
|
|
|
|
|
{
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::dummySet(const std::string &/* value */)
|
|
|
|
|
{
|
|
|
|
|
nlwarning("Element can't be written.");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
int CInterfaceElement::luaUpdateCoords(CLuaState &ls)
|
|
|
|
|
{
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
int CInterfaceElement::luaUpdateCoords(CLuaState &ls)
|
|
|
|
|
{
|
|
|
|
|
CLuaIHM::checkArgCount(ls, "updateCoords", 0);
|
|
|
|
|
updateCoords();
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
int CInterfaceElement::luaInvalidateCoords(CLuaState &ls)
|
|
|
|
|
{
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
int CInterfaceElement::luaInvalidateCoords(CLuaState &ls)
|
|
|
|
|
{
|
|
|
|
|
CLuaIHM::checkArgCount(ls, "updateCoords", 0);
|
|
|
|
|
invalidateCoords();
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
int CInterfaceElement::luaInvalidateContent(CLuaState &ls)
|
|
|
|
|
{
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
int CInterfaceElement::luaInvalidateContent(CLuaState &ls)
|
|
|
|
|
{
|
|
|
|
|
CLuaIHM::checkArgCount(ls, "invalidateContent", 0);
|
|
|
|
|
invalidateContent();
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
int CInterfaceElement::luaCenter(CLuaState &ls)
|
|
|
|
|
{
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
int CInterfaceElement::luaCenter(CLuaState &ls)
|
|
|
|
|
{
|
|
|
|
|
CLuaIHM::checkArgCount(ls, "center", 0);
|
|
|
|
|
center();
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
int CInterfaceElement::luaSetPosRef(CLuaState &ls)
|
|
|
|
|
{
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
int CInterfaceElement::luaSetPosRef(CLuaState &ls)
|
|
|
|
|
{
|
|
|
|
|
CLuaIHM::checkArgCount(ls, "setPosRef", 1);
|
|
|
|
|
CLuaIHM::check(ls, ls.isString(1), "setPosRef() requires a string in param 1");
|
|
|
|
|
|
|
|
|
@ -1161,11 +1164,11 @@ int CInterfaceElement::luaSetPosRef(CLuaState &ls)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
int CInterfaceElement::luaSetParentPos(CLuaState &ls)
|
|
|
|
|
{
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
int CInterfaceElement::luaSetParentPos(CLuaState &ls)
|
|
|
|
|
{
|
|
|
|
|
CLuaIHM::checkArgCount(ls, "setParentPos", 1);
|
|
|
|
|
CInterfaceElement *ie = CLuaIHM::getUIOnStack(ls, 1);
|
|
|
|
|
if(ie)
|
|
|
|
@ -1173,13 +1176,13 @@ int CInterfaceElement::luaSetParentPos(CLuaState &ls)
|
|
|
|
|
setParentPos(ie);
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
CInterfaceElement *CInterfaceElement::clone()
|
|
|
|
|
{
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
CInterfaceElement *CInterfaceElement::clone()
|
|
|
|
|
{
|
|
|
|
|
NLMISC::CMemStream dupStream;
|
|
|
|
|
nlassert(!dupStream.isReading());
|
|
|
|
|
CInterfaceGroup *oldParent = _Parent;
|
|
|
|
@ -1214,11 +1217,11 @@ CInterfaceElement *CInterfaceElement::clone()
|
|
|
|
|
_ParentSize = oldParentSize;
|
|
|
|
|
//
|
|
|
|
|
return begunThisCloneWarHas;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::serial(NLMISC::IStream &f)
|
|
|
|
|
{
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::serial(NLMISC::IStream &f)
|
|
|
|
|
{
|
|
|
|
|
f.serialPolyPtr(_Parent);
|
|
|
|
|
f.serial(_Id);
|
|
|
|
|
f.serial(_Active);
|
|
|
|
@ -1235,12 +1238,12 @@ void CInterfaceElement::serial(NLMISC::IStream &f)
|
|
|
|
|
f.serial(_RenderLayer);
|
|
|
|
|
f.serial(_AvoidResizeParent);
|
|
|
|
|
nlassert(_Links == NULL); // not supported
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::serialAH(NLMISC::IStream &f, IActionHandler *&ah)
|
|
|
|
|
{
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CInterfaceElement::serialAH(NLMISC::IStream &f, IActionHandler *&ah)
|
|
|
|
|
{
|
|
|
|
|
std::string ahName;
|
|
|
|
|
if (f.isReading())
|
|
|
|
|
{
|
|
|
|
@ -1252,9 +1255,10 @@ void CInterfaceElement::serialAH(NLMISC::IStream &f, IActionHandler *&ah)
|
|
|
|
|
ahName = CAHManager::getInstance()->getActionHandlerName(ah);
|
|
|
|
|
f.serial(ahName);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|