@Override public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) { FocusManager.resetFocus(getStage()); return false; } });
@Override public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) { FocusManager.resetFocus(getStage()); return false; } });
@Override public void setDisabled (boolean disabled) { super.setDisabled(disabled); if (disabled) FocusManager.resetFocus(getStage(), this); }
@Override public void setDisabled (boolean disabled) { this.disabled = disabled; if (disabled) { FocusManager.resetFocus(getStage(), this); keyRepeatTask.cancel(); } }
@Override public void setDisabled (boolean disabled) { super.setDisabled(disabled); if (disabled) FocusManager.resetFocus(getStage(), this); }
@LmlAction("resetViewFocus") public void resetViewFocus() { FocusManager.resetFocus(getStage()); }
@Override public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) { Focusable focusable = FocusManager.getFocusedWidget(); if (focusable instanceof Actor == false || isAscendantOf((Actor) focusable) == false) { FocusManager.resetFocus(getStage()); } return false; } });
@Override public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) { //TODO potential bug with libgdx scene2d? //fixes issue when split bar could be still dragged even when touchable is set to childrenOnly, probably scene2d issue if (isTouchable() == false) return false; if (draggingPointer != -1) return false; if (pointer == 0 && button != 0) return false; if (handleBounds.contains(x, y)) { FocusManager.resetFocus(getStage()); draggingPointer = pointer; lastPoint.set(x, y); handlePosition.set(handleBounds.x, handleBounds.y); return true; } return false; }
@Override public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) { if (isTouchable() == false) return false; if (draggingPointer != -1) return false; if (pointer == 0 && button != 0) return false; Rectangle containingHandle = getHandleContaining(x, y); if (containingHandle != null) { handleOverIndex = handleBounds.indexOf(containingHandle, true); FocusManager.resetFocus(getStage()); draggingPointer = pointer; lastPoint.set(x, y); handlePosition.set(containingHandle.x, containingHandle.y); return true; } return false; }
@Override public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) { if (isTouchable() == false) return false; if (draggingPointer != -1) return false; if (pointer == 0 && button != 0) return false; Rectangle containingHandle = getHandleContaining(x, y); if (containingHandle != null) { handleOverIndex = handleBounds.indexOf(containingHandle, true); FocusManager.resetFocus(getStage()); draggingPointer = pointer; lastPoint.set(x, y); handlePosition.set(containingHandle.x, containingHandle.y); return true; } return false; }
@Override public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) { // TODO potential bug with libgdx scene2d? // fixes issue when split bar could be still dragged even when // touchable is set to childrenOnly, probably scene2d issue if (isTouchable() == false) return false; if (draggingPointer != -1) return false; if (pointer == 0 && button != 0) return false; if (handleBounds.contains(x, y)) { FocusManager.resetFocus(getStage()); draggingPointer = pointer; lastPoint.set(x, y); handlePosition.set(handleBounds.x, handleBounds.y); return true; } return false; }
/** * Fade outs this window, when fade out animation is completed, window is removed from Stage. Calling this for the * second time won't have any effect if previous animation is still running. */ public void fadeOut (float time) { if (fadeOutActionRunning) return; fadeOutActionRunning = true; final Touchable previousTouchable = getTouchable(); setTouchable(Touchable.disabled); Stage stage = getStage(); if (stage != null && stage.getKeyboardFocus() != null && stage.getKeyboardFocus().isDescendantOf(this)) { FocusManager.resetFocus(stage); } addAction(Actions.sequence(Actions.fadeOut(time, Interpolation.fade), new Action() { @Override public boolean act (float delta) { setTouchable(previousTouchable); remove(); getColor().a = 1f; fadeOutActionRunning = false; return true; } })); }