Skip to content
This repository has been archived by the owner on Jul 12, 2020. It is now read-only.

MouseEnter and MouseLeave #205

Merged
merged 2 commits into from
Jul 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ This document should remain up-to-date with current API coverage and status.
* InputBegan
* InputEnded
* LayoutOrder
* MouseEnter
* MouseLeave
* Position
* Selectable
* Size
Expand Down
12 changes: 12 additions & 0 deletions lib/instances/GuiObject.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,18 @@ GuiObject.properties.LayoutOrder = InstanceProperty.typed("number", {
end,
})

GuiObject.properties.MouseEnter = InstanceProperty.readOnly({
getDefault = function()
return Signal.new()
end,
})

GuiObject.properties.MouseLeave = InstanceProperty.readOnly({
getDefault = function()
return Signal.new()
end,
})

GuiObject.properties.Position = InstanceProperty.typed("UDim2", {
getDefault = function()
return UDim2.new()
Expand Down
2 changes: 2 additions & 0 deletions lib/instances/GuiObject_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ describe("instances.GuiObject", function()
assert.equal(typeof(instance.InputBegan), "RBXScriptSignal")
assert.equal(typeof(instance.InputEnded), "RBXScriptSignal")
assert.equal(typeof(instance.LayoutOrder), "number")
assert.equal(typeof(instance.MouseEnter), "RBXScriptSignal")
assert.equal(typeof(instance.MouseLeave), "RBXScriptSignal")
assert.equal(typeof(instance.Position), "UDim2")
assert.equal(typeof(instance.Selectable), "boolean")
assert.equal(typeof(instance.Size), "UDim2")
Expand Down