Thread Tools Display Modes
01-16-14, 03:14 PM   #1
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 275
Issue with SetHeight on GameMenuFrame

Hi again

Quick-ish question..
I was wondering why a SetHeight method would not take affect on GameMenuFrame (where the Logout button is and others):

Lua Code:
  1. local menu = _G["GameMenuFrame"]
  2. menu:SetHeight(menu:GetHeight() + 100)

I want to increase the size of that frame however it only works if I use it like the command below for example:
Lua Code:
  1. /run GameMenuFrame:SetHeight(340)

I thought maybe a blizzard function is blocking this but cannot find it. Also tried HookScript on the OnLoad handler but that did nothing so I'm out of ideas. Is this possible?

If you are wondering why I want to do this it is because I am trying to "skin" the GameMenuFrame using this:

Lua Code:
  1. local menu = _G["GameMenuFrame"]
  2. menu:SetBackdrop(nil)
  3. menu:SetBackdrop(Artwork_Import.ScaleBox)
  4. menu:SetBackdropBorderColor(0,0,0,0.7)
  5. menu:SetFrameStrata("TOOLTIP")
  6. menu:SetFrameLevel("20")
  7. menu:SetHeight(menu:GetHeight() + 100) -- Does not work

Thank you for reading
  Reply With Quote
01-16-14, 03:45 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
If you're just doing SetHeight once when your addon loads, it's overwritten later by Blizzard code; you need to hook/replace the GameMenuFrame_UpdateVisibleButtons function.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
01-16-14, 04:23 PM   #3
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 275
Originally Posted by Phanx View Post
If you're just doing SetHeight once when your addon loads, it's overwritten later by Blizzard code; you need to hook/replace the GameMenuFrame_UpdateVisibleButtons function.
Thank you Phanx, I was looking in there, not sure how I missed that
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Issue with SetHeight on GameMenuFrame


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