Events
Lucky you, Enoria manages event connections automatically!
To connect a widget to an event, add it as a property with the event name (after "On") as the key and a function
as the value:
e.TextButton("Click me", {
OnClick = function()
print("Clicked!")
end,
})
Event names are the same than in the Roblox API, except for button clicks (OnClick
, OnRightClick
, OnClickUp
, etc.) which are shorter.
Here's another example but with the MouseEnter
event:
e.Container({
OnMouseEnter = function()
print("Mouse enter!")
end,
Child = e.TextLabel("This is text inside GreenContainer")
})
Last updated
Was this helpful?