Skip to content

Commit

Permalink
Merge branch 'dargohzy-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathanael Seen committed Mar 19, 2020
2 parents 3decf3a + 452d885 commit 201f9e8
Show file tree
Hide file tree
Showing 17 changed files with 278 additions and 102 deletions.
8 changes: 1 addition & 7 deletions src/main/java/igrad/ui/CapPanel.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
package igrad.ui;

import javafx.fxml.FXML;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.Region;

/**
* Panel containing the current, target CAP for the user.
*/
public class CapPanel extends UiPart<Region> {

public static final String FXML = "CapPanel.fxml";
public static final String FXML = "ProgressSidePanel.fxml";

@FXML
private AnchorPane capPanel;

/*
* @FXML
Expand All @@ -27,8 +23,6 @@ public class CapPanel extends UiPart<Region> {

public CapPanel() {
super(FXML);

this.capPanel = new AnchorPane();
}

/* public void showPanels() {
Expand Down
24 changes: 18 additions & 6 deletions src/main/java/igrad/ui/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import igrad.services.exceptions.ServiceException;
import javafx.fxml.FXML;
import javafx.scene.control.Label;
import javafx.scene.layout.HBox;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
Expand All @@ -40,7 +39,7 @@ public class MainWindow extends UiPart<Stage> {
private ResultDisplay resultDisplay;
private HelpWindow helpWindow;
private StatusBar statusBar;
private McSidePanel mcSidePanel;
/* private McSidePanel mcSidePanel;*/
private CapPanel capPanel;

@FXML
Expand All @@ -49,8 +48,10 @@ public class MainWindow extends UiPart<Stage> {
@FXML
private VBox moduleList;

@FXML
private HBox sidePanelPlaceholder;
/*
* @FXML
* private HBox sidePanelPlaceholder;
*/

@FXML
private VBox capPanelPlaceholder;
Expand All @@ -67,6 +68,9 @@ public class MainWindow extends UiPart<Stage> {
@FXML
private Label mcCount;

@FXML
private Label commandReceived;


public MainWindow(Stage primaryStage, Logic logic) {
super(FXML, primaryStage);
Expand Down Expand Up @@ -165,8 +169,10 @@ void displayModulePanel(Model model) {
* Fills up and displays/refreshes the the placeholders of the side panels (Modular credits info, CAP info).
*/
void displaySidePanels(Model model) {
mcSidePanel = new McSidePanel();
sidePanelPlaceholder.getChildren().add(mcSidePanel.getRoot());
/*
* mcSidePanel = new McSidePanel();
* sidePanelPlaceholder.getChildren().add(mcSidePanel.getRoot());
*/

capPanel = new CapPanel();
capPanelPlaceholder.getChildren().add(capPanel.getRoot());
Expand Down Expand Up @@ -227,6 +233,10 @@ private void setWindowDefaultSize(GuiSettings guiSettings) {
}
}

private void setCommandReceived(String command) {
commandReceived.setText(command);
}

/**
* Opens the help window or focuses on it if it's already opened.
*/
Expand Down Expand Up @@ -269,6 +279,8 @@ private CommandResult executeCommand(String commandText, Model model) throws Com
IOException,
ServiceException {

setCommandReceived(commandText);

try {
CommandResult commandResult;

Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/avatars/chikin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/main/resources/avatars/frogger.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/main/resources/avatars/grizzly.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/main/resources/avatars/koala.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/main/resources/avatars/po.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/main/resources/avatars/shibu.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions src/main/resources/view/CommandBox.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.text.Font?>
<StackPane xmlns:fx="http://javafx.com/fxml/1" styleClass="stack-pane" xmlns="http://javafx.com/javafx/11.0.0">
<TextField fx:id="commandTextField" onAction="#handleCommandEntered" promptText="Enter command here...">

<StackPane styleClass="stack-pane" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<TextField fx:id="commandTextField" onAction="#handleCommandEntered" promptText="Enter command here..." styleClass="command-box" stylesheets="@DarkTheme.css">
<font>
<Font name="Calibri" size="16.0"/>
<Font name="Calibri" size="16.0" />
</font>
</TextField>

Expand Down
88 changes: 71 additions & 17 deletions src/main/resources/view/DarkTheme.css
Original file line number Diff line number Diff line change
Expand Up @@ -91,25 +91,25 @@
.list-view {
-fx-background-insets: 0;
-fx-padding: 0;
-fx-background-color: #2d2d2d;
-fx-background-color: #3a3a3a;
}

.list-cell {
-fx-label-padding: 0 0 0 0;
-fx-graphic-text-gap : 0;
-fx-padding: 0 0 0 0;
-fx-padding: 10 20 10 20;
}

.list-cell:filled:even {
-fx-background-color: #3c3e3f;
-fx-background-color: #3a3a3a;
}

.list-cell:filled:odd {
-fx-background-color: #515658;
-fx-background-color: #3a3a3a;
}

.list-cell:filled:selected {
-fx-background-color: #424d5f;
-fx-background-color: #3a3a3a;
}

.list-cell:filled:selected #cardPane {
Expand Down Expand Up @@ -141,6 +141,20 @@
-fx-text-fill: #010504;
}

.progress_panel {
-fx-background-color: #3a3a3a;
-fx-border-style: solid;
-fx-border-color: transparent;
-fx-background-radius: 20;
-fx-effect: dropshadow(gaussian, #1d1d1d, 20, 0.2, 0, 10);
}

.progress_panel .label {
-fx-font-family: Calibri;
-fx-text-fill: #d1d1d1;
-fx-font-size: 16;
}

.stack-pane {
-fx-background-color: #2d2d2d;
}
Expand All @@ -167,22 +181,30 @@
}

.status-bar {
-fx-background-color: #3d3d3d;
-fx-background-color: #2d2d2d;
}

.result-display {
-fx-background-color: #3a3a3a;
-fx-background-radius: 20;
-fx-border-color: transparent;
-fx-effect: dropshadow(gaussian, #1d1d1d, 20, 0.2, 0, 10);
}

.result-display-text-area {
-fx-background-color: transparent;
-fx-font-family: "Calibri Light";
-fx-font-size: 16pt;
-fx-border-color: transparent;
-fx-font-size: 20;
-fx-text-fill: white;
-fx-font-family: Calibri;
}

.result-display .label {
-fx-text-fill: white !important;
}

.status-bar .label {
-fx-font-family: "Calibri Light";
-fx-font-family: Calibri;
-fx-font-size: 18pt;
-fx-text-fill: white;
-fx-padding: 4px;
Expand Down Expand Up @@ -347,32 +369,64 @@
-fx-padding: 8 1 8 1;
}

#cardPane {
.command-box {
-fx-background-color: #d1d1d1;
-fx-background-radius: 20;
-fx-font-family: Calibri;
-fx-font-size: 20;
-fx-text-fill: #2a2a2a;
-fx-border-color: transparent;
}

.command-received {
-fx-font-size: 16;
-fx-text-fill: white;
-fx-background-color: #2d2d2d;
-fx-background-radius: 5;
-fx-border-radius: 5;
-fx-border-style: solid solid solid solid;
-fx-border-color: #4d4d4d;
-fx-text-fill: white;
-fx-effect: innershadow(gaussian, #1d1d1d, 0.2, 1, 1);
}

#cardPane {
-fx-background-color: #303030;
-fx-background-radius: 20;
-fx-border-width: 1;
-fx-border-style: solid solid solid solid;
-fx-border-color: #3d3d3d;
-fx-border-radius: 20;
-fx-border-color: #4d4d4d;
}

#commandTypeLabel {
-fx-font-size: 11px;
-fx-text-fill: #F70D1A;
}

#commandTextField {
/*#commandTextField {
-fx-background-color: #2f2f2f;
-fx-background-radius: 20;
-fx-border-style: solid;
-fx-border-color: #2d2d2d;
-fx-text-fill: white;
}
-fx-border-color: transparent;
-fx-text-fill: black;
}*/

#filterField, #personListPanel, #personWebpage {
-fx-effect: innershadow(gaussian, black, 10, 0, 0, 0);
}

#resultDisplay .content {
-fx-background-color: #2f2f2f;
-fx-background-radius: 0;
-fx-background-color: #3a3a3a;
-fx-background-radius:0;
-fx-border-color: transparent;
-fx-text-fill: white;
}

#commandReceived .content {
-fx-background-color: #2a2a2a;
-fx-border-radius: 20;
-fx-border-style: solid;
-fx-border-color: transparent;
-fx-text-fill: white;
}
Expand Down
Loading

0 comments on commit 201f9e8

Please sign in to comment.