WoW:API Texture SetTexture: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Factual correction)
mNo edit summary
Line 3: Line 3:
==Arguments==
==Arguments==
:;filename
:;filename
::'''filename''' (String) Name of the texture image. Format: .blp or .tga, only power-of-two dimensions.
::'''filename''' (String) Name of the texture image.
:::Format: .blp or .tga, only power-of-two dimensions (16, 32, 64, 128, 256, and 512) with 256 colors (8 BPP (bits per pixel)) max.
::Sets the texture for the Texture object.
::Sets the texture for the Texture object.
:;red, green, blue
::'''red''' (Number, 0.0 to 1.0) Red component
::'''green''' (Number, 0.0 to 1.0) Green component
::'''blue''' (Number, 0.0 to 1.0) Blue component
::Sets the Texture to an opaque fill.
:;red, green, blue, alpha
:;red, green, blue, alpha
::'''red''' (Number, 0.0 to 1.0) Red component
::'''red''' (Number, 0.0 to 1.0) Red component
::'''green''' (Number, 0.0 to 1.0) Green component
::'''green''' (Number, 0.0 to 1.0) Green component
::'''blue''' (Number, 0.0 to 1.0) Blue component
::'''blue''' (Number, 0.0 to 1.0) Blue component
::'''alpha''' (Number, 0.0 to 1.0) Opacity
::'''alpha''' (Number, 0.0 to 1.0) Opacity (transparentcy)
::Sets the Texture to a semi-transparent fill.


==Description==
==Description==

Revision as of 15:35, 30 May 2008

Widget API ← Texture < SetTexture

Arguments

filename
filename (String) Name of the texture image.
Format: .blp or .tga, only power-of-two dimensions (16, 32, 64, 128, 256, and 512) with 256 colors (8 BPP (bits per pixel)) max.
Sets the texture for the Texture object.
red, green, blue, alpha
red (Number, 0.0 to 1.0) Red component
green (Number, 0.0 to 1.0) Green component
blue (Number, 0.0 to 1.0) Blue component
alpha (Number, 0.0 to 1.0) Opacity (transparentcy)

Description

Can be used to either set the texture file, or to change the RGB fill of a texture. Pass it one string to change the texture file, or pass it three numbers to set the RGB. The only place I've seen this used to change the color is within the inline script of a ColorSelect object.

If no Alpha value is specified for the color, it is defaulted to be "1.0".