Thread Tools Display Modes
10-28-16, 04:17 AM   #1
gmarco
An Onyxian Warder
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 362
7.1 LUA api changes

Hi all,

a couple of questions if possible:

1) Is there a place where I can check what is changed with the latest patch in the wow api ?

2) I see that a lot of things related to player are now missing, like GetUnitPitch("Player") for example but why remove also thing like:

Lua Code:
  1. SetPadding(num)

Or it is changed and there is a new function for it ?

Really thanks to all.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
  Reply With Quote
10-28-16, 06:29 AM   #2
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
1) There is the (incomplete?) Wowpedia API changes page and diff files
2) Do you mean GameTooltip:SetPadding? It should still be there afaik
  Reply With Quote
10-28-16, 07:01 AM   #3
gmarco
An Onyxian Warder
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 362
Originally Posted by Ketho View Post
2) Do you mean GameTooltip:SetPadding? It should still be there afaik


Hi thanks for your reply,
You are right. It is still there.

But I have this code in an addon:


Lua Code:
  1. local tooltip = CreateFrame("GameTooltip", "gmAchievementsCompareTooltip", UIParent, "GameTooltipTemplate")
  2. tooltip:EnableMouse(true)
  3. tooltip:SetToplevel(true)
  4. tooltip:SetMovable(true)
  5. tooltip:SetFrameStrata("TOOLTIP")
  6. tooltip:Hide()
  7. tooltip:SetSize(128, 64)
  8. tooltip:SetPoint("BOTTOM", 150, 80)
  9. tooltip:SetPadding(16)
  10. tooltip:RegisterForDrag("LeftButton")
  11. tooltip:SetScript("OnDragStart", tooltip.StartMoving)
  12. tooltip:SetScript("OnDragStop", function(self)
  13.     self:StopMovingOrSizing()
  14.     ValidateFramePosition(self)
  15. end)

And it worked since 7.1

Now I get:

8x gmAchievementsCompare\core.lua:13: Usage: gmAchievementsCompareTooltip:SetPadding(width, height)
[C]:: in function 'SetPadding' gmAchievementsCompare\core.lua:13: in main chun
Only today I realize that now it wants 2 params not 1.

So I changed this to:
Lua Code:
  1. tooltip:SetPadding(16,0)
and everything is fine.

Sperem ...
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
  Reply With Quote
10-28-16, 07:03 AM   #4
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
Oh you're right, it was idd changed to accept 2 parameters now :s
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » 7.1 LUA api changes

Thread Tools
Display Modes

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