Added ImageViews for noise Bell
This commit is contained in:
parent
c5293bc8ee
commit
d963c35965
@ -23,6 +23,8 @@ import javafx.scene.control.Label;
|
||||
import javafx.scene.control.SplitPane;
|
||||
import javafx.scene.control.TextArea;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import javafx.scene.layout.Background;
|
||||
import javafx.scene.layout.HBox;
|
||||
@ -38,6 +40,8 @@ public class GameController {
|
||||
|
||||
private static GameStateModel gameStateModel;
|
||||
|
||||
|
||||
|
||||
//TODO(Seraina, Sebi): Same issue as ChatController? do with setters?
|
||||
public GameController(ClientModel c, GameStateModel g) {
|
||||
client = c;
|
||||
@ -76,6 +80,20 @@ public class GameController {
|
||||
@FXML
|
||||
private TextFlow lableRoom5;
|
||||
@FXML
|
||||
private HBox notificationHBox;
|
||||
@FXML
|
||||
private ImageView noiseImage0;
|
||||
@FXML
|
||||
private ImageView noiseImage1;
|
||||
@FXML
|
||||
private ImageView noiseImage2;
|
||||
@FXML
|
||||
private ImageView noiseImage3;
|
||||
@FXML
|
||||
private ImageView noiseImage4;
|
||||
@FXML
|
||||
private ImageView noiseImage5;
|
||||
@FXML
|
||||
private Button noiseButton;
|
||||
@FXML
|
||||
private TextFlow notificationText;
|
||||
@ -132,7 +150,7 @@ public class GameController {
|
||||
* Sends a noise message, to the server, should be a gui message?
|
||||
*/
|
||||
public void noise() {
|
||||
client.getClient().sendMsgToServer("noise"); //TODO: Add message
|
||||
client.getClient().sendMsgToServer("noise"); //TODO: Add message that server understands
|
||||
}
|
||||
|
||||
/**
|
||||
@ -185,6 +203,55 @@ public class GameController {
|
||||
lableRoom5.getChildren().add(role5);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an image of a bell on top of button0
|
||||
*/
|
||||
public void noiseDisplay0(){
|
||||
Image bell = new Image("ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.game.DayOpen.bell.png");
|
||||
noiseImage0.setImage(bell);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an image of a bell on top of button1
|
||||
*/
|
||||
public void noiseDisplay1(){
|
||||
Image bell = new Image("ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.game.DayOpen.bell.png");
|
||||
noiseImage0.setImage(bell);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an image of a bell on top of button2
|
||||
*/
|
||||
public void noiseDisplay2(){
|
||||
Image bell = new Image("ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.game.DayOpen.bell.png");
|
||||
noiseImage0.setImage(bell);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an image of a bell on top of button3
|
||||
*/
|
||||
public void noiseDisplay3(){
|
||||
Image bell = new Image("ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.game.DayOpen.bell.png");
|
||||
noiseImage0.setImage(bell);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an image of a bell on top of button4
|
||||
*/
|
||||
public void noiseDisplay4(){
|
||||
Image bell = new Image("ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.game.DayOpen.bell.png");
|
||||
noiseImage0.setImage(bell);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an image of a bell on top of button5
|
||||
*/
|
||||
public void noiseDisplay5(){
|
||||
Image bell = new Image("ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.game.DayOpen.bell.png");
|
||||
noiseImage0.setImage(bell);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setGameStateModel(
|
||||
GameStateModel gameStateModel) {
|
||||
|
||||
@ -13,6 +13,16 @@
|
||||
<children>
|
||||
<Group fx:id="roomButtonGroupDay" layoutX="230.5" layoutY="220.0">
|
||||
<children>
|
||||
<HBox fx:id="notificationHBox" layoutX="50.0" layoutY="-74.0" rotate="12.4">
|
||||
<children>
|
||||
<ImageView fx:id="noiseImage0" fitHeight="150.0" fitWidth="125.0" pickOnBounds="true" preserveRatio="true" />
|
||||
<ImageView fx:id="noiseImage1" fitHeight="150.0" fitWidth="125.0" pickOnBounds="true" preserveRatio="true" />
|
||||
<ImageView fx:id="noiseImage2" fitHeight="150.0" fitWidth="125.0" pickOnBounds="true" preserveRatio="true" />
|
||||
<ImageView fx:id="noiseImage3" fitHeight="150.0" fitWidth="125.0" pickOnBounds="true" preserveRatio="true" />
|
||||
<ImageView fx:id="noiseImage4" fitHeight="150.0" fitWidth="125.0" pickOnBounds="true" preserveRatio="true" />
|
||||
<ImageView fx:id="noiseImage5" fitHeight="150.0" fitWidth="125.0" pickOnBounds="true" preserveRatio="true" />
|
||||
</children>
|
||||
</HBox>
|
||||
<Button id="room1" fx:id="buttonRoom0" accessibleRole="RADIO_BUTTON" alignment="TOP_CENTER" contentDisplay="GRAPHIC_ONLY" layoutX="21.5" minWidth="-Infinity" mnemonicParsing="false" onAction="#sendVote0" prefHeight="110.0" prefWidth="90.0" text="room0">
|
||||
<font>
|
||||
<Font size="25.0" />
|
||||
|
||||
Reference in New Issue
Block a user