Difference between revisions of "Template:LCD/doc"

From MegaDrumWiki
Jump to: navigation, search
 
(7 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
color=black|
 
color=black|
 
bgcolor=#00FF00|
 
bgcolor=#00FF00|
line1=<MegaDrum.info ;>|
+
line1=<MegaDrum.info >|
line2=(c)D.Skachkov  ♦|
+
line2=(c)D.Skachkov{{nbsp|2}}{{LCD/arrows|black}}|
 
caption=MegaDrum copyright screen and contrast adjust
 
caption=MegaDrum copyright screen and contrast adjust
 
}}
 
}}
 
</pre>
 
</pre>
  
Ang get this result:
+
And get this result:
 
{{LCD|
 
{{LCD|
 
color=black|
 
color=black|
 
bgcolor=#00FF00|
 
bgcolor=#00FF00|
 
line1=&lt;MegaDrum.info&nbsp;&gt;|
 
line1=&lt;MegaDrum.info&nbsp;&gt;|
line2=(c)D.Skachkov&nbsp;&nbsp;♦|
+
line2=(c)D.Skachkov{{nbsp|2}}{{LCD/arrows|black}}|
 
caption=MegaDrum copyright screen and contrast adjust
 
caption=MegaDrum copyright screen and contrast adjust
 
}}
 
}}
 +
 +
As you can see, there is 2 lines, 16 characters in each. This mimics the type of LCD currently used with MegaDrum.
  
 
The format of the template is self-explanatory. Any parameter can be omitted. Defaults are: black characters on green background. The default text is the copyright screen and default caption is "MegaDrum display". Observe the main template to see how it looks.
 
The format of the template is self-explanatory. Any parameter can be omitted. Defaults are: black characters on green background. The default text is the copyright screen and default caption is "MegaDrum display". Observe the main template to see how it looks.
  
'''A note on text formatting: Please note that if a line contains more than a single whitespace character you will need to enter &amp;nbsp; for each additional whitespace.'''
+
'''A note on text formatting: Please note that if a line contains more than a single whitespace character you will need to use the Nbsp template. For example, let's say you need 5 consecutive space characters in a string. You would write this as:'''
 +
 
 +
<pre>
 +
{{nbsp|5}}
 +
</pre>
 +
 
 +
Please consult the [[Template:Nbsp|documentation]] for more information.
  
Also consider using &amp;lt; for the "&lt;" character and "&amp;gt;" for the "&gt;" character.
+
'''Also consider using &amp;lt; for the "&lt;" character and "&amp;gt;" for the "&gt;" character.'''
  
 
Here's another example. Note that I used a different color/bgcolor here. You can also use standard RGB color representations such as &#35;00FF00.
 
Here's another example. Note that I used a different color/bgcolor here. You can also use standard RGB color representations such as &#35;00FF00.
Line 45: Line 53:
 
}}
 
}}
  
Finally here is an example settings screen:
+
Finally here is an example settings screen.
 +
 
 
<pre>
 
<pre>
 
{{LCD|
 
{{LCD|
 
color=white|
 
color=white|
 
bgcolor=blue|
 
bgcolor=blue|
line1=&amp;lt;CustomCurve1&amp;nbsp;&amp;nbsp;&amp;gt;|
+
line1=&amp;lt;CustomCurve1{{nbsp|2}}&amp;gt;|
line2=P1:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2♦|
+
line2=P1:{{nbsp|11}}2{{LCD/arrows|white}}|
 
caption=Custom curve '''CustomCurve1''' point '''P1''' value
 
caption=Custom curve '''CustomCurve1''' point '''P1''' value
 
}}
 
}}
 
</pre>
 
</pre>
 +
 +
Note that to insert a up/down arrow symbol a special template is used. Here's the syntax:
 +
<pre>{{LCD/arrows|color}}</pre>
 +
where color can be: ''black'', ''blue'', ''red'', ''magenta'', ''green'', ''cyan'', ''yellow'' and ''white''. Please use the same color as you do for the LCD font.
  
 
The result is as follows:
 
The result is as follows:
Line 60: Line 73:
 
color=white|
 
color=white|
 
bgcolor=blue|
 
bgcolor=blue|
line1=&lt;CustomCurve1&nbsp;&nbsp;&gt;|
+
line1=&lt;CustomCurve1{{nbsp|2}}&gt;|
line2=P1:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2♦|
+
line2=P1:{{nbsp|11}}2{{LCD/arrows|white}}|
 
caption=Custom curve '''CustomCurve1''' point '''P1''' value
 
caption=Custom curve '''CustomCurve1''' point '''P1''' value
 
}}
 
}}
  
I agree that entering those whitespace characters is quite tedious, but I can't think of any remedy at this time. Unless, of course, the LoopFunctions and probably also StringFunctions extensions are installed.
+
You can also float the LCD screen to left/right using an additional float parameter. For example, here is the previous example right-aligned:
 +
<pre>
 +
{{LCD|
 +
color=white|
 +
float=right|
 +
bgcolor=blue|
 +
line1=&amp;lt;CustomCurve1{{nbsp|2}}&amp;gt;|
 +
line2=P1:{{nbsp|11}}2{{LCD/arrows|white}}|
 +
caption=Custom curve '''CustomCurve1''' point '''P1''' value
 +
}}
 +
</pre>
 +
 
 +
{{LCD|
 +
color=white|
 +
float=right|
 +
bgcolor=blue|
 +
line1=&lt;CustomCurve1{{nbsp|2}}&gt;|
 +
line2=P1:{{nbsp|11}}2{{LCD/arrows|white}}|
 +
caption=Custom curve '''CustomCurve1''' point '''P1''' value
 +
}}
 +
You should see the container to the right of this text.
 +
 
 +
To make an example of poor contrast of this screen, add one more parameter: contrast=poor-contrast. This makes the font barely visible. The full example is:
 +
<pre>
 +
{{LCD|
 +
color=white|
 +
bgcolor=blue|
 +
contrast=poor-contrast|
 +
line1=&amp;lt;CustomCurve1{{nbsp|2}}&amp;gt;|
 +
line2=P1:{{nbsp|11}}2{{LCD/arrows|white}}|
 +
caption=Custom curve '''CustomCurve1''' point '''P1''' value
 +
}}
 +
</pre>
 +
 
 +
Here's how it will look like:
 +
{{LCD|
 +
color=white|
 +
bgcolor=blue|
 +
contrast=poor-contrast|
 +
line1=&lt;CustomCurve1{{nbsp|2}}&gt;|
 +
line2=P1:{{nbsp|11}}2{{LCD/arrows|white}}|
 +
caption=Custom curve '''CustomCurve1''' point '''P1''' value
 +
}}

Latest revision as of 21:47, 28 July 2010

This template is used to illustrate various MegaDrum settings that a user can observe on the LCD screen. Here's how it works in a nutshell: you write the following code:

{{LCD|
color=black|
bgcolor=#00FF00|
line1=<MegaDrum.info >|
line2=(c)D.Skachkov{{nbsp|2}}{{LCD/arrows|black}}|
caption=MegaDrum copyright screen and contrast adjust
}}

And get this result:

<MegaDrum.info >
(c)D.Skachkov  ArrowsUpDown black.gif

MegaDrum copyright screen and contrast adjust


As you can see, there is 2 lines, 16 characters in each. This mimics the type of LCD currently used with MegaDrum.

The format of the template is self-explanatory. Any parameter can be omitted. Defaults are: black characters on green background. The default text is the copyright screen and default caption is "MegaDrum display". Observe the main template to see how it looks.

A note on text formatting: Please note that if a line contains more than a single whitespace character you will need to use the Nbsp template. For example, let's say you need 5 consecutive space characters in a string. You would write this as:

{{nbsp|5}}

Please consult the documentation for more information.

Also consider using &lt; for the "<" character and "&gt;" for the ">" character.

Here's another example. Note that I used a different color/bgcolor here. You can also use standard RGB color representations such as #00FF00.

{{LCD|
color=white|
bgcolor=blue|
line1=█_______________|
line2=________________|
caption=MegaDrum VU Meter screen
}}

Result:

█_______________
________________

MegaDrum VU Meter screen


Finally here is an example settings screen.

{{LCD|
color=white|
bgcolor=blue|
line1=&lt;CustomCurve1{{nbsp|2}}&gt;|
line2=P1:{{nbsp|11}}2{{LCD/arrows|white}}|
caption=Custom curve '''CustomCurve1''' point '''P1''' value
}}

Note that to insert a up/down arrow symbol a special template is used. Here's the syntax:

{{LCD/arrows|color}}

where color can be: black, blue, red, magenta, green, cyan, yellow and white. Please use the same color as you do for the LCD font.

The result is as follows:

<CustomCurve1  >
P1:           2ArrowsUpDown white.gif

Custom curve CustomCurve1 point P1 value


You can also float the LCD screen to left/right using an additional float parameter. For example, here is the previous example right-aligned:

{{LCD|
color=white|
float=right|
bgcolor=blue|
line1=&lt;CustomCurve1{{nbsp|2}}&gt;|
line2=P1:{{nbsp|11}}2{{LCD/arrows|white}}|
caption=Custom curve '''CustomCurve1''' point '''P1''' value
}}
<CustomCurve1  >
P1:           2ArrowsUpDown white.gif

Custom curve CustomCurve1 point P1 value

You should see the container to the right of this text.

To make an example of poor contrast of this screen, add one more parameter: contrast=poor-contrast. This makes the font barely visible. The full example is:

{{LCD|
color=white|
bgcolor=blue|
contrast=poor-contrast|
line1=&lt;CustomCurve1{{nbsp|2}}&gt;|
line2=P1:{{nbsp|11}}2{{LCD/arrows|white}}|
caption=Custom curve '''CustomCurve1''' point '''P1''' value
}}

Here's how it will look like:

<CustomCurve1  >
P1:           2ArrowsUpDown white.gif

Custom curve CustomCurve1 point P1 value