Difference between revisions of "User talk:Quinn"
m |
|||
Line 11: | Line 11: | ||
[[User:Sarevok|Sarevok]] ([[User talk:Sarevok|talk]]) 08:55, 20 February 2013 (CET) | [[User:Sarevok|Sarevok]] ([[User talk:Sarevok|talk]]) 08:55, 20 February 2013 (CET) | ||
:How does it work? [[User:Quinn|<span style="font-family:Ar Destine;"><span style="font-size:1.9em; color:#5d0505;">Q</span>uinn</span>]] <sup>([[Special:EmailUser/Quinn|✉]] • [[Special:Contributions/Quinn|✐]] • [[User talk:Quinn|✍]])</sup> 15:39, 20 February 2013 (CET) | :How does it work? [[User:Quinn|<span style="font-family:Ar Destine;"><span style="font-size:1.9em; color:#5d0505;">Q</span>uinn</span>]] <sup>([[Special:EmailUser/Quinn|✉]] • [[Special:Contributions/Quinn|✐]] • [[User talk:Quinn|✍]])</sup> 15:39, 20 February 2013 (CET) | ||
+ | |||
+ | |||
+ | :U have universal standard function in javascript | ||
+ | <pre> | ||
+ | function pozice(width, height, object) { | ||
+ | var x=Math.round(event.offsetX.valueOf()*width.valueOf()/(object.width.valueOf()-1)); | ||
+ | var y=Math.round(event.offsetY.valueOf()*height.valueOf()/(object.height.valueOf()-1)); | ||
+ | object.title=x+', '+y; | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | To picture u add it throught action onmove | ||
+ | <pre> | ||
+ | <img src="mapa.png" alt="obrazek" onmousemove="pozice(800, 600, this)" /> | ||
+ | </pre> | ||
+ | |||
+ | This function has 3 variables, first is width, second height, third is standard pointer to object. So u as user edit only first two. In its simplest terms u put to this function coords from right bottom corner. After it when u will have mouse on picture of map, it will write u correctly ingame coords on every point of this map. It counts it from the width and height (right bottom coord). | ||
+ | |||
+ | |||
+ | ACESSKEY is good thing too, u can add to object key from keyboard, for example, to link of monster u can add acesskey="m" and when u push alt+m, u go to this link without searching on the site => its really comfortable for better users. |
Revision as of 16:46, 20 February 2013
Hi,
Could u delete my pages Template:ForLoop and Template:ForLoopHelper ? It was test, i want to simulate for loop, but its impossible :( . In theoretical base its possible, but wiki blocks it... Thank u :) // Sarevok (talk) 20:03, 7 February 2013 (CET)
Hello,
I finished a locator for maps, if u want it, u can copy from my page http://myspace.aspone.cz/js.htm , its a simply js function - will be good for maps as red forest, when friends go on metins. Did u think about ACESSKEYS? :)
Sarevok (talk) 08:55, 20 February 2013 (CET)
- U have universal standard function in javascript
function pozice(width, height, object) { var x=Math.round(event.offsetX.valueOf()*width.valueOf()/(object.width.valueOf()-1)); var y=Math.round(event.offsetY.valueOf()*height.valueOf()/(object.height.valueOf()-1)); object.title=x+', '+y; }
To picture u add it throught action onmove
<img src="mapa.png" alt="obrazek" onmousemove="pozice(800, 600, this)" />
This function has 3 variables, first is width, second height, third is standard pointer to object. So u as user edit only first two. In its simplest terms u put to this function coords from right bottom corner. After it when u will have mouse on picture of map, it will write u correctly ingame coords on every point of this map. It counts it from the width and height (right bottom coord).
ACESSKEY is good thing too, u can add to object key from keyboard, for example, to link of monster u can add acesskey="m" and when u push alt+m, u go to this link without searching on the site => its really comfortable for better users.