So i’m using the widget library as a module because I needed to make a change in the code to fit my needs.
The change I made was –
view.\_onEvent( event, M.\_options.defaultFile )
On line 144 i belive.
The problem is if i have multiple widget.newButton’s then when i try to get the defaultFile for let say the second widget; it gets the file for the last one. Here’s an example. ( Not a working testing example )
function showImage( event, \_fileName ) if event.phase == "ended" then print(\_fileName) end end shortCut.addWidget( true, \_name, x, y, width, height, "imgs/Images/2.png", nil, showImage ) shortCut.addWidget( true, \_name, x, y, width, height, "imgs/Images/3.png", nil, showImage ) shortCut.addWidget( true, \_name, x, y, width, height, "imgs/Images/4.png", nil, showImage ) shortCut.addWidget( true, \_name, x, y, width, height, "imgs/Images/5.png", nil, showImage )
If i press on the one with “2.png” it still gives me the “5.png”
Thanks!
–SonicX278