public void changed (ChangeEvent event, Actor actor) { Timer.schedule(new Task(){ public void run () { nextColor(); Gdx.app.postRunnable(new Runnable(){ public void run () { Gdx.app.log(str3, "Posted runnable to Gdx.app"); } }); }}, 2f); }}); root.add(button3).row();
protected void setCursorPosition (float x, float y) { cursor = letterUnderCursor(x); cursorOn = focused; blinkTask.cancel(); if (focused) Timer.schedule(blinkTask, blinkTime, blinkTime); }
protected void scheduleKeyRepeatTask (int keycode) { if (!keyRepeatTask.isScheduled() || keyRepeatTask.keycode != keycode) { keyRepeatTask.keycode = keycode; keyRepeatTask.cancel(); Timer.schedule(keyRepeatTask, keyRepeatInitialTime, keyRepeatTime); } }
protected void setCursorPosition (float x, float y) { cursor = letterUnderCursor(x); cursorOn = focused; blinkTask.cancel(); if (focused) Timer.schedule(blinkTask, blinkTime, blinkTime); }
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); } }
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 scheduleKeyRepeatTask (int keycode) { if (!keyRepeatTask.isScheduled() || keyRepeatTask.keycode != keycode) { keyRepeatTask.keycode = keycode; keyRepeatTask.cancel(); Timer.schedule(keyRepeatTask, keyRepeatInitialTime, keyRepeatTime); } }
public void touchDown (Tooltip tooltip) { showTask.cancel(); if (tooltip.container.remove()) resetTask.cancel(); resetTask.run(); if (enabled || tooltip.always) { showTooltip = tooltip; Timer.schedule(showTask, time); } }
public void touchDown (Tooltip tooltip) { showTask.cancel(); if (tooltip.container.remove()) resetTask.cancel(); resetTask.run(); if (enabled || tooltip.always) { showTooltip = tooltip; Timer.schedule(showTask, time); } }
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 hide (Tooltip tooltip) { showTooltip = null; showTask.cancel(); if (tooltip.container.hasParent()) { shown.removeValue(tooltip, true); hideAction(tooltip); resetTask.cancel(); Timer.schedule(resetTask, resetTime); } }
public void hide (Tooltip tooltip) { showTooltip = null; showTask.cancel(); if (tooltip.container.hasParent()) { shown.removeValue(tooltip, true); hideAction(tooltip); resetTask.cancel(); Timer.schedule(resetTask, resetTime); } }
tapRectangleCenterX = x; tapRectangleCenterY = y; if (!longPressTask.isScheduled()) Timer.schedule(longPressTask, longPressSeconds);
tapRectangleCenterX = x; tapRectangleCenterY = y; if (!longPressTask.isScheduled()) Timer.schedule(longPressTask, longPressSeconds);
cursorOn = focused; if (focused) Timer.schedule(blinkTask, blinkTime, blinkTime); else keyRepeatTask.cancel();
cursorOn = focused; if (focused) Timer.schedule(blinkTask, blinkTime, blinkTime); else keyRepeatTask.cancel();
if (focused) Timer.schedule(blinkTask, blinkTime, blinkTime);
if (focused) Timer.schedule(blinkTask, blinkTime, blinkTime);
@Override public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) { if (buttonRepeatTask.isScheduled() == false) { buttonRepeatTask.advance = advance; buttonRepeatTask.cancel(); Timer.schedule(buttonRepeatTask, buttonRepeatInitialTime, buttonRepeatTime); } return true; }