Thread Tools Display Modes
05/25/14, 04:59 PM   #1
Onibubu
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 1
To dumb for XML UI

Hi,

First about my background. I did learn C##/Java and also have written code in a lot of other languages.
LUA isn't really my problem.
My problem is XML.
I never have used it, never needed it and I simply doesn't get how to make an UI in Eso...

All I want is a window with 2 Buttons.
When you click on a button a lua function is called, when you click on the other button another lua function is called.

My Problem:
My Button is as big as the whole window... and I dont know a good texture to "fill" the button.

Code:
<GuiXml>
    <Controls>
        <TopLevelControl name="raidRegrouper">
            <Dimensions x="400" y="200" />
            <Anchor point="CENTER" />
 
            <OnUpdate>
               AddOnUpdate()
            </OnUpdate>
 
            <Controls>
                <Backdrop name="$(parent)BG" inherits="ZO_ThinBackdrop" />
				
				<Button name="$(parent)save" font="ZoFontWindowTitle" verticalAlignment="CENTER" text="Anus">
					<Anchor point="TOPLEFT" />
					<Dimensions x="50" y="200" />
					<FontColors normalColor="FF0000" />
					<Textures normal="/esoui/art/buttons/accept_over.dds" />
					<AnchorFill />
				</Button>
				
            </Controls>

        </TopLevelControl>
    </Controls>
</GuiXml>
If any one has a idea i would be gratefull!

Edit:
I accidantly postet in the wrong section -.- I am deeply sorry can a Mod move it?

Last edited by Onibubu : 05/25/14 at 05:02 PM.
  Reply With Quote
05/25/14, 05:11 PM   #2
Kentarii
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 42
Your button has two anchors, one which positions at topleft. AnchorFill however will stretch your button to match the size of the parent, so first step would be to remove that.

If you want to find some texture you can use, try my addon called Texture Viewer in my signature.

A button can have a child element called OnClicked:
Code:
<Button ..>
  <OnClicked>
    MyOnClickedMethod(self, button)
  </OnClicked>
</Button>
Here's the wiki-page if you haven't read it:
http://wiki.esoui.com/UI_XML#Button

Last edited by Kentarii : 05/25/14 at 05:20 PM.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » To dumb for XML UI


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