ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   ZO_ScrollList (https://www.esoui.com/forums/showthread.php?t=1532)

CrazyDutchGuy 05/17/14 07:54 AM

ZO_ScrollList
 
Wondering if anyone actually uses this, and got an implementation of ZO_ScrollList actually working? Trying to create my own one, but it just will not display for some reason.

CrazyDutchGuy 05/17/14 12:25 PM

After some fiddling i start to get something, but i don't see any data in the list

Lua Code:
  1. local scrollList = WINDOW_MANAGER:CreateControlFromVirtual("$(parent)ScrollList", window, "ZO_ScrollList")
  2. scrollList:SetAnchor(TOPLEFT, window, TOPLEFT, 400, 20)    
  3.  
  4. ZO_ScrollList_Initialize(scrollList)
  5.        
  6. local LOCATION_DATA = 1
  7.  
  8. ZO_ScrollList_AddDataType(scrollList, LOCATION_DATA, "SomeLocationRow", 23, nil, nil, nil, nil)
  9. local scrollData = ZO_ScrollList_GetDataList(scrollList)
  10. for i = 1, GetNumMaps() do
  11.         local mapName, mapType, mapContentType = GetMapInfo(i)
  12.         scrollData[#scrollData + 1] = ZO_ScrollList_CreateDataEntry(LOCATION_DATA, { locationName = zo_strformat("<<1>>", mapName), index = i })
  13. end    
  14.  
  15. ZO_ScrollList_Commit(scrollList)

xml part
Lua Code:
  1. <Control name="SomeLocationRow" virtual="true">
  2.             <Dimensions x="200" y="23"/>
  3.             <Controls>
  4.                 <Label name="$(parent)Location" inherits="ZO_SelectableLabel" font="ZoFontHeader">
  5.                     <Anchor point="TOPLEFT"/>
  6.                 </Label>
  7.             </Controls>
  8.         </Control>

which results in this


I don't see any map locations and the slider is way too small. I can manually fiddle with the height, but still it misses the content

CrazyDutchGuy 05/17/14 04:34 PM

Ok it was working all the time, only i added a wrong control object to display it in ....

gcarver 06/05/14 01:59 PM

I am also trying to use the scrolllist and I get the same results as you. What sort of control did you use to get the display? Could you post that?

ingeniousclown 06/05/14 03:10 PM

Not sure if CDG is still having issues with this or not, this is half a month old.

However, looking at his code, I have to ask: what do you expect the list item to look like?

"That's a good question, clown," you may say. I believe you need to set up a control factory function for populating the list. Don't ask me how... I dunno right now >_<

pills 06/07/14 09:25 PM

not sure if this helps
 
you can try and grok this. its what I did for MailR (Guild Beta) but stripped down and uh...readable.

http://www.esoui.com/downloads/info5...stExample.html

CrazyDutchGuy 06/08/14 03:46 AM

old threads getting resurrected :) I solved it a wile ago, was just some stupidity. Anyways thanks for the helpfullness and i am pretty sure it is handy for other people working on scrollists

gcarver 06/08/14 06:27 AM

Thanks pills. That example is very helpful.


All times are GMT -6. The time now is 06:30 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI