Skip to content

Commit

Permalink
Make background resizable
Browse files Browse the repository at this point in the history
  • Loading branch information
esmanda3w committed Sep 17, 2020
1 parent 0d68293 commit 72214ca
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ application {
}

shadowJar {
archiveBaseName = "duke"
archiveBaseName = "bikiniBot"
archiveClassifier = null
}

Expand Down
1 change: 1 addition & 0 deletions src/main/java/duke/ui/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public void start(Stage stage) {
AnchorPane ap = fxmlLoader.load();
Scene scene = new Scene(ap);
stage.setScene(scene);
stage.setTitle("BikiniBot");
fxmlLoader.<MainWindow>getController().setDuke(duke);
stage.show();
} catch (IOException e) {
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/duke/ui/Ui.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public Ui() { }
* @return Reply to the user command.
*/
public static String showWelcome() {
String welcomeMessage = "HOWDY!!!!! WELCOME TO BIKINI BOTTOM! "
String welcomeMessage = "HOWDY!!!!! WELCOME TO BIKINI BOTTOM!\n"
+ "I'm Sandy Cheeks, what can I do for yer?\n"
+ "Try typin' \"help\" to see what commands you can use!";
return welcomeMessage;
Expand Down Expand Up @@ -59,7 +59,7 @@ public String showHelp() {
+ "event *task description* /at *date+time*: adds a task that\n"
+ "starts at a specific time and ends at a specific time\n"
+ "(date and time to be written in yyyy-mm-dd HHMM format)\n"
+ "eg karate competition /at 2019-10-15 1200\n"
+ "eg event karate competition /at 2019-10-15 1200\n"
+ "\n"
+ "done *task number*: marks the task with that number as done\n"
+ "eg done 1\n"
Expand All @@ -70,7 +70,7 @@ public String showHelp() {
+ "update *task number* /name *task name*: updates the name of the task with "
+ "that number from the list\n" + "update 1 /name help spongebob\n"
+ "\n"
+ "update *task number* /date *task name*: (only for deadline or event tasks!) "
+ "update *task number* /date *task date*: (only for deadline or event tasks!) "
+ "updates the date and time of the task with that number from the list\n"
+ "update 1 /date 2020-02-20 1200\n"
+ "\n"
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/view/DialogBox.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<fx:root alignment="TOP_RIGHT" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" prefWidth="400.0" type="javafx.scene.layout.HBox" xmlns="http://javafx.com/javafx/11" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Label fx:id="dialog" maxWidth="250.0" style="-fx-background-color: mistyrose; -fx-background-radius: 15 15 15 15; -fx-border-color: pink; -fx-border-radius: 12 12 12 12; -fx-border-width: 3;" text="Label" wrapText="true">
<Label fx:id="dialog" style="-fx-background-color: mistyrose; -fx-background-radius: 15 15 15 15; -fx-border-color: pink; -fx-border-radius: 12 12 12 12; -fx-border-width: 3;" text="Label" wrapText="true">
<font>
<Font name="Comic Sans MS" size="13.0" />
</font>
Expand Down
19 changes: 14 additions & 5 deletions src/main/resources/view/MainWindow.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,25 @@
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>

<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="400.0" xmlns="http://javafx.com/javafx/11" xmlns:fx="http://javafx.com/fxml/1" fx:controller="duke.ui.MainWindow">
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity"
prefHeight="600.0" prefWidth="400.0" xmlns="http://javafx.com/javafx/11" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="duke.ui.MainWindow">
<children>
<TextField fx:id="userInput" layoutY="558.0" onAction="#handleUserInput" prefHeight="41.0" prefWidth="324.0" style="-fx-border-color: pink; -fx-border-width: 3;" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="76.0" />
<Button fx:id="sendButton" layoutX="324.0" layoutY="558.0" mnemonicParsing="false" onAction="#handleUserInput" prefHeight="41.0" prefWidth="76.0" style="-fx-background-color: pink;" text="ENTER" textFill="dimgrey" AnchorPane.bottomAnchor="0.0" AnchorPane.rightAnchor="0.0">
<TextField fx:id="userInput" layoutY="558.0" onAction="#handleUserInput" prefHeight="41.0" prefWidth="324.0"
style="-fx-border-color: pink; -fx-border-width: 3;"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="76.0" />
<Button fx:id="sendButton" layoutX="324.0" layoutY="558.0" mnemonicParsing="false" onAction="#handleUserInput"
prefHeight="41.0" prefWidth="76.0" style="-fx-background-color: pink;"
text="ENTER" textFill="dimgrey" AnchorPane.bottomAnchor="0.0" AnchorPane.rightAnchor="0.0">
<font>
<Font name="Comic Sans MS Bold" size="15.0" />
</font></Button>
<ScrollPane fx:id="scrollPane" hbarPolicy="NEVER" hvalue="1.0" prefHeight="557.0" prefWidth="400.0" vvalue="1.0" AnchorPane.bottomAnchor="41.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<ScrollPane fx:id="scrollPane" fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" hvalue="1.0"
prefHeight="557.0" prefWidth="400.0" vvalue="1.0" AnchorPane.bottomAnchor="41.0"
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<content>
<VBox fx:id="dialogContainer" prefHeight="552.0" prefWidth="388.0" style="-fx-background-image: url('/images/clouds.jpg');"/>
<VBox fx:id="dialogContainer" prefHeight="552.0" prefWidth="388.0"
style="-fx-background-image: url('/images/clouds.jpg');"/>
</content>
</ScrollPane>
</children>
Expand Down

0 comments on commit 72214ca

Please sign in to comment.