You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix scrollbar bug with scrollbox content being smaller than or the same size as scrollbox bounds + Improve Dropdown API (#1287)
* add scrollbar
* add dropdown
* errors for proper usage
* polish
* docs pt 1
* comment patches
* scroll progress now saves
on a per-instance basis
* docs (final)
* Update ui.lua
* Update ui.lua
* add stuff
* fix scrolling and convert stuff to absolute positioning
* reimplement scroll mult
* pass args into dropdown_element_def
* fix bug with underfull content
* ehhhh why did this not get committed
* more config
Allows displayed options to be different from options stored in the options table
* Update ui.lua
* well that was less bad than i thought it was gonna be
* Update ui.lua
* Update ui.lua
Copy file name to clipboardExpand all lines: lsp_def/ui.lua
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -386,6 +386,7 @@ function G.FUNCS.scrollbar(e) end
386
386
---@fieldid? string Assigns the given id to the config table of the root of the button UIBox if set.
387
387
---@fieldoption_align? string Aligns the text of the dropdown options. Works just like aligning regular UI nodes. Default is "cl".
388
388
---@fieldclose_on_select? boolean If true, the dropdown menu will automatically close when an option is selected or unselected.
389
+
---@fielddisplay_choice_func? fun(option: string): string? If defined, changes the displayed text for a choice to the returned value of this function. `option` is
389
390
390
391
---Returns a button that creates a dropdown selection menu when clicked on.
ifnotparent.config.prev_valueor (parent.config.prev_valueandstring.len(parent.config.prev_value) ~=string.len(parent.config.text)) thenparent.UIBox:recalculate() end
2984
+
parent.config.prev_value=text
2985
+
end
2959
2986
end
2960
2987
2961
2988
functionG.FUNCS.update_dropdown_select(e)
@@ -3000,7 +3027,11 @@ function SMODS.GUI.create_UIBox_dropdown_menu(args, parent_width, parent)
0 commit comments