Download
(6 Kb)
Download
Updated: 11-04-12 03:23 PM
Pictures
File Info
Updated:11-04-12 03:23 PM
Created:10-16-12 01:52 AM
Downloads:903
Favorites:5
MD5:
Gadgets Distance
Version: 1.11r2
by: adelea [More]
This is a modified version of the RangeFinder gadget that is supplied as part of the baseline Gadgets.

It is cut down a fair bit, so that it only displays the range to the selected target, but it is configurable as to which target you want the range to

Target
Target.Target
Focus
Focus.Target

Group01 - Group20

Can specify fontcolor/fontsize for each seperate gadget.

Has an option to override selected color if distance > 50m (will go red). This is useful for seeing if people are out of range of guild res. perk


Thanks to Wildtide for Gadgets, and for allowing me to post this derivative work of one of his gadgets.
1.11r2:
+ Lowered the strata to hud

1.11r1:
- Expanded range of unit that can be tracked by group01-group20
- Added fontsize/fontcolor config options
- Added fontcolor override for distance >50m (useful for guild res. perk)
Optional Files (1)
File Name
Version
Size
Author
Date
Type
1.11r3a
2kB
11-07-12 04:41 AM
Patch


Archived Files (3)
File Name
Version
Size
Author
Date
1.11r1
6kB
adelea
11-03-12 06:31 AM
1.10r1
6kB
adelea
10-16-12 01:52 AM
0B
adelea
01-01-70 12:00 AM


Post A Reply Comment Options
Unread 11-06-12, 02:00 PM  
Nerva3x0
 
Nerva3x0's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 18
Uploads: 1
Since the latest update I can no longer put the distance gadget over top of the various player frames. I know there was an issue with things overlapping native UI elements and so on, but Is this a functionality that will not be possible at all anymore?
Nerva3x0 is offline Report comment to moderator  
Reply With Quote
Unread 11-06-12, 04:20 PM  
adelea
Claw of Regulos
AddOn Author - Click to view AddOns

Forum posts: 22
File comments: 285
Uploads: 6
Quote:
Originally Posted by Nerva3x0
Since the latest update I can no longer put the distance gadget over top of the various player frames. I know there was an issue with things overlapping native UI elements and so on, but Is this a functionality that will not be possible at all anymore?
What exactly do they not go over?
adelea is offline Report comment to moderator  
Reply With Quote
Unread 11-06-12, 09:49 PM  
Nerva3x0
 
Nerva3x0's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 18
Uploads: 1
Quote:
Originally Posted by adelea
Quote:
Originally Posted by Nerva3x0
Since the latest update I can no longer put the distance gadget over top of the various player frames. I know there was an issue with things overlapping native UI elements and so on, but Is this a functionality that will not be possible at all anymore?
What exactly do they not go over?
Any other gadget
Nerva3x0 is offline Report comment to moderator  
Reply With Quote
Unread 11-07-12, 02:24 AM  
adelea
Claw of Regulos
AddOn Author - Click to view AddOns

Forum posts: 22
File comments: 285
Uploads: 6
Quote:
Originally Posted by Nerva3x0
Quote:
Originally Posted by adelea
Quote:
Originally Posted by Nerva3x0
Since the latest update I can no longer put the distance gadget over top of the various player frames. I know there was an issue with things overlapping native UI elements and so on, but Is this a functionality that will not be possible at all anymore?
What exactly do they not go over?
Any other gadget
Very odd!

Can you try something, to see if it fixes things?

In Gadget_Distance.lua, at around line 63 you should see:

Code:
local function Create(configuration)
	local rfHeight = 70

	local distance = WT.UnitFrame:Create(configuration.unitSpec)

	distance:GetParent():SetStrata("hud")
	distance:SetWidth(60)
If you change it, so that it looks like:

Code:
local dist_context = nil

local function Create(configuration)
	local rfHeight = 70

	if dist_context == nil then
		dist_context = UI.CreateContext(addon.identifier)
	end
	
	distance:SetParent(dist_context)
	distance:SetWidth(60)
If this works for you, I will push a version out that does this.
adelea is offline Report comment to moderator  
Reply With Quote
Unread 11-07-12, 04:19 AM  
Nerva3x0
 
