bga-score-sheet
    Preparing search index...

    Interface ScoreSheetSettings

    The settings to initiate the score sheet.

    interface ScoreSheetSettings {
        animationsActive?: boolean | (() => boolean);
        classes?: string;
        direction?: "vertical" | "horizontal";
        entries: Entry[];
        entryLabelHeight?: number;
        entryLabelWidth?: number;
        left?: number;
        onScoreDisplayed?: (
            property: string,
            playerId: number,
            score: string | number,
        ) => any;
        playerNameHeight?: number;
        playerNameWidth?: number;
        players: { [playerId: number]: Player };
        scores?: PlayerScores;
        skipButton?: SkipButton;
        top?: number;
    }
    Index

    Properties

    animationsActive?: boolean | (() => boolean)

    A function returning a boolean, or a boolean, to know if animations are active.

    classes?: string

    The classes to apply to the score sheet. You can use it to set an image background, if the game has a score sheet image.

    direction?: "vertical" | "horizontal"

    The direction: vertical for each player on a column and entries on rows, horizontal for a player on each row and entries on columns. Default vertical.

    entries: Entry[]

    The lines of the score sheet.

    entryLabelHeight?: number

    The entry label cell height.

    entryLabelWidth?: number

    The entry label cell width.

    left?: number

    The left margin to start the table (usually, only to match a background image).

    onScoreDisplayed?: (
        property: string,
        playerId: number,
        score: string | number,
    ) => any

    The callback when a score cell is filled. You can update the player score on the player panel when the total is displayed for a player :

    onScoreDisplayed: (property, playerId, score) => { if (property === 'total' && this.scoreCtrl[playerId]) { this.scoreCtrl[playerId].setValue(score); } }

    playerNameHeight?: number

    The player name cell height.

    playerNameWidth?: number

    The player name cell width.

    players: { [playerId: number]: Player }

    The players, displayed on each score column. It can be players from gamedatas.players, an automata, or a mix of both.

    scores?: PlayerScores

    The scores to display. Fill it only if the game is already ended.

    skipButton?: SkipButton

    The Skip button to display. If unset, no Skip button will be shown. The button will only be visible during the animation.

    top?: number

    The top margin to start the table (usually, only to match a background image).