Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fe2056d

Browse filesBrowse files
committed
Fix dropdown cb, magicList defaults, update loop off by one
1 parent ac82375 commit fe2056d
Copy full SHA for fe2056d

File tree

Expand file treeCollapse file tree

3 files changed

+6
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+6
-4
lines changed
Open diff view settings
Collapse file

‎elements/input.lua‎

Copy file name to clipboardExpand all lines: elements/input.lua
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1241,6 +1241,9 @@ uie.add("dropdown", {
12411241
clip = false,
12421242
interactive = 1,
12431243

1244+
isList = true,
1245+
cbOnItemClick = true,
1246+
12441247
init = function(self, list, cb)
12451248
self._itemsCache = {}
12461249
self.placeholder = list.placeholder
@@ -1250,7 +1253,6 @@ uie.add("dropdown", {
12501253
self:getItemCached(list[i], i)
12511254
end
12521255
self.data = list
1253-
self.isList = true
12541256
self:addChild(uie.icon("ui:icons/drop"):with(uiu.at(0.999 + 1, 0.5 + 5)))
12551257
self.cb = cb
12561258
self.submenuParent = self
Collapse file

‎elements/magicList.lua‎

Copy file name to clipboardExpand all lines: elements/magicList.lua
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ local listCommon = {
1212
isList = true,
1313
cbOnItemClick = false,
1414
grow = true,
15+
recycledMax = 64,
1516

1617
style = {
1718
spacing = 1,
18-
offscreen = 16,
19+
offscreen = 32,
1920
elementSize = false
2021
},
2122

@@ -37,7 +38,6 @@ local listCommon = {
3738
self.data = data
3839
self.dataToElement = dataToElement or self.dataToElement
3940
self.cb = cb
40-
self.recycledMax = 32
4141
self.currentFirst = 0
4242
self.currentLast = 0
4343

Collapse file

‎main.lua‎

Copy file name to clipboardExpand all lines: main.lua
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ function ui.update()
199199
end
200200
end
201201

202-
iLast = i + 1
202+
iLast = i
203203
if root:collect() then
204204
goto reupdate
205205
end

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.