Nerva3x0's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 18
Uploads: 1
I will when I get a chance was in ID all night after work sorry.
Nerva3x0 is offline Report comment to moderator  
Reply With Quote
Unread 11-07-12, 04:42 AM  
adelea
Claw of Regulos
AddOn Author - Click to view AddOns

Forum posts: 22
File comments: 285
Uploads: 6
Quote:
Originally Posted by Nerva3x0
I will when I get a chance was in ID all night after work sorry.
I've uploaded a modified version of the file - should show up in the Other Files section once approved.

If it works I'll move the changes into a proper release version.
adelea is offline Report comment to moderator  
Reply With Quote
Unread 11-07-12, 02:06 PM  
adelea
Claw of Regulos
AddOn Author - Click to view AddOns

Forum posts: 22
File comments: 285
Uploads: 6
Quote:
Originally Posted by adelea
Quote:
Originally Posted by Nerva3x0
I will when I get a chance was in ID all night after work sorry.
I've uploaded a modified version of the file - should show up in the Other Files section once approved.

If it works I'll move the changes into a proper release version.
Well...

It displays initially and works fine. But when someone dies, they all disappear...
adelea is offline Report comment to moderator  
Reply With Quote
Unread 11-07-12, 03:24 PM  
Nerva3x0
 
Nerva3x0's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 18
Uploads: 1
Yeah, it works fine with the patch. TY!

On a completely unrelated note...is there anyway to have your Currency gadget or MoneyBags to track all currencies or at least just plat on a shard?

Just noticed your 2nd comment on the bug... didn't use it anymore then to load it up and see if it worked.
Last edited by Nerva3x0 : 11-07-12 at 03:26 PM.
Nerva3x0 is offline Report comment to moderator  
Reply With Quote
Unread 11-07-12, 03:47 PM  
adelea
Claw of Regulos
AddOn Author - Click to view AddOns

Forum posts: 22
File comments: 285
Uploads: 6
Quote:
Originally Posted by Nerva3x0
Yeah, it works fine with the patch. TY!

On a completely unrelated note...is there anyway to have your Currency gadget or MoneyBags to track all currencies or at least just plat on a shard?

Just noticed your 2nd comment on the bug... didn't use it anymore then to load it up and see if it worked.
Im going to have to dig much deeper into the range thing.

Im thinking it would just be easier to add the range text directly into the unit frame template!

Regarding tracking across a shard - you want to see total(currencytype) ?

That should be fairly easy to do - though where it would belong, I dont know! I will think on it a bit.
adelea is offline Report comment to moderator  
Reply With Quote
Unread 11-07-12, 07:05 PM  
Nerva3x0
 
Nerva3x0's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 18
Uploads: 1
Quote:
Originally Posted by adelea

Im thinking it would just be easier to add the range text directly into the unit frame template!

Regarding tracking across a shard - you want to see total(currencytype) ?

That should be fairly easy to do - though where it would belong, I dont know! I will think on it a bit.
Yeah I was thinking the same thing about adding it to the template as well.

And on the currency tracking, yeah I would love to have the total of lets say plat for example of all my toons on that shard displayed, instead of just the plat of the current toon im on when using for example Gadgets:Currency. It would be even better to see a break down of what toon has how much of each currency when you mouse over it for example. Either way It would be a cool feature imo.

Also on the distance layering bug...when I reload the UI it goes back underneath any other gadget. May help figure it out idk. TY for taking the time to help though.
Nerva3x0 is offline Report comment to moderator  
Reply With Quote
Unread 11-08-12, 03:04 AM  
adelea
Claw of Regulos
AddOn Author - Click to view AddOns

Forum posts: 22
File comments: 285
Uploads: 6
Quote:
Originally Posted by Nerva3x0
Quote:
Originally Posted by adelea

Im thinking it would just be easier to add the range text directly into the unit frame template!

Regarding tracking across a shard - you want to see total(currencytype) ?

That should be fairly easy to do - though where it would belong, I dont know! I will think on it a bit.
Yeah I was thinking the same thing about adding it to the template as well.

And on the currency tracking, yeah I would love to have the total of lets say plat for example of all my toons on that shard displayed, instead of just the plat of the current toon im on when using for example Gadgets:Currency. It would be even better to see a break down of what toon has how much of each currency when you mouse over it for example. Either way It would be a cool feature imo.

