Skip to content

Commit

Permalink
v3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kysre committed Jul 21, 2021
1 parent 95e8934 commit 8f54792
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
7 changes: 3 additions & 4 deletions src/main/java/Client/view/MessageView.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ public MessageView(String userName, int id, String message, boolean isPinned, St
if (isOwnerMessage) {
this.setAlignment(Pos.CENTER_LEFT);
this.setStyle("-fx-background-color: #54b74d");
}
else {
} else {
this.setAlignment(Pos.CENTER_RIGHT);
this.setStyle("-fx-background-color: #ffff");
}
Expand All @@ -55,8 +54,8 @@ public MessageView(String userName, int id, String message, boolean isPinned, St
optionButton.setOnAction(e -> showOption());
ImageView imageView = null;
try {
imageView = new ImageView(new Image(new FileInputStream("src/main/resources/Client/view" +
"/chatButtonImages/options.png")));
imageView = new ImageView(new Image(
new FileInputStream("src/main/resources/Client/view/chatButtonImages/options.png")));
} catch (FileNotFoundException e) {
e.printStackTrace();
}
Expand Down
22 changes: 14 additions & 8 deletions src/main/java/Client/view/ShopCellMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
import javafx.scene.text.Text;
import Client.view.elements.GetImage;

import java.io.FileInputStream;
import java.io.FileNotFoundException;

public class ShopCellMenu extends AnchorPane {
private static ClientShopServer clientShopServer;
private ShopMenuGui shopMenuGui;
Expand Down Expand Up @@ -63,8 +66,7 @@ public void setButton() {
if (clientShopServer.getUserMoney() >= price) {
buyButton.setText("buy");
buyButton.setStyle("-fx-background-color: #0000ff");
}
else {
} else {
buyButton.setText("_");
buyButton.setStyle("-fx-background-color: orange");
}
Expand All @@ -74,8 +76,7 @@ public void setButton() {
if (clientShopServer.getUserMoney() >= price) {
buyButton.setText("buy");
buyButton.setStyle("-fx-background-color: #0000ff");
}
else {
} else {
buyButton.setText("_");
buyButton.setStyle("-fx-background-color: orange");
}
Expand All @@ -92,10 +93,15 @@ public void setButton() {
}

private void setImageButton(Button buyButton) {
ImageView imageView = new ImageView(new Image("src\\main\\resources\\Client\\view\\chatButtonImages\\forbidden.png"));
imageView.setFitWidth(19);
imageView.setFitHeight(17);
buyButton.setGraphic(imageView);
try {
ImageView imageView = new ImageView(new Image(
new FileInputStream("src\\main\\resources\\Client\\view\\chatButtonImages\\forbidden.png")));
imageView.setFitWidth(19);
imageView.setFitHeight(17);
buyButton.setGraphic(imageView);
} catch (FileNotFoundException fileNotFoundException) {
fileNotFoundException.printStackTrace();
}
}

public void setCardText() {
Expand Down

0 comments on commit 8f54792

Please sign in to comment.