You can now press enter in the "Game..." text field to start a search.
This commit is contained in:
parent
8c23ae27e8
commit
7d9514abae
@ -21,6 +21,7 @@ import javafx.concurrent.Service;
|
||||
import javafx.concurrent.Task;
|
||||
import javafx.event.Event;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.input.KeyCode;
|
||||
import javafx.scene.input.KeyEvent;
|
||||
import javafx.scene.paint.Color;
|
||||
@ -40,17 +41,15 @@ import util.SteamAppsListCache;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public class Controller {
|
||||
public class Controller implements Initializable {
|
||||
|
||||
private static final String REGEX = "(?<steamApiDll>steam_api(?:64)?.dll)$";
|
||||
public Label creamApiDllApplied;
|
||||
@ -111,8 +110,15 @@ public class Controller {
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void initialize() {
|
||||
@Override
|
||||
public void initialize(URL location, ResourceBundle resources) {
|
||||
appId_textfield.textProperty().addListener(appIdChangesGameName());
|
||||
game_name_textfield.setOnKeyReleased(event -> {
|
||||
KeyCode code = event.getCode();
|
||||
if (code.equals(KeyCode.ENTER)) {
|
||||
getAppId();
|
||||
}
|
||||
});
|
||||
language_combobox.setItems(FXCollections.observableArrayList(config.getLanguages()));
|
||||
language_combobox.setTooltip(new Tooltip());
|
||||
language_combobox.setEditable(false);
|
||||
@ -286,7 +292,6 @@ public class Controller {
|
||||
}
|
||||
|
||||
public void getAppId() {
|
||||
//final App game = cache.findGame(game_name_textfield.getText());
|
||||
final List<App> games = cache.findListOfGames(game_name_textfield.getText());
|
||||
if (games.isEmpty()) {
|
||||
appId_textfield.setText("-1");
|
||||
@ -306,7 +311,6 @@ public class Controller {
|
||||
Stage stage = new Stage();
|
||||
stage.initModality(Modality.APPLICATION_MODAL);
|
||||
stage.setResizable(false);
|
||||
//stage.initStyle(StageStyle.UNDECORATED);
|
||||
stage.setTitle("Choose game...");
|
||||
stage.setScene(new Scene(root1));
|
||||
stage.show();
|
||||
|
@ -14,6 +14,7 @@
|
||||
*/
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.control.cell.TreeItemPropertyValueFactory;
|
||||
import javafx.scene.input.MouseButton;
|
||||
@ -21,9 +22,11 @@ import javafx.scene.input.MouseEvent;
|
||||
import javafx.stage.Stage;
|
||||
import pojo.App;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.List;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
public class SearchResultWindowController {
|
||||
public class SearchResultWindowController implements Initializable {
|
||||
|
||||
@FXML
|
||||
public Button okButton;
|
||||
@ -45,7 +48,8 @@ public class SearchResultWindowController {
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void initialize() {
|
||||
@Override
|
||||
public void initialize(URL location, ResourceBundle resources) {
|
||||
}
|
||||
|
||||
public void initMe(List<App> games) {
|
||||
|
Loading…
Reference in New Issue
Block a user