Skip to content

ErrorLook beta ​

Interface of @v12-engine/client

ts
export interface ErrorLook

How a game's error screen looks, shown when it could not be loaded or stopped (CrashReport.kind). Each way takes more of it over than the last: - declared: the words (title, text) and the background, the client's screen around them - in code: the same words worked out from the report ((report) => …) - a component (component) in the place of the client's (ErrorScreen, which it can wrap) - an element of the game's own (mount): any HTML, any framework

Members ​

background ​

ts
background?: string;

The background (CSS) of a game that could not be loaded. A stopped game's last picture shows, darkened, behind the rest

component ​

ts
component?: (props: ErrorScreenProps) => JSX.Element;

A screen of the game's own, in place of the client's

mount ​

ts
mount?: (element: HTMLElement, report: CrashReport, actions: ErrorActions) => () => void;

Draws the whole screen into element. Returns what takes it away

text ​

ts
text?: string | ((report: CrashReport) => string);

What is said under it: the report's message when left out

title ​

ts
title?: string | ((report: CrashReport) => string);

The heading: "Melee could not be loaded", "The game stopped" when left out