UserInterface changes without an XML file?

sp00n

Prince
Joined
Jan 4, 2007
Messages
371
So I just learned how to change the interface by hooking a LuaEvent and making use of ContextPtr:LookUpControl() calls. And as far as I understood these function calls only work when they are executed from within the <UserInterface> section of the .modinfo file, and not within <ImportFiles>.
The problem - not really a problem, but an oddity - is that this section only seems to allow xml file entries. When I enter a lua file, I see the following entry in the Modding.log file: ERROR: UserInterface components require only the .xml file to be specified.
And the lua file isn't loaded.

However, I actually don't add any new UI element to the game, I'm only changing the size of an already existing one depending on a value I calculate in the lua file. So my xml file would be empty. Is there any way around having to reference an empty dummy xml file?
 
The XML must not be empty, it should contain at least a few line, for example:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<Context Name="YourContext"></Context>
in YourContext.XML and then your code in YourContext.lua
 
Top Bottom