handle showPipes in code only. Fix #609
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<!-- OK button -->
|
||||
<field name='text' top='34' left='55' width='293' height='98'/>
|
||||
<button name='cancel' type='regular' top='141' left='222' def-key='esc'>Cancel</button>
|
||||
<text top='142' left='7' width='198' height='15' show-pipes='true'>Use a '|' to indicate a line break.</text>
|
||||
<text top='142' left='7' width='198' height='15'>Use a '|' to indicate a line break.</text>
|
||||
<text name='num' top='8' left='287' width='37' height='14'/>
|
||||
<pict name='pic' type='dlog' num='16' top='8' left='12'/>
|
||||
<text size='large' top='6' left='50' width='138' height='17'>Editing Sign</text>
|
||||
|
||||
@@ -186,7 +186,6 @@
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="show-pipes" type="xs:boolean" default="false"/>
|
||||
<xs:attribute ref="def-key"/>
|
||||
<xs:attribute name="fromlist" default="none" type="xs:string"/>
|
||||
<xs:attributeGroup ref="rect-size"/>
|
||||
|
||||
@@ -65,15 +65,16 @@ bool cTextMsg::parseAttribute(ticpp::Attribute& attr, std::string tagName, std::
|
||||
else if(val == "left") right_align = false;
|
||||
else throw xBadVal(tagName, attr.Name(), val, attr.Row(), attr.Column(), fname);
|
||||
return true;
|
||||
}else if(attr.Name() == "show-pipes"){
|
||||
style.showPipes = str_to_bool(attr.Value());
|
||||
return true;
|
||||
}
|
||||
return cControl::parseAttribute(attr, tagName, fname);
|
||||
}
|
||||
|
||||
bool cTextMsg::parseContent(ticpp::Node& content, int n, std::string tagName, std::string fname, std::string& text) {
|
||||
if(content.Type() == TiXmlNode::TEXT) {
|
||||
// If a literal '|' is in the XML text, render pipes literally and not as newlines
|
||||
if(content.Value().find('|') != std::string::npos){
|
||||
style.showPipes = true;
|
||||
}
|
||||
text += dlogStringFilter(content.Value());
|
||||
return true;
|
||||
} else if(content.Value() == "br") {
|
||||
|
||||
@@ -90,7 +90,6 @@ The `<text>` tag accepts the following attributes:
|
||||
|
||||
* `framed` - See **Common Attributes** above. Defaults to `false`.
|
||||
* `outline` - See **Common Attributes** above.
|
||||
* `show-pipes` - If true the | character will appear literally.
|
||||
* `underline` - If true, the text will be underlined.
|
||||
* `align` - `right` or `left`. Defaults to `left`.
|
||||
* `fromlist`, `font`, `size`, `color`, `colour`, `def-key` -
|
||||
|
||||
Reference in New Issue
Block a user