Difference between revisions of "User:Natemckn/sandbox3/doc"

From Team Fortress Wiki
Jump to: navigation, search
(I think this is working how I want)
 
m (oops)
Line 14: Line 14:
  
 
<pre>
 
<pre>
{{User:Natemckn/sandbox3|25
+
{{User:Natemckn/sandbox3|20
 
|text1 = done with thing 1
 
|text1 = done with thing 1
|section2 = 25
+
|section2 = 30
|text2 = done with thing 2}}
+
|text2 = done with thing 2
 +
|total = 80}}
 
</pre>
 
</pre>
generates:{{User:Natemckn/sandbox3|25
+
generates:{{User:Natemckn/sandbox3|20
 
|text1 = done with thing 1
 
|text1 = done with thing 1
|section2 = 100
+
|section2 = 30
 
|text2 = done with thing 2
 
|text2 = done with thing 2
|total = 150}}
+
|total = 80}}

Revision as of 14:59, 29 December 2010

This template creates an awesome status bar representing the completion percent of anything. By default this template assumes that the bar goes from 0% to 100%, so in use:

{{User:Natemckn/sandbox3|25}}

generates:

25%  

However the top end can be overridden by specifying the total argument, so in this case:

{{User:Natemckn/sandbox3|25|total=200}}

generates:

12%  

As 25 of 200 is 12%, rounded.

{{User:Natemckn/sandbox3|20
|text1 = done with thing 1
|section2 = 30
|text2 = done with thing 2
|total = 80}}

generates:

25% done with thing 137% done with thing 2