Thanks for getting back to me! I figured that out not long ago after getting a better understanding of CMX. Unfortunately I can't get the textures to display.
The current XML I'm using is:
Lua Code:
<GuiXml>
<Controls>
<Control name="BarTracker_Slot" virtual="true">
<!-- <Anchor point="CENTER" relativeTo="$(parent)" relativePoint="CENTER" offsetX="0" offsetY="0"/>-->
<Controls>
<Texture name="$(parent)Tex">
<Anchor point="LEFT" relativePoint="LEFT"/>
<Dimensions x="50" y="50"/>
</Texture>
</Controls>
</Control>
<TopLevelControl name="BarTrackerWindow">
<Dimensions x="250" y="100"/>
<Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="CENTER" offsetX="0" offsetY="0"/>
<OnMouseEnter>WINDOW_MANAGER:SetMouseCursor(12);</OnMouseEnter>-->
<OnMouseExit>WINDOW_MANAGER:SetMouseCursor(0);</OnMouseExit>
<OnMoveStop>BarTracker.savePosition()</OnMoveStop>
<Controls>
<Backdrop name="$(parent)_BG" alpha="1" centerColor="40000000" edgeColor="60000000">
<AnchorFill />
<Edge edgeSize="1" />
</Backdrop>
<Control name="$(parent)_Front">
<Dimensions x="250" y="100" />
<Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT"/>
</Control>
<Control name="$(parent)_Back">
<Dimensions x="250" y="100" />
<Anchor point="TOPLEFT" relativeTo="$(parent)_Front" relativePoint="TOPLEFT"/>
</Control>
</Controls>
</TopLevelControl>
</Controls>
</GuiXml>
And I'm trying to use the virtual via:
Lua Code:
local wm = WINDOW_MANAGER
BarTracker = {
name = "BarTracker",
author = "QuantumPie",
version = "0.0.1",
varsVersion = 1,
guiWindow = BarTrackerWindow,
guiBG = BarTrackerWindow_BG,
guiFront = BarTrackerWindow_Front,
guiBack = BarTrackerWindow_Back,
guiTemplate = "BarTracker_Slot",
wm = WINDOW_MANAGER,
defaults = {
fb = {},
bb = {},
hidden = false,
isLocked = false
}
}
...
function BarTracker.initTracker()
BarTracker.restorePosition()
BarTracker.updateVisibility()
for i=1, 1, 1 do
d("Putting slot")
local slot = wm:CreateControlFromVirtual("Bar_Slot_" .. i, BarTracker.guiFront, BarTracker.guiTemplate)
slot:SetAnchor(TOPLEFT, BarTracker.guiFront, TOPLEFT, 0, 0)
slot:SetHidden(false)
slot.tex = slot:GetNamedChild("Tex")
slot.tex:SetTexture("art/icons/ability_templar_purifying_light.dds")
end
end
Currently I can see the backdrop but the textures aren't displaying. Through DebugLogViewer I can see the print and no errors.