Template:DialogueOption: Difference between revisions

From Ephinea PSO Wiki
(Meant for showing the option(s) a player can choose in between dialogue text)
 
(Rephrasing; Adjusted parameters)
 
Line 1: Line 1:
</div>
</div>
{{#switch:{{{indent|}}}|5 = :::::|4 = ::::|3 = :::|2 = ::|1 = :}}<div align=center class="psoBackground psoStyle" style="max-width:200px; font-size:15px;">{{{text}}}</div>
{{#switch:{{{indent|}}}|5 = :::::|4 = ::::|3 = :::|2 = ::|1 = :|0|#default =}}<div align=center class="psoBackground psoStyle" style="max-width:200px; font-size:15px;">{{{text}}}</div>
<div style="line-height:50%;"><noinclude></div>
<div style="line-height:50%;"><noinclude></div>


Line 6: Line 6:
Meant for showing the option(s) a player can choose in between dialogue text, can be more than one in case they lead to a similar dialogue branch.
Meant for showing the option(s) a player can choose in between dialogue text, can be more than one in case they lead to a similar dialogue branch.
<br>
<br>
Will automatically close the div structure beforehand and re-open it afterward to avoid issues involving the option box as well as later dialogue text.
Will automatically close a div tag earlier opened either by itself or <code><nowiki>{{DialogueStart}}</nowiki></code> beforehand and re-open the tag afterward to avoid issues involving the option box as well as later dialogue text.


Currently supports up to 5 indents, or <code><nowiki>:</nowiki></code> inserts preceding the option box.
Currently supports up to 5 indents, or <code><nowiki>:</nowiki></code> inserts preceding the option box. Due to the current Dialogue structure, at least one indent is needed if initial dialogue text is used, though it is possible to write <code><nowiki>indent=0</nowiki></code> or simply omit the indent field if an NPC starts with an option prompt without initial dialogue text.
<br>
Due to the current Dialogue structure, at least one indent is preferred in order to line up with initial dialogue text.


==Example==
==Example==
<pre>
<pre>
{{DialogueOption|indent=2|text=Green<br>Blue<br>Purple<br>Red<br>Yellow}}
{{DialogueOption|indent=2|text=Green<br/>Blue<br/>Purple<br/>Red<br/>Yellow}}
</pre>
</pre>
{{DialogueOption|indent=2|text=Green<br>Blue<br>Purple<br>Red<br>Yellow}}
{{DialogueOption|indent=2|text=Green<br/>Blue<br/>Purple<br/>Red<br/>Yellow}}


[[Category:Templates]]</noinclude>
[[Category:Templates]]</noinclude>

Latest revision as of 15:39, 4 January 2022

{{{text}}}

Usage[edit source]

Meant for showing the option(s) a player can choose in between dialogue text, can be more than one in case they lead to a similar dialogue branch.
Will automatically close a div tag earlier opened either by itself or {{DialogueStart}} beforehand and re-open the tag afterward to avoid issues involving the option box as well as later dialogue text.

Currently supports up to 5 indents, or : inserts preceding the option box. Due to the current Dialogue structure, at least one indent is needed if initial dialogue text is used, though it is possible to write indent=0 or simply omit the indent field if an NPC starts with an option prompt without initial dialogue text.

Example[edit source]

{{DialogueOption|indent=2|text=Green<br/>Blue<br/>Purple<br/>Red<br/>Yellow}}
Green
Blue
Purple
Red
Yellow