public void drag (InputEvent event, float x, float y, int pointer) { event.getListenerActor().localToActorCoordinates(scroll, tmpCoords.set(x, y)); if (tmpCoords.y >= scroll.getHeight()) { scrollDown.cancel(); if (!scrollUp.isScheduled()) { startTime = System.currentTimeMillis(); Timer.schedule(scrollUp, tickSecs, tickSecs); } return; } else if (tmpCoords.y < 0) { scrollUp.cancel(); if (!scrollDown.isScheduled()) { startTime = System.currentTimeMillis(); Timer.schedule(scrollDown, tickSecs, tickSecs); } return; } scrollUp.cancel(); scrollDown.cancel(); }
public void drag (InputEvent event, float x, float y, int pointer) { event.getListenerActor().localToActorCoordinates(scroll, tmpCoords.set(x, y)); if (tmpCoords.y >= scroll.getHeight()) { scrollDown.cancel(); if (!scrollUp.isScheduled()) { startTime = System.currentTimeMillis(); Timer.schedule(scrollUp, tickSecs, tickSecs); } return; } else if (tmpCoords.y < 0) { scrollUp.cancel(); if (!scrollDown.isScheduled()) { startTime = System.currentTimeMillis(); Timer.schedule(scrollDown, tickSecs, tickSecs); } return; } scrollUp.cancel(); scrollDown.cancel(); }
public void run () { if (showTooltip == null || showTooltip.targetActor == null) return; Stage stage = showTooltip.targetActor.getStage(); if (stage == null) return; stage.addActor(showTooltip.container); showTooltip.container.toFront(); shown.add(showTooltip); showTooltip.container.clearActions(); showAction(showTooltip); if (!showTooltip.instant) { time = subsequentTime; resetTask.cancel(); } } };
public void run () { if (showTooltip == null || showTooltip.targetActor == null) return; Stage stage = showTooltip.targetActor.getStage(); if (stage == null) return; stage.addActor(showTooltip.container); showTooltip.container.toFront(); shown.add(showTooltip); showTooltip.container.clearActions(); showAction(showTooltip); if (!showTooltip.instant) { time = subsequentTime; resetTask.cancel(); } } };
public void enter (Tooltip tooltip) { showTooltip = tooltip; showTask.cancel(); if (enabled || tooltip.always) { if (time == 0 || tooltip.instant) showTask.run(); else Timer.schedule(showTask, time); } }
protected void setCursorPosition (float x, float y) { cursor = letterUnderCursor(x); cursorOn = focused; blinkTask.cancel(); if (focused) Timer.schedule(blinkTask, blinkTime, blinkTime); }
/** No further gesture events will be triggered for the current touch, if any. */ public void cancel () { longPressTask.cancel(); longPressFired = true; }
/** Shows all tooltips on hover without a delay for {@link #resetTime} seconds. */ public void instant () { time = 0; showTask.run(); showTask.cancel(); }
public void enter (Tooltip tooltip) { showTooltip = tooltip; showTask.cancel(); if (enabled || tooltip.always) { if (time == 0 || tooltip.instant) showTask.run(); else Timer.schedule(showTask, time); } }
/** Shows all tooltips on hover without a delay for {@link #resetTime} seconds. */ public void instant () { time = 0; showTask.run(); showTask.cancel(); }
/** No further gesture events will be triggered for the current touch, if any. */ public void cancel () { longPressTask.cancel(); longPressFired = true; }
protected void setCursorPosition (float x, float y) { cursor = letterUnderCursor(x); cursorOn = focused; blinkTask.cancel(); if (focused) Timer.schedule(blinkTask, blinkTime, blinkTime); }