Thread Tools Display Modes
10/26/14, 08:41 AM   #1
zireko
 
zireko's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 63
I know this is a Simple XML transparent question but need some help.

All I'm trying to do is make this transparent when I delete it , it gives me a white box background.
I tried to look for the api for backdrops and couldn't find them in the main api list , also I tried looking it up in zgoo but I may just be looking in the wrong places.

inherits="ZO_ThinBackdrop"

here is my xml currently

Lua Code:
  1. <GuiXml>
  2.     <Controls>
  3.         <TopLevelControl name="QuestLurker" mouseEnabled="true" movable="true" hidden="false" resizeToFitDescendents="true">       
  4.                 <Controls>
  5.                 <Backdrop name="$(parent)BG" inherits="ZO_ThinBackdrop" excludeFromResizeToFitExtents="true">
  6.                     <AnchorFill />
  7.                 </Backdrop>
  8.                
  9.                 <Label name="$(parent)Quest" font="ZoFontWindowTitle" color="CFDCBD" wrapMode="ELLIPSIS" verticalAlignment="CENTER" horizontalAlignment="CENTER">
  10.                     <Anchor point="CENTER" realtiveTo="$(parent)" realtivePoint="CENTER" offsetX="0" offsetY="0" />
  11.                 </Label>
  12.             </Controls>
  13.         </TopLevelControl>
  14.     </Controls>
  15. </GuiXml>
  Reply With Quote
10/26/14, 09:55 AM   #2
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
If you want to make any control transparent in LUA, use SetAlpha(value), where value is number between 0 (transparent) and 1 (fully opaque).
lua Code:
  1. QuestLurkerBG:SetAlpha(0.3)
Or you can completely hide control using SetHidden(true).
lua Code:
  1. QuestLurkerBG:SetHidden(true)

If you want set transparency in XML use alpha="value". This example sets transparency for backdrop to 30%:
lua Code:
  1. <Backdrop name="$(parent)BG" inherits="ZO_ThinBackdrop" alpha="0.3" />
To completely hide control in XML use hidden="true":
lua Code:
  1. <Backdrop name="$(parent)BG" inherits="ZO_ThinBackdrop" hidden="true" />

Last edited by Garkin : 10/26/14 at 10:14 AM.
  Reply With Quote
10/26/14, 11:42 AM   #3
zireko
 
zireko's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 63
Thank you Garkin it's working perfect now.
  Reply With Quote
10/27/14, 01:04 AM   #4
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
If you want to hide the entire control do what Garkin suggested.
But, just fyi there may be a case sometimes when you don't want to hide the entire control.

For example if you had a backdrop & you only wanted to see the border, but not the rest (center) of the control you could set its center color
Lua Code:
  1. centerColor="00000000"

and that would make the center transparent, but the border would still be visible.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » I know this is a Simple XML transparent question but need some help.


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