I made a scroller (ScrollContainer that holds a VBoxContainer) with textures to press and select an option. Each texture has the code below connected to gui_input signal. My problem is that you can't press and drag up to see more options without causing a selection of one of the options. I wonder if there is a way to check if the mouse is being dragged or if its position changed from when it was pressed and when it was released.
public void OnSelect(InputEvent @event)
{
if (@event is InputEventMouseButton mouseEvent)
{
// Only when mouse is pressed; not released
if (!mouseEvent.Pressed || mouseEvent.ButtonIndex != MouseButton.Left) return;
EmitSignal(SignalName.PromotionSelected, (int)PieceType);
}
}