本文整理了Java中com.badlogic.gdx.scenes.scene2d.Stage.cancelTouchFocusExcept()
方法的一些代码示例,展示了Stage.cancelTouchFocusExcept()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Stage.cancelTouchFocusExcept()
方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.Stage
类名称:Stage
方法名:cancelTouchFocusExcept
[英]Cancels touch focus for all listeners except the specified listener.
[中]取消除指定侦听器之外的所有侦听器的触摸焦点。
代码示例来源:origin: libgdx/libgdx
/** Removes all touch focus listeners, sending a touchUp event to each listener. Listeners typically expect to receive a
* touchUp event when they have touch focus. The location of the touchUp is {@link Integer#MIN_VALUE}. Listeners can use
* {@link InputEvent#isTouchFocusCancel()} to ignore this event if needed. */
public void cancelTouchFocus () {
cancelTouchFocusExcept(null, null);
}
代码示例来源:origin: libgdx/libgdx
/** Removes all touch focus listeners, sending a touchUp event to each listener. Listeners typically expect to receive a
* touchUp event when they have touch focus. The location of the touchUp is {@link Integer#MIN_VALUE}. Listeners can use
* {@link InputEvent#isTouchFocusCancel()} to ignore this event if needed. */
public void cancelTouchFocus () {
cancelTouchFocusExcept(null, null);
}
代码示例来源:origin: libgdx/libgdx
/** Cancels the stage's touch focus for all listeners except this scroll pane's flick scroll listener. This causes any widgets
* inside the scrollpane that have received touchDown to receive touchUp.
* @see #setCancelTouchFocus(boolean) */
public void cancelTouchFocus () {
Stage stage = getStage();
if (stage != null) stage.cancelTouchFocusExcept(flickScrollListener, this);
}
代码示例来源:origin: libgdx/libgdx
/** Cancels the stage's touch focus for all listeners except this scroll pane's flick scroll listener. This causes any widgets
* inside the scrollpane that have received touchDown to receive touchUp.
* @see #setCancelTouchFocus(boolean) */
public void cancelTouchFocus () {
Stage stage = getStage();
if (stage != null) stage.cancelTouchFocusExcept(flickScrollListener, this);
}
代码示例来源:origin: libgdx/libgdx
/** Cancels the touch focus for everything except the specified source. */
public void cancelTouchFocusExcept (Source except) {
DragListener listener = sourceListeners.get(except);
if (listener == null) return;
except.getActor().getStage().cancelTouchFocusExcept(listener, except.getActor());
}
代码示例来源:origin: libgdx/libgdx
/** Cancels the touch focus for everything except the specified source. */
public void cancelTouchFocusExcept (Source except) {
DragListener listener = sourceListeners.get(except);
if (listener == null) return;
except.getActor().getStage().cancelTouchFocusExcept(listener, except.getActor());
}
代码示例来源:origin: libgdx/libgdx
public void dragStart (InputEvent event, float x, float y, int pointer) {
if (activePointer != -1) {
event.stop();
return;
}
activePointer = pointer;
dragStartTime = System.currentTimeMillis();
dragSource = source;
payload = source.dragStart(event, getTouchDownX(), getTouchDownY(), pointer);
event.stop();
if (cancelTouchFocus && payload != null) source.getActor().getStage().cancelTouchFocusExcept(this, source.getActor());
}
代码示例来源:origin: libgdx/libgdx
public void dragStart (InputEvent event, float x, float y, int pointer) {
if (activePointer != -1) {
event.stop();
return;
}
activePointer = pointer;
dragStartTime = System.currentTimeMillis();
dragSource = source;
payload = source.dragStart(event, getTouchDownX(), getTouchDownY(), pointer);
event.stop();
if (cancelTouchFocus && payload != null) source.getActor().getStage().cancelTouchFocusExcept(this, source.getActor());
}
代码示例来源:origin: com.badlogicgames.gdx/gdx
/** Sends a touchUp event to all listeners that are registered to receive touchDragged and touchUp events and removes their
* touch focus. This method removes all touch focus listeners, but sends a touchUp event so that the state of the listeners
* remains consistent (listeners typically expect to receive touchUp eventually). The location of the touchUp is
* {@link Integer#MIN_VALUE}. Listeners can use {@link InputEvent#isTouchFocusCancel()} to ignore this event if needed. */
public void cancelTouchFocus () {
cancelTouchFocusExcept(null, null);
}
代码示例来源:origin: com.badlogicgames.gdx/gdx
/** Cancels the stage's touch focus for all listeners except this scroll pane's flick scroll listener. This causes any widgets
* inside the scrollpane that have received touchDown to receive touchUp.
* @see #setCancelTouchFocus(boolean) */
public void cancelTouchFocus () {
Stage stage = getStage();
if (stage != null) stage.cancelTouchFocusExcept(flickScrollListener, this);
}
代码示例来源:origin: com.badlogicgames.gdx/gdx
public void dragStart (InputEvent event, float x, float y, int pointer) {
if (activePointer != -1) {
event.stop();
return;
}
activePointer = pointer;
dragStartTime = System.currentTimeMillis();
payload = source.dragStart(event, getTouchDownX(), getTouchDownY(), pointer);
event.stop();
if (cancelTouchFocus && payload != null) source.getActor().getStage().cancelTouchFocusExcept(this, source.getActor());
}
内容来源于网络,如有侵权,请联系作者删除!