I am aware the feature isn’t released yet, but from what I’ve seen so far the API looks only partially useful to me because it has some blind spots. So I’m attempting to nip that in the bud by mentioning my concerns here.
Firstly I am worried about not being able to separate hover input from press input, as there is only a single GuiState property. If I want to have a GuiObject which is not clickable, but can detect hover, it looks like I will be forced to check for both GuiState.Idle and GuiState.Press. But I believe the latter will be problematic because it will continue to be set when the input’s position has been moved outside of the GuiObject, therefore giving an inaccurrate result if I only wanted to detect the hover. Probably the simplest solution API-wise is having another property that just sets whether the Press state is disabled or not.
Secondly, it’s not great that the API does not provide information about InputObjects. If you need to do anything more complicated than a simple button you are probably going to need to them. It would be nice to just get access to those for free, instead of having to manually rewrite the input processing code as we need to do currently. This would give us enough information to implement things like draggable objects, sliders, etc. Giving full information about InputObjects should be a standard for all input-related APIs IMO because they are so useful and are a requirement for doing anything non-trivial.
-- The current input objects which are causing
-- GuiState.Hover and GuiState.Press.
-- (With touch input these will be the same Touch, with
-- mouse input they will be MouseMovement and MouseButton1.)
GuiObject.PressInputObject
GuiObject.HoverInputObject
-- Fires whenever press/hover state changes.
-- Each signal provides both input objects because the press input may want to
-- know information that only the hover input has and vice versa.
-- i.e. hover input object has ownership of positional information,
-- press input object has ownership of activation information
GuiObject.PressChanged:Connect(function(IsPressing, PressInputObject, HoverInputObject) end)
GuiObject.HoverChanged:Connect(function(IsHovering, HoverInputObject, PressInputObject) end)