aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gameplay/SongPlayer.java39
-rw-r--r--src/gui/style.css6
2 files changed, 26 insertions, 19 deletions
diff --git a/src/gameplay/SongPlayer.java b/src/gameplay/SongPlayer.java
index a1a6b45..e4a8d82 100644
--- a/src/gameplay/SongPlayer.java
+++ b/src/gameplay/SongPlayer.java
@@ -150,23 +150,26 @@ public class SongPlayer extends Pane {
* calls the checkNote() method for the corresponding lane
*/
//System.out.println(timer.time());
- if (e.getCode() == KeyCode.D) {
- checkNote(dLane, dButton);
- }
- if (e.getCode() == KeyCode.F) {
- checkNote(fLane, fButton);
- }
- if (e.getCode() == KeyCode.SPACE) {
- checkNote(spaceLane, sButton);
- }
- if (e.getCode() == KeyCode.J) {
- checkNote(jLane, jButton);
- }
- if (e.getCode() == KeyCode.K) {
- checkNote(kLane, kButton);
- }
- if (e.getCode() == KeyCode.Q) {
- System.out.println("" + timer.time());
+ if (super.isVisible())
+ {
+ if (e.getCode() == KeyCode.D) {
+ checkNote(dLane, dButton);
+ }
+ if (e.getCode() == KeyCode.F) {
+ checkNote(fLane, fButton);
+ }
+ if (e.getCode() == KeyCode.SPACE) {
+ checkNote(spaceLane, sButton);
+ }
+ if (e.getCode() == KeyCode.J) {
+ checkNote(jLane, jButton);
+ }
+ if (e.getCode() == KeyCode.K) {
+ checkNote(kLane, kButton);
+ }
+ if (e.getCode() == KeyCode.Q) {
+ System.out.println("" + timer.time());
+ }
}
//prints the user's current score and combo, for debugging purposes
//System.out.println("Score: " + scoreCounter.getScore() + "\nCombo: " + scoreCounter.getCombo() + "\n");
@@ -318,7 +321,7 @@ public class SongPlayer extends Pane {
* @return 2 for a perfect hit, 1 for a good hit, 0 for a miss, and -1 if there are no notes to hit
*/
private int checkNote(ArrayList<Block> lane, Target button) {
- if (lane.size() != 0)
+ if (lane.size() != 0 && super.isVisible())
{
double distance = distanceToGoal(lane.get(getClosestNote(lane)));
if (lane.size() > 0 && distance < super.getHeight() / 3) {
diff --git a/src/gui/style.css b/src/gui/style.css
index 09e164e..dd1de55 100644
--- a/src/gui/style.css
+++ b/src/gui/style.css
@@ -92,6 +92,11 @@ TableView:focused .list-cell:focused {
/* -fx-border-color: rgb(255, 255, 255); */
}
+.table-view .corner {
+ -fx-background-color: transparent;
+ -fx-border-color: transparent;
+}
+
.table-row-cell:selected {
-fx-background-color: rgb(255, 255, 255);
-fx-text-background-color: rgb(0, 0, 0);
@@ -229,4 +234,3 @@ Slider:focused .thumb{
/* -fx-border-width: 20; */
}
-