Template:Qud text: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
<includeonly>{{#switch: {{{2|}}}| notxml={{#ifeq: {{{3|}}}| unbolded |<span style="font-weight:400;">{{#invoke: ColorParse | nonxmlparse |&y{{{1}}}}}</span>|<span style="font-weight:700;">{{#invoke: ColorParse | nonxmlparse |&y{{{1}}}}}</span>}}| unbolded=<span style="font-weight:400;">{{#invoke: ColorParse | parse |&y{{{1}}}}}</span>|<span style="font-weight:700;">{{#invoke: ColorParse | parse | | <includeonly>{{#switch: {{{2|}}}| notxml={{#ifeq: {{{3|}}}| unbolded |<span style="font-weight:400;">{{#invoke: ColorParse | nonxmlparse |&y{{{1}}}}}</span>|<span style="font-weight:700;">{{#invoke: ColorParse | nonxmlparse |&y{{{1}}}}}</span>}}| unbolded=<span style="font-weight:400;">{{#invoke: ColorParse | parse |&y{{{1}}}}}</span>|<span style="font-weight:700;">{{#invoke: ColorParse | parse |&y{{{1}}}}}</span>}}</includeonly><noinclude>{{doc}}[[Category:Qud Templates]]</noinclude> |
Revision as of 20:20, 19 August 2019
Usage
{{Qud text|&olalalalala&OlALALALA&YLALA!}}
The text does not remove trailing whitespace, so remove any extra space there is. Use this instead of calling ColorParse directly.
If you're reading color codes not from an xml file (it doesn't have amp;
), it will automatically try to detect it. To manually decide this, add notxml
as an extra argument.
{{Qud text|&REat &rthe rich!}}
To prevent automatic bolding of text, add the "unbolded" argument.
{{Qud text|&Cultra-light &belectronics| unbolded }}
&Cultra-light &belectronics
For dialogue from conversations.xml, you can also call tildes are new lines
as another argument to automatically replace tildes with another linebreak.
{{Qud text|Live and eat honey.~ Oh, look. It is a not-bear. Greetings, not-bear.~ Live and drink, little friend.~ I would enjoy some honey.~ *grunting*~ *snuffle*~ *whuffling*~ *heavy sigh*~|tildes are new lines}}
All of these arguments can be used at the same time.