Please remember to make use of the DML Wiki Manual of Style and Code of Conduct during your stay.

 Actions

Template

Template:Overlay

From Dragon Mania Legends (DML) Wiki

Template documentation
Note: portions of the template sample may not be visible without values provided.
View or edit this template's documentation. (About template documentation)

Function

Name

This template is adapted from Wikipedia's Template:Overlay and simplified for use on this wiki (maybe, haven't decided if it's practical for us for more than one place such as an interface introduction). Though its modules and associated functions are unmodified, the instructions here have been simplified greatly and made a little easier on the eyes.

Purpose

Image overlay

Allows positioning of up to 30 number, textual number, or colour tag overlays over an image indicate and label features in it.

Any overlay can be placed up to 3 times to indicate multiple locations of the same feature.

Typical colours of overlays are:

Color name Example
#C91B69 (default)
1
50
#CE4421
1
50
#F5B618
1
50
#309110
1
50
#1db1b3
1
50
#854495
1
50
#882963
1
50
#4D4D4D
1
50

Overlay colors can be individually set though each overlay inherits its colour from the previous, so only the first of any colour grouped must have a colour set.

Each overlay is wiki-linkable by the template.

The overlays can be turned off by setting overlay to 'no', causing only the image and legend to display, which is useful when the image already includes overlays and-or colour tagging and just needs corresponding explanations.

Overlay legend

A legend of text for each overlay displays by default, in 3 columns, under the image. The legend is turned off by setting the number of columns to '0'.

The legend can be grouped into up to 6 groups of overlays, explicitly up to 6 groups, each with an optional title.

See Template:Overlay/doc for more information.

Deficiences

Automatic column balancing

See Template:Overlay/doc for more information.

Undeterminable legend start and ends

See Template:Overlay/doc for more information.

Double quotes in pop up tips for overlays

Double quotes, ", cannot be placed in overlay tips when form = text or when form = colour are used. To include a double quote use its HTML coding, ".

See Template:Overlay/doc for more information.

Usage

This is a colour/color friendly template. Either spelling can be used for any parameter value or any parameter name.

Form = colour

When setting

| overlayNform = colour

then the overlays still use up numbered positions within the list of overlays. Accordingly, if using a mixture of image and-or text forms with colour forms, then gaps will appear in the number sequence where a colour form overlay is specified.

It might be generally best if colour form overlays are always set as the last overlays.

Examples

Note: The data in these examples is not necessarily correct.

Codex Snapshot

Codex Snapshot.png
1
2
3
4
5
6
1
Sigils
2
Dragon Level
3
Enchantment Stars
4
Rarity
5
Species Name
6
Elements
Wikitext for example
{{overlay
|image = Codex Snapshot.png
|columns = 1
|width = 140
|height = 164
|overlay1 = Sigils
|overlay1left = 133
|overlay1top = 19
|overlay2 = Dragon Level
|overlay2left = -6
|overlay2top = -1
|overlay3 = Enchantment Stars
|overlay3left = -6
|overlay3top = 46
|overlay4 = Rarity
|overlay4left = 135
|overlay4top = 96
|overlay5 = Species Name
|overlay5left = 31
|overlay5top = 97
|overlay6 = Elements
|overlay6left = 60
|overlay6top = 151
}}

Template parameters

Parameter Name Required Description Values
image no The image. If not set then only the legend is presented. Image file name.
width no Width of the image in pixels. Defaults to 500. Number.
height no Height of the image in pixels. Defaults to 500. Number.
columns no The number of columns to display the legend in. Defaults to 3. Set to 0 to not display any legend. Number == 0, 1, 2, 3, . . .
grid no Set to 'yes' to turn on the coordinate grid to allow easier determination of overlay coordinates while editing. Defaults to 'no'. All values other than 'yes' are equivalent to 'no'. 1=Text == yes.
link no Set to 'yes' to turn on default linking of overlay and legend entry. Defaults to 'no'. All values other than 'yes' are equivalent to 'no'. 1=Text == yes.
legendbox no Set to 'no' to turn off a box / border around each legend group set of overlays. Defaults to 'yes'. All other values other than 'no' are equivalent to 'yes'. 1=Text == no.
float no Floats the image and legend. Defaults to centering the image and legend on the page. Text == right, left.
overlay no Determines whether or not the overlays are presented when an image is available. Defaults to 'yes'. All values other than 'no' are equivalent to 'yes'. 1=Text == no.
legend1title no Text for legend1 title. Optionally linked text.
legend1start no The number of the first overlay to appear in legend1. Defaults to the first overlay set, otherwise to the previous legend end plus 1 if there is a previous legend. Number == 1, . ., 30.
legend1end no The number of the last overlay to appear in legend1. Defaults to the next legend start less 1 if there is a next legend, otherwise to the last set overlay. Number == 1, . ., 30.
Both legend starts and legend ends do not need to be provided. Legend starts only, or, legend ends only, for each legend may be provided.
overlay1form no The form of the overlays may be:
  • image: an image number, for example,
    1
    . It is the default form.
  • text: textual numbers, for example, 1.
  • color or colour: coloured tags, for example,   .

Defaults to the previous overlay form, or to 'image' if no previous overlay form.

Text == image, text, colour/color.
overlay1 no Text for overlay1 for the legend. Defaults to overlay1tip if any. Text. Do not link. The template will link.
overlay1colour no Colour of overlay1. Defaults to the previous overlay colour, or to 'red' if no previous overlay colour. Text == red, green, blue.
overlay1tip no Pop up tool tip text to appear when the screen pointer is over overlay1. Defaults to overlay1. Text.
overlay1left no Distance in pixels of the left edge of overlay1 from the left side of the image. Number.
overlay1top no Distance in pixels of the top edge of overlay1 from the top side of the image. Number.
overlay1link no Text to be used as a link for the overlay legend text. Defaults to overlay1 if link is not set to no. Text. Do not link.
overlay1left1 no The same as overlay1left. As per overlay1left.
overlay1top1 no The same as overlay1top. As per overlay1top.
overlay1left2 no The left ordinate for a second position of overlay1. As per overlay1left.
overlay1top2 no The top ordinate for a second position of overlay1. As per overlay1top.
overlay1left3 no The left ordinate for a third position of overlay1. As per overlay1left.
overlay1top3 no The top ordinate for a third position of overlay1. As per overlay1top.

See also

Template:Overlay/doc on wikipedia.org


This Wiki is created by players for other players and is not maintained by, or affiliated with, the game maker (Gameloft).
Cookies help us deliver our services. By using our services, you agree to our use of cookies.