removed unnecessary code

This commit is contained in:
2025-11-28 16:27:00 +01:00
parent ff82d8f7e6
commit c3aa7ea540
3 changed files with 3 additions and 45 deletions

View File

@@ -1,21 +1,12 @@
package de.miaurizius.jgame2d.core;
import java.awt.*;
import java.text.DecimalFormat;
public class UI {
GamePanel panel;
Graphics graphics2d;
Font arial_40, arial_80B;
DecimalFormat df = new DecimalFormat("#0.00");
public boolean messageOn = false;
public String message;
public boolean gameFinished = false;
int msgC = 0;
double playTime;
public UI(GamePanel panel) {
this.panel = panel;
@@ -23,11 +14,6 @@ public class UI {
arial_80B = new Font("Arial", Font.BOLD, 80);
}
public void showMessage(String text) {
message = text;
messageOn = true;
}
public void draw(Graphics graphics2d) {
this.graphics2d = graphics2d;
graphics2d.setFont(arial_40);
@@ -44,6 +30,7 @@ public class UI {
}
public void drawPauseScreen() {
graphics2d.setFont(graphics2d.getFont().deriveFont(Font.PLAIN, 80));
String text = "PAUSED";
int y = panel.screenHeight / 2;
graphics2d.drawString(text, getCenteredX(text), y);