Skip to content

Commit

Permalink
Customise user and Devon's display pictures
Browse files Browse the repository at this point in the history
  • Loading branch information
icantshootfloorballs committed Sep 18, 2024
1 parent 3d1bf04 commit 4cb80d3
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Duke project template
# Devon project template

This is a project template for a greenfield Java project. It's named after the Java mascot _Duke_. Given below are instructions on how to use it.

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/devon/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class MainWindow extends AnchorPane {
private Devon devon;

private Image userImage = new Image(this.getClass().getResourceAsStream("/images/DaUser.png"));
private Image dukeImage = new Image(this.getClass().getResourceAsStream("/images/DaDuke.png"));
private Image devonImage = new Image(this.getClass().getResourceAsStream("/images/DaDevon.png"));

@FXML
public void initialize() {
Expand All @@ -34,7 +34,7 @@ public void initialize() {
public void setDevon(Devon devon) {
this.devon = devon;
devon.start();
dialogContainer.getChildren().add(DialogBox.getDevonDialog(devon.introduction(), dukeImage));
dialogContainer.getChildren().add(DialogBox.getDevonDialog(devon.introduction(), devonImage));
}

/**
Expand All @@ -47,7 +47,7 @@ private void handleUserInput() {
String response = devon.getResponse(input);
dialogContainer.getChildren().addAll(
DialogBox.getUserDialog(input, userImage),
DialogBox.getDevonDialog(response, dukeImage)
DialogBox.getDevonDialog(response, devonImage)
);
userInput.clear();
}
Expand Down
Binary file modified src/main/resources/images/DaDuke.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/images/DaUser.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/main/resources/images/DaUser.png
Binary file not shown.

0 comments on commit 4cb80d3

Please sign in to comment.