Ok I finally managed setting up a working scroll container:
lua Code:
<GuiXml>
<Controls>
<!-- This is my parent container containing the scrollable container -->
<TopLevelControl name="AuraMasteryMenuContainer" clampedToScreen="true" mouseEnabled="true" movable="true" hidden="true">
<Dimensions x="1280" y="768" />
<Anchor point="CENTER" relativeTo="GuiRoot" relativePoint="CENTER" />
<Controls>
<Backdrop name="$(parent)_Backdrop" centerColor="CC000000" edgeColor="1F1F1F">
<AnchorFill />
<Edge edgeSize= "1" />
</Backdrop>
<!-- SCrollable container that will contain all the nice little icons that the user will be able to scroll through -->
<Control name="$(parent)ScrollExample" inherits="ZO_ScrollContainer">
<OnInitialized>
ZO_Scroll_Initialize(self)
</OnInitialized>
<Dimensions x="850" y="630"/>
<Anchor point="BOTTOMLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT" offsetX="50" offsetY="650" />
</Control>
And the .lua file for adding one of the above mentioned icons to the scroll container:
lua Code:
local parent = WM:GetControlByName("AuraMasteryMenuContainerScrollExampleScrollChild");
d(tostring(parent));
local icon = WM:CreateControl("$(parent)_Texture", parent, CT_TEXTURE);
icon:SetParent(parent);
icon:SetAnchor(TOPLEFT, parent, TOPLEFT, 4, 4);
icon:SetDimensions(iconSize,iconSize);
icon:SetTexture("esoui/art/icons/ability_1handed_001.dds");
This code results in the icon texture being displayed, but no scroll bar and no background for the scrollcontainer.
In this post (
http://www.esoui.com/forums/showpost.php?p=10826) u stated that
Originally Posted by merlight
ZO_ScrollContainer is a control that contains the slider bar, buttons and the scrolled area, which is named "$(parent)ScrollChild".
|
I inspected the container with the addon "zgoo" and the container does not contain a scrollbar.
Did i do something wrong or did Zenimax change that? How do i set up a scollbar and associate it or it's event handler OnValueChanged to the container?
P.S.: I didn't get that ZO_ScrollContainer and ZO_ScrollList are two different things, that confused me