Go to Page... |
Compatibility: | Gold Road (10.0.0) Scions of Ithelia (9.3.0) |
Updated: | 06/02/24 01:51 PM |
Created: | 01/24/23 03:57 PM |
Monthly downloads: | 5,795 |
Total downloads: | 248,447 |
Favorites: | 117 |
MD5: |
--Adds a scrollable dropdown to the comboBoxControl, replacing the original dropdown, and enabling scrollable submenus (even with nested scrollable submenus) -- control parent Must be the parent control of the comboBox -- control comboBoxContainer Must be any ZO_ComboBox control (e.g. created from virtual template ZO_ComboBox -> Where ZO_ComboBox_ObjectFromContainer can find the m_comboBox object) -- -- table options:optional = { --> === Dropdown general customization ================================================================================= -- number visibleRowsDropdown:optional Number or function returning number of shown entries at 1 page of the scrollable comboBox's opened dropdown -- number visibleRowsSubmenu:optional Number or function returning number of shown entries at 1 page of the scrollable comboBox's opened submenus -- number maxDropdownHeight Number or function returning number of total dropdown's maximum height -- boolean sortEntries:optional Boolean or function returning boolean if items in the main-/submenu should be sorted alphabetically. !!!Attention: Default is TRUE (sorting is enabled)!!! -- table sortType:optional table or function returning table for the sort type, e.g. ZO_SORT_BY_NAME, ZO_SORT_BY_NAME_NUMERIC -- boolean sortOrder:optional Boolean or function returning boolean for the sort order ZO_SORT_ORDER_UP or ZO_SORT_ORDER_DOWN -- string font:optional String or function returning a string: font to use for the dropdown entries -- number spacing:optional, Number or function returning a Number: Spacing between the entries -- boolean disableFadeGradient:optional Boolean or function returning a boolean: for the fading of the top/bottom scrolled rows -- table headerColor:optional table (ZO_ColorDef) or function returning a color table with r, g, b, a keys and their values: for header entries -- table normalColor:optional table (ZO_ColorDef) or function returning a color table with r, g, b, a keys and their values: for all normal (enabled) entries -- table disabledColor:optional table (ZO_ColorDef) or function returning a color table with r, g, b, a keys and their values: for all disabled entries --> ===Dropdown header/title ========================================================================================== -- string titleText:optional String or function returning a string: Title text to show above the dropdown entries -- string titleFont:optional String or function returning a font string: Title text's font. Default: "ZoFontHeader3" -- string subtitleText:optional String or function returning a string: Sub-title text to show below the titleText and above the dropdown entries -- string subtitleFont:optional String or function returning a font string: Sub-Title text's font. Default: "ZoFontHeader2" -- number titleTextAlignment:optional Number or function returning a number: The title's vertical alignment, e.g. TEXT_ALIGN_CENTER -- userdata customHeaderControl:optional Userdata or function returning Userdata: A custom control thta should be shown above the dropdown entries --> === Dropdown text search & filter ================================================================================= -- boolean enableFilter:optional Boolean or function returning boolean which controls if the text search/filter editbox at the dropdown header is shown ---> === Dropdown callback functions -- function preshowDropdownFn:optional function function(ctrl) codeHere end: to run before the dropdown shows ---> === Dropdown's Custom XML virtual row/entry templates ============================================================ -- boolean useDefaultHighlightForSubmenuWithCallback Boolean or function returning a boolean if always the default ZO_ComboBox highlight XML template should be used for an entry having a submenu AND a callback function. If false the highlight 'LibScrollableMenu_Highlight_Green' will be used -- table XMLRowTemplates:optional Table or function returning a table with key = row type of lib.scrollListRowTypes and the value = subtable having -- "template" String = XMLVirtualTemplateName, -- rowHeight number = ZO_COMBO_BOX_ENTRY_TEMPLATE_HEIGHT, -- setupFunc = function(control, data, list) -- local comboBox = ZO_ComboBox_ObjectFromContainer(comboBoxContainer) -- comboBoxContainer = The ZO_ComboBox control you created via WINDOW_MANAGER:CreateControlFromVirtual("NameHere", yourTopLevelControlToAddAsAChild, "ZO_ComboBox") -- comboBox:SetupEntryLabel(control, data, list) -- -->See class comboBox_base:SetupEntry* functions above for examples how the setup functions provide the data to the row control -- -->Reuse those where possible by calling them via e.g. self:SetupEntryBase(...) and then just adding your additional controls setup routines -- end -- -->See local table "defaultXMLTemplates" in LibScrollableMenu -- -->Attention: If you do not specify all template attributes, the non-specified will be mixedIn from defaultXMLTemplates[entryType_ID] again! -- { -- [lib.scrollListRowTypes.LSM_ENTRY_TYPE_NORMAL] = { template = "XMLVirtualTemplateRow_ForEntryId", ... } -- [lib.scrollListRowTypes.LSM_ENTRY_TYPE_SUBMENU] = { template = "XMLVirtualTemplateRow_ForSubmenuEntryId", ... }, -- ... -- } ---> === Narration: UI screen reader, with accessibility mode enabled only ============================================ -- table narrate:optional Table or function returning a table with key = narration event and value = function called for that narration event. -- Each functions signature/parameters is shown below! -- -> The function either builds your narrateString and narrates it in your addon. -- Or you must return a string as 1st return param (and optionally a boolean "stopCurrentNarration" as 2nd return param. If this is nil it will be set to false!) -- and let the library here narrate it for you via the UI narration -- Optional narration events can be: -- "OnComboBoxMouseEnter" function(m_dropdownObject, comboBoxControl) Build your narrateString and narrate it now, or return a string and let the library narrate it for you end -- "OnComboBoxMouseExit" function(m_dropdownObject, comboBoxControl) end -- "OnMenuShow" function(m_dropdownObject, dropdownControl, nil, nil) end -- "OnMenuHide" function(m_dropdownObject, dropdownControl) end -- "OnSubMenuShow" function(m_dropdownObject, parentControl, anchorPoint) end -- "OnSubMenuHide" function(m_dropdownObject, parentControl) end -- "OnEntryMouseEnter" function(m_dropdownObject, entryControl, data, hasSubmenu) end -- "OnEntryMouseExit" function(m_dropdownObject, entryControl, data, hasSubmenu) end -- "OnEntrySelected" function(m_dropdownObject, entryControl, data, hasSubmenu) end -- "OnCheckboxUpdated" function(m_dropdownObject, checkboxControl, data) end -- Example: narrate = { ["OnComboBoxMouseEnter"] = myAddonsNarrateComboBoxOnMouseEnter, ... } -- } function AddCustomScrollableComboBoxDropdownMenu(parent, comboBoxContainer, options)
Entry types: LSM_ENTRY_TYPE_NORMAL LSM_ENTRY_TYPE_DIVIDER LSM_ENTRY_TYPE_HEADER LSM_ENTRY_TYPE_CHECKBOX LSM_ENTRY_TYPE_SUBMENU --Adds a new entry to the context menu entries with the shown text, where the callback function is called once the entry is clicked. --If entries is provided the entry will be a submenu having those entries. The callback can be used, if entries are passed in, too (to select a special entry and not an enry of the opening submenu). --But usually it should be nil if entries are specified, as each entry in entries got it's own callback then. --Existing context menu entries will be kept (until ClearCustomScrollableMenu will be called) -- --Example - Normal entry without submenu --AddCustomScrollableMenuEntry("Test entry 1", function() d("test entry 1 clicked") end, LibScrollableMenu.LSM_ENTRY_TYPE_NORMAL, nil, nil) --Example - Normal entry with submenu --AddCustomScrollableMenuEntry("Test entry 1", function() d("test entry 1 clicked") end, LibScrollableMenu.LSM_ENTRY_TYPE_NORMAL, { -- [1] = { -- label = "Test submenu entry 1", --optional String or function returning a string. If missing: Name will be shown and used for clicked callback value -- name = "TestValue1" --String or function returning a string if label is givenm name will be only used for the clicked callback value -- isHeader = false, -- optional boolean or function returning a boolean Is this entry a non clickable header control with a headline text? -- isDivider = false, -- optional boolean or function returning a boolean Is this entry a non clickable divider control without any text? -- isCheckbox = false, -- optional boolean or function returning a boolean Is this entry a clickable checkbox control with text? -- isNew = false, -- optional booelan or function returning a boolean Is this entry a new entry and thus shows the "New" icon? -- entries = { ... see above ... }, -- optional table containing nested submenu entries in this submenu -> This entry opens a new nested submenu then. Contents of entries use the same values as shown in this example here -- contextMenuCallback = function(ctrl) ... end, -- optional function for a right click action, e.g. show a scrollable context menu at the menu entry -- } --}, --[[additionalData]] -- { isNew = true, normalColor = ZO_ColorDef, highlightColor = ZO_ColorDef, disabledColor = ZO_ColorDef, highlightTemplate = "ZO_SelectionHighlight", -- font = "ZO_FontGame", label="test label", name="test value", enabled = true, checked = true, customValue1="foo", cutomValue2="bar", ... } -- --[[ Attention: additionalData keys which are maintained in table LSMOptionsKeyToZO_ComboBoxOptionsKey will be mapped to ZO_ComboBox's key and taken over into the entry.data[ZO_ComboBox's key]. All other "custom keys" will stay in entry.data.additionalData[key]! ]] --) function AddCustomScrollableMenuEntry(text, callback, entryType, entries, additionalData) --Adds an entry having a submenu (or maybe nested submenues) in the entries table/entries function whch returns a table --> See examples for the table "entries" values above AddCustomScrollableMenuEntry --Existing context menu entries will be kept (until ClearCustomScrollableMenu will be called) function AddCustomScrollableSubMenuEntry(text, entries) --Adds a divider line to the context menu entries --Existing context menu entries will be kept (until ClearCustomScrollableMenu will be called) function AddCustomScrollableMenuDivider() --Adds a header line to the context menu entries --Existing context menu entries will be kept (until ClearCustomScrollableMenu will be called) function AddCustomScrollableMenuHeader(text, additionalData) --Adds a checkbox line to the context menu entries --Existing context menu entries will be kept (until ClearCustomScrollableMenu will be called) function AddCustomScrollableMenuCheckbox(text, callback, checked, additionalData) --Pass in a table/function returning a table with predefined context menu entries and let them all be added in order of the table's number key --Existing context menu entries will be kept (until ClearCustomScrollableMenu will be called) function AddCustomScrollableMenuEntries(contextMenuEntries) --Populate a new scrollable context menu with the defined entries table/a functinon returning the entries. --Existing context menu entries will be reset, because ClearCustomScrollableMenu will be called! --You can add more entries later, prior to showing, via AddCustomScrollableMenuEntry / AddCustomScrollableMenuEntries functions too function AddCustomScrollableMenu(entries, options) --Set the options (visible rows max, etc.) for the scrollable context menu, or any passed in 2nd param comboBoxContainer -->See possible options above AddCustomScrollableComboBoxDropdownMenu function SetCustomScrollableMenuOptions(options, comboBoxContainer) --Show the custom scrollable context menu now at the control controlToAnchorTo, using optional options. --If controlToAnchorTo is nil it will be anchored to the current control's position below the mouse, like ZO_Menu does --Existing context menu entries will be kept (until ClearCustomScrollableMenu will be called) function ShowCustomScrollableMenu(controlToAnchorTo, options) --Hide the custom scrollable context menu and clear it's entries, clear internal variables, mouse clicks etc. function ClearCustomScrollableMenu() --Can be used within a callback function of any entry: --Run a callback function myAddonCallbackFunc passing in the entries of the opening menu/submneu of a clicked LSM context menu item -->Parameters of your function myAddonCallbackFunc must be: -->function myAddonCallbackFunc(userdata LSM_comboBox, userdata selectedContextMenuItem, table openingMenusEntries, ...) -->... can be any additional params that your function needs, and must be passed in to the ... of calling API function RunCustomScrollableMenuItemsCallback too! --->e.g. use this function in your LSM contextMenu entry's callback function, to call a function of your addon to update your SavedVariables -->based on the currently selected checkboxEntries of the opening LSM dropdown: --[[ AddCustomScrollableMenuEntry("Context menu Normal entry 1", function(comboBox, itemName, item, selectionChanged, oldItem) d('Context menu Normal entry 1') local function myAddonCallbackFunc(LSM_comboBox, selectedContextMenuItem, openingMenusEntries, customParam1, customParam2) --Loop at openingMenusEntries, get it's .dataSource, and if it's a checked checkbox then update SavedVariables of your addon accordingly --or do oher things --> Attention: Updating the entries in openingMenusEntries won't work as it's a copy of the data as the contextMenu was shown, and no reference! --> Updating the data directly would make the menus break, and sometimes the data would be even gone due to your mouse moving above any other entry --> wile the callbackFunc here runs end --Use LSM API func to get the opening control's list and m_sorted items properly so addons do not have to take care of that again and again on their own RunCustomScrollableMenuItemsCallback(comboBox, item, myAddonCallbackFunc, { LSM_ENTRY_TYPE_CHECKBOX }, true, "customParam1", "customParam2") end) ]] --If table/function returning a table parameter filterEntryTypes is not nil: --The table needs to have a number key and a LibScrollableMenu entryType constants e.g. LSM_ENTRY_TYPE_CHECKBOX as value. Only the provided entryTypes will be selected --from the m_sortedItems list of the parent dropdown! All others will be filtered out. Only the selected entries will be passed to the myAddonCallbackFunc's param openingMenusEntries. --If the param filterEntryTypes is nil: All entries will be selected and passed to the myAddonCallbackFunc's param openingMenusEntries. -- --If the boolean/function returning a boolean parameter fromParentMenu is true: The menu items of the opening (parent) menu will be returned. If false: The currently shown menu's items will be returned function RunCustomScrollableMenuItemsCallback(comboBox, item, myAddonCallbackFunc, filterEntryTypes, fromParentMenu, ...)
Entry types: LSM_ENTRY_TYPE_NORMAL LSM_ENTRY_TYPE_DIVIDER LSM_ENTRY_TYPE_HEADER LSM_ENTRY_TYPE_CHECKBOX --Adds a new entry to the context menu entries with the shown text, which calls the callback function once clicked. --If entries is provided the entry will be a submenu having those entries. The callback can only be used if entries are passed in --but normally it should be nil in that case function AddCustomScrollableMenuEntry(text, callback, entryType, entries, isNew) --Adds an entry having a submenu (or maybe nested submenues) in the entries table function AddCustomScrollableSubMenuEntry(text, entries) --Adds a divider line to the context menu entries function AddCustomScrollableMenuDivider() --Pass in a table with predefined context menu entries and let them all be added in order of the table's number key function AddCustomScrollableMenuEntries(contextMenuEntries) --Set the options (visible rows max, etc.) for the scrollable context menu function SetCustomScrollableMenuOptions(options, scrollHelper) --Add a new scrollable context menu with the defined entries table. --You can add more entries later via AddCustomScrollableMenuEntry function too function AddCustomScrollableMenu(parent, entries, options) --Show the custom scrollable context menu now function ShowCustomScrollableMenu(controlToAnchorTo, point, relativePoint, offsetX, offsetY, options) --Hide the custom scrollable context menu and clear internal variables, mouse clicks etc. function ClearCustomScrollableMenu()
File Name |
Version |
Size |
Uploader |
Date |
2.2 |
62kB |
Baertram |
06/02/24 11:06 AM |
|
2.1.1 |
41kB |
Baertram |
04/29/24 03:37 PM |
|
2.1 |
41kB |
Baertram |
04/26/24 02:02 PM |
|
2.0 |
29kB |
Baertram |
03/21/24 05:38 AM |
|
1.9 |
28kB |
Baertram |
03/11/24 03:10 AM |
|
1.8 |
31kB |
Baertram |
02/26/24 03:42 AM |
|
1.7 |
27kB |
Baertram |
01/11/24 06:09 PM |
|
1.6 |
23kB |
Baertram |
12/10/23 11:26 AM |
|
1.5 |
23kB |
Baertram |
12/09/23 06:05 PM |
|
1.4 |
22kB |
Baertram |
11/13/23 02:59 PM |
|
1.3 |
22kB |
Baertram |
10/31/23 04:15 AM |
|
1.2 |
22kB |
Baertram |
10/30/23 03:56 AM |
|
1.1 |
7kB |
tomstock |
03/19/23 02:51 PM |
|
1.0 |
7kB |
01/24/23 03:57 PM |
![]() |
Comment Options |
![]() |
|
|
but ESO UI has ZO_ScrollableComboBox already
![]() |
![]() |
![]() |
zelenin |
View Public Profile |
Send a private message to zelenin |
Find More Posts by zelenin |
Add zelenin to Your Buddy List |
Kyoma |
View Public Profile |
Send a private message to Kyoma |
Find More Posts by Kyoma |
Add Kyoma to Your Buddy List |
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
ewscharf |
View Public Profile |
Send a private message to ewscharf |
Find More Posts by ewscharf |
Add ewscharf to Your Buddy List |
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |
||
Forum posts: 0
File comments: 7
Uploads: 0
|
I disabled all my addons and left only this one enabled (I even created a new addons folder and started the game again with only LibScrollableMenu there to be loaded). I tested it in more than 5 houses, from Pilgrim's Rest to Mathiisen Manor. I go into Housing Editor mode (key F5), and open the Housing panel (key R), then I click the Purchase menu. There I can navigate the left menu like usual (Services, Dining, Suite, etc), but if I try to use the dropdown-menu (at right top corner) to select a theme, as soon I chose any theme the UI Error panel will show the error. And the list of items will become messy. Thanks! Edit: When we open the Housing panel, we start at "Place" window, where we have a list of our items to use. The dropdown-menu to filter themes is also there, but it works fine. Only in the store window the bug happens.
Last edited by ewscharf : 11/29/23 at 04:40 PM.
|
|
![]() |
![]() |
ewscharf |
View Public Profile |
Send a private message to ewscharf |
Find More Posts by ewscharf |
Add ewscharf to Your Buddy List |
![]() |
|||
|
Thanks for the details, that's very appreciated!
We'll have a look how and where that could happen. Guess the lib hooks into some ZO_ function too early then.
|
||
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |
|
|
Check your PM here please for a test BETA version, hope it works for you.
|
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |
||
Forum posts: 0
File comments: 7
Uploads: 0
|
|
|
![]() |
![]() |
ewscharf |
View Public Profile |
Send a private message to ewscharf |
Find More Posts by ewscharf |
Add ewscharf to Your Buddy List |
![]() |
|||
|
![]()
Last edited by Baertram : 12/02/23 at 07:53 AM.
|
||
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |
|
Update causes Advanced Filters to stop working
So I did all the testing I could and finally figured out which addon caused the issue.
This recent update causes the Built-In Advanced Filters menu items to stop working, however the Custom Advanced Filter Plugin I made still works (It sorts based on TTC Prices, I have not uploaded it yet, it is something my wife and I use), some of the other Custom Plugin Filters also stopped working, some still do but none of the Built-In AF filters worked. Reverting back to version 1.4 of this Lib and it is now working again. If you need me to send you my custom plugin that still works with the update, let me know. I guess it seems odd that some of plugins work but Built-In functions of AF do not. Note that no Error actually occurs, it just fails. Also another note, if I try to change the filter back to "All" after changing it to something that did not work, and I try to switch to any other normal in-game Filter or Sub-Filter (EG From Weapons to Armor or Even inside Armor > Light to Medium) that when I switch back to the In-Game Filter/Sub-Filter that I had change the AF on, it is back to the last failed filter setting. So here to be more specific, I have a bunch of Consumables in my Junk, if I switch to the In-Game Sub-Filter under Junk to Consumables, and switch it to "Crafted" it does not work, and then when I switch it back to "All" (which actually fails also) and switch to the All Junk Sub-Filter, and go back to the Consumables Sub-Filter, the AF is set back to "Crafted". Hope this helps in understanding what is going on... I have reverted back to 1.4 for now.
Last edited by Smugger21 : 12/10/23 at 04:12 AM.
|
|
![]() |
![]() |
Smugger21 |
View Public Profile |
Send a private message to Smugger21 |
Find More Posts by Smugger21 |
Add Smugger21 to Your Buddy List |
![]() |
||
|
Re: Update causes Advanced Filters to stop working
Hi, by not working you mean what exactly? Entries in teh dropdown filterboxes are missing in total? Clicking the entries does nothing?
Any Screenshots to explain more? The filter dropdown does show the filters, like level filter, for me properly. Clicking one level range in the submenu does not filter anything then for you? Did you test to disable ALL other addons AND AF filter dropdown plugins and only run AF alone? Which other AF plugins do you use and which do not work, and which work? If you disable your local AF plugin, does it work then? Thank you Edit: Seems that the callbacks of the filters do not work if they are "no submenu". As "Filters" -> 1 to 10 works, but others like "Heal staff" does not. On it
Last edited by Baertram : 12/10/23 at 09:39 AM.
|
|
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |
|
|
Think I found out what is happening and was able to fix it.
Last edited by Baertram : 12/10/23 at 11:27 AM.
|
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |
|||||
Re: Re: Update causes Advanced Filters to stop working
And when I woke up I just realized that the menu items that didn't work were on the main menu and things that did work were in Sub-Menus.
EDIT: Yup, seems to be good, everything seems to be working correctly again with this update! Thank You.
Last edited by Smugger21 : 12/10/23 at 07:30 PM.
|
|||||
![]() |
![]() |
Smugger21 |
View Public Profile |
Send a private message to Smugger21 |
Find More Posts by Smugger21 |
Add Smugger21 to Your Buddy List |
![]() |