GuiService#SelectedObject should call mouse enter and leave event when manually set

Currently, the SelectedObject field in GuiService is a great way to navigate through gui elements using an xbox controller.

When the selected object is “Clicked” it already fires the MouseButton1Click event, but when it is “Selected” it does not fire the enter or leave events.

While this is trivial, and doesn’t take too much time to workaround, it would be really helpful if this was done automatically.

Here’s what I’m currently using MouseEnter and MouseLeave for :slight_smile:

1 Like

There are actually events for this:

http://wiki.roblox.com/index.php?title=API:Class/GuiObject/SelectionGained
http://wiki.roblox.com/index.php?title=API:Class/GuiObject/SelectionLost

6 Likes

Ah well that’s great too! Thank you for letting me know!