Wikia

WoWWiki

Patch 1.11.0/API changes

Talk0
101,314pages on
this wiki

< Patch 1.11.0

Revision as of 18:45, January 15, 2008 by Pcj (Talk | contribs)

Copied from Iriel's forums.worldofwarcraft.com post, 11:59, 21 June 2006 (EDT).




This is a consolidated list of the announced (and sometimes observed) changes in the User Interface API's and functionality for the 1.11 patch. Please note that this thread is to discuss the upcoming changes and any clarifications or features that are a direct result of those changes, or things which we've been asked to remind slouken of. It is NOT an appropriate place for general feature requests, they should have their own threads (or be in the suggestions forum).

Frame Subsystem Changes

  • "Anonymous" Textures/FontStrings that currently have no lua presence will be automatically instantiated if they are queried. (WARNING: Dont traverse and query every object in the UI subsystem unless you're prepared to deal with the possibly significant memory overhead of all of these scripting system objects)
  • Created frames will not set the global symbol with their name if it already exists (:GetName() will still return the given name, but you'll need to access the frame via its object reference)
  • Virtual frame definitions will remain in memory after the initial XML parse pass, and can be accessed from updated CreateFrame/CreateFontString/CreateTexture methods. (Future PTR build)

Region Methods

Region is the base object type for all frames, textures and fontstrings. Region is also the type of object returned by the new Frame:GetTitleRegion() method. (For that, Region:GetObjectType() returns "Region") Region:IsObjectType("type") returns true if "type" is "Region".

For wiki users, the new Region object is more or less equivalent to the 'LayoutFrame' object in the widget API there.

All regions have the following member functions:

  • type = Region:GetObjectType()
  • isType = Region:IsObjectType("type")
  • name = Region:GetName()
  • frame = Region:GetParent()
  • Region:SetParent(frame)
  • x,y = Region:GetCenter()
  • x = Region:GetLeft()
  • x = Region:GetRight()
  • y = Region:GetTop()
  • y = Region:GetBottom()
  • width = Region:GetWidth()
  • Region:SetWidth(width)
  • height = Region:GetHeight()
  • Region:SetHeight(height)
  • numPoints = Region:GetNumPoints()
  • "point",relativeObject,"relativePoint",xOfs,yOfs = Region:GetPoint(index)
  • Region:SetPoint("point" [, LayoutFrame] [, "relativePoint"] [, offsetX, offsetY])
  • Region:SetAllPoints(LayoutFrame)
  • Region:ClearAllPoints()

Frame Methods

  • NEW state = Frame:IsMouseEnabled()
  • NEW state = Frame:IsKeyboardEnabled()
  • NEW state = Frame:IsMouseWheelEnabled()
  • UPDATE Frame:SetPoint(...) accepts the an explicit nil as the relativeTo frame value to anchor relative to the screen.
  • UPDATE Frame:SetAllPoints(relativeTo) accepts the an explicit nil as the relativeTo value to anchor relative to the whole screen.
  • NEW titleRegion = Frame:CreateTitleRegion() - Creates a new title region on this frame.
  • NEW titleRegion = Frame:GetTitleRegion() - Returns this frame's title region.
  • NEW Frame:RegisterAllEvents() - For debugging purposes only!!!ZOMG!!!
  • NEW Frame:SetHitRectInsets(left, right, top, bottom)
  • NEW left, right, top, bottom = Frame:GetHitRectInsets()
  • NEW minWidth, minHeight = Frame:GetMinResize()
  • NEW maxWidth, maxHeight = Frame:GetMaxResize()
  • NEW backdropTable = Frame:GetBackdrop(backdropTable) - backdropTable will be filled in and returned.
  • NEW r, g, b, a = Frame:GetBackdropColor()
  • NEW r, g, b, a = Frame:GetBackdropBorderColor()
  • NEW Frame:SetClampedToScreen(clamped) - Set whether frame is prohibited from being dragged off screen
  • NEW clamped = Frame:IsClampedToScreen() - Gets clamping status
  • UPDATED texture = Frame:CreateTexture(["name", ["drawlayer" [,"inheritsFrom"]]]) - Added virtual Texture inheritance. (Future PTR build)
  • UPDATED texture = Frame:CreateFontString(["name", ["drawlayer" [,"inheritsFrom"]]]) - Added virtual FontString inheritance. (Future PTR build)

EditBox Methods

  • NEW state = EditBox:IsAutoFocus() -- Determine if editbox has autofocus enabled.
  • NEW EditBox:SetAutoFocus(state) -- Set EditBox autoFocus state.
  • NEW state = EditBox:IsNumeric() -- Determine if editbox accepts only numeric input.
  • NEW EditBox:SetNumeric(state) -- Set EditBox acceptance of numeric only input.
  • NEW state = EditBox:IsMultiLine() -- Determine if editbox accepts multiple lines.
  • NEW EditBox:SetMultiLine(state) -- Set EditBox multi-line state.
  • NEW EditBox:SetPassword(isPassword)
  • NEW isPassword = EditBox:IsPassword()
  • NEW EditBox:SetBlinkSpeed(speed)
  • NEW speed = EditBox:GetBlinkSpeed()
  • NEW bytes = EditBox:GetMaxBytes()
  • NEW letters = EditBox:GetMaxLetters()
  • NEW l, r, t, b = EditBox:GetTextInsets()

MessageFrame Methods

  • NEW MessageFrame:SetInsertMode("TOP" or "BOTTOM")
  • NEW mode = MessageFrame:GetInsertMode()
  • NEW MessageFrame:SetFading(fading)
  • NEW fading = MessageFrame:GetFading()
  • NEW MessageFrame:SetTimeVisible(seconds)
  • NEW seconds = MessageFrame:GetTimeVisible()
  • NEW MessageFrame:SetFadeDuration(seconds)
  • NEW seconds = MessageFrame:GetFadeDuration()
  • NEW MessageFrame:Clear()

Model Methods

  • NEW filename = Model:GetModel()
  • NEW r, g, b, a = Model:GetFogColor()
  • NEW value = Model:GetFogNear()
  • NEW value = Model:GetFogFar()
  • NEW enabled, omni, dirX,dirY,dirZ, ambIntensity[,ambR,ambG,ambB], dirIntensity[,dirR,dirG,dirB] = Model:GetLight() - Optional returns are omitted if their corresponding intensity is 0

Minimap Methods

  • NEW MiniMap:SetArrowModel("file")
  • NEW MiniMap:SetPlayerModel("file")

GameTooltip Methods

  • NEW GameTooltip:AddFontStrings(leftstring, rightstring) - Dynamically expands the size of a tooltip.

Buttons and Button Methods

The implementation of Button objects has been changed to use only one FontString and several alternate Font objects for the various styles. NormalText, HighlightText, and DisabledText are deprecated (but still work for now), and have been replaced with ButtonText, NormalFont, HighlightFont, and DisabledFont.

  • NEW Button:SetFontString(fontString)
  • NEW fontString = Button:GetFontString()
  • NEW texture = Button:GetNormalTexture()
  • NEW texture = Button:GetPushedTexture()
  • NEW texture = Button:GetDisabledTexture()
  • NEW texture = Button:GetHighlightTexture()
  • NEW r,g,b,a = Button:GetTextColor()
  • NEW r,g,b,a = Button:GetDisabledTextColor()
  • NEW r,g,b,a = Button:GetHighlightTextColor()
  • NEW Button:SetPushedTextOffset(x, y)
  • NEW x, y = Button:GetPushedTextOffset()

CheckButton Methods

  • NEW texture = CheckButton:GetCheckedTexture()
  • NEW texture = CheckButton:GetDisabledCheckedTexture()

Slider Methods

  • NEW texture = Slider:GetThumbTexture()

StatusBar Methods

  • UPDATED StatusBar:SetStatusBarTexture(texture or "filename") - Now takes a filename, a texture object, or nil (previously only filename)
  • UPDATED texture = StatusBar:GetStatusBarTexture() - Returns a texture object instead of a filename.

ColorSelect Frames

  • NEW ColorSelect:SetColorWheelTexture(texture or nil)
  • NEW ColorSelect:SetColorWheelThumbTexture(texture or "texture" or nil)
  • NEW ColorSelect:SetColorValueTexture(texture or nil)
  • NEW ColorSelect:SetColorValueThumbTexture(texture or "texture" or nil)
  • NEW texture = ColorSelect:GetColorWheelTexture()
  • NEW texture = ColorSelect:GetColorWheelThumbTexture()
  • NEW texture = ColorSelect:GetColorValueTexture()
  • NEW texture = ColorSelect:GetColorValueThumbTexture()

SimpleHTML Methods

  • NEW format = SimpleHTML:GetHyperlinkFormat()

ScrollingMessageFrame Methods

  • NEW isAtTop = ScrollingMessageFrame:AtTop()

Texture Methods

  • NEW ULx,ULy,LLx,LLy,URx,URy,LRx,LRy = Texture:GetTexCoord()
  • NEW status = Texture:IsDesaturated()

FontString Methods

  • NEW status = FontString:CanNonSpaceWrap()


Global APIs

Frame Management Methods

  • UPDATED frame = CreateFrame("frameType" [,"name"] [,parent] [,"inheritsFrom"]) - Added virtual Frame inheritance. (Future PTR build)

Visual Functions

  • SetCursor() can now be passed a 32x32 texture filename, as well as a cursor mode, or nil to reset the cursor.

AddOn Support

  • GetAddOnMetadata("addon", "field") - returns the value of the following fields in the addon TOC file: Title, Notes, Author, Version, and any field starting with X-

Unit Functions

  • UnitSex("unit") now returns 1=unknown,2=male,3=female instead of 0=male,1=female,2=unknown


Other changes

Key Bindings

  • It will be possible to bind actions with both up and down transition logic to one-shot triggers like the mouse wheel.

Messaging

  • Monster death messages will indicate if you delivered the killing blow.

Event Updates

  • Fixed missing SPELLCAST_FAILED when spell fails due to lack of mana.
  • The interface event processing has been optimized while zoning.
  • When you kill a creature, the combat log will report "You have slain X!"

Misc changes

  • Reloading the UI requires user input.
  • Your interface windows are no longer closed when you zone.
  • You can now bind the mousewheel to button actions.
  • You can now rebind the screenshot action.
  • Mouselook now overrides normal UI input, and if the world area loses mouse focus, mouselook is turned off.
  • Virtual frame definitions now remain in memory after the XML parse pass for later use.


Bug Fixes

  • Fixed allocation/crash bugs around EditBox:SetHistoryLines and ScrollingMessageFrame:SetMaxLines
  • Fixed newlines in SavedVariables files
  • CreateFrame("Minimap") no longer crashes the client.
  • Fixed EditBox behavior when JustifyH set to "RIGHT"
  • You can no longer create a 2nd WorldFrame with CreateFrame("WorldFrame")
  • Assiging the same texture to a StatusBar twice no longer crashes the client.
  • Saving extremely long strings to SavedVariables no longer crashes client on logout/reload.
  • Fixed error message if you ReloadUI while following someone.
  • Fixed chat tab issues introduced in 1.10.2
  • Fixed problems with OnUpdate events for frames that are Hidded/Shown during OnUpdate execution.
  • Fixed memory corruption issue with frame positioning (assertion on mac)
  • Bitlib will use 64 bit unsigned values to avoid unexpected signed results.
  • FontStrings defined in XML will be able to 'inherit' from global Font objects regardless of whether they were declared virtual in the current XML parse pass.
  • Fixed cursor tooltip positioning in widescreen video modes.


Last updated: 2006-05-23 17:49 Pacific.

Around Wikia's network

Random Wiki