Thread Tools Display Modes
02-18-12, 12:13 AM   #1
unlimit
Lookin' Good
 
unlimit's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 484
Anchoring a foreign object to an RDX object.

Is there anyway to anchor a seperate addon, such as one using:

lua Code:
  1. -- list of positions that the tracker can be in. first is the default, other ones are cycled through by right-clicking the minimize button
  2. local positionPresets = {
  3.     { "TOPRIGHT", "UIParent", "TOPRIGHT", -15, -250 },
  4.     { "TOPRIGHT", "UIParent", "TOPRIGHT", -15, -250 },
  5. }

to an RDX object? I would like the frame - atleast for me - to ALWAYS be on the left of one of my vertical action bars.
__________________


kúdan: im playing pantheon
JRCapablanca: no youre not
** Pantheon has been Banned. **
  Reply With Quote
02-18-12, 03:50 AM   #2
sigg
Featured Artist
 
sigg's Avatar
Featured
Join Date: Aug 2008
Posts: 1,251
If you can wait for the next major version 8.3

__________________
RDX manager
Sigg
  Reply With Quote
02-18-12, 12:41 PM   #3
unlimit
Lookin' Good
 
unlimit's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 484
I can wait.
__________________


kúdan: im playing pantheon
JRCapablanca: no youre not
** Pantheon has been Banned. **
  Reply With Quote
02-26-12, 06:06 AM   #4
unlimit
Lookin' Good
 
unlimit's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 484
I know you're going to get too this for the next version of RDX, but out of curiosity, how hard would it be to do? It would require assigning a static frame name or something? o,.,o
__________________


kúdan: im playing pantheon
JRCapablanca: no youre not
** Pantheon has been Banned. **
  Reply With Quote
02-26-12, 06:59 AM   #5
sigg
Featured Artist
 
sigg's Avatar
Featured
Join Date: Aug 2008
Posts: 1,251
In fact this feature was already builtin.

You have to use the following register function:
name: is the id
Open: Aquired the frame that need to be layout by RDX.
Close: How to close your frame.
IsOpen: if your frame is already opened.

Code:
RDXDK.RegisterWindowLess({
	name = "desktop_bossmod",
	Open = function(id)
		local a = RDX.GetEncounterPane(); 
		if a then a:Show(); end
		return a;
	end,
	Close = function(id, frame)
		RDX.ReleaseEncounterPane();
		return true;
	end,
	IsOpen = function()
		return RDX.IsEncounterPaneShow1();
	end,
	Description = "Bossmod",
	Rebuild = function(id, frame)
		return true;
	end,
	Props = function(mnu, id, frame)
		table.insert(mnu, {
			text = VFLI.i18n("Rebuild"),
			OnClick = function()
				VFL.poptree:Release();
				local cls = RDXDK.GetWindowLess(frame._dk_name);
				if cls then
					cls.Rebuild(id, frame);
				end
			end
		});
	end
});
To open the windows less list:
/script RDXDK.ToggleWindowLessList()

I will modify the desktop tool to integrate this list.

Cheers

Sigg
__________________
RDX manager
Sigg
  Reply With Quote
02-26-12, 08:28 PM   #6
unlimit
Lookin' Good
 
unlimit's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 484
The desktop itself already seems to integrate this, which is awesome! And yeah, having it integrate into the desktop manager list would be pretty nifty too.

So, using the code below I seem to achieve what I'm after... However, I don't think it's entirely correct. It serves it's purpose, but when I go to close the frame it doesn't hide it... and the frame is only able to be docked, not moveable. When you try to move it if it isn't docked it will throw an error. Right clicking on it while it is undocked also throws an error:

Code:
Interface\AddOns\RDX\DesktopMgr\FrameProps.lua:46: attempt to index local 'feat' (a nil value)

Stack trace:
-----------
Interface\AddOns\RDX\DesktopMgr\FrameProps.lua:46: in function `FrameProperties'
Interface\AddOns\RDX\DesktopMgr\ManagedFrame.lua:155: in function <Interface\AddOns\RDX\DesktopMgr\ManagedFrame.lua:147>
Code:
Interface\AddOns\RDX\DesktopMgr\ManagedFrame.lua:34: Frame QuestKing_Tracker is not movable

Stack trace:
-----------
[C]: in function `StartMoving'
Interface\AddOns\RDX\DesktopMgr\ManagedFrame.lua:34: in function `WMDrag'
Interface\AddOns\RDX\DesktopMgr\ManagedFrame.lua:145: in function <Interface\AddOns\RDX\DesktopMgr\ManagedFrame.lua:141>
lua Code:
  1. RDXDK.RegisterWindowLess({
  2.     name = "desktop_questking",
  3.     Open = function(id)
  4.         local a = QuestKing_Tracker;
  5.         if a then a:Show(); end
  6.         return a;
  7.     end,
  8.     Close = function(id, frame)
  9.         local a = QuestKing_Tracker;
  10.         if a then a:Hide(); end
  11.         return true;
  12.     end,
  13.     IsOpen = function()
  14.         local a = QuestKing_Tracker;
  15.         if a:Show() == true then
  16.             return true;
  17.         else
  18.             return false;
  19.         end
  20.     end,
  21.     Description = "QuestKing",
  22.     Rebuild = function(id, frame)
  23.         return true;
  24.     end,
  25.     Props = function(mnu, id, frame)
  26.         table.insert(mnu, {
  27.             text = VFLI.i18n("Rebuild"),
  28.             OnClick = function()
  29.                 VFL.poptree:Release();
  30.                 local cls = RDXDK.GetWindowLess(frame._dk_name);
  31.                 if cls then
  32.                     cls.Rebuild(id, frame);
  33.                 end
  34.             end
  35.         });
  36.     end
  37. });


__________________


kúdan: im playing pantheon
JRCapablanca: no youre not
** Pantheon has been Banned. **

Last edited by unlimit : 02-26-12 at 09:38 PM.
  Reply With Quote
02-29-12, 07:25 AM   #7
sigg
Featured Artist
 
sigg's Avatar
Featured
Join Date: Aug 2008
Posts: 1,251
KingQuest integration is enabled in 8.3.0 alpha
__________________
RDX manager
Sigg
  Reply With Quote

WoWInterface » Featured Projects » OpenRDX » OpenRDX Community » OpenRDX: Community Chat » Anchoring a foreign object to an RDX object.


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off