WoW:API Texture GetTexture: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (Move page script moved page API Texture GetTexture to API Texture GetTexture without leaving a redirect) |
||
(6 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
texture = | {{widgetmethod}} | ||
texture = ''Texture'':GetTexture(); | |||
Returns the texture string from any Texture object. | Returns the texture string from any Texture object. | ||
Line 6: | Line 8: | ||
;''Arguments'' | ;''Arguments'' | ||
: | :''none'' | ||
---- | ---- | ||
;''Returns'' | ;''Returns'' | ||
:;texture : String - The path/filename of the texture | :;texture : String - The path/filename without extension of the texture | ||
::* If a SetPortraitTexture(texture,unit) is performed on a texture, then it will return "Portrait1" | |||
::* If the texture only contains a solid color (that is, no texture file), then it will return "Solid Texture" | |||
---- | ---- | ||
Line 22: | Line 26: | ||
;''Notes'' | ;''Notes'' | ||
* If a :SetTexture(nil) is performed on a texture, then it will return nil. | * If a :SetTexture(nil) is performed on a texture, then it will return nil. | ||
* If a :SetTexture("missing image") is performed on a texture | * If a :SetTexture(''"missing image"'') is performed on a texture, it will return nil. | ||
* The "Solid Texture" return for a missing image has been removed as of 1.10. Use the return of [[API Texture SetTexture|SetTexture]] to determine if a texture exists. | |||
Latest revision as of 04:47, 15 August 2023
← Widget API ← Texture < GetTexture
texture = Texture:GetTexture();
Returns the texture string from any Texture object.
- Arguments
- none
- Returns
- texture
- String - The path/filename without extension of the texture
- If a SetPortraitTexture(texture,unit) is performed on a texture, then it will return "Portrait1"
- If the texture only contains a solid color (that is, no texture file), then it will return "Solid Texture"
- Example
/script message(ActionButton1Icon:GetTexture())
- Result
Interface\Icons\INV_Mace_07
- Notes
- If a :SetTexture(nil) is performed on a texture, then it will return nil.
- If a :SetTexture("missing image") is performed on a texture, it will return nil.
- The "Solid Texture" return for a missing image has been removed as of 1.10. Use the return of SetTexture to determine if a texture exists.