Links |
---|
Creates a Texture object within the specified widget.
texture = Frame:CreateTexture([name, layer, inheritsFrom, subLayer])
Arguments
- name
- string - Globally accessible name to assign to the frame, or
nil
for an anonymous frame. - layer
- string - Layer to traw the texture in, e.g. "ARTWORK".
- inheritsFrom
- string - Comma-delimited list of names of virtual textures (created in XML) to inherit from; if nil, the texture does not inherit any properties.
- subLayer
- number - Order to draw overlapping textures within the same layer.
Example
Adds a semi-transparent white background to a frame:
local tex = frame:CreateTexture(nil, "BACKGROUND")
tex:SetAllPoints()
tex:SetColorTexture(1, 1, 1, 0.5)
Patch history
Patch 1.11.0 (2006-06-19): Can now instantiate virtuals.