Originally Posted by bsrealm
Perfect! Thanks good sir! Will confirm when I get home, saw your edit too.
|
I've created a small example of this so you can see it in action. Here are the three files you need to create within a brand new "myAddon" folder in the same directory as your other addons.
Contents of the
myAddon.txt file:
Code:
## Title: myAddon
## APIVersion: 100003
myAddon.lua
myAddon.xml
Contents of the
myAddon.xml file:
Code:
<GuiXml>
<Controls>
<TopLevelControl name="myAddonUI" mouseEnabled="true" movable="true">
<Dimensions x="300" y="300" />
<Anchor point="CENTER" />
<OnUpdate>
myAddonUpdate()
</OnUpdate>
<Controls>
<Backdrop name="$(parent)Backdrop" inherits="ZO_DefaultBackdrop" alpha="1.0" />
<Label name="$(parent)Label" font="ZoFontGame" color="FFFFFF" alpha="1.0">
<Anchor point="TOP" />
</Label>
</Controls>
</TopLevelControl>
</Controls>
</GuiXml>
Contents of the
myAddon.lua file:
Code:
function myAddonUpdate()
AutoHide()
myAddonUILabel:SetText(string.format("This is a test label"))
end
function AutoHide()
menu1 = ZO_GameMenu_InGame:IsHidden()
menu2 = ZO_KeybindStripControlBackground:IsHidden()
menu3 = ZO_InteractWindow:IsHidden()
menu4 = ZO_Character:IsHidden()
if not menu1 or not menu2 or not menu3 or not menu4
then
myAddonUI:SetMouseEnabled(false)
myAddonUIBackdrop:SetHidden(true)
myAddonUILabel:SetHidden(true)
else
myAddonUI:SetMouseEnabled(true)
myAddonUIBackdrop:SetHidden(false)
myAddonUILabel:SetHidden(false)
end
end
Let me know if you can't get this working and I'll see what I can do to help. Thanks!
EDIT: Please note that there might be an even easier way to do this, but I didn't spend a whole lot of time researching.