-
Notifications
You must be signed in to change notification settings - Fork 41
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When a button gets clicked, instead of a string like "mouse_click" or "mouse_up" the event (2nd parameter) is a table.
To Reproduce
Steps to reproduce the behavior:
- A small program can be used to test the behaviour:
local basalt = require("basalt")
local main = basalt.createFrame()
main:addButton()
:setText("Start")
:setPosition(1, 1)
:setSize("7", "1")
:onClick(function(self, event, button, x, y)
basalt.debug("Event ("..tostring(event)..") = {")
if type(event) == "table" then
for k, v in pairs(event) do
basalt.debug(k.."="..tostring(v)..",")
end
end
basalt.debug("}")
end)
basalt.autoUpdate()- Run the program.
- Click the "Start" button.
- Open the Basalt debug window.
- See something like the attached screenshot.
Expected behavior
Once the button is clicked, the Basalt debug window will contain:
Event (mouse_click) = {
}
Screenshots
If applicable, add screenshots to help explain your problem.
^ The contents of the event.
Additional context
Add any other context about the problem here.
N/A ?
Checklist
[ X ] I am running the latest version.
Tick the box if you are running the latest version!
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working