diff options
author | Ethan Yonker <dees_troy@teamw.in> | 2015-02-18 21:35:00 +0100 |
---|---|---|
committer | Ethan Yonker <dees_troy@teamw.in> | 2015-02-21 15:14:24 +0100 |
commit | 21ff02a69331fbcd53dc93a1af9a93618225b4bf (patch) | |
tree | 623fe5a07a506362b91a16b34d62a875b3d45c32 /gui/text.cpp | |
parent | gui: make kinetic scrolling deceleration more awesome (diff) | |
download | android_bootable_recovery-21ff02a69331fbcd53dc93a1af9a93618225b4bf.tar android_bootable_recovery-21ff02a69331fbcd53dc93a1af9a93618225b4bf.tar.gz android_bootable_recovery-21ff02a69331fbcd53dc93a1af9a93618225b4bf.tar.bz2 android_bootable_recovery-21ff02a69331fbcd53dc93a1af9a93618225b4bf.tar.lz android_bootable_recovery-21ff02a69331fbcd53dc93a1af9a93618225b4bf.tar.xz android_bootable_recovery-21ff02a69331fbcd53dc93a1af9a93618225b4bf.tar.zst android_bootable_recovery-21ff02a69331fbcd53dc93a1af9a93618225b4bf.zip |
Diffstat (limited to 'gui/text.cpp')
-rw-r--r-- | gui/text.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/gui/text.cpp b/gui/text.cpp index cc18b170f..3487f7a82 100644 --- a/gui/text.cpp +++ b/gui/text.cpp @@ -44,18 +44,14 @@ GUIText::GUIText(xml_node<>* node) mHighlightColor = LoadAttrColor(node, "highlightcolor", mColor); // Load the font, and possibly override the color - xml_node<>* child = node->first_node("font"); - if (child) - { - mFont = LoadAttrFont(child, "resource"); - mColor = LoadAttrColor(child, "color", mColor); - mHighlightColor = LoadAttrColor(child, "highlightcolor", mColor); - } + mFont = LoadAttrFont(FindNode(node, "font"), "resource"); + mColor = LoadAttrColor(FindNode(node, "font"), "color", mColor); + mHighlightColor = LoadAttrColor(FindNode(node, "font"), "highlightcolor", mColor); // Load the placement - LoadPlacement(node->first_node("placement"), &mRenderX, &mRenderY, &mRenderW, &mRenderH, &mPlacement); + LoadPlacement(FindNode(node, "placement"), &mRenderX, &mRenderY, &mRenderW, &mRenderH, &mPlacement); - child = node->first_node("text"); + xml_node<>* child = FindNode(node, "text"); if (child) mText = child->value(); // Simple way to check for static state |