From d71d8ed7894032d8c06261208d872029cb161caa Mon Sep 17 00:00:00 2001 From: Jeddunk Date: Fri, 28 Aug 2020 15:20:55 +0200 Subject: [PATCH] Fixed main window resizing. --- src/main/java/Controller.java | 6 +++--- src/main/java/Main.java | 11 ++++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/main/java/Controller.java b/src/main/java/Controller.java index 32b9294..1f73fe4 100644 --- a/src/main/java/Controller.java +++ b/src/main/java/Controller.java @@ -384,9 +384,9 @@ public class Controller { } /** - * check if creamapi version of dll is there, if not, rename original to steam_api(64)_o.dll and copy - * creamapi dll to the path. also looks for alternative steam dll (which means it patches both 64 and 32 bit - * dlls at once if found) + * Check if CreamAPI version of DLL is there, if not, rename original to steam_api(64)_o.dll and copy + * CreamAPI DLL to the path. Also looks for alternative Steam DLL (which means it patches both 64 and 32 bit + * DLLs at once if found) * * @throws IOException If file is missing or not accessible/modifiable. */ diff --git a/src/main/java/Main.java b/src/main/java/Main.java index acb4ee7..68ce704 100644 --- a/src/main/java/Main.java +++ b/src/main/java/Main.java @@ -21,13 +21,18 @@ import javafx.stage.Stage; public class Main extends Application { + private static final int MIN_WIDTH = 905; + private static final int MIN_HEIGHT = 400; + private static final int PREF_WIDTH = 1200; + private static final int PREF_HEIGHT = 600; + @Override public void start(Stage primaryStage) throws Exception { Parent root = FXMLLoader.load(ClassLoader.getSystemResource("mainWindow.fxml")); primaryStage.setTitle("Auto CreamAPI"); - primaryStage.setMinWidth(655 + 25); - primaryStage.setMinHeight(400 + 50); - primaryStage.setScene(new Scene(root, 1200, 600)); + primaryStage.setMinWidth(MIN_WIDTH + 25); + primaryStage.setMinHeight(MIN_HEIGHT + 50); + primaryStage.setScene(new Scene(root, PREF_WIDTH, PREF_HEIGHT)); primaryStage.show(); }