Files
Basalt/docs/objects/Object/onLeave.md
Robert Jelic ab72f244ed Updated some formatting
Updated formatting for object
2022-10-20 21:05:29 +02:00

535 B

Object - Event

onLeave

onLeave(self, event, button, x, y)

The computercraft event which triggers this method is mouse_move - only available in CraftOS-PC.

Here is a example on how to add a onLeave event to your button:

local basalt = require("basalt")

local main = basalt.createFrame()
local button = main:addButton()
  :setPosition(3,3)
  :setSize(12,3)
  :setText("Leave")

function buttonOnLeave()
  basalt.debug("The mouse left the button!")
end
button:onLeave(buttonOnLeave)