Widget button swallowing MouseButtonUp
So our game on iOS implements a simple functionality where a player can move the camera around by swiping. We get the status of touch via PlayerInput->Touches.Z. Now the issues is that if the user touches the screen, moves his finger around, and releases touching on a button widget, the Touches.Z is not reset to 0. Actually the PlayerInput is not updated by viewport the moment the touch is on the button. On some research, we found that FSlateApplication::ProcessMouseButtonUpEvent delegates the OnMouseButtonUp to an SButton, which failed to call OnClicked.Execute() in SButton::OnMouseButtonUp. There is comment "If the user of the button didn't handle this click, then the button's default behavior handles it." followed by the code marking the reply handled. (Line 234 in the latest 4.8 building) By removing this line, it seems everything is okay. Clicking button will still be handled properly. So is there any particular reason the button is handled in that way? Is it safe to remove that? Thank you very much for your help.
asked Jun 15 '15 at 11:32 AM in C++ Programming
Follow this question
Once you sign in you will be able to subscribe for any updates here