Zur13
Chieftain
- Joined
- Nov 7, 2018
- Messages
- 26
Wow... I never knew it was that bad... I only thought ReplaceUIScript simply runs something to override them. Pretty sure last time I used ReplaceUIScript, it only changes what I need to change.
What is the proper way to do that then? I need to get unit's level, which only available in ContextUI, then I plan to use LuaEvents to communicate with Script context.
If you need your own UI and not replace some base game UI element you may add your own UI:
Code:
<AddUserInterfaces id="UI">
<Properties>
<Context>InGame</Context>
<LoadOrder>99000</LoadOrder>
</Properties>
<File>CTE_UI.xml</File>
</AddUserInterfaces>
You need a pair of UI files with the same name in your project like this:
CTE_UI.lua
CTE_UI.xml
XML may have simple structure:
Code:
<?xml version="1.0" encoding="utf-8"?>
<Context Name="CmeCtx">
</Context>