03-27-06, 08:05 PM | #1 |
API Changes for 1.10
Here is Iriel's collection of the API changes for 1.10, based on the 0.10.0-5195 test realm build. As always it's expected that you read this thread in conjunction with the 1.10 Changes thread. (Originally posted here.)
Frame Method Changes (INCOMPLETE!) * All UI Object shave the following NEW methods objType = LayoutFrame:GetObjectType() - Return the object type for this object (Similar to Frame:GetFrameType() but supports all UI object types) isType = LayoutFrame:IsObjectType("Type") - Return if the object is of the specified type (Similar to Frame:IsFrameType("Type") but supports all UI object types) * New Font object with the following methods: Font:CopyFontObject(otherFont) - Set this Font's attributes to be a copy of the otherFont font object's. Font:GetAlpha() - Return this font's alpha setting. Font:GetFont() - Return the font file, height, and flags for this Font. Font:GetFontObject() - Return the 'parent' Font object, or nil if none. Font:GetJustifyH() - Return Font's horizontal justification. Font:GetJustifyV() - Return Font's vertical justification. Font:GetName() - Return the name of the Font object. Font:GetShadowColor() - Returns the color of this Font's shadow (r,g,b,a). Font:GetShadowOffset() - Returns the Font's shadow offset (x,y). Font:GetSpacing() - Returns the Font's spacing(). Font:GetTextColor() - Returns the Font's color (r,g,b,a) Font:SetAlpha(alpha) - Set the Font's alpha value. Font:SetFont("path", height[, "flags"]) - Sets the font to use, returns 1 if the path was valid, nil otherwise (no change occurs). Font:SetFontObject(fontObject) - Sets the 'parent' Font object. Font:SetJustifyH("justifyH") - Sets horizontal justification ("LEFT","RIGHT", or "CENTER") Font:SetJustifyV("justifyV") - Sets vertical justification ("TOP","BOTTOM", or "MIDDLE") Font:SetShadowColor(r,g,b,a) - Sets the shadow color. Font:SetShadowOffset(x,y) - Sets the shadow offset. Font:SetSpacing(spacing) - Sets the font spacing. Font:SetTextColor(r,g,b,a) - Sets the font's color. * All LayoutFrames have these NEW methods: numPoints = LayoutFrame:GetNumPoints() - Return the number of anchor points for the frame. point, relativeTo, relativePoint, xofs, yofs = LayoutFrame:GetPoint(index) - Return the details of the specified anchor point. * The following methods moved to be supported by all layout frames: bottom = LayoutFrame:GetBottom() - Get the bottom edge of the frame. x,y = LayoutFrame:GetCenter() - Get the center coordinate of the frame. left = LayoutFrame:GetLeft() - Get the left edge of the frame. right = LayoutFrame:GetRight() - Get the right edge of the frame. top = LayoutFrame:GetTop() - Get the top edge of the frame. parent = LayoutFrame:GetParent() - Get the parent for this frame. LayoutFrame:SetParent(parent or "parentName") - Set the parent for this frame. alpha = LayoutFrame:GetAlpha() - Get the alpha level of this frame. LayoutFrame:SetAllPoints(frame or "frameName") - Set all anchors on this frame to match specified frame's edges. * All Regions (Texture, FontString) have these NEW methods layer = Region:GetDrawLayer() - Get the draw layer for the Region. Region:SetDrawLayer("layer") - Set the draw layer for the Region. * Frames (and derivatives) have these NEW methods: fontString = Frame:CreateFontString(["name"[, "layer"]]) - Create a new FontString as a child of this Frame. texture = Frame:Texture(["name"[, "layer"]]) - Create a new Texture as a child of this Frame. numRegions = Frame:GetNumRegions() - Return the number of Regions that are children of this frame. a,b,c,d,... = Frame:GetRegions() - Return the regions of the frame. * FontString now includes the following methods (see Font changes for details): GetAlpha, GetFontObject, GetJustifyH, GetJustifyV, GetShadowColor, GetShadowOffset, GetSpacing, SetFontObject, SetShadowColor, SetShadowOffset, SetSpacing * Button has these NEW methods font = Button:GetFontObject() - Return the font object for the Button's normal text. font = Button:GetDisabledFontObject() - Return the font object for the Button when disabled. font = Button:GetHighlightFontObject() - Return the font object for the Button when highlighted. Button:SetTextFontObject([font]) - Set the font object from which to get settings for this Button's normal state. Button:SetDisabledFontObject([font]) - Set the font object for settings when disabled. Button:SetHighlightFontObject([font]) - Set the font object for settings when highlighted. Also the SetNormalTexture, SetDisabledTexture, SetPushedTexture, and SetHighlightTexture methods now take either a texture file path, or a Texture object. (This section isn't yet complete, because it's taking me ages to write up all of the changes, i'll be back!) |
|
WoWInterface » Developer Discussions » Tutorials & Other Helpful Info. » API Changes for 1.10 |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Switch to Linear Mode |
Switch to Hybrid Mode |
Threaded Mode |
|
|