Could actually be either. You can set an OnEnter(), OnLeave(), and OnMouseDown() for each cell. For a DewDrop replacement, you'd set the OnEnter() of the appropriate cell to create/anchor a frame and so on.
I seem to remember Dewdrop providing some more complex GUI widget type stuff like sliders.
local function Tip_OnMousedown(cell, arg, event)
if arg == "randomArg1" then
print("You clicked the left cell")
elseif arg == "randomArg2" then
print("You clicked the right cell")
end
end
local tip = LibQTipClick:Acquire("myTip",2, "LEFT", "RIGHT")
tip:SetCallback("OnMousedown", Tip_OnMousedown)
tip:AddLine()
tip:SetCell(1,1,"Click Me", LibQTipClick.Provider, "randomArg1")
tip:SetCell(1,2,"Click Me Before !", LibQTipClick.Provider, "randomArg2")
@Torhal: about the library file layout, I would put both LibQTip.lua and LibQTipClick.lua in the same folder and add a lib.xml to load them both at a time. This way people could just references the LibQTipClick-1.0 subfolder and loads LibQTipClick-1.0\lib.xml to have everything loaded as need be without bothering with library dependencies.
Hrm... I'm wondering if we should'nt add a :SetDefaultCellProvider in LibQTip to ease using thing like LibQTipClick.
@Torhal: about the library file layout, I would put both LibQTip.lua and LibQTipClick.lua in the same folder and add a lib.xml to load them both at a time. This way people could just references the LibQTipClick-1.0 subfolder and loads LibQTipClick-1.0\lib.xml to have everything loaded as need be without bothering with library dependencies.
Ah ok. But I see where you are going : LibQTipDialog. After sliders someone will ask for checkboxes, radiobuttons, text fields, etc. I am not sure I want to follow you there...
Just pushed the first beta version. See if things break and give me feedback on what can be improved. I changed the library to reflect the new functionality of LibQTip: It is no longer necessary to explicitly refer to the LibQTipClick cellprovider.
1) How can I know the mouse button that was pressed for the OnMouseDown handler in LibQTipClick, using my own cell provider for LibQTip I get it working using the second argument of OnMouseDown but I'm not sure I know it using LibQTipClick
2) Can I define my own custom cell provider with LibQTipClick that are clickable?
3) Is it possible in LibQTip (and LibQTipClick) to define custom LEFT or RIGHT cellpading (cellpading is the amount of space between the border of the cell and its contents).
1) How can I know the mouse button that was pressed for the OnMouseDown handler in LibQTipClick, using my own cell provider for LibQTip I get it working using the second argument of OnMouseDown but I'm not sure I know it using LibQTipClick
Look at the Getting Started guide for an example of using the callback. I will be re-adding per-cell function assigment (in a more sane manner) as well.
2) Can I define my own custom cell provider with LibQTipClick that are clickable?
Definitely, as LibQTipClick uses LibQTip as a superset. The only thing different is an extra argument for the :SetUpCell() and you'll need to use a new labelprovider as a base:
3) Is it possible in LibQTip (and LibQTipClick) to define custom LEFT or RIGHT cellpading (cellpading is the amount of space between the border of the cell and its contents).
Custom cellpadding was actually something I wanted to put in last night to allow for a uniform highlight when mousing over cells. I ended up playing WoW, though, so it didn't happen yet. :D
Did you change the way LibQTip is embedded in LibQTipCLick or something? Getting this error now:
[2009/02/14 14:14:44-7375-x1]: LibQTipClick-1.0-2:7: Cannot find a library instance of "LibQTip-1.0".
Broker_ChannelWatch-1.9\Libs\LibStub\LibStub.lua:38: in function `GetLibrary'
LibQTipClick-1.0-2:7: in main chunk
---
Never had a problem before. Do I now have to embed LibQTip manually as well now?
The only thing I changed about the way it's embedded is that it is now handled by the packager to automatically grab the latest LibQTip. Otherwise, it's in the same location as it was previously.
I don't know what the hell is going on with the packager, because r30 of LibQTipClick contains LibQTip, as it should. You shouldn't have to explicitly include LibQTip, unless the packager doesn't recursively parse the .pkgmeta of external projects...which seems to be the case.
I just changed the directory structure of LibQTipClick - LibStub is no longer hard-embedded, there is no longer a LibQTipClick-1.0/LibQTipClick-1.0 folder, and there is now a lib.xml which you should include in your addon's TOC to load it.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I seem to remember Dewdrop providing some more complex GUI widget type stuff like sliders.
Then nevermind.
IIRC, Dewdrop makes dropdown menus with submenus from a table looking like an Ace2 option table and Tablet provides a vertical slider.
Here : http://ace.pastey.net/104409
Sample usage :
@Torhal: about the library file layout, I would put both LibQTip.lua and LibQTipClick.lua in the same folder and add a lib.xml to load them both at a time. This way people could just references the LibQTipClick-1.0 subfolder and loads LibQTipClick-1.0\lib.xml to have everything loaded as need be without bothering with library dependencies.
Hrm... I'm wondering if we should'nt add a :SetDefaultCellProvider in LibQTip to ease using thing like LibQTipClick.
function handler(self, event, ... ) end
self_object, event_triggered, ...everything else..
just like blizzard. :D
Done.
Methinks that would be a nice addition. BTW, you're now an Author for LibQTipClick.
No, I mean horizontal sliders as a GUI element for configuring things, not for scrolling a tooltip (although that's useful too).
1) How can I know the mouse button that was pressed for the OnMouseDown handler in LibQTipClick, using my own cell provider for LibQTip I get it working using the second argument of OnMouseDown but I'm not sure I know it using LibQTipClick
2) Can I define my own custom cell provider with LibQTipClick that are clickable?
3) Is it possible in LibQTip (and LibQTipClick) to define custom LEFT or RIGHT cellpading (cellpading is the amount of space between the border of the cell and its contents).
Look at the Getting Started guide for an example of using the callback. I will be re-adding per-cell function assigment (in a more sane manner) as well.
Definitely, as LibQTipClick uses LibQTip as a superset. The only thing different is an extra argument for the :SetUpCell() and you'll need to use a new labelprovider as a base:
Custom cellpadding was actually something I wanted to put in last night to allow for a uniform highlight when mousing over cells. I ended up playing WoW, though, so it didn't happen yet. :D
This keeps happening to me too.
Never had a problem before. Do I now have to embed LibQTip manually as well now?
If I do this I get no version of libqtip found error when loading into wow:
.pkgmeta
embeds
Format of lib directory:
LibQTipClick-1.0
LibQTipClick-1.0.lua
LibQTipClick-1.0.xml
Also tried:
.pkgmeta
embeds
Results in lib directory:
LibQTipClick-1.0
lib.xml
So I have been doing this:
.pkgmeta
and embeds