Skip to content

Commit

Permalink
Increase width of time box and adjust text positioning in scoreboard …
Browse files Browse the repository at this point in the history
…rendering (#70)
  • Loading branch information
MiguelRipoll23 authored Dec 22, 2024
1 parent 23c4449 commit da15ff4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/objects/scoreboard-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class ScoreboardObject
{
private readonly SQUARE_SIZE: number = 50;
private readonly SPACE_BETWEEN: number = 10;
private readonly TIME_BOX_WIDTH: number = 120;
private readonly TIME_BOX_WIDTH: number = 150; // Increased width from 120 to 150
private readonly TIME_BOX_HEIGHT: number = 50;
private readonly CORNER_RADIUS: number = 10;

Expand Down Expand Up @@ -179,7 +179,7 @@ export class ScoreboardObject
context,
score.toString(),
x + this.SQUARE_SIZE / 2,
this.y + 12 + this.SQUARE_SIZE / 2
this.y + 12.5 + this.SQUARE_SIZE / 2
);
}

Expand All @@ -194,7 +194,7 @@ export class ScoreboardObject
context.fillStyle = this.TIME_BOX_FILL_COLOR;
this.roundedRect(context, x, y, width, height, this.CORNER_RADIUS);
context.fill();
this.renderText(context, text, x + width / 2, y + 12 + height / 2);
this.renderText(context, text, x + width / 2, y + 12.5 + height / 2);
}

private roundedRect(
Expand Down

0 comments on commit da15ff4

Please sign in to comment.