Mudanças entre as edições de "Predefinição:NaviLink"

De History Reborn Wiki
Ir para navegação Ir para pesquisar
Etiqueta: Reversão manual
 
(138 revisões intermediárias pelo mesmo usuário não estão sendo mostradas)
Linha 1: Linha 1:
<includeonly>{{ | {{{prefix}}} }}<div class="navi-copy"><span>{{{1}}}</span><span>{{{2}}}</span><span>{{{3}}}</span></div>{{ #if:{{{postfix|}}} | {{{postfix}}} }}</includeonly><noinclude>__NOTOC__
<includeonly><span class="naviText" data-map="{{{map}}}" data-x="{{{x|}}}" data-y="{{{y|}}}">{{{text|({{{map}}})}}}</span><span class="naviCopied">Copiado!</span></includeonly><noinclude>
== Description ==
The purpose of this template is to turn a set of coordinates into a copyable link for use with the in-game syntax.


Acredito que o problema seja pq no css não existe a class:"navi-copy" que implementa o seguinte contexto:
NaviLink is used to automatically copy the navi command with the map name and its coordinates when the text is clicked.
== Syntax ==


Testando com o Dudé a nova versão do encode.
<code><nowiki>{{NaviLink|map=|x=|y=|text=}}</nowiki></code>


<div class="navi-copy"><div class="navi-copy-text" onclick="CopyNaviLink(this, 'mora','120','212');">(mora 120, 212)</div><div class="navi-copied" style="display:none;">Copiada realizada..!</div></div>
; Parameters
{{NaviLink|mora|120|212}}
; map : The name of the map, it's the name that is involved in parenthesis.
{{NaviLink|moc_para01|133|170}}
; x : The '''X''' coordinate, it's the first coordinate you get when using <code>/where</code>.
; y : The '''Y''' coordinate, it's the second coordinate you get when using <code>/where</code>.
; text : Optional. Text to show instead of the default text <code>(<map> <x>,<y>)</code>.


==Usage==
To get the name of the map and the coordinates you can use <code>/where</code> inside a map.
<pre>{{Navi|MapName|X|Y}}</pre>
* '''MapName''' is the map to be used.
* '''X''' is the X coordinate.
* '''Y''' is the Y coordinate.


=== Example ===
== Example ==
{|class=wikitable
Let's use an example of Abyss Lake, typing <code>/where</code> there we get:
! Code Used
 
|-
[[File:Where-example.png]]
|<code>Visit the mora npc <nowiki>{{NaviLink|mora|120|212}} and select the first dialogue option.</nowiki></code>
 
|-
The name of the map is '''abyss_01''', the X coordinate is '''261''' and the Y coordinate is '''272'''.
! Result
 
|-
With all the data in our hands, using <code><nowiki>{{NaviLink|map=abyss_01|x=261|y=272}}</nowiki></code> will result into: {{NaviLink|map=abyss_01|x=261|y=272}}.
| Visit the mora npc {{NaviLink|mora|120|212}} and select the first dialogue option.
 
|}
You can also use the template without an X, Y. <code><nowiki>{{NaviLink|map=abyss_01}}</nowiki></code> will look like this: {{NaviLink|map=abyss_01}}.
[[Categoria:Predefinições]]</noinclude>
 
Alternatively, using <code><nowiki>{{NaviLink|map=abyss_01|x=261|y=272|text=somewhere in Abyss Lake 1F}}</nowiki></code> will result into: {{NaviLink|map=abyss_01|x=261|y=272|text=somewhere in Abyss Lake 1F}}.
 
Clicking the text will copy the navi command into the clipboard, which can then be pasted using <code>CTRL+V</code> in game.
</noinclude>

Edição atual tal como às 22h04min de 18 de abril de 2022


NaviLink is used to automatically copy the navi command with the map name and its coordinates when the text is clicked.

Syntax

{{NaviLink|map=|x=|y=|text=}}

Parameters
map
The name of the map, it's the name that is involved in parenthesis.
x
The X coordinate, it's the first coordinate you get when using /where.
y
The Y coordinate, it's the second coordinate you get when using /where.
text
Optional. Text to show instead of the default text (<map> <x>,<y>).

To get the name of the map and the coordinates you can use /where inside a map.

Example

Let's use an example of Abyss Lake, typing /where there we get:

Arquivo:Where-example.png

The name of the map is abyss_01, the X coordinate is 261 and the Y coordinate is 272.

With all the data in our hands, using {{NaviLink|map=abyss_01|x=261|y=272}} will result into: (abyss_01)Copiado!.

You can also use the template without an X, Y. {{NaviLink|map=abyss_01}} will look like this: (abyss_01)Copiado!.

Alternatively, using {{NaviLink|map=abyss_01|x=261|y=272|text=somewhere in Abyss Lake 1F}} will result into: somewhere in Abyss Lake 1FCopiado!.

Clicking the text will copy the navi command into the clipboard, which can then be pasted using CTRL+V in game.