diff options
author | Richard Linden <none@none> | 2012-04-05 16:10:07 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2012-04-05 16:10:07 -0700 |
commit | 9626ab8fec34f73cd60822bd34376c1cb94e11d7 (patch) | |
tree | 0b4feb7b49b9a3e3d9936faea0b03aaff1dcb578 /indra/llxuixml/llxuiparser.cpp | |
parent | c2afd200a0d55c5137de6f89200a8d4b09ba8b6e (diff) |
CHUI-89 FIX Make nametags appear consistently next to avatar heads
nametags now track avatar head
avatar_skeleton now loaded as param block
vector3 param block parsing support
fixes for param block recursion
Diffstat (limited to 'indra/llxuixml/llxuiparser.cpp')
-rw-r--r-- | indra/llxuixml/llxuiparser.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/indra/llxuixml/llxuiparser.cpp b/indra/llxuixml/llxuiparser.cpp index afc76024d1..3c89fa3aaf 100644 --- a/indra/llxuixml/llxuiparser.cpp +++ b/indra/llxuixml/llxuiparser.cpp @@ -42,6 +42,7 @@ #include <boost/spirit/include/classic_core.hpp> #include "lluicolor.h" +#include "v3math.h" using namespace BOOST_SPIRIT_CLASSIC_NS; @@ -670,6 +671,7 @@ LLXUIParser::LLXUIParser() registerParserFuncs<S32>(readS32Value, writeS32Value); registerParserFuncs<F32>(readF32Value, writeF32Value); registerParserFuncs<F64>(readF64Value, writeF64Value); + registerParserFuncs<LLVector3>(readVector3Value, writeVector3Value); registerParserFuncs<LLColor4>(readColor4Value, writeColor4Value); registerParserFuncs<LLUIColor>(readUIColorValue, writeUIColorValue); registerParserFuncs<LLUUID>(readUUIDValue, writeUUIDValue); @@ -1144,6 +1146,31 @@ bool LLXUIParser::writeF64Value(Parser& parser, const void* val_ptr, name_stack_ return false; } +bool LLXUIParser::readVector3Value(Parser& parser, void* val_ptr) +{ + LLXUIParser& self = static_cast<LLXUIParser&>(parser); + LLVector3* vecp = (LLVector3*)val_ptr; + if(self.mCurReadNode->getFloatValue(3, vecp->mV) >= 3) + { + return true; + } + + return false; +} + +bool LLXUIParser::writeVector3Value(Parser& parser, const void* val_ptr, name_stack_t& stack) +{ + LLXUIParser& self = static_cast<LLXUIParser&>(parser); + LLXMLNodePtr node = self.getNode(stack); + if (node.notNull()) + { + LLVector3 vector = *((LLVector3*)val_ptr); + node->setFloatValue(3, vector.mV); + return true; + } + return false; +} + bool LLXUIParser::readColor4Value(Parser& parser, void* val_ptr) { LLXUIParser& self = static_cast<LLXUIParser&>(parser); |