public boolean isOver () { return clickListener.isOver(); }
public boolean isOver () { return clickListener.isOver(); }
public void touchDragged (InputEvent event, float x, float y, int pointer) { if (pointer != pressedPointer || cancelled) return; pressed = isOver(event.getListenerActor(), x, y); if (!pressed) { // Once outside the tap square, don't use the tap square anymore. invalidateTapSquare(); } }
public void touchDragged (InputEvent event, float x, float y, int pointer) { if (pointer != pressedPointer || cancelled) return; pressed = isOver(event.getListenerActor(), x, y); if (!pressed) { // Once outside the tap square, don't use the tap square anymore. invalidateTapSquare(); } }
public void touchUp (InputEvent event, float x, float y, int pointer, int button) { if (pointer == pressedPointer) { if (!cancelled) { boolean touchUpOver = isOver(event.getListenerActor(), x, y); // Ignore touch up if the wrong mouse button. if (touchUpOver && pointer == 0 && this.button != -1 && button != this.button) touchUpOver = false; if (touchUpOver) { long time = TimeUtils.nanoTime(); if (time - lastTapTime > tapCountInterval) tapCount = 0; tapCount++; lastTapTime = time; clicked(event, x, y); } } pressed = false; pressedPointer = -1; pressedButton = -1; cancelled = false; } }
public void touchUp (InputEvent event, float x, float y, int pointer, int button) { if (pointer == pressedPointer) { if (!cancelled) { boolean touchUpOver = isOver(event.getListenerActor(), x, y); // Ignore touch up if the wrong mouse button. if (touchUpOver && pointer == 0 && this.button != -1 && button != this.button) touchUpOver = false; if (touchUpOver) { long time = TimeUtils.nanoTime(); if (time - lastTapTime > tapCountInterval) tapCount = 0; tapCount++; lastTapTime = time; clicked(event, x, y); } } pressed = false; pressedPointer = -1; pressedButton = -1; cancelled = false; } }
else if (selectBoxList.hasParent() && style.backgroundOpen != null) background = style.backgroundOpen; else if (clickListener.isOver() && style.backgroundOver != null) background = style.backgroundOver; else if (style.background != null)
else if (selectBoxList.hasParent() && style.backgroundOpen != null) background = style.backgroundOpen; else if (clickListener.isOver() && style.backgroundOver != null) background = style.backgroundOver; else if (style.background != null)
public boolean isOver () { return clickListener.isOver(); }
public void touchDragged (InputEvent event, float x, float y, int pointer) { if (pointer != pressedPointer || cancelled) return; pressed = isOver(event.getListenerActor(), x, y); if (!pressed) { // Once outside the tap square, don't use the tap square anymore. invalidateTapSquare(); } }
public void touchUp (InputEvent event, float x, float y, int pointer, int button) { if (pointer == pressedPointer) { if (!cancelled) { boolean touchUpOver = isOver(event.getListenerActor(), x, y); // Ignore touch up if the wrong mouse button. if (touchUpOver && pointer == 0 && this.button != -1 && button != this.button) touchUpOver = false; if (touchUpOver) { long time = TimeUtils.nanoTime(); if (time - lastTapTime > tapCountInterval) tapCount = 0; tapCount++; lastTapTime = time; clicked(event, x, y); } } pressed = false; pressedPointer = -1; pressedButton = -1; cancelled = false; } }
@Override public void draw (Batch batch, float parentAlpha) { super.draw(batch, parentAlpha); Drawable underline = style.underline; if (underline != null && clickListener.isOver()) { Color color = tempColor.set(getColor()); color.a *= parentAlpha; if (style.fontColor != null) color.mul(style.fontColor); batch.setColor(color); underline.draw(batch, getX(), getY(), getWidth(), 1); } }
public void draw (Batch batch, float parentAlpha) { selectBox.localToStageCoordinates(temp.set(0, 0)); if (!temp.equals(screenPosition)) hide(); super.draw(batch, parentAlpha); }
if (!disabled && style.backgroundOver != null && (clickListener.isOver() || focused)) { background = style.backgroundOver;
else if (selectBoxList.hasParent() && style.backgroundOpen != null) background = style.backgroundOpen; else if (clickListener.isOver() && style.backgroundOver != null) background = style.backgroundOver; else if (style.background != null)