Aktuelle Version |
Dein Text |
Zeile 1: |
Zeile 1: |
| <div id="contentSub"><span class="subpages">< [[Hilfe:Karten#Feldzusammenfassung/Minimap-Hotspots]]</span></div> | | <div id="contentSub"><span class="subpages">< [[Hilfe:Karten]]</span></div> |
|
| |
|
| Eine Sammlung von Scripten, um Minimap-Hotspots zu erstellen: | | Eine Sammlung von Scripten, um Minimap-Hotspots zu erstellen: |
Zeile 34: |
Zeile 34: |
| py = py + 15 | | py = py + 15 |
| Next y | | Next y |
| Selection.TypeText "<noinclude>{{Hotspot-Dokumentation}}</noinclude>"
| |
| End Sub | | End Sub |
| </pre>
| |
| == Javascript ==
| |
| Dieses Script steht auch [http://www.arbiedz.de/MakeMinimapHotspots.htm hier] zur direkten Verwendung zur Verfügung.
| |
| <pre>
| |
| <html>
| |
| <head>
| |
| <meta http-equiv="content-type" content="text/html;CHARSET=iso-8859-15">
| |
| <title>Script zum Erstellen einer Karten/Minimap-Hotspots</title>
| |
| <script type="text/javascript">
| |
| <!--
| |
|
| |
| function main() {
| |
| var px = 0;
| |
| var py = 0;
| |
|
| |
| document.Formular.Ausgabe.value = "";
| |
| py=eval(document.Formular.edit_ofs_y.value);
| |
| for (var y = eval(document.Formular.edit_y1.value); y <= eval(document.Formular.edit_y2.value); y++) {
| |
| px = eval(document.Formular.edit_ofs_x.value);
| |
| for (var x = eval(document.Formular.edit_x1.value); x <= eval(document.Formular.edit_x2.value); x++) {
| |
| document.Formular.Ausgabe.value += "{{Link-Div|#" + x + "," + y
| |
| + "|" + eval(document.Formular.edit_width.value) + "px"
| |
| + "|" + eval(document.Formular.edit_height.value) + "px"
| |
| + "|position:absolute;"
| |
| + "left:" + px + "px;"
| |
| + "top:" + py + "px;"
| |
| + "z-index:2;"
| |
| + "}}" + "\n";
| |
| px = px + eval(document.Formular.edit_width.value);
| |
| }
| |
|
| |
| py = py + eval(document.Formular.edit_height.value);
| |
| }
| |
| document.Formular.Ausgabe.value += "<noinclude>{{Hotspot-Dokumentation}}</noinclude>";
| |
| }
| |
|
| |
| //-->
| |
| </script>
| |
|
| |
| </head>
| |
| <body>
| |
| <noscript>
| |
| <h1>Javascript muss aktiviert sein!</h1>
| |
| </noscript>
| |
| Script zum Erstellen einer Karten/Minimap-Hotspots. Einfach die x- und y-Startwerte eintragen und anschließend
| |
| die Ausgabe in den fwwiki-Artikel <tt>Vorlage:Feldzusammenfassung/Minimap-Hotspots/<i>Gebietsname</i></tt> eintragen.
| |
| (Version vom 21.02.2011)
| |
| <form name="Formular" action="">
| |
| <fieldset>
| |
| <legend>Feldkoordinaten</legend>
| |
| obere linke Ecke:<br />
| |
| x<sub>1</sub>=<input name="edit_x1" type="text" size="5" maxlength="5" value="89">
| |
| y<sub>1</sub>=<input name="edit_y1" type="text" size="5" maxlength="5" value="80">
| |
| <p>
| |
| untere rechte Ecke:<br />
| |
| x<sub>2</sub>=<input name="edit_x2" type="text" size="5" maxlength="5" value="101">
| |
| y<sub>2</sub>=<input name="edit_y2" type="text" size="5" maxlength="5" value="89">
| |
| <p>
| |
| Offset: (Verschiebung in x- und y- Richtung, normalerweise (0/0))<br />
| |
| x=<input name="edit_ofs_x" type="text" size="2" maxlength="5" value="0">px,
| |
| y=<input name="edit_ofs_y" type="text" size="2" maxlength="5" value="0">px
| |
| </fieldset>
| |
| <fieldset>
| |
| <legend>Kachelgröße (in Pixeln)</legend>
| |
| Breite=<input name="edit_width" type="text" size="5" maxlength="5" value="15"> Höhe=<input name="edit_height" type="text" size="5" maxlength="5" value="15">
| |
| </fieldset>
| |
| <input type="button" value="Ausrechnen" onclick="main()"><br />
| |
| <textarea cols="140" rows="25" name="Ausgabe"></textarea>
| |
| </form>
| |
|
| |
| </body>
| |
| </html>
| |
| </pre> | | </pre> |