|
|
#21 |
|
Legendary Member
Join Date: May 2006
Location: Arizona
Posts: 3,379
|
Torhal, while those perticular scripts may only be used for highlights and beggener tooltips, those perticualr frames are created by blizzard and are secure. Setting a insecure script, IMO, shouse be avoided. A secure hook might be better.
__________________
Author of GuildCraft, SickOfClickingDailies, and CursorCooldown "I was there in the beginning... and things were very different back then" --An Echo from a time before. |
|
|
|
|
|
#22 |
|
Moderator
|
You can't un-hook secure hooks, which is why it was done that way. If this becomes an issue, I have a way of handling it so that it no longer is.
![]() I'll just have to finish getting Revelation working without Dewdrop, and see if I have issues with taint or blocked actions from CastSpellByName() and such.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes". Author of Revelation, Volumizer, and many other AddOns. |
|
|
|
|
|
#23 |
|
Asian Sheep Lover
Join Date: Aug 2007
Location: Singapore
Posts: 3,420
|
Hi Torhal, your method is too complicated. There is a much simpler method to display tooltips regardless of whether the Beginner Tooltips option is turned on or off.
Here's how. Step 1: Securehook the function GameTooltip_AddNewbieTip(frame, normalText, r, g, b, newbieText, noNormalText) PHP Code:
If you looked in WoWEquip's code, you'll see that the menuitems in question has .keepShownOnClick = true, and the menu is only forcefully closed on a normal click, and kept open on a Shift or Ctrl-click which does different things. The beauty of this hook is that it really is just about 5 lines of code without all the extra if-then-else logic for checking if the number I passed in is positive or negative. In the simplest use-case, you can just have PHP Code:
Now compare my simple 5 line function hook which is safe, compared to your 60 line behemoth mess of hooks which may or may not have unknown tainting side-effects, you'll probably want to rewrite all of your code. ![]() Step 2: In your info[] table when passing to UIDropDownMenu_AddButton(), simply include info.tooltipTitle and info.tooltipText. For example: PHP Code:
GameTooltip_AddNewbieTip() is called whenever your mouse enters a UIDropDownMenuButton, regardless of whether newbie tooltips are on or off. Because our securehooked function runs after Blizzard's one, it overwrites the GameTooltip that Blizzard created with normalText and newbieText in it.
__________________
Author/Maintainer of Postal, Omen3, GemHelper, BankItems, WoWEquip, GatherMate, Routes, HandyNotes and some others. Last edited by Xinhuan; 10-09-2009 at 10:08 AM. |
|
|
|
|
|
#24 |
|
Moderator
|
Much, much simpler. I'll adjust accordingly.
![]()
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes". Author of Revelation, Volumizer, and many other AddOns. |
|
|
|
|
|
#25 |
|
Member
Join Date: Mar 2008
Posts: 12
|
I'm not really sure if this is the right place to post this but this guide while teaching me some I'm still lost as to what is happening in this addon.
I took over a bag addon because it was dying out and it was the bag addon I have used since Vanilla and I couldn't continue without it. So I started cleaning it up to be more up to date code wise. The problem I'm coming up with is the Submenus 2 and 3 from the context menu. When you control right click I get my context menu and it works perfect. When you mouse over the arrow to open the sub menu it shows up as it should. When you move the mouse across the category and into the next sub menu the menu vanishes. It's very buggy if you move the mouse really fast or back and forth sometimes you can get the 2nd and 3rd sub menus to stay visible but in most cases they just vanish and you can't just have to keep moving the mouse back over the arrow to bring then back. I have read through this tutorial 100% and I can't find anything that would cause this or allow it. So if anyone can point me into a direction as to what I can look for I would really appreciate it. I'm pretty new to coding I dabble in it so I don't know all of it but I am learning more about it. I can post parts of the code if there is something that would be helpful to determine it. |
|
|
|
|
|
#26 |
|
Asian Sheep Lover
Join Date: Aug 2007
Location: Singapore
Posts: 3,420
|
Hi Requital, read the reply I have posted in your other thread on this issue.
(And use that thread.)
__________________
Author/Maintainer of Postal, Omen3, GemHelper, BankItems, WoWEquip, GatherMate, Routes, HandyNotes and some others. |
|
|
|
|
|
#27 |
|
Member
Join Date: Mar 2008
Posts: 12
|
Man you are everywhere, I guess I kinda forgot the sites were linked these days but will do thank you again.
|
|
|
|
![]() |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|
All times are GMT. The time now is 09:11 AM.
WowAce Forums







