Brozy123 commited on
Commit
7141569
·
verified ·
1 Parent(s): dded7ce

Update lineupRenderer.js

Browse files
Files changed (1) hide show
  1. lineupRenderer.js +3 -3
lineupRenderer.js CHANGED
@@ -151,12 +151,12 @@ function drawPitch(ctx, W, H) {
151
  /**
152
  * Render the lineup as a PNG image buffer
153
  * @param {Map} lineup - Map of posKey -> [userId, ...]
154
- * @param {string} formKey - Formation key (e.g. "3-1-2")
155
  * @param {Array} formation - Array of [posKey, posLabel]
156
  * @param {object} client - Discord client for fetching user data
157
  * @returns {Promise<Buffer>} PNG image buffer
158
  */
159
- async function renderLineupImage(lineup, formKey, formation, client) {
160
  const PITCH_W = 900;
161
  const SIDEBAR_W = 280;
162
  const W = PITCH_W + SIDEBAR_W;
@@ -223,7 +223,7 @@ async function renderLineupImage(lineup, formKey, formation, client) {
223
  ctx.fillStyle = '#ffffff';
224
  ctx.font = 'bold 16px Arial, sans-serif';
225
  ctx.textAlign = 'center';
226
- ctx.fillText(`LINEUP — ${formKey.toUpperCase()}`, PITCH_W / 2, 24);
227
  ctx.restore();
228
 
229
  // Extract subs and draw them
 
151
  /**
152
  * Render the lineup as a PNG image buffer
153
  * @param {Map} lineup - Map of posKey -> [userId, ...]
154
+ * @param {string} title - Title to display on the image
155
  * @param {Array} formation - Array of [posKey, posLabel]
156
  * @param {object} client - Discord client for fetching user data
157
  * @returns {Promise<Buffer>} PNG image buffer
158
  */
159
+ async function renderLineupImage(lineup, title, formation, client) {
160
  const PITCH_W = 900;
161
  const SIDEBAR_W = 280;
162
  const W = PITCH_W + SIDEBAR_W;
 
223
  ctx.fillStyle = '#ffffff';
224
  ctx.font = 'bold 16px Arial, sans-serif';
225
  ctx.textAlign = 'center';
226
+ ctx.fillText(`LINEUP — ${title.toUpperCase()}`, PITCH_W / 2, 24);
227
  ctx.restore();
228
 
229
  // Extract subs and draw them