Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: clarified note about Lua files in the root-folder

...

Info

Please note that Lua files in the root-folder of the extension is unsupported. We are not giving any guarantee that this doesn't cause problems or will work in future versions. It's best practice to create a ui-folder and put the Lua files there.

Creating the ui.xml file

 


Code Block
titlesample ui.xml file
linenumberstrue
<?xml version="1.0" encoding="UTF-8"?>
<addon name="foo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../ui/core/addon.xsd">
  <environment type="detailmonitor">
    <file name="ui/file1.lua" />
    <file name="ui/file2.lua" />
    <dependency name="foo_dependency" />
    <savedvariable name="foo_MyData" storage="userdata" />
  </environment>
</addon>

line 1: The file being in the XML-format, this is the XML-header.
line 2: The addon node is the root-node of the ui.xml file and describes the UI addon. 

  • name: Gives the addon a unique name. It's suggested to name the addon according to the folder name of your addon. This ensures that if everybody sticks with that rule, players will never end up with two addons using the same name. (note that the addon-name must not start with ego_)
  • xmlns:xsi: specified for XML-standard compliance
  • xsi:noNamespaceSchemaLocation: references the corresponding XSD in the ui-directory. This allows your editor to highlight errors and display documentation/tooltips directly in the file, if supported by your editor.

...