ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   XML - Creating and Customizing 'Frames' (https://www.esoui.com/forums/showthread.php?t=545)

Gillymead 04/04/14 02:54 AM

XML - Creating and Customizing 'Frames'
 
Hi,

I'm completely new to creating anything with LUA and XML. I have some JavaScript/CSS/HTML experience but that's about it. Apologies if this post is in the wrong place or I've missed similar threads.

I followed the MyFirstAddon tutorial, which was quite useful, and decided I'd start trying to 'skin up' the frame for the content a bit more. Presumably the inherits="ZO_ThinBackdrop" attribute is controlling the current look/style of the frame the counter appears in, as well as mouse actions against it?

Anyway, I've been trying to do something really simple, change the colour and alpha of the background of the frame, but failing pretty miserably.

Think I tried using an attribute of centerColor="990000" or something similar to add a dark red background, but didn't seem to get anywhere. I played around with a couple of other things too.

Can anyone give me a starter for ten here?

Cheers,
Gillymead

jokerfwb 04/09/14 04:55 PM

Hey as much of a beginner as you but I have been able to get done what you were doing. You have to add open the BACKDROP attribute up and and add <AnchorFill />. Like this.
Code:

<Backdrop name="$(parent)BG"  centerColor="adadad" alpha="0.8">
            <AnchorFill />
            <Edge edgeSize="0" />
</Backdrop>

Igonore the edgeSize for some reason I am getting a background with the adadad color but it has a 5 or so pixel edge around it.

Mrwhitepantz 04/09/14 10:59 PM

Quote:

Originally Posted by jokerfwb (Post 3585)
Hey as much of a beginner as you but I have been able to get done what you were doing. You have to add open the BACKDROP attribute up and and add <AnchorFill />. Like this.
Code:

<Backdrop name="$(parent)BG"  centerColor="adadad" alpha="0.8">
            <AnchorFill />
            <Edge edgeSize="0" />
</Backdrop>

Igonore the edgeSize for some reason I am getting a background with the adadad color but it has a 5 or so pixel edge around it.

Sorry to hi-jack, but by any chance do you know how to set the background to be a separate image? rather than just a color fill?

Seerah 04/09/14 11:04 PM

http://wiki.esoui.com/Controls#BackdropControl

/edit: that's how to do it in the Lua. There's a way, too, for in the XML, where you set the texture through the Center child.
http://wiki.esoui.com/UI_XML#Backdrop


All times are GMT -6. The time now is 03:27 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI