ISSUE-054 - Initial work of building the Timing Board. Working so far only have work for the Timing Tower.

Timing Board is the combination of all elements on the left side of the screen, including the Status Indicator component (not written yet) that is visible whenever there are cars on track.
This commit is contained in:
Kyle Geib committed 2022-02-16 14:36:27 -05:00
1 parent 8bf413ba31
commit 22ebab1101
19 files changed
+521 -41

No files matched your search

+26 -7
View File
@@ -60,7 +60,7 @@ export interface OverlayTool {
visible: boolean;
}
export type OverlayId = string;
export type OverlayIds = Array<OverlayId>;
export type OverlayIds = OverlayId[];
export interface OverlayPosition { x: number; y: number; }
export interface OverlayItem {
position: OverlayPosition;
@@ -92,7 +92,7 @@ export type EventMode =
| "q3";
export interface CourseStatus {
courseFlag: CourseFlags;
sectorFlags: Array<CourseFlag>;
sectorFlags: CourseFlag[];
safetyCar: SafetyCarStatus;
virtualSafetyCar: VirtualSafetyCarStatus;
}
@@ -106,11 +106,11 @@ export type CourseFlag =
| "redYellow";
export type SafetyCarStatus = "clear" | "starting" | "out" | "ending";
export type VirtualSafetyCarStatus = "clear" | "out" | "ending";
export type Grid = Array<Car>; // Grid order does not change.
export type Grid = Car[]; // Grid order does not change.
export interface Car {
position: number;
driver: Driver;
// status: ???; // retired
status: CarStatus;
// flags: ???, // blue, red, meatball, black/white, black
// notices: ???; // Penalties, warnings, investigations, blue flags, etc
// distance: number;
@@ -193,7 +193,7 @@ export type TeamFullName =
// Broadcast Director
export interface BroadcastDirector {
selectedCars: Array<Car>;
selectedCars: Car[];
}
// Broadcast Graphics
@@ -213,14 +213,33 @@ export interface BGBaseState {
export type OpenState = number;
export interface BroadcastGraphics {
// timingBoard: BGTimingBoard;
// statusIndicator: BGStatusIndicator;
timingBoard: BGTimingBoard;
// indicators: BGIndicators
chyrons: Optional<BGChyrons>;
// gems: BGGems
// toasts: BGToasts;
}
// Timing Board
export interface BGTimingBoard extends BGBaseState {
statusIndicator: BGStatusIndicator;
timingTower: BGTimingTower;
}
// Status Indicator
export interface BGStatusIndicator {
mode: BGStatusIndicatorModes;
}
// Timing Tower
export interface BGTimingTower {
open: OpenState;
mode: BGTimingTowerModes;
focusedCars: Car[],
focusedCarsMode: BGTimingTowerFocusedCarsMode,
}
// Chyrons
export type BGChyronMode = string;
export type BGChyronSubMode = string;
+29
View File
@@ -0,0 +1,29 @@
// To support enums https://stackoverflow.com/a/66939542
export * from "./state.d";
export enum CarStatus {
Normal,
Retired,
InPit,
OutLap,
InLap,
DidNotStart,
}
export enum BGStatusIndicatorModes {
NormalNarrow, // "LAP" above "##/##" lap count.
NormalWide, // "LAP" to the left of "##/##" lap count.
}
export enum BGTimingTowerModes {
Hidden, // Not on display.
Minimum, // Just the driver name abbrv.
Leader, // Leader timing.
Interval, // Interval timing.
FullName, // Displays full name.
}
export enum BGTimingTowerFocusedCarsMode {
None, // When no special treatments are made.
Portrait, // When it shows the portrait of the driver.
}