Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:SetTargetPortraitBackground

From RoR Wiki
Revision as of 19:49, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · Interface functions
Version: WAR 1.4.8

Sets the background image drawn behind the target's 3D portrait.

SetTargetPortraitBackground(templateName, x, y)

Arguments

templateName
string – Name of a DynamicImage window template defined in the UI's XML.
x, y
number – Position given to the background image.

Returns

Nothing.

Details

  • Any background set earlier is destroyed first.
  • If templateName names a DynamicImage template, the client creates a new DynamicImage from it for the target portrait and places it at (x, y), kept inside the screen. If there is no such template, or it is not a DynamicImage, the portrait is left without a background.
  • If the target portrait does not exist yet, the call does nothing.
  • The stock UI never calls this function. The only reference is a commented-out line in eatemplate_unitframes/source/targetunitframe.lua.

Errors

None besides the Invalid Parameters argument check.

Example

The commented-out call in eatemplate_unitframes/source/targetunitframe.lua:

-- SetTargetPortraitBackground( "TargetPortraitBackground", 10, 10 )

See also