mirror of
https://github.com/Akomry/makeyourownapp-jam.git
synced 2025-12-06 11:43:53 +00:00
feat: help i'm struggling
This commit is contained in:
parent
041f721ed5
commit
a8b2a0ced6
4 changed files with 25 additions and 23 deletions
|
|
@ -11,7 +11,7 @@ public class HelloApplication extends Application {
|
|||
@Override
|
||||
public void start(Stage stage) throws IOException {
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(HelloApplication.class.getResource("hello-view.fxml"));
|
||||
Scene scene = new Scene(fxmlLoader.load(), 320, 240);
|
||||
Scene scene = new Scene(fxmlLoader.load(), 1280, 720);
|
||||
stage.setTitle("PixelWriter");
|
||||
stage.setScene(scene);
|
||||
stage.show();
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public class HelloController implements Initializable {
|
|||
loadButton.setOnAction(this::onActionLoad);
|
||||
newCanvasButton.setOnAction(this::onActionCreateCanvas);
|
||||
scrollPane.setOnScroll(this::onScrollZoom);
|
||||
scrollPane.getParent().setOnKeyPressed(this::onActionKeyPressed);
|
||||
scrollPane.setOnKeyPressed(this::onActionKeyPressed);
|
||||
brushSizeLabel.textProperty().bind(brushSizeSlider.valueProperty().asString());
|
||||
setupCanvas();
|
||||
scrollPane.prefViewportHeightProperty().bind(pane.layoutYProperty());
|
||||
|
|
|
|||
|
|
@ -27,11 +27,11 @@ public class NewCanvasController implements Initializable {
|
|||
createButton.setOnAction(this::create);
|
||||
createButton.disableProperty().bind(validator.containsErrorsProperty());
|
||||
cancelButton.setOnAction(this::close);
|
||||
|
||||
widthTextField.setOnAction(this::create);
|
||||
validator.createCheck()
|
||||
.decorates(createButton)
|
||||
.dependsOn("width", heightTextField.textProperty())
|
||||
.dependsOn("height", widthTextField.textProperty())
|
||||
.dependsOn("width", widthTextField.textProperty())
|
||||
.dependsOn("height", heightTextField.textProperty())
|
||||
.withMethod(this::checkWidthHeight)
|
||||
.immediate();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue