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; } }
@Override public void clicked (InputEvent event, float x, float y) { super.clicked(event, x, y); if (httpRequest != null) { Gdx.net.cancelHttpRequest(httpRequest); Gdx.app.log("NetAPITest", "Cancelling request " + httpRequest.getUrl()); statusLabel.setText("Cancelling request " + httpRequest.getUrl()); } } };
@Override public void clicked (InputEvent event, float x, float y) { super.clicked(event, x, y); if (isWindowed) { isWindowed = false; changeModeButton.setText(fullScreenInstructions); Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode()); } else { isWindowed = true; changeModeButton.setText(windowedInstructions); Gdx.graphics.setWindowedMode(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); } } });
@Override public void clicked (InputEvent event, float x, float y) { super.clicked(event, x, y);
@Override public void clicked(InputEvent event, float x, float y) { super.clicked(event, x, y); setGraphicProperties(GraphicType.JAVA_HEAP, Color.GREEN); } });
@Override public void clicked(InputEvent event, float x, float y) { super.clicked(event, x, y); setGraphicProperties(GraphicType.FPS, Color.RED); } });
@Override public void clicked(InputEvent event, float x, float y) { super.clicked(event, x, y); setGraphicProperties(GraphicType.NATIVE_HEAP, Color.BLUE); } });
@Override public void clicked(InputEvent event, float x, float y) { super.clicked(event, x, y); verticalGroup.addActor(createImage()); } });
@Override public void clicked (InputEvent event, float x, float y) { super.clicked(event, x, y); if (listener == null) { Gdx.net.openURI(url.toString()); } else { listener.clicked(url.toString()); } }
@Override public void clicked(InputEvent event, float x, float y) { invoke(actor, widget.getCallBackName()); super.clicked(event, x, y); } });
@Override public void clicked(InputEvent event, float x, float y) { invoke(button, widget.getCallBackName()); super.clicked(event, x, y); } });
@Override public void clicked(InputEvent event, float x, float y) { super.clicked(event, x, y); verticalGroup.removeActor(verticalGroup.getChildren().random()); } });
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 clicked (InputEvent event, float x, float y) { super.clicked(event, x, y); if (getTapCount() == 2 && selectedItems.contains(FileItem.this, true)) { if (file.isDirectory()) { setDirectory(file, HistoryPolicy.ADD); } else selectionFinished(); } }
@Override public void clicked (InputEvent event, float x, float y) { super.clicked(event, x, y); if (getTapCount() == 1) { File file = ShortcutItem.this.file; if (file.exists() == false) { showDialog(POPUP_DIRECTORY_DOES_NOT_EXIST.get()); refresh(); return; } if (file.isDirectory()) { setDirectory(Gdx.files.absolute(file.getAbsolutePath()), HistoryPolicy.ADD); getChooserStage().setScrollFocus(fileListView.getScrollPane()); } } } });
@Override public void clicked(InputEvent event, float x, float y) { super.clicked(event, x, y); FileChooser fileChooser = UI.INSTANCE.getFileChooser(); fileChooser.setSelectionMode(FileChooser.SelectionMode.FILES); fileChooser.setListener(new SingleFileChooserListener() { public void selected(FileHandle file) { if (FileFormatUtils.isImage(file)) { setImage(file); } else { Dialogs.showErrorDialog(UI.INSTANCE, "This is no image"); } } }); UI.INSTANCE.addActor(fileChooser.fadeIn()); } });
@Override public void clicked(InputEvent event, float x, float y) { super.clicked(event, x, y); FileChooser fileChooser = UI.INSTANCE.getFileChooser(); fileChooser.setSelectionMode(mode); fileChooser.setListener(new SingleFileChooserListener() { @Override protected void selected(FileHandle file) { fileHandle = file; path = file.path(); textField.setText(file.path()); if (fileSelected != null) { fileSelected.selected(file); } } }); UI.INSTANCE.addActor(fileChooser.fadeIn()); } });