View Single Post
06-14-05, 08:56 AM   #2
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
You can use SetWidth or SetHeight to change the dimensions of a frame as long as it has a name. But this won't change any artwork.

You can force the artwork to stretch by setting anchors as long as the texture has a name, to cover the extra distance. But it may look odd if the UI is placing stuff ontop of stretched artwork that's now out of place.

As an example try this in game and you should see what you can do:

/script AuctionFrame:SetHeight(AuctionFrame:GetHeight() + 100)
/script AuctionFrameBotLeft:SetPoint("BOTTOMLEFT","AuctionFrame","BOTTOMLEFT")
/script AuctionFrameBot:SetPoint("BOTTOM","AuctionFrame,"BOTTOM")
/script AuctionFrameBotRight:SetPoint("BOTTOMRIGHT","AuctionFrame","BOTTOMRIGHT")

The 3 SetPoints are used on named textures in the AH frame.

Textures can have multiple anchors. In the AH all textures appear to be anchored to topleft and drawn with an offset from the topleft. Adding a "BOTTOMRIGHT" anchor to AuctionFrameBotRight will still keep the topleft anchor, but it will add a bottomright anchor that will stretch the texture.

You can copy the FrameXML file but don't ever post it someplace for distribution if you do. Mods that alter FrameXML tend to break very fast and are wisely unused by most.

If you want to change AuctionFrameTab_OnClick() you can write your own to use instead. In your mod's OnLoad:

AuctionFrameTab_OnClick = my_AuctionFrameTab_OnClick

then later in your lua:

function my_AuctionFrameTab_OnClick(index)
-- copy/paste the FrameXML's version and make your changes here
end

the game will now use your version instead of the default.

Last edited by Gello : 06-14-05 at 09:01 AM.
  Reply With Quote