Commit ca7ed05d authored by dkonam's avatar dkonam
Browse files

Merge branch 'develop' of https://gitlab.utc.fr/qdruault/lo23-project into develop

parents 1e0104c6 d3ced366
......@@ -15,6 +15,10 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLDecoder;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
......@@ -55,11 +59,7 @@ public class IHMMain {
primaryStage.setMinHeight(600);
// Load the font for the css
try {
Font.loadFont(new FileInputStream(new File("./target/classes/styles/space_age.ttf")), 10);
} catch (FileNotFoundException ex) {
Logger.getLogger(PlayerListController.class.getName()).log(Level.SEVERE, null, ex);
}
//load all scenes when app starts
for(SceneName scenename : SceneName.values()){
......@@ -71,7 +71,7 @@ public class IHMMain {
primaryStage.setTitle("Battle Ship");
toNetworkInterfaceChoice();
stage.show();
//add onClose event handler which handle the event when user clicks X
stage.setOnCloseRequest(new EventHandler<WindowEvent>() {
@Override
......
......@@ -15,6 +15,7 @@ import java.text.SimpleDateFormat;
import java.time.ZoneId;
import java.util.ArrayList;
import java.util.Date;
import java.util.Formatter;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
......@@ -33,8 +34,6 @@ import javafx.scene.control.DatePicker;
import javafx.scene.control.Label;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.Pane;
import javafx.stage.FileChooser;
......@@ -241,6 +240,7 @@ public class PlayerProfileController extends AbstractController{
if (data.get(3)!=0){
rate = ((double)data.get(0))/((double)data.get(3))*100;
}
new Formatter().format("%.2f", rate);
rateBelgian.setText("win rate: "+rate+"%");
}
return data;
......@@ -256,6 +256,7 @@ public class PlayerProfileController extends AbstractController{
if (data.get(3)!=0){
rate = ((double)data.get(0))/((double)data.get(3))*100;
}
new Formatter().format("%.2f", rate);
rateAll.setText("win rate: "+rate+"%");
return data;
}
......
......@@ -228,7 +228,12 @@
-fx-border-color: #ef8d00;
}
#statGrid {
#stat {
-fx-border-radius: 15px;
-fx-border-color: #ef8d00;
-fx-border-color: #ef8d00;
}
#gridBorderChart {
-fx-border-radius: 15px;
-fx-border-color: #ef8d00;
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment