Nice, but I have one complaint, when using Quick Loot, sometimes the frame would go off the screen if my mouse was too close to the edge, and it became a real problem on my rogue when he tried to pick-pockect. Did you fix this problem?
Cool, Neriak. There were always some improvements I wanted on Telo's, like fixing the problem Random mentioned. You might fix this a couple of ways. First, take a look at Tipster and the code that makes sure the tooltip doesn't go offscreen. You might apply that. Option two, make the loot frame movable somehow. I'm not sure that anything in 1.7 was provided to make a fixed position frame like this draggable, but you could either apply a transparent button on the title bar that would allow dragging, or you could create your own draggable frame and use SetParent(). That may work. If you're interested, let me know and I can explain some more if you need me to.
Browsing through the code real quick, I noticed you can delete the following line:
oldLootFrame_Update = LootFrame_Update
Then in ItemUnderCursor, replace oldLootFrame_Update() with:
self:CallHook("LootFrame_Update")
<EDIT>
Oh, I was going to mention that after the patch (presumably tomorrow) you can eliminate that xml file altogether.
I've always wondered how this type of addon is useful. Why not just shift-right-click? Still, nice job I guess.
Because you can't see what you are looting by this way. Also do this on a raid and you soon will be alone in the big world of WoW ;)
I always look through the items before I loot them.
Nice, but I have one complaint, when using Quick Loot, sometimes the frame would go off the screen if my mouse was too close to the edge, and it became a real problem on my rogue when he tried to pick-pockect. Did you fix this problem?
Neriak is also a rogue, Troll of course ;) I'm afraid I didn't fix this yet, but I know of that problem Now that you've complained about it I remember. If i can fix it I'll do so, sure thing.
Option two, make the loot frame movable somehow. I'm not sure that anything in 1.7 was provided to make a fixed position frame like this draggable, but you could either apply a transparent button on the title bar that would allow dragging, or you could create your own draggable frame and use SetParent().
But this would also mean I had to use xml-code for my frame, right ? That's something I wouldn't like to do, because I love the possibility to get rid of the whole xml-file. I have to take a look at how Tipster is handling the Tooltips, I've already used Tipster but didn't look over the code yet
Browsing through the code real quick, I noticed you can delete the following line:
oldLootFrame_Update = LootFrame_Update
Then in ItemUnderCursor, replace oldLootFrame_Update() with:
self:CallHook("LootFrame_Update")
Ahhh .. that's what it's doing. I tried to comment this out before, but the result was ending in a catastrophe *g* Though I can't see why, regarding your description in the manual it's releasing the hook so other addons could hook it. I don't have any other addon's that would make use of the LootFrame_Update. Or does eg. Onebag need control ove tit? Doh, I think now I've understood it. I hook the function, and when my code bit is done, I release it since I've got no more use for it. So simple said this is a temporary replacement. (Sorry I didn't exactly know what a 'hook' would be.) Correct me if i'm wrong , tho.
<EDIT>
Oh, I was going to mention that after the patch (presumably tomorrow) you can eliminate that xml file altogether.
Keeping the frame from going off screen could possibly be a haslte. I've always had problems with the GetLeft,GetTop, GetHeight, and GetWidth functions which i think would be required for this. But if they ever work like they're supposed to... heh.
Also, making the frame movable isn't that big of a deal anymore with 1.7, you don't need to add any XML. You just need to add a OnMouseDown, OnMouseUp event, and and it should be pretty easy to call frame:StartMoving(), frame:StopMovingOrSizing()
Excellent. Thanks, Ramble. Just remember that you maybe also need to call EnableMouse(true) on the frame.
The off-screen stuff is a pain, but I managed it in Tipster. The same technique should apply. The problem I discovered in Tipster is that you have to wait until after the dialog is displayed, so you either need to hook an OnShow or come up with some other way to reposition it after the display has finished. In Tipster I used an OnUpdate to create a pause, but now I should be able to hook the tooltip's OnShow.
Right, that's the annoyance I've found with it: You can't do
frame:Show()
local top,left = frame:GetTop(), frame:GetLeft()
local height, width = frame:GetHeight(), frame:GetWidth()
if the frame wasn't visible before this function called, because sometimes some of those values would not return correctly. If you look at my "SetAnchor" code in MyBags, I'm doing some tricky things to make sure the frame always grows from a specific corner (when scaling, or changing size).
I think I'll wait till the patch is out, it would be stupid to bloat the code with a workaround of what could easily be made with l33tness from 1.7 ;)
Anyway ... small update, added the self:CallHook Turan advised.
If you fix it so the window goes off screen, there won't be any need to make it draggable.
I guess Rowne will come out with some mega-update of Visor one day, so making it draggable would be pretty unnecessary. Also there are enough addons that do this, you know the big bloat :P
One thing that would be kind of important to me is that the LootFrame would be on top of all. So if someone had Side-Bars it wouldn't become covered by that.
Personally I would like to have the Mouse Cursor set next to my character on self:RegisterEvent("LOOT_OPENED"). How would that be ?
I think I'll wait till the patch is out, it would be stupid to bloat the code with a workaround of what could easily be made with l33tness from 1.7 ;)
Anyway ... small update, added the self:CallHook Turan advised.
1.7 is out, and I like the idea about always having the loot fr.ame ontop.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Wiki
FruityLoots
Browsing through the code real quick, I noticed you can delete the following line:
Then in ItemUnderCursor, replace oldLootFrame_Update() with:
<EDIT>
Oh, I was going to mention that after the patch (presumably tomorrow) you can eliminate that xml file altogether.
Because you can't see what you are looting by this way. Also do this on a raid and you soon will be alone in the big world of WoW ;)
I always look through the items before I loot them.
Neriak is also a rogue, Troll of course ;) I'm afraid I didn't fix this yet, but I know of that problem Now that you've complained about it I remember. If i can fix it I'll do so, sure thing.
My first thoughts?
Holy crap!
Following that?
How'd he pull that off?
Seriously, you have optimization here of Timex degrees.
I need to fully read this to understand how you've managed to make it so small compared to Telo's bloatfest but damn Neriak, that's compressed code.
< Edit >
Also. *Boggle.*
Well done, seriously.
/bow :)
I'll most-likely add the auto-fix for offscreen-positioning and stuff. But it won't get bloated, no worries ;)
Also, making the frame movable isn't that big of a deal anymore with 1.7, you don't need to add any XML. You just need to add a OnMouseDown, OnMouseUp event, and and it should be pretty easy to call frame:StartMoving(), frame:StopMovingOrSizing()
The off-screen stuff is a pain, but I managed it in Tipster. The same technique should apply. The problem I discovered in Tipster is that you have to wait until after the dialog is displayed, so you either need to hook an OnShow or come up with some other way to reposition it after the display has finished. In Tipster I used an OnUpdate to create a pause, but now I should be able to hook the tooltip's OnShow.
if the frame wasn't visible before this function called, because sometimes some of those values would not return correctly. If you look at my "SetAnchor" code in MyBags, I'm doing some tricky things to make sure the frame always grows from a specific corner (when scaling, or changing size).
Anyway ... small update, added the self:CallHook Turan advised.
I guess Rowne will come out with some mega-update of Visor one day, so making it draggable would be pretty unnecessary. Also there are enough addons that do this, you know the big bloat :P
One thing that would be kind of important to me is that the LootFrame would be on top of all. So if someone had Side-Bars it wouldn't become covered by that.
Personally I would like to have the Mouse Cursor set next to my character on self:RegisterEvent("LOOT_OPENED"). How would that be ?
1.7 is out, and I like the idea about always having the loot fr.ame ontop.