View Single Post
05/14/17, 10:18 AM   #5
Alaren96
 
Alaren96's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2017
Posts: 8
We're dealing with 3 controls..

A backdrop which is basically an area where other controls are added, and two virtual controls, a checkbox and a label..

Lua Code:
  1. <Backdrop name="$(parent)SearchBG" inherits="ZO_ThinBackdrop">
  2.     <Dimensions x="830" y="390" />
  3.     <Anchor point="TOPLEFT" offsetX="10" offsetY="80" />
  4. </Backdrop>
  5.  
  6. <Button name="EnchantMakerCheckBox" inherits="ZO_CheckButton" virtual="true" text="">
  7.     <Dimensions x="20" y="20" />
  8.     <Anchor point="TOPLEFT" offsetX="50" offsetY="50" />
  9. </Button>
  10.  
  11. <Label name="EnchantMakerCheckBoxText" font="ZoFontGame" color="INTERFACE_COLOR_TYPE_TEXT_COLORS:INTERFACE_TEXT_COLOR_NORMAL" virtual="true" text="">
  12.     <Anchor point="LEFT" relativePoint="RIGHT" offsetX="10" />
  13. </Label>

The checkbox is added to the backdrop control first and then the label control is added as a child of the checkbox..

Lua Code:
  1. cboxControl = CreateControlFromVirtual(controlName, EnchantMakerSearchBG, "EnchantMakerCheckBox")
  2. labelControl = CreateControlFromVirtual(controlName .. "Text", cboxControl, "EnchantMakerCheckBoxText")
  Reply With Quote