Go to Page... |
Compatibility: | Necrom (9.0.0) Scribes of Fate (8.3.5) Firesong (8.2.5) Lost Depths (8.1.5) High Isle (8.0.0) |
Updated: | 03/14/23 07:50 AM |
Created: | 05/20/21 05:53 PM |
Monthly downloads: | 5,970 |
Total downloads: | 156,783 |
Favorites: | 130 |
MD5: |
## DependsOn: LibAddonMenuOrderListBox
--[[orderListBoxData= { type = "orderlistbox", name = "My OrderListBox", -- or string id or function returning a string listEntries = { [1] = { value = "Value of the entry", -- or number or boolean or function returning the value of this entry uniqueKey = 1, --number of the unique key of this list entry. This will not change if the order changes. Will be used to identify the entry uniquely text = "Text of this entry", -- or string id or function returning a string (optional) tooltip = "Tooltip text shown at this entry", -- or string id or function returning a string (optional) }, [2] = {...}, ... }, getFunc = function() return db.currentSortedListEntries end, setFunc = function(currentSortedListEntries) db.currentSortedListEntries = currentSortedListEntries doStuff() end, tooltip = "OrderListBox's tooltip text.", -- or string id or function returning a string (optional) width = "full", -- or "half" (optional) isExtraWide = false, -- boolean (optional) minHeight = function() return db.minHeightNumber end, --or number for the minimum height of this control. Default: 125 (optional) maxHeight = function() return db.maxHeightNumber end, --or number for the maximum height of this control. Default: value of minHeight (optional) rowHeight = function() return db.rowHeightNumber end, --or number for the height of the row of the entries in listEntries. Default: 25 (optional) rowTemplate = "LAM2_orderlistbox_widget_scrolllist_row", --String defining the XML virtual template control for a row of the listEntries (optional) Make sure to add the handlers OnDragStart and OnReceiveDrag to your virtual row template! Check XML file LAM2_orderlistbox_widget.xml, virtual control "LAM2_OrderListBox_Widget_Scrolllist_Row" as template! rowFont = "ZoFontWinH4", --or function returning a String of the font to use for the row (optional) rowMaxLineCount = 1, --or function returning a number of the maximum text lines within the row. 1 = Only 1 text line, no wrapping, get's truncated. (optional) rowSelectionTemplate = "ZO_ThinListHighlight", --or function defining the XML virtual template control for the selection at a row of the listEntries (optional) rowSelectedCallback = function doStuffOnSelection(rowControl, previouslySelectedData, selectedData, reselectingDuringRebuild) end, --An optional callback function when a row of the listEntries got selected. The standard selected callback function adding the selection XML template will always run BEFORE this optional one (optional) rowHideCallback = function doStuffOnHide(rowControl, currentRowData) end, --An optional callback function when a row of the listEntries got hidden (optional) dataTypeSelectSound = SOUNDS["NONE"], --or function returning a String of a sound from the global SOUNDS table. Will be played as any row containing the datatype (1) of the orderListBox will be selected (optional) dataTypeResetControlCallback = function doStuffOnReset(control) end, --An optional callback function when the datatype control gets reset (optional) disableDrag = false, -- or function returning a boolean (optional). Disable the drag&drop of the rows disableButtons = false, -- or function returning a boolean (optional). Disable the move up/move down/move to top/move to bottom buttons showPosition = false, -- or function returning a boolean (optional). Show the position number in front of the list entry showValue = false, -- or function returning a boolean (optional). Show the value of the entry after the list entry text, surrounded by [] showValueAtTooltip = false, -- or function returning a boolean (optional). Show the value of the entry after the tooltip text, surrounded by [] disabled = function() return db.someBooleanSetting end, -- or boolean (optional) warning = "May cause permanent awesomeness.", -- or string id or function returning a string (optional) requiresReload = false, -- boolean, if set to true, the warning text will contain a notice that changes are only applied after an UI reload and any change to the value will make the "Apply Settings" button appear on the panel which will reload the UI when pressed (optional) default = defaults.var, -- default value or function that returns the default value (optional) helpUrl = "https://www.esoui.com/portal.php?id=218&a=faq", -- a string URL or a function that returns the string URL (optional) reference = "MyAddonOrderListBox" -- unique global reference to control (optional) } ]]
settings.iconSortOrderEntries = { [1] = { value = "Value of the entry 1", -- or number or boolean or function returning the value of this entry uniqueKey = 1, --number of the unique key of this list entry. This will not change if the order changes. Will be used to identify the entry uniquely text = "Text of this entry 1", -- or string id or function returning a string (optional) tooltip = "Tooltip text shown at this entry 1", -- or string id or function returning a string (optional) }, [2] = { value = "Value of the entry 2", -- or number or boolean or function returning the value of this entry uniqueKey = 2, --number of the unique key of this list entry. This will not change if the order changes. Will be used to identify the entry uniquely text = "Text of this entry 2", -- or string id or function returning a string (optional) tooltip = "Tooltip text shown at this entry 2", -- or string id or function returning a string (optional) }, } { type = "orderlistbox", name = "Order list box 1", tooltip = "Tooltip of the order list box 1", listEntries = settings.iconSortOrderEntries, disableDrag = false, disableButtons = false, showPosition = false, getFunc = function() return settings.iconSortOrderEntries end, setFunc = function(sortedSortListEntries) settings.iconSortOrderEntries = sortedSortListEntries for idx, data in ipairs(sortedSortListEntries) do settings.icon[data.value].sortOrder = idx settings.iconSortOrder[idx] = data.value end end, width="full", minHeight = 250, maxHeight = 400, disabled = function() return false end, reference = "MyAddon_Settings_IconSortOrder_OrderListBox", disabled = function() return not settings.sortIcons end, default = defaultSettings.iconSortOrderEntries, },
File Name |
Version |
Size |
Uploader |
Date |
7 |
17kB |
Baertram |
04/18/22 06:17 AM |
|
6 |
17kB |
Baertram |
05/24/21 01:22 PM |
|
5 |
16kB |
Baertram |
05/24/21 09:09 AM |
|
4 |
16kB |
Baertram |
05/23/21 12:46 PM |
|
3 |
15kB |
Baertram |
05/21/21 02:55 PM |
|
2 |
13kB |
Baertram |
05/20/21 07:33 PM |
|
1 |
13kB |
Baertram |
05/20/21 05:53 PM |
![]() |
Comment Options |
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |
|
|
Error when trying to use a custom row template
I'm trying to use the widget combined with a custom row control.
I have the rowTemplate & reference parameters in my table to create the list control: Code:
rowTemplate = "NZA_Scroll_List_Row", -- String defining the XML virtual template control reference = "NZAListBox", -- unique global reference to control Code:
<GuiXml> <Control name="NZA_Scroll_List_Row" mouseEnabled="true" virtual="true"> <Controls> <!-- Virtual row for the odered list widget --> <Button name="$(parent)_Btn" inherits="ZO_ButtonBehaviorClickSound"> <Dimensions x="20" y="20"/> <Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT" offsetX="0" offsetY="2"/> <Textures normal="/esoui/art/buttons/decline_up.dds" pressed="/esoui/art/buttons/decline_down.dds" mouseOver="/esoui/art/buttons/decline_over.dds" disabled="/esoui/art/buttons/decline_disabled.dds" /> </Button> <Label name="$(parent)_Label" mouseEnabled="true" color="INTERFACE_COLOR_TYPE_TEXT_COLORS:INTERFACE_TEXT_COLOR_NORMAL"> <Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$(parent)_Btn" offsetX="0"/> </Label> </Controls> <Control> </GuiXml> Code:
CreateControlFromVirtual failed: template with VirtualName not found. ControlName[NZAListBox_OrderListBox1Row], ParentName[NZAListBox_OrderListBoxContents], VirtualName[NZAListBox_OrderListBox1Row]. stack traceback: [C]: in function 'CreateControlFromVirtual' /EsoUI/Libraries/Globals/GlobalVars.lua:18: in function 'CreateControlFromVirtual' (tail call): ? (tail call): ? /EsoUI/Libraries/Utility/ZO_ObjectPool.lua:166: in function 'ZO_ObjectPool:CreateObject' /EsoUI/Libraries/Utility/ZO_ObjectPool.lua:153: in function 'ZO_ObjectPool:AcquireObject' /EsoUI/Libraries/ZO_Templates/ScrollTemplates.lua:2442: in function 'ZO_ScrollList_UpdateScroll' /EsoUI/Libraries/ZO_Templates/ScrollTemplates.lua:2207: in function 'ZO_ScrollList_Commit' user:/AddOns/LibAddonMenuOrderListBox/LAM2_orderlistbox_widget.lua:668: in function 'OrderListBox:UpdateScrollList' user:/AddOns/LibAddonMenuOrderListBox/LAM2_orderlistbox_widget.lua:254: in function 'updateOrderListBoxEntries' user:/AddOns/LibAddonMenuOrderListBox/LAM2_orderlistbox_widget.lua:341: in function 'UpdateValue' user:/AddOns/LibAddonMenuOrderListBox/LAM2_orderlistbox_widget.lua:1110: in function 'LAMCreateControl.orderlistbox' user:/AddOns/LibAddonMenu-2.0/LibAddonMenu-2.0.lua:861: in function '(anonymous)' [C]: in function 'pcall' user:/AddOns/LibAddonMenu-2.0/LibAddonMenu-2.0.lua:861: in function 'CreateAndAnchorWidget' user:/AddOns/LibAddonMenu-2.0/LibAddonMenu-2.0.lua:917: in function 'CreateWidgetsInPanel' user:/AddOns/LibAddonMenu-2.0/LibAddonMenu-2.0.lua:897: in function 'nextCall' user:/AddOns/LibAddonMenu-2.0/LibAddonMenu-2.0.lua:935: in function 'DoCreateSettings' user:/AddOns/LibAddonMenu-2.0/LibAddonMenu-2.0.lua:937: in function 'DoCreateSettings' user:/AddOns/LibAddonMenu-2.0/LibAddonMenu-2.0.lua:949: in function 'CreateOptionsControls' user:/AddOns/LibAddonMenu-2.0/LibAddonMenu-2.0.lua:970: in function 'ToggleAddonPanels' [C]: in function 'SetHidden' user:/AddOns/LibAddonMenu-2.0/LibAddonMenu-2.0.lua:1116: in function 'addonListRow_Select' /EsoUI/Libraries/ZO_Templates/ScrollTemplates.lua:1648: in function 'ZO_ScrollList_SelectData' user:/AddOns/LibAddonMenu-2.0/LibAddonMenu-2.0.lua:1098: in function 'addonListRow_OnMouseDown |
![]() |
![]() |
Toirealach |
View Public Profile |
Send a private message to Toirealach |
Send email to Toirealach |
Find More Posts by Toirealach |
Add Toirealach to Your Buddy List |
![]() |
|||
|
I totally understand, thanks for the help
![]() I wish you a very well recovery, get healthy and stay so soon! ![]()
|
||
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Send email to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |
||
|
||
![]() |
![]() |
Teva |
View Public Profile |
Send a private message to Teva |
Send email to Teva |
Visit Teva's homepage! |
Find More Posts by Teva |
Add Teva to Your Buddy List |
![]() |
|
|
Thanks Teva.
I think it should be fine, had tested it in the past days and got no errors so far. The resizeToFit calls are only problematic on label controls not on TopLevelControl (TLC) or others. The game should notify you if there are problems, by showing you an error message too.
Last edited by Baertram : 03/16/23 at 02:31 AM.
|
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Send email to Baertram |
Visit Baertram's homepage! |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |
|
SetResizeToFitDescendents
Just a heads up that in LAM2_orderlistbox_widget.lua line 941 is calling
Code:
cursorTLC:SetResizeToFitDescendents(true) |
|
![]() |
![]() |
Teva |
View Public Profile |
Send a private message to Teva |
Send email to Teva |
Visit Teva's homepage! |
Find More Posts by Teva |
Add Teva to Your Buddy List |
![]() |
|
|
An example is build into the addon "FCOItemSaver" (version 2.0.3) at the Icons submenu -> Sort order... -> Sort order submenu
![]()
Last edited by Baertram : 05/24/21 at 01:25 PM.
|
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Send email to Baertram |
Visit Baertram's homepage! |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |
You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.