Template:LocateRegion/Init: Difference between revisions

From FreewarWiki
Jump to navigation Jump to search
Istrugar (talk | contribs)
mNo edit summary
Istrugar (talk | contribs)
Undo revision 67299 by Istrugar (talk)
 
Line 7: Line 7:
-->{{#vardefine:{{{1}}}TopLeftY|{{{Y1}}}}}<!--
-->{{#vardefine:{{{1}}}TopLeftY|{{{Y1}}}}}<!--
-->{{#vardefine:{{{1}}}BottomRightY|{{{Y2}}}}}<!--
-->{{#vardefine:{{{1}}}BottomRightY|{{{Y2}}}}}<!--
-->{{#vardefine:{{{1}}}Coords|{{#ifexpr:{{{X1}}} < 0|-|+}}}}<!--
-->{{#vardefine:{{{1}}}Coord|{{#ifexpr:{{{X1}}} < 0|-|+}}}}<!--


  The actual area dimensions
  The actual area dimensions
Line 16: Line 16:
  Area dimensions with border (in dungeons there are no border)
  Area dimensions with border (in dungeons there are no border)


-->{{#vardefine:{{{1}}}WidthTotal|{{#expr:{{#ifeq:{{#var:{{{1}}}Coords}}|+|2|0}} + {{#var:{{{1}}}Width}}}}}}<!--
-->{{#vardefine:{{{1}}}WidthTotal|{{#expr:{{#ifeq:{{#var:{{{1}}}Coord}}|+|2|0}} + {{#var:{{{1}}}Width}}}}}}<!--
-->{{#vardefine:{{{1}}}HeightTotal|{{#expr:{{#ifeq:{{#var:{{{1}}}Coords}}|+|2|0}} + {{#var:{{{1}}}Height}}}}}}<!--
-->{{#vardefine:{{{1}}}HeightTotal|{{#expr:{{#ifeq:{{#var:{{{1}}}Coord}}|+|2|0}} + {{#var:{{{1}}}Height}}}}}}<!--


For Template:AreaOnMap
For Template:AreaOnMap


-->{{#ifeq:{{#var:{{{1}}}Coords}}|+|<!--
-->{{#ifeq:{{#var:{{{1}}}Coord}}|+|<!--


  -->{{#vardefine:locate{{{1}}}|position:absolute; left:{{#expr:({{{X1}}} - {{#var:{{#var:prefix{{{1}}}}}TopLeftX}} + {{#var:{{#var:prefix{{{1}}}}}OffsetX}} + 1) * 5 - 1}}px; top:{{#expr:({{{Y1}}} - {{#var:{{#var:prefix{{{1}}}}}TopLeftY}} + {{#var:{{#var:prefix{{{1}}}}}OffsetY}} + 1) * 5 - 1}}px; width:{{#expr:({{{X2}}} - {{{X1}}} + 1) * 5}}px; height:{{#expr:({{{Y2}}} - {{{Y1}}} + 1) * 5}}px;}}<!--
  -->{{#vardefine:locate{{{1}}}|position:absolute; left:{{#expr:({{{X1}}} - {{#var:{{#var:prefix{{{1}}}}}TopLeftX}} + {{#var:{{#var:prefix{{{1}}}}}OffsetX}} + 1) * 5 - 1}}px; top:{{#expr:({{{Y1}}} - {{#var:{{#var:prefix{{{1}}}}}TopLeftY}} + {{#var:{{#var:prefix{{{1}}}}}OffsetY}} + 1) * 5 - 1}}px; width:{{#expr:({{{X2}}} - {{{X1}}} + 1) * 5}}px; height:{{#expr:({{{Y2}}} - {{{Y1}}} + 1) * 5}}px;}}<!--

Latest revision as of 22:43, 7 February 2017


[Create] Documentation

No documentation page has been created for this template. If you are familiar with this template, you should create a documentation page. For more information, see Help:Templates.