Fixed some UI bugs, and redesigned some UI elements.

- Changed class structure (added dialogs, cells folder)
- Changed font to Baloo as it has better font height
- Figured out a way to change the font color of max player slider thumb
- Added cursor effect when mouse hover on any button
- Fixed drop shadow bug for lobby view player cell
- Moved drop shadow effect from player cell controller to css

#story[1245]
This commit is contained in:
Haoming Yin
2017-09-09 15:00:32 +12:00
parent cf4f8813d2
commit 1516e817b7
21 changed files with 170 additions and 124 deletions
Binary file not shown.
Binary file not shown.
-5
View File
@@ -1,5 +0,0 @@
#submitBtn {
-fx-background-color: -fx-pp-theme-color;
-fx-font-size: 14px;
-fx-text-fill: -fx-pp-light-text-color;
}
-26
View File
@@ -1,26 +0,0 @@
#submitBtn {
-fx-background-color: -fx-pp-theme-color;
-fx-text-fill: -fx-pp-light-text-color;
-fx-font-size: 20px;
}
#hostDialogHeader {
-fx-font-size: 30px;
-fx-text-fill: -fx-pp-dark-text-color;
}
#serverName {
-jfx-focus-color: -fx-pp-dark-text-color;
-jfx-unfocus-color: -fx-pp-dark-text-color;
-fx-text-fill: -fx-pp-dark-text-color;
-fx-prompt-text-fill: -fx-pp-dark-text-color;
}
#maxPlayerLabel {
-fx-text-fill: -fx-pp-dark-text-color;
}
#maxPlayers .thumb, #maxPlayers .track {
-fx-background-color: -fx-pp-theme-color;
}
@@ -5,6 +5,11 @@
#playerListCell {
-fx-background-color: -fx-pp-front-color;
-fx-effect: -fx-pp-dropshadow-light;
}
#playerListCell:hover {
-fx-effect: -fx-pp-dropshadow-dark;
}
#playerCellVBox {
@@ -0,0 +1,55 @@
#maxPlayersGridPane VBox * {
-fx-font-family: monospace !important;
}
#submitBtn {
-fx-background-color: -fx-pp-theme-color;
-fx-text-fill: -fx-pp-light-text-color;
-fx-font-size: 20px;
-fx-effect: -fx-pp-dropshadow-dark;
}
.jfx-rippler {
-jfx-rippler-fill: -fx-pp-light-theme-color; /* set rippler color for button */
}
#submitBtn:hover {
-fx-font-size: 23px;
-fx-background-color: -fx-pp-light-theme-color;
}
#hostDialogHeader {
-fx-font-size: 30px;
-fx-text-fill: -fx-pp-dark-text-color;
}
#serverName {
-jfx-focus-color: -fx-pp-dark-text-color;
-jfx-unfocus-color: -fx-pp-dark-text-color;
-fx-text-fill: -fx-pp-dark-text-color;
-fx-prompt-text-fill: -fx-pp-dark-text-color;
-fx-font-size: 16px;
}
#maxPlayersLabel {
-fx-text-fill: -fx-pp-dark-text-color;
-fx-font-size: 16px;
}
#maxPlayerPromptLabel {
-fx-text-fill: -fx-pp-dark-text-color;
-fx-font-size: 16px;
}
.maxPlayers {
-fx-font-size: 13px;
}
#maxPlayersSlider .thumb {
-fx-background-color: -fx-pp-theme-color;
}
#maxPlayersSlider .track {
-fx-background-color: -fx-pp-dark-text-color;
}
+14 -2
View File
@@ -1,5 +1,5 @@
@font-face {
src: url("BalooTammudu-Regular.ttf");
src: url("Baloo-Regular.ttf");
}
* {
@@ -9,12 +9,24 @@
-fx-pp-light-theme-color: #38a2fa;
-fx-pp-background-color: transparent;
-fx-pp-front-color: #fff;
-fx-font-family: "Baloo Tammudu";
-fx-font-family: "Baloo";
-fx-pp-dropshadow-light: dropshadow(gaussian, rgba(0, 0, 0, 0.1), 10.0, 0.2, 3, 4);
-fx-pp-dropshadow-dark: dropshadow(gaussian, rgba(0, 0, 0, 0.3), 10.0, 0.2, 5, 6);
}
GridPane .jfx-button {
-fx-min-height: 65px; /* because we changed the font, we now need to set mini height for all buttons */
}
.jfx-button {
-fx-cursor: hand;
}
.jfx-button:pressed {
-fx-cursor: wait;
}
.jfx-text-field {
-jfx-label-float: true;
}