mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-04 18:56:07 +00:00
remove name, rebalance income
This commit is contained in:
@@ -48,20 +48,20 @@ export class UIRenderer {
|
||||
}
|
||||
|
||||
render(context: CanvasRenderingContext2D) {
|
||||
const p = this.game.players().find(p => p.clientID() == this.clientID);
|
||||
let troopCount = p ? `${renderTroops(p.troops())}` : '';
|
||||
// const p = this.game.players().find(p => p.clientID() == this.clientID);
|
||||
// let troopCount = p ? `${renderTroops(p.troops())}` : '';
|
||||
|
||||
context.save();
|
||||
context.fillStyle = 'rgba(0, 0, 0, 0.7)'; // Black with 70% opacity
|
||||
context.textAlign = 'center';
|
||||
context.textBaseline = 'top';
|
||||
// context.save();
|
||||
// context.fillStyle = 'rgba(0, 0, 0, 0.7)'; // Black with 70% opacity
|
||||
// context.textAlign = 'center';
|
||||
// context.textBaseline = 'top';
|
||||
|
||||
const x = context.canvas.width / 2; // Center horizontally
|
||||
const y = 40; // Distance from the top
|
||||
// const x = context.canvas.width / 2; // Center horizontally
|
||||
// const y = 40; // Distance from the top
|
||||
|
||||
context.font = `bold ${60}px ${this.theme.font()}`;
|
||||
context.fillText(troopCount, x, y);
|
||||
context.restore();
|
||||
// context.font = `bold ${60}px ${this.theme.font()}`;
|
||||
// context.fillText(troopCount, x, y);
|
||||
// context.restore();
|
||||
}
|
||||
|
||||
onExitButtonClick() {
|
||||
|
||||
Reference in New Issue
Block a user