X,Y Coordinates on Map
1 Attachment(s)
Could someone make a simple coordinates lua that displays x,y for cursor and the player on the map?
Preferably to hook onto the part I circled in the picture, written as "Player: X,Y Cursor: X,Y" or something to that effect. No decimals necessary. I know there are a bunch of coordinates addons but all of them that I've found have extra features that I don't want. There's one on this site that does similar to what I want but it doesn't display when the map isn't full screen. The addon that does similiar to what I want is called riffCoords, but it's at the bottom of the map, and only displays when you're full screen. |
Lua Code:
What I use, this adds player (or mouse when hovering the map) position to the left of the close button. |
Hey, thanks man! This is almost exactly what I'm looking for! The adjustment I would want to make is to just move the frame to the center where I circled in the picture and get rid of the "Map and Quest" text. Other than that it's perfect. I like how it shows player position when not hovering instead of making two coordinates for each, that's actually clever.
|
Just have it reuse the existing title fontstring instead of creating a new one. Replace the first two lines with this one:
Code:
local CoordText = WorldMapFrame.BorderFrame.TitleText |
An alternative is this one on Curse which is aptly named Coordinates
|
I'm new in programming, so I might be wrong and my code can be too massy, but i tried to replace OnUpdate with C_Timer.After(0.2seconds,function). And on my PC i got 30% less CPU usage of this feature with 30 FPS capped (i used ChocolateBar+libQtip+BrokerCPU to track performance). i think for players with 60+ FPS the difference in performance will be more significant.
Lua Code:
If you can make my code even run faster and looks better, and point on my mistakes, i will very appreciate it. |
All times are GMT -6. The time now is 04:53 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI