Thread Tools Display Modes
Prev Previous Post   Next Post Next
07/01/17, 02:44 AM   #1
BoarGules
 
BoarGules's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2017
Posts: 34
How to get programmatic access to a control defined in XML

With the friendly help I've received on this forum I've succeeded in putting a scene fragment on the Guild Home screen:

Code:
<GuiXml>
  <Controls>
    <TopLevelControl name="MyFragment" hidden="true">
      <Dimensions x="200" y="200" />
      <Anchor point="BOTTOM" relativeTo="ZO_GuildSharedInfo" relativePoint="BOTTOM" offsetX="120" offsetY="680" />
      <Controls>
        <Label name="$(parent)Label" width="200" height="25" font="ZoFontWinH3" inheritAlpha="true"  color="FFFFFF"
            wrapMode="TRUNCATE" verticalAlignment="TOP" horizontalAlignment="CENTER"  text="some text">
          <Anchor point="TOP" relativeTo="$(parent)" relativePoint="TOP" />
        </Label>
      </Controls>
    </TopLevelControl>
  </Controls>
</GuiXml>
Lua Code:
  1. local fragment = ZO_SimpleSceneFragment:New(MyFragment)
  2. GUILD_HOME_SCENE:AddFragment(fragment)

Now I want to change the text of the label control MyFragmentLabel under program control but I can't work out how to get a reference to it.
  Reply With Quote
 

ESOUI » Developer Discussions » General Authoring Discussion » How to get programmatic access to a control defined in XML


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off