Also on the distance layering bug...when I reload the UI it goes back underneath any other gadget. May help figure it out idk. TY for taking the time to help though.
Ill try and work out why the range stuff keeps moving, but in the meantime, I added it to my raid frame template.

First up, I needed to create two virtual properties, one to handle text and one to handle range coloring :

Code:
WT.Unit.CreateVirtualProperty("range", { "coord" },
	function(unit)
		if WT.Player.coord and unit.coord then
			local range = WT.Utility.MeasureDistance(
				WT.Player.coord[1], WT.Player.coord[2], WT.Player.coord[3],
				unit.coord[1], unit.coord[2], unit.coord[3])
			return string.format("%.01fm", range)
		else
			return ""
		end
	end)

WT.Unit.CreateVirtualProperty("adeleaRangeColor", { "coord" },
	function(unit)
		if WT.Player.coord and unit.coord then
			local range = WT.Utility.MeasureDistance(
				WT.Player.coord[1], WT.Player.coord[2], WT.Player.coord[3],
				unit.coord[1], unit.coord[2], unit.coord[3])
			if range > 50 then
				return { r=1, g=0, b=0, a=1 }
			else
				return { r=1, g=1, b=1, a=1 }
			end
		else
			return { r=1, g=1, b=1, a=1 }
		end
	end)
Then I added a new block to my RF template:

Code:
			{
				id="txtRange", type="Label", parent="frameBackdrop", layer=30,
				attach = {{ point="TOPLEFT", element="labelName", targetPoint="BOTTOMLEFT", offsetX=0, offsetY=0 }},
				visibilityBinding="name",colorBinding="adeleaRangeColor",
				text="{range}", fontSize=10, color={r=1, g=1, b=1}
			},
In other news, I uploaded a new version of Currency that does cross-shard totals + breakdown on mouseover.
adelea is offline Report comment to moderator  
Reply With Quote
Unread 12-06-12, 01:52 AM  
Strange_d
Zombie

Forum posts: 1
File comments: 16
Uploads: 0
I added the virtual property and the block to my target template and it looks great and works when I target someone but it doesn't seem to update. I have to click on something else then re-target to get the updated distance.

Sometimes it updates correctly for a second or two then stops but I can't figure the trigger.

Did I miss something?
Last edited by Strange_d : 12-06-12 at 01:57 AM.
Strange_d is offline Report comment to moderator  
Reply With Quote
Unread 12-06-12, 04:31 AM  
adelea
Claw of Regulos
AddOn Author - Click to view AddOns

Forum posts: 22
File comments: 285
Uploads: 6
Quote:
Originally Posted by Strange_d
I added the virtual property and the block to my target template and it looks great and works when I target someone but it doesn't seem to update. I have to click on something else then re-target to get the updated distance.

Sometimes it updates correctly for a second or two then stops but I can't figure the trigger.

Did I miss something?
Take a look at my raidframe template:

http://www.exyles.com/template/AdeleaRF.lua

You will also need to setup something that will actually update the distances - so I have an Event.System.Update.Begin handler in there too.
adelea is offline Report comment to moderator  
Reply With Quote
Unread 12-07-12, 12:45 AM  
Strange_d
Zombie

Forum posts: 1
File comments: 16
Uploads: 0
Played with your template for an hour, couldn't get it to work by adding in the code I thought was relevant to my template. My respect for real coders goes up each time I try and tweak someone else's stuff.

I found the range updates just fine as long as the target moves but not when I move.


Any suggestions?
Strange_d is offline Report comment to moderator  
Reply With Quote
Unread 12-07-12, 01:18 AM  
adelea
Claw of Regulos
AddOn Author - Click to view AddOns

Forum posts: 22
File comments: 285
Uploads: 6
Quote:
Originally Posted by Strange_d
Played with your template for an hour, couldn't get it to work by adding in the code I thought was relevant to my template. My respect for real coders goes up each time I try and tweak someone else's stuff.

I found the range updates just fine as long as the target moves but not when I move.


Any suggestions?
What template are you using, I'll see if I can get it to work!
adelea is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: