WoW:XML/UiScript

< XML
Revision as of 04:49, 15 August 2023 by Move page script (talk) (Move page script moved page XML/UiScript to XML/UiScript without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

XML UI ← XML elements < UiScript

Script allows Lua scripts or Lua files to be included in an WoW UI XML file. The Include element can be used in a Ui element.

Inheritance

Inherited by: none, Inherits: none, Defined in: Ui

Elements

  • {text} - actual Lua script text as the contents of <Script> element

Attributes

  • file (string) - (optional) relative path to the WoW UI XML file to include

Summary

Script elements include other WoW UI Lua files in an XML file and allow them to be processed on load inline, at the point of the include statement.

Example

<Ui xmlns="http://www.blizzard.com/wow/ui/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Script file="MyFrame.lua"/>
  <Frame name="MyFrame">
    <Size x="200" y="200"/>
  </Frame>
</Ui>

This example demonstrates use of using Script to include a WoW UI Lua file. The included Lua file will be loaded at the point of the <Script> element during load.

Details