Go to Page... |
Compatibility: | Update 43 (10.1.0) Gold Road (10.0.0) Scions of Ithelia (9.3.0) Endless Archive (9.2.5) base-game patch (9.1.5) Necrom (9.0.0) Scribes of Fate (8.3.5) |
Updated: | 05/30/24 08:18 PM |
Created: | 05/20/21 05:53 PM |
Monthly downloads: | 5,640 |
Total downloads: | 300,394 |
Favorites: | 165 |
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 [] addEntryDialog = { --title="Add new value", --text="Enter new value here", textType=TEXT_TYPE_ALL, --buttonTexture="/esoui/art/buttons/minus_up.dds", --maxInputCharacters=3, --specialCharacters={"a", "b", "c"}, --defaultText = "Default text", --instructions = ZO_ValidNameInstructions:New(GetControl(self, "NameInstructions"), nil, { NAME_RULE_TOO_SHORT, NAME_RULE_CANNOT_START_WITH_SPACE, NAME_RULE_MUST_END_WITH_LETTER }) validatesText = true, validator = function(text) return text ~= nil and text ~= "" end }, showRemoveEntryButton = true, askBeforeRemoveEntry = function() return true end 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 |
10 |
17kB |
Baertram |
12/09/23 05:33 PM |
|
9 |
17kB |
Baertram |
11/13/23 02:58 PM |
|
8 |
17kB |
Baertram |
03/14/23 07:50 AM |
|
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 |
karthrag inak |
View Public Profile |
Send a private message to karthrag inak |
Send email to karthrag inak |
Find More Posts by karthrag inak |
Add karthrag inak to Your Buddy List |
![]() |
||
|
![]() And I have to say this as it's true: It's not only me! All the staff here, and the other addon devs that are with me since 2014, or even new ones that came in later are very helping and keeping the community and this game alive. So: Say thanks to them all ![]() |
|
![]() |
![]() |
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 |
![]() |
|
Forum posts: 0
File comments: 69
Uploads: 0
|
EDIT: Seems Like I should have updated my addons this morning, appears that LibScrollableMenu update has addressed this.
Thanks for All you do Baertram. I shudder to think what the ESO experience would be without your formidable efforts and contributions.
Last edited by karthrag inak : 12/11/23 at 08:15 AM.
|
![]() |
![]() |
karthrag inak |
View Public Profile |
Send a private message to karthrag inak |
Send email to karthrag inak |
Find More Posts by karthrag inak |
Add karthrag inak to Your Buddy List |
![]() |
||
|
Re: Error when trying to use a custom row template
Edit:
I'll have a look, seems the rowTemplate is not used properly there to create the row controls. It's still searching for the virtual template name "NZAListBox_OrderListBox1Row" which seems to be <reference>_OrderListBox<number>Row somehow Does it work if you pass in rowTemplate = "LAM2_OrderListBox_Widget_Scrolllist_Row" ? Edit2: I cannot find any error there, the rowTemplate name is passed as templateName to Code:
ZO_ScrollList_AddDataType(scrollListControl, dataTypeId, templateName, rowHeight, setupFunction, rowHideCallback, dataTypeSelectSound, resetControlCallback) Either you are overwriting rowTemplate somehow, somewhere with another value or I'm puzzled where that NZAListBox_OrderListBox1* template name comes from... If you leave the rowTemplate empty it does the very same as you try there, but only passes in the default XML defined "LAM2_OrderListBox_Widget_Scrolllist_Row" in the addon folder of this addon here. So this works fine, and your code muset somehow mess up the assigned rowTemplate then? Or I'm really stuck. btw: !!! IF you want your virtual XML template to work properly you MUST have a look at my virtual template and at least add the handlers OnDragStart and OnReceiveDrag to your template too! ->Check file live/Addons/LibAddonMenuOrderListBox/LAM2_orderlistbox_widget.xml, virtual template "LAM2_OrderListBox_Widget_Scrolllist_Row" !!!
Last edited by Baertram : 04/28/23 at 03:42 AM.
|
|
![]() |
![]() |
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 |
![]() |
|
|
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.