Thread Tools Display Modes
10/20/23, 05:41 PM   #1
robert.labrie
AddOn Author - Click to view addons
Join Date: Dec 2021
Posts: 16
Just want a window with a black background

Does anyone have an example of doing a control with a plain black background? I swear I'm trying but not getting it. I assume it goes in the backdrop with centerColor and edgeColor but if I don't inherit a backdrop it doesn't render anything and if I do then it just looks like the backdrop. I'll work out the anchors and starting position and the rest I just want a black box to put labels in right now.

I'm a sysadmin, not a front end dev, please take pity on me.

Thanks,
Robert
  Reply With Quote
10/21/23, 06:41 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
Hi Robert,

you can try to use this virtual backdrop here, it looks black see-through with a small thin border around it:

Code:
<GuiXml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sir.insidi.at/or/schema/esoui.xsd">
<Controls>
		<Backdrop name="DarkThinFrameBackdrop" inherits="ZO_DarkThinFrame" virtual="true" tier="LOW" layer="BACKGROUND" level="0">
			<Anchor point="TOPLEFT" offsetX="-4" offsetY="-4"/>
            <Anchor point="BOTTOMRIGHT" offsetX="4" offsetY="4"/>
            <Edge file="EsoUI/Art/Miscellaneous/dark_edgeFrame_8_thin.dds" edgeFileWidth="64" edgeFileHeight="8" />
            <Center file="EsoUI/Art/Miscellaneous/Gamepad/gp_edgeFill.dds" />
        </Backdrop>



</Controls>

</GuiXML>

Then create a TopLevelControl and at it's <Controls> add this e.g.

Code:
<TopLevelControl name="MyUI_TLC_Keyboard">
            <Dimensions x="900" y="600"/>
            <DimensionConstraints minX="900" minY="600"/>
            <Anchor point="CENTER" relativeTo="GuiRoot" relativePoint="CENTER" offsetX="0" offsetY="0"/>
<!-- Background -->
		    	<Backdrop name="$(parent)BG" alpha="1" inherits="DarkThinFrameBackdrop" centerColor="666666">
		    		<AnchorFill/>
				</Backdrop>

  </Controls>
        </TopLevelControl>
I bet there also is an easy way to craete just a plain black backdrop but I never did, so I'm not quite sure how to do it.
Maybe you can change the above line
<Backdrop name="$(parent)BG" alpha="1" inherits="DarkThinFrameBackdrop" centerColor="666666">
to use 000000 as center color.


Edit:
The ZO_DarkThinFrame backdrop with centerColor="666666" looks like this

Last edited by Baertram : 10/21/23 at 08:27 AM.
  Reply With Quote
10/21/23, 07:23 PM   #3
robert.labrie
AddOn Author - Click to view addons
Join Date: Dec 2021
Posts: 16
Deleted my other responses, thanks Baertram I took your example and modded a bit more am good to go. Any idea how to hid the frame border? Votan does it in lua like this

frame:SetHidden(true)

Not critical, looks way better now than when I started so thanks again so much for your help!
  Reply With Quote
10/22/23, 05:55 AM   #4
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
frame:SetHidden(true) would only work if you got an extra control e.g. <control name="$(parent)Frame" ... /> and have assigned it in lua via
local frame = MyUI_TLC_Keyboard:GetNamedChild("Frame")

But as this is not the case, and the frame is only a texture <Edge file="....

Try if commenting this line will remove the frame texture around it:
<!-- <Edge file="EsoUI/Art/Miscellaneous/dark_edgeFrame_8_thin.dds" edgeFileWidth="64" edgeFileHeight="8" /> -->

Last edited by Baertram : 10/22/23 at 05:59 AM.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Just want a window with a black background


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