summaryrefslogtreecommitdiff
path: root/xml/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'xml/parser.c')
-rw-r--r--xml/parser.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/xml/parser.c b/xml/parser.c
index 0045af1..1e3ed73 100644
--- a/xml/parser.c
+++ b/xml/parser.c
@@ -102,6 +102,7 @@ bool xStartElem(const std::string &name, std::map<std::string,std::string> &attr
if (name == "display") {
display = new cxDisplay(skin);
ATTRIB_MAN_FUNC ("id", display->ParseType);
+ ATTRIB_OPT_FUNC ("refresh", display->mRefreshDefault.Parse);
}
else
TAG_ERR_REMAIN("skin");
@@ -129,12 +130,18 @@ bool xStartElem(const std::string &name, std::map<std::string,std::string> &attr
else {
object = new cxObject(display);
if (object->ParseType(name)) {
+ if(parents.size() > 0)
+ object->mRefresh = parents.back()->mRefresh;
+ else
+ object->mRefresh = display->mRefreshDefault;
+
ATTRIB_OPT_NUMBER("x1", object->mPos1.x);
ATTRIB_OPT_NUMBER("y1", object->mPos1.y);
ATTRIB_OPT_NUMBER("x2", object->mPos2.x);
ATTRIB_OPT_NUMBER("y2", object->mPos2.y);
ATTRIB_OPT_FUNC ("condition", object->ParseCondition);
-
+ ATTRIB_OPT_FUNC ("refresh", object->mRefresh.Parse);
+ ATTRIB_OPT_FUNC ("changed", object->mRefresh.ParseChanged);
if (name == "image") {
ATTRIB_OPT_NUMBER("x", object->mPos1.x);
ATTRIB_OPT_NUMBER("y", object->mPos1.y);
@@ -256,6 +263,20 @@ bool xEndElem(const std::string &name) {
}
}
+ if (object->mRefresh.mChanged == NULL) {
+ switch (object->mType) {
+ case cxObject::text:
+ case cxObject::marquee:
+ case cxObject::blink:
+ case cxObject::scrolltext:
+ object->mRefresh.mChanged = &object->mText;
+ break;
+
+ default:
+ break;
+ }
+ }
+
object->mIndex = oindex++;
if (parents.size() > 0) {
Dprintf("pushing to parent\n");