Skip to content

Commit

Permalink
fixed left and right players name display (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
jberclaz authored Jul 16, 2024
1 parent 4aebba3 commit e000b5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/leflat/jass/client/ModernGamePanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ void paintLeftArea(Graphics2D g2, Rectangle2D.Float leftArea, Dimension cardDime

// name
float nameX = leftArea.x + leftArea.width * 20f / 120f;
float nameY = leftArea.y + min(leftArea.height * 90f / 450f, hand_y_offset - cardDimension.width / 3f);
float nameY = min(hand_y_offset - cardDimension.height / 10f, leftArea.y + leftArea.height / 4);
g2.drawString(player.getName(), nameX, nameY);
if (atoutChooser == PlayerPosition.LEFT) {
g2.fillOval(round(nameX), round(nameY + 7), DOT_SIZE, DOT_SIZE);
Expand Down Expand Up @@ -654,7 +654,7 @@ void paintRightArea(Graphics2D g2, Rectangle2D.Float rightArea, Dimension cardDi

// name
float nameX = rightArea.x + rightArea.width * 20f / 120f;
float nameY = rightArea.y + min(round(rightArea.height * 90f / 450f), hand_y_offset - cardDimension.width / 3f);
float nameY = min(hand_y_offset - cardDimension.height / 10f, rightArea.y + rightArea.height / 4);
g2.drawString(player.getName(), nameX, nameY);

if (atoutChooser == PlayerPosition.RIGHT) {
Expand Down

0 comments on commit e000b5c

Please sign in to comment.