mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-12 17:40:11 -07:00
Fix[controls]: handle secondary pointer being removed
This commit is contained in:
parent
1d958abdab
commit
c963bc2b6c
1 changed files with 3 additions and 1 deletions
|
|
@ -303,7 +303,9 @@ public class ControlLayout extends FrameLayout {
|
||||||
ControlInterface lastControlButton = mapTable.get(v);
|
ControlInterface lastControlButton = mapTable.get(v);
|
||||||
|
|
||||||
//Check if the action is cancelling, reset the lastControl button associated to the view
|
//Check if the action is cancelling, reset the lastControl button associated to the view
|
||||||
if(ev.getActionMasked() == MotionEvent.ACTION_UP || ev.getActionMasked() == MotionEvent.ACTION_CANCEL){
|
if(ev.getActionMasked() == MotionEvent.ACTION_UP
|
||||||
|
|| ev.getActionMasked() == MotionEvent.ACTION_CANCEL
|
||||||
|
|| ev.getActionMasked() == MotionEvent.ACTION_POINTER_UP){
|
||||||
if(lastControlButton != null) lastControlButton.sendKeyPresses(false);
|
if(lastControlButton != null) lastControlButton.sendKeyPresses(false);
|
||||||
mapTable.put(v, null);
|
mapTable.put(v, null);
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue