- Timestamp:
- Oct 28, 2008, 3:05:17 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/orxonox/overlays/OverlayText.cc
r2019 r2024 65 65 } 66 66 67 XMLPortParam(OverlayText, "font", setFont, getFont,xmlElement, mode).defaultValues("Monofur");68 XMLPortParam(OverlayText, "colour", setColour, getColour,xmlElement, mode).defaultValues(ColourValue(1.0, 1.0, 1.0, 1.0));69 XMLPortParam(OverlayText, "caption", setCaption, getCaption,xmlElement, mode).defaultValues("");70 XMLPortParam(OverlayText, "textSize", setTextSize, getTextSize,xmlElement, mode).defaultValues(1.0f);71 XMLPortParam Template(OverlayText, "align", setAlignment, getAlignment, xmlElement, mode, const std::string&).defaultValues("left");67 XMLPortParam(OverlayText, "font", setFont, getFont, xmlElement, mode).defaultValues("Monofur"); 68 XMLPortParam(OverlayText, "colour", setColour, getColour, xmlElement, mode).defaultValues(ColourValue(1.0, 1.0, 1.0, 1.0)); 69 XMLPortParam(OverlayText, "caption", setCaption, getCaption, xmlElement, mode).defaultValues(""); 70 XMLPortParam(OverlayText, "textSize", setTextSize, getTextSize, xmlElement, mode).defaultValues(1.0f); 71 XMLPortParam(OverlayText, "align", setAlignmentString, getAlignmentString, xmlElement, mode).defaultValues("left"); 72 72 } 73 73 … … 106 106 } 107 107 108 void OverlayText::setAlignment(const std::string& alignment) 108 Ogre::TextAreaOverlayElement::Alignment OverlayText::getAlignment() const 109 { 110 if (this->text_) 111 return this->text_->getAlignment(); 112 else 113 return Ogre::TextAreaOverlayElement::Left; 114 } 115 116 void OverlayText::setAlignmentString(const std::string& alignment) 109 117 { 110 118 if (alignment == "right") … … 116 124 } 117 125 118 std::string OverlayText::getAlignment () const126 std::string OverlayText::getAlignmentString() const 119 127 { 120 128 if (this->text_)
Note: See TracChangeset
for help on using the changeset viewer.