Thread Tools Display Modes
08-23-10, 07:37 AM   #1
Marqui
A Murloc Raider
Join Date: Oct 2008
Posts: 5
Clickable Artwork Frame?

Hey,

i wonder if it is possible to make Artwork Frames clickable?
My intention is to add textures to my desktop and open up other addons by clicking these textures, for example by executing /recount or something similar.
  Reply With Quote
08-23-10, 02:16 PM   #2
Unkn
Premium Member
 
Unkn's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 258
Just make them intercept mouseclicks, and obviously assign a OnClick function to them. Something like...


OnClick = function(self, button)
if button == "LeftButton" then
Skada:ToggleWindow()
end
end,
The code in red. This is my Skada panel toggle.

Edited: Just edited to the needed stuffs.
__________________
"I'm very feminine. And I'll beat the crap out of ANYONE who disagrees!"

Last edited by Unkn : 08-25-10 at 08:25 AM.
  Reply With Quote
08-23-10, 08:15 PM   #3
Marqui
A Murloc Raider
Join Date: Oct 2008
Posts: 5
Thank you for your reply but I suppose it's related to Litepanels or something similar.
I was able to set it up in kgpanels without great effort but why use another addon when RDX might have the same function. Currently I do not even know nor see how to intercept mouseclicks on an ArtFrame Type in RDX.
  Reply With Quote
08-23-10, 08:58 PM   #4
Unkn
Premium Member
 
Unkn's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 258
Its probablly something very similar, the OnClick functions are WoW api, not addon specific. The only reason I cited the whole litepanels thing was to show where it went.

I havent used RDX in a while or I'd play with it and find out specifically how you'd do it.
__________________
"I'm very feminine. And I'll beat the crap out of ANYONE who disagrees!"
  Reply With Quote
08-24-10, 12:09 AM   #5
sigg
Featured Artist
 
sigg's Avatar
Featured
Join Date: Aug 2008
Posts: 1,251
Hello,

It is not possible for now, but I can create a atrframe feature for that.

A button where you can assign a script.

Cheers
Sigg
  Reply With Quote
08-24-10, 01:22 PM   #6
sigg
Featured Artist
 
sigg's Avatar
Featured
Join Date: Aug 2008
Posts: 1,251
Put the file Button.lua in RDX\ArtFrames folder.
Modify the file RDX.toc and add the line "ArtFrames\Button.lua"

You can add your script in the button feature like this


Cheers
Sigg
Attached Thumbnails
Click image for larger version

Name:	WoWScrnShot_082410_211319.jpg
Views:	1079
Size:	345.4 KB
ID:	4725  
Attached Files
File Type: lua Button.lua (3.2 KB, 802 views)
  Reply With Quote
08-25-10, 06:25 AM   #7
Marqui
A Murloc Raider
Join Date: Oct 2008
Posts: 5
Added Button.lua to ArtFrames directory and modified the toc file.

Now get following error whenever I try to add a button to a baseframe

Code:
Interface\AddOns\RDX\ArtFrames\Button.lua:16: attempt to call field 'UFFrameCheck_Proto' (a nil value)

Stack trace:
-----------
(tail call): ?
Interface\AddOns\RDX\ObjectMgr\ObjectState.lua:107: in function `InSituState'
Interface\AddOns\RDX\ObjectMgr\FeatureEditor.lua:76: in function <Interface\AddOns\RDX\ObjectMgr\FeatureEditor.lua:59>
Interface\AddOns\RDX\ObjectMgr\FeatureEditor.lua:246: in function `OnDrop'
Interface\AddOns\VFL\UI\DragDrop.lua:48: in function <Interface\AddOns\VFL\UI\DragDrop.lua:40>
  Reply With Quote
08-25-10, 07:27 AM   #8
sigg
Featured Artist
 
sigg's Avatar
Featured
Join Date: Aug 2008
Posts: 1,251
In the toc file, put the line at the end of all others artframes files.

cheers
  Reply With Quote
08-25-10, 08:22 AM   #9
Marqui
A Murloc Raider
Join Date: Oct 2008
Posts: 5
That's what I did I guess

See line 202

  Reply With Quote
08-25-10, 09:17 AM   #10
sigg
Featured Artist
 
sigg's Avatar
Featured
Join Date: Aug 2008
Posts: 1,251
Did you modify any files ? or add some scripts ?
  Reply With Quote
08-25-10, 09:21 AM   #11
sigg
Featured Artist
 
sigg's Avatar
Featured
Join Date: Aug 2008
Posts: 1,251
Arf

I may be found the problem.

Open the button.lua file, replace

local editor = VFLUI.TextEditor:new(ui, "LuaEditBox");

by

local editor = VFLUI.TextEditor:new(ui);

LuaEditBox is only available with 7.5
  Reply With Quote
08-25-10, 09:59 AM   #12
Marqui
A Murloc Raider
Join Date: Oct 2008
Posts: 5
well thank you very much for your help but error is still the same.
Reinstalled latest RDX from scratch to be sure.

Button shows up in the feature editor but when dragged to the right side this error occurs.
  Reply With Quote
08-30-10, 04:35 PM   #13
Dgrimes
A Black Drake
 
Dgrimes's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 89
To fix this go into the Button.lua file and edit these lines from:
Code:
flg = flg and RDXUI.UFFrameCheck_Proto("Button_", desc, state, errs);
flg = flg and RDXUI.UFAnchorCheck(desc.anchor, state, errs);
flg = flg and RDXUI.UFOwnerCheck(desc.owner, state, errs);
To:
Code:
flg = flg and __UFFrameCheck_Proto("Button_", desc, state, errs);
flg = flg and __UFAnchorCheck(desc.anchor, state, errs);
flg = flg and __UFOwnerCheck(desc.owner, state, errs);
They will be near the top of the file.
That will get rid of the error you are experiencing.
__________________
What was is, what will be was.
  Reply With Quote
08-31-10, 04:16 AM   #14
sigg
Featured Artist
 
sigg's Avatar
Featured
Join Date: Aug 2008
Posts: 1,251
Thanks

I didn't see that.

Cheers
  Reply With Quote

WoWInterface » Featured Projects » OpenRDX » OpenRDX Community » OpenRDX: Community Chat » Clickable Artwork Frame?


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