<?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%3ASetTargetPortraitBackground</id>
	<title>API:SetTargetPortraitBackground - 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%3ASetTargetPortraitBackground"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:SetTargetPortraitBackground&amp;action=history"/>
	<updated>2026-10-18T05:49:19Z</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:SetTargetPortraitBackground&amp;diff=30735&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:SetTargetPortraitBackground&amp;diff=30735&amp;oldid=prev"/>
		<updated>2026-10-16T19:49:16Z</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;
Sets the background image drawn behind the target&amp;#039;s 3D portrait.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SetTargetPortraitBackground(templateName, x, y)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;templateName : &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; – Name of a DynamicImage window template defined in the UI&amp;#039;s XML.&lt;br /&gt;
;x, y : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Position given to the background image.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
Nothing.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* Any background set earlier is destroyed first.&lt;br /&gt;
* If &amp;lt;code&amp;gt;templateName&amp;lt;/code&amp;gt; names a DynamicImage template, the client creates a new DynamicImage from it for the target portrait and places it at (&amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt;), kept inside the screen. If there is no such template, or it is not a DynamicImage, the portrait is left without a background.&lt;br /&gt;
* If the target portrait does not exist yet, the call does nothing.&lt;br /&gt;
* The stock UI never calls this function. The only reference is a commented-out line in &amp;lt;code&amp;gt;eatemplate_unitframes/source/targetunitframe.lua&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
None besides the &amp;#039;&amp;#039;Invalid Parameters&amp;#039;&amp;#039; argument check.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
The commented-out call in &amp;lt;code&amp;gt;eatemplate_unitframes/source/targetunitframe.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-- SetTargetPortraitBackground( &amp;quot;TargetPortraitBackground&amp;quot;, 10, 10 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:SetPlayerPortraitBackground|SetPlayerPortraitBackground]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>