Difference between revisions of "Template:MapMetaDatas/Crossmods"

From FreewarWiki
Jump to: navigation, search
Line 1: Line 1:
{{#switch:{{{9}}}
+
<!--
| span = <span class="crossmod">{{{1}}}&#124;{{{2}}}&#124;{{{3}}}&#124;{{{4}}}&#124;{{{5}}}&#124;{{{6}}}&#124;{{{7}}}&#124;{{{8}}}</span>
+
 
| fieldcross = {{#ifexpr:{{{X}}} >= {{{1}}} and {{{Y}}} >= {{{2}}} and {{{X}}} <= {{{3}}} and {{{Y}}} <= {{{4}}}|
+
  crossmod: Modifies the position of the crosshairs in a certain area.
<span style="position:absolute; left:{{#expr:({{#var:{{{Prefix|}}}OffsetX}} + {{{5}}}) * 5 - 1}}px; top:{{#expr:({{#var:{{{Prefix|}}}OffsetY}} + {{{Y}}} - {{#var:{{{Prefix|}}}TopLeftY}} + 1) * 5 - 1}}px; width:{{#expr:{{{6}}} * 5}}px; height: 5px; border:1px solid red;"></span>
+
  X1|Y1|X2|Y2|Horz-left-offset|Horz-width|Vert-top-offset|Vert-height
<span style="position:absolute; left:{{#expr:({{#var:{{{Prefix|}}}OffsetX}} + {{{X}}} - {{#var:{{{Prefix|}}}TopLeftX}} + 1) * 5 - 1}}px; top:{{#expr:({{#var:{{{Prefix|}}}OffsetY}} + {{{7}}}) * 5 - 1}}px; width:5px; height:{{#expr:{{{8}}} * 5}}px; border:1px solid red;"></span>
+
 
}}
+
-->{{MapMetaDate/Crossmod|0|0|132|109|0|{{#expr:135 - {{#var:TopLeftX}} + 3}}|0|{{#expr:{{#var:Height}} + 3}}|{{{1}}}|X={{{X}}}|Y={{{Y}}}|X2={{{X2}}}|Y2={{{Y2}}}|Prefix={{{Prefix|}}}}}<!--
| areacross = {{#ifexpr:{{{X}}} >= {{{1}}} and {{{Y}}} >= {{{2}}} and {{{X}}} <= {{{3}}} and {{{Y}}} <= {{{4}}}|
+
-->{{MapMetaDate/Crossmod|0|110|132|{{#var:BottomRightY}}|0|{{#expr:{{#var:Width}} + 3}}|0|{{#expr:{{#var:Height}} + 3}}|{{{1}}}|X={{{X}}}|Y={{{Y}}}|X2={{{X2}}}|Y2={{{Y2}}}|Prefix={{{Prefix|}}}}}<!--
<span style="position:absolute; left:{{#expr:({{#var:{{{Prefix|}}}OffsetX}} + {{{5}}}) * 5}}px; top:{{#expr:({{#var:{{{Prefix|}}}OffsetY}} + {{{Y}}} - {{#var:{{{Prefix|}}}TopLeftY}} + 1) * 5}}px; width:{{#expr:{{{6}}} * 5}}px; height:0; border-top:1px solid red;"></span>
+
-->{{MapMetaDate/Crossmod|133|110|144|{{#var:BottomRightY}}|0|{{#expr:{{#var:Width}} + 3}}|{{#expr:111 - {{#var:TopLeftY}}}}|{{#expr:{{#var:BottomRightY}} - 111 + 3}}|{{{1}}}|X={{{X}}}|Y={{{Y}}}|X2={{{X2}}}|Y2={{{Y2}}}|Prefix={{{Prefix|}}}}}<noinclude>
<span style="position:absolute; left:{{#expr:({{#var:{{{Prefix|}}}OffsetX}} + {{{X}}} - {{#var:{{{Prefix|}}}TopLeftX}} + 1) * 5 - 1}}px; top:{{#expr:({{#var:{{{Prefix|}}}OffsetY}} + {{{7}}}) * 5}}px; width:0; height:{{#expr:{{{8}}} * 5}}px; border-left:1px solid red;"></span>
+
{{Template Documentation|This template modifies the carosshair on maps in a certain area. This is used to show areas or locations on maps.|This template can be included by using '''<tt><nowiki>{{MapMetaDatas/Crossmods|"X1"|"Y1"|"X2"|"X2"|"Horizontal, left margin"|"Horizontal width"|"Vertical, upper margin"|"Vertical width"}}</nowiki></tt>'''.|
}}{{#ifexpr:{{{X2}}} >= {{{1}}} and {{{Y2}}} >= {{{2}}} and {{{X2}}} <= {{{3}}} and {{{Y2}}} <= {{{4}}}|
+
* '''X1:''' Defines the first X-coordinate
<span style="position:absolute; left:{{#expr:({{#var:{{{Prefix|}}}OffsetX}} + {{{5}}}) * 5}}px; top:{{#expr:({{#var:{{{Prefix|}}}OffsetY}} + {{{Y2}}} - {{#var:{{{Prefix|}}}TopLeftY}} + 1) * 5 + 5}}px; width:{{#expr:{{{6}}} * 5}}px; height:0; border-top:1px solid red;"></span>
+
* '''Y1:''' Defines the first Y-coordinate
<span style="position:absolute; left:{{#expr:({{#var:{{{Prefix|}}}OffsetX}} + {{{X2}}} - {{#var:{{{Prefix|}}}TopLeftX}} + 1) * 5 + 5}}px; top:{{#expr:({{#var:{{{Prefix|}}}OffsetY}} + {{{7}}}) * 5}}px; width:0; height:{{#expr:{{{8}}} * 5}}px; border-left:1px solid red;"></span>
+
* '''X2:''' Defines the second X-coordinate
}}
+
* '''Y2:''' Defines the second Y-coordinate
}}
+
* '''Horiztontal, left margin:''' Defines the margin from the left end of the page for the crosshairs
 +
* '''Horiztontal width:''' Defines the horizontal width of the crosshairs
 +
* '''Vertical, upper margin:''' Defines the margin from the upper end of the page for the crosshairs
 +
* '''Vertical width:''' Defines the vertical width of the crosshairs}}
 +
 
 +
[[Kategorie:Kartenvorlagen|MetaDaten]]
 +
</noinclude>

Revision as of 21:07, 11 January 2010

Documentation

Usage
This template modifies the carosshair on maps in a certain area. This is used to show areas or locations on maps.

Integration
This template can be included by using {{MapMetaDatas/Crossmods|"X1"|"Y1"|"X2"|"X2"|"Horizontal, left margin"|"Horizontal width"|"Vertical, upper margin"|"Vertical width"}}.

Parameters

  • X1: Defines the first X-coordinate
  • Y1: Defines the first Y-coordinate
  • X2: Defines the second X-coordinate
  • Y2: Defines the second Y-coordinate
  • Horiztontal, left margin: Defines the margin from the left end of the page for the crosshairs
  • Horiztontal width: Defines the horizontal width of the crosshairs
  • Vertical, upper margin: Defines the margin from the upper end of the page for the crosshairs
  • Vertical width: Defines the vertical width of the crosshairs

MetaDaten