Restyled character creation dialog.

Added dialog factory.
This commit is contained in:
Aaron Lutomski
2026-05-29 21:14:23 -07:00
parent 9282cdb334
commit 46a5fb0cd6
43 changed files with 2340 additions and 1112 deletions
+18
View File
@@ -1,3 +1,21 @@
/**
* Splits a flat list into column arrays for vertical stacking (top-to-bottom per column).
*
* @template T
* @param {T[]} arr
* @param {number} numCols
* @returns {T[][]}
*/
export function splitIntoColumns(arr, numCols) {
if (numCols <= 1) return [arr];
const columns = Array.from({ length: numCols }, () => /** @type {T[]} */ ([]));
const perCol = Math.ceil(arr.length / numCols);
for (let col = 0; col < numCols; col++) {
columns[col] = arr.slice(col * perCol, (col + 1) * perCol);
}
return columns;
}
/**
* Reorders a flat array into column-major order for grid display.
*