Example.xml

From ESOUI Wiki

Jump to: navigation, search

Comment

This is the control that I use to generate database entries for FurnitureCatalogue. It's a textbox that reacts to getting emptied.

If you want to see the code, check [1]. Please note that *this* is just a local alias for the addon name because I've been coding in Java too much. ;)

Code

<GuiXml>
  <Controls>
    <!-- Every control's name must be _unique_. -->
    <TopLevelControl name="MyDemoControl" clampedToScreen="true"  movable="true" mouseEnabled="true" hidden="false" resizeHandleSize="10">
      <Dimensions x="200" y="100"/>
      <Anchor point="CENTER" relativeTo="GUI_ROOT" relativePoint="CENTER" offsetX="-125" offsetY="-140" />
      <Controls>
        <Backdrop name="$(parent)_BG" inherits="ZO_DefaultBackdrop"><AnchorFill/></Backdrop>
                <Button name="$(parent)_hide" inherits="ZO_ButtonBehaviorClickSound" >
                    <!-- <OnClicked>MyAddon.HideUI()</OnClicked> -->
                    <Dimensions x="30" y="30" />                                
                    <Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT" offsetX="10" offsetY="10"  />
                    <Textures
                        normal    ="/esoui/art/buttons/decline_up.dds"
                        pressed    ="/esoui/art/buttons/decline_down.dds"
                        mouseOver  ="/esoui/art/buttons/decline_over.dds"
                     />  
                </Button>
                <Button name="$(parent)_clear" inherits="ZO_ButtonBehaviorClickSound" >
                    <!-- <OnClicked>MyAddon.TextboxIsEmpty</OnClicked> -->
                    <Dimensions x="40" y="40" />                  
                    <Anchor point="TOPRIGHT" relativeTo="$(parent)" relativePoint="TOPRIGHT"  offsetX="-10" offsetY="10" />
                    <Textures
                        normal    ="/esoui/art/help/help_tabicon_feedback_up.dds"
                        pressed    ="/esoui/art/help/help_tabicon_feedback_down.dds "
                        mouseOver  ="/esoui/art/help/help_tabicon_feedback_over.dds"
                     />  
                </Button>
 
                <EditBox name="$(parent)Box" inherits="ZO_DefaultEditMultiLine ZO_DefaultEditForDarkBackdrop" >
                    <Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT" offsetX="50" offsetY="50"/>
                    <Anchor point="BOTTOMRIGHT" relativeTo="$(parent)" relativePoint="BOTTOMRIGHT" offsetX="50"/>                    
                 <!--    <OnFocusGained>MyAddon.selectEntireTextbox()</OnFocusGained>
                    <OnTextChanged>MyAddon.onTextboxTextChanged()</OnTextChanged> -->
                </EditBox>
 
            </Controls>
        </TopLevelControl>
    </Controls>
</GuiXml>
Personal tools
Namespaces
Variants
Actions
Menu
Wiki
Toolbox