<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AGetIconData</id>
	<title>API:GetIconData - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AGetIconData"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetIconData&amp;action=history"/>
	<updated>2026-10-17T13:43:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.returnofreckoning.com/index.php?title=API:GetIconData&amp;diff=30410&amp;oldid=prev</id>
		<title>Maintenance script: UI Lua API import (WAR 1.4.8)</title>
		<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetIconData&amp;diff=30410&amp;oldid=prev"/>
		<updated>2026-10-16T19:44:09Z</updated>

		<summary type="html">&lt;p&gt;UI Lua API import (WAR 1.4.8)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LuaApi|group=Interface}}&lt;br /&gt;
Returns the texture and texture coordinates for an icon id.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
texture, x, y, disabledTexture = GetIconData(iconId)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;iconId : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Icon id, as found in fields such as &amp;lt;code&amp;gt;iconNum&amp;lt;/code&amp;gt; of ability, item and buff data.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
;texture : &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; – Name of the texture that holds the icon.&lt;br /&gt;
;x, y : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Position of the icon inside that texture.&lt;br /&gt;
;disabledTexture : &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; – Name of a texture with the disabled (greyed) version of the icon, or an empty string if there is none.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* The id is converted to an integer.&lt;br /&gt;
* If the id is not in the client&amp;#039;s icon table, the data of the client&amp;#039;s default icon entry is returned instead. There is no error for an unknown id.&lt;br /&gt;
* All four values are returned on every successful call.&lt;br /&gt;
* &amp;lt;code&amp;gt;texture&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;disabledTexture&amp;lt;/code&amp;gt; are plain strings, not wide strings. &amp;lt;code&amp;gt;easystem_utils/source/iconbuttonutils.lua&amp;lt;/code&amp;gt; compares &amp;lt;code&amp;gt;disabledTexture&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;L&amp;quot;&amp;quot;&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ea_actionbars/source/actionbutton.lua&amp;lt;/code&amp;gt; compares it with &amp;lt;code&amp;gt;&amp;quot;&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;easystem_utils/source/iconbuttonutils.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local texture, x, y, disabledTexture = GetIconData( iconId )&lt;br /&gt;
&lt;br /&gt;
-- Set the Normal Texture&lt;br /&gt;
DynamicImageSetTexture( iconButtonName..&amp;quot;Icon&amp;quot;, texture, x, y )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From &amp;lt;code&amp;gt;ea_actionbars/source/actionbutton.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
texture, x, y, disabledTexture = GetIconData (iconNum)&lt;br /&gt;
&lt;br /&gt;
if (iconType == USE_DISABLED_ICON)&lt;br /&gt;
then&lt;br /&gt;
    if (disabledTexture ~= &amp;quot;&amp;quot;)&lt;br /&gt;
    then&lt;br /&gt;
        texture = disabledTexture&lt;br /&gt;
    ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:DynamicImageSetTexture|DynamicImageSetTexture]]&lt;br /&gt;
* [[API:GetMapIconData|GetMapIconData]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>