<?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%3ADynamicImageSetTexture</id>
	<title>API:DynamicImageSetTexture - 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%3ADynamicImageSetTexture"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:DynamicImageSetTexture&amp;action=history"/>
	<updated>2026-10-17T11:51:14Z</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:DynamicImageSetTexture&amp;diff=30286&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:DynamicImageSetTexture&amp;diff=30286&amp;oldid=prev"/>
		<updated>2026-10-16T19:42: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=DynamicImage}}&lt;br /&gt;
Sets the texture a DynamicImage shows and where in that texture to start.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DynamicImageSetTexture(imageName, textureName, x, y)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;imageName : &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; – Name of a DynamicImage window.&lt;br /&gt;
;textureName : &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; – Name of the texture.&lt;br /&gt;
;x, y : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Pixel position in the texture of the top-left corner of the area to show. Fractions are dropped.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
Nothing.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* If the texture name, &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; are all the same as before, nothing happens.&lt;br /&gt;
* The size of the area shown is set with [[API:DynamicImageSetTextureDimensions|DynamicImageSetTextureDimensions]]. If that has not been set (or one of its values is 0), the area is the window&amp;#039;s size divided by the texture scale (see [[API:DynamicImageSetTextureScale|DynamicImageSetTextureScale]]).&lt;br /&gt;
* A comment in the stock UI says this function does not work correctly while a texture slice is assigned; the stock code clears the slice first with &amp;lt;code&amp;gt;DynamicImageSetTextureSlice( name, &amp;quot;&amp;quot; )&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
* &amp;lt;code&amp;gt;Error in function call &amp;#039;DynamicImageSetTexture&amp;#039;: Window %s does not exist&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;Error in function call &amp;#039;DynamicImageSetTexture&amp;#039;: Window %s is not a DynamicImage&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;easystem_glyphdisplay/source/glyphdisplay.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DynamicImageSetTexture( glyphWindowName, glyphData.textureName, 64, 64 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switching a map icon from a slice to texture coordinates, from &amp;lt;code&amp;gt;easystem_tooltips/source/maptooltips.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
textureX, textureY, sizeX, sizeY = GetMapIconData( ptData.mapIcon )&lt;br /&gt;
-- Clear the slice on the dynamic image. DynamicImageSetTexture will not work&lt;br /&gt;
-- correctly if a slice is assigned.&lt;br /&gt;
DynamicImageSetTextureSlice( iconWindow, &amp;quot;&amp;quot; )&lt;br /&gt;
DynamicImageSetTexture( iconWindow, &amp;quot;map_markers01&amp;quot;, textureX, textureY )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:DynamicImageSetTextureDimensions|DynamicImageSetTextureDimensions]]&lt;br /&gt;
* [[API:DynamicImageSetTextureSlice|DynamicImageSetTextureSlice]]&lt;br /&gt;
* [[API:DynamicImageHasTexture|DynamicImageHasTexture]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>