Template:B3D:N2P/VTT1
Usage
editThis template is used to overlay as many as nine textboxes or rectangles on top of an image. You must provide an image to the template using the image
argument, although you can (optionally) provide an image width (via imageWidth
). If left unspecified, the width will default to 800px
.
Each item overlayed on the image must be one of two types: either a "textbox" or a "drawbox". Both have their own arguments.
Each argument (apart from the image
and imageWidth
arguments) must belong to a item numbered 1-9. This "item number" will be appended to each argument of the item. For example, see the following:
{{B3D:N2P/VTT1
|image=Blender 2.90-startup.png
|imageWidth=600px
|type1=text
|top1=10%
|label1=Example
|text1=This is an example textbox.
|type2=text
|bottom2=10%
|label2=Another example
|text2=This is another example textbox.
}}
The first item is item number 1. Therefore, we add a "1" at the end of every argument for item 1. Similarly, the next item is item number 2, so we add "2" at the end of its arguments.
For a detailed list of arguments, see the below
Shared arguments
editThese are the arguments that are shared between textboxes and drawboxes. Most of these arguments work similarly to CSS properties of the same name. To see a list of all of them, visit https://developer.mozilla.org/en-US/docs/Web/CSS.
top
,bottom
,left
, andright
: These arguments position the box relative to the image. They behave similarly to their corresponding CSS properties, for example, you can setleft=10px
to position the box 10 pixels away from the left border of the image, or you can settop=50%
to position the top of the box at the center of the image (i.e., the midway point). All of these are optional (if left unspecified, bothtop
andleft
will default to5%
)width
: This specifies the width of the box. It works similarly to thewidth
CSS property. For example,width=50%
will set the width to take up 50% of the image. It is an optional argument, and it will be set to35%
if left unspecified.border
: This argument allows you to style the border of the box. You can customize the color, the width, and the line style. It works similarly to theborder
CSS property. For example,border=2px dashed blue
will create a 2-pixel-wide blue border with dashed lines. It is an optional argument, however, its default value depends on the type of box used (typically3px solid #000
).
Textboxes
editTextboxes have the following exclusive arguments, which can't be used for drawboxes:
theme
: This can either be set todefault
,black
,yellow
,red
, orblue
. These themes change various textbox colors, for example,theme=red
will set the background color to red, and change the border color and the text color to match accordingly. It is an optional argument. By default, its value isdefault
, which simply displays a white background.color
: This argument sets the text color of the textbox. It behaves similarly to thecolor
CSS property. You can specify a color in many formats, including using a named color (e.g.red
), using hexadecimal notation (e.g.#FF0000
) orrgb()
notation (e.g.rgb(255, 0, 0)
), usinghsl()
notation (e.g.hsl(255, 0, 0)
), among other methods. You can use a color picker to get these values, or pick from a list of named colors. It is an optional argument, but its default value depends on thetheme
(typically#000
)background
: This argument styles the background of the textbox. It behaves similarly to thebackground
CSS property. Its main use is to specify a background color, although it can be used to specify other background properties. It is an optional argument, but its defaultt value depends on thetheme
.label
: This argument specifies an optional label for the textbox. For example,label=Example label
will display "Example label" at the top of the textbox. Any label text will always use white for its text color, and black for its background color, completely ignoring thecolor
andbackground
arguments. It is an optional argument.text
: This argument specifies the text to be displayed inside the textbox. For example,text=Example text
will display "Example text" at the top of the textbox.
Textboxes look like the following:
Drawboxes
editDrawboxes also have their own exclusive arguments, which can't be used for textboxes:
height
: This argument, like thewidth
argument, specifies the height of the box. It behaves similarly to theheight
CSS property. It is an optional argument, defaulting to5%
if unspecified.
Drawboxes look like the following:
Example
edit{{B3D:N2P/VTT1
|image=Blender 2.90-startup.png
|imageWidth=1000px
|type1=text
|top1=15px
|left1=15%
|width1=60%
|label1=Example
|text1=This is an example textbox.
|type2=draw
|top2=25%
|left2=35%
|width2=30%
|height2=50%
|border2=2px solid red
|type3=text
|bottom3=15px
|left3=15%
|width3=60%
|label3=Example 2
|text3=This is another example textbox. Note the {{Red|red}} box above, highlighting the splash screen.
}}
becomes