I found a menu bug that prevents me from implementing my plan, after scrolling, UIMenuGridPanel:CirclePosition stops working on all elements. Let’s say the page shows only 7 elements by default, UIMenuGridPanel:CirclePosition works on all of these elements, but as soon as you go down to the 8th menu element, UIMenuGridPanel:CirclePosition stops working on all of them.
local Item = UIMenuListItem.New(name, {"One","Two", "Three"}, 0)
local Grid = UIMenuGridPanel.New("TOP", "LEFT", "RIGHT", "BOTTOM", vector2(0.5,0.5), 0)
Grid.OnGridPanelChanged = function(menu, item, pos)
Item:ChangeList({"Individually"})
end
Item.OnListChanged = function(menu, item, index)
Item:ChangeList({"One","Two", "Three"})
Grid:CirclePosition(vector2(randomFloat(0.1, 1.0),randomFloat(0.1, 1.0)))
end
Item:AddPanel(Grid)
return Item
end
RegisterCommand("getBug", function(source, args)
MenuHandler:CloseAndClearHistory()
local Menu = UIMenu.New("Bug test", "Items", 10, 50, false, "commonmenu", "interaction_bgd")
Menu:AddItem(newItem("Test item 1"))
Menu:AddItem(newItem("Test item 2"))
Menu:AddItem(newItem("Test item 3"))
Menu:AddItem(newItem("Test item 4"))
Menu:AddItem(newItem("Test item 5"))
Menu:AddItem(newItem("Test item 6"))
Menu:AddItem(newItem("Test item 7"))
Menu:AddItem(newItem("Test item 8")) -- From the moment we see the element after the scroll, all the others will no longer do Grid:CirclePosition until we return the scroll to its place
Menu:AddItem(newItem("Test item 9"))
Menu:AddItem(newItem("Test item 0"))
Menu:Visible(true)
I found a menu bug that prevents me from implementing my plan, after scrolling, UIMenuGridPanel:CirclePosition stops working on all elements. Let’s say the page shows only 7 elements by default, UIMenuGridPanel:CirclePosition works on all of these elements, but as soon as you go down to the 8th menu element, UIMenuGridPanel:CirclePosition stops working on all of them.
Use ScaleformUI Version: v5.3.5
Code example:
`function randomFloat(lower, greater) return lower + math.random() * (greater - lower); end
function newItem(name)
end
RegisterCommand("getBug", function(source, args)
end, false)`