Go to Page... |
|
Thread Tools | Display Modes |
07-25-14, 01:32 PM | #4 |
As far as i know it was made after 5.1 so not that old.
Thank you for the heads up on how to post code properly (i only recently found this forum) I solved some of my initial problems with the addon. 1) i got the color of the enchant and season text changed to green turned out there was a saved variables file also and ONLY changing it both in the lua code and saved variables changed it. 2) I solved the problem with TSM addon by moving the TMS tooltip to a seperate window (option of TSM) Now i just need to solve the problem of the addon removing the large number seperators wich it does everywhere from dmg/healing gold stats ect ect, ill repost the piece of code wich i think it the culprit. Code:
frame:SetScript("OnEvent", function(self, event, ...) if (event == "VARIABLES_LOADED") then self:UnregisterEvent("VARIABLES_LOADED"); self:RegisterEvent("CVAR_UPDATE"); if (GetCVarBool("breakUpLargeNumbers")) then SetCVar("breakUpLargeNumbers", nil); end BetterItemTooltip:OnInitialize(); elseif (event == "CVAR_UPDATE") then if (GetCVarBool("breakUpLargeNumbers")) then SetCVar("breakUpLargeNumbers", nil); end end end); frame:RegisterEvent("VARIABLES_LOADED"); Code:
SLASH_BETTERITEMTOOLTIP1 = "/betteritemtooltip"; SLASH_BETTERITEMTOOLTIP2 = "/bitip"; end function BetterItemTooltip:Print(...) if not (...) then return; end print("|cff4fcfffBetterItemTooltip:|r "..(...)); end local options = {}; SlashCmdList.BETTERITEMTOOLTIP = function(msg) if not msg then return; end wipe(options); for v in gmatch(strlower(msg), "[^ ]+") do options[#options + 1] = v; end if options[1] == "bonuscolor" then if tonumber(options[2]) and tonumber(options[3]) and tonumber(options[4]) then local r, g, b = tonumber(options[2]), tonumber(options[3]), tonumber(options[4]); if r > 1 then r = 1; elseif r < 0 then r = 0; end if g > 1 then g = 1; elseif g < 0 then g = 0; end if b > 1 then b = 1; elseif b < 0 then b = 0; end db.bonusColor[1] = r; db.bonusColor[2] = g; db.bonusColor[3] = b; AvgItemLvl:Print("Bonus Stats Color is now "..format("|cff%02x%02x%02x%s, %s, %s|r", r*255, g*255, b*255, r, g, b)); Code:
elseif options[1] == "on" then db.enable = true; BetterItemTooltip:Print("BetterItemTooltip is now "..(db.enable and "|cff00ff00on|r" or "|cffff0000off|r")); elseif options[1] == "off" then db.enable = false; BetterItemTooltip:Print("BetterItemTooltip is now "..(db.enable and "|cff00ff00on|r" or "|cffff0000off|r")); for _, tooltip in pairs(tooltips) do if _G[tooltip] then tipIsShown = 1; ItemTooltip_OnHide(_G[tooltip]); end end Code:
elseif options[1] == "shortbonus" then db.shortBonus = not db.shortBonus; BetterItemTooltip:Print("Bonus Stats are now using "..(db.shortBonus and "|cff00ff00short|r" or "|cffff0000long|r").." format"); And can i get large number seperation back again. Thanks alot in advance, bas. |
|
WoWInterface » Developer Discussions » Lua/XML Help » Looking for help with modifying code tooltip addon |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Switch to Linear Mode |
Switch to Hybrid Mode |
Threaded Mode |
|
|