editorRows
Namespace of @v12-engine/editor
Members
asDegrees beta
asDegrees: (value: number) => stringShows a number of degrees rounded, with a degree sign: 45.4 reads 45°
asPercent beta
asPercent: (value: number) => stringShows a 0..1 number as a percentage, rounded: 0.25 reads 25%
ChoiceRow beta
export declare function ChoiceRow(props: {
label: string;
hint?: string;
value: unknown;
options: {
value: string;
label: string;
}[];
onChange: (value: string) => void;
reset?: () => void;
drop?: ReturnType<typeof outlineDrop>;
}): JSX.Element;A row with a select of a few options: its label, the one picked, and what to do when another is; may be a place to drop a row of the Hierarchy on
ColorRow beta
export declare function ColorRow(props: {
color: readonly number[] | undefined;
onPick: (color: [number, number, number]) => void;
}): JSX.Element;Colours to draw a point, a path or a region in
ColourRow beta
export declare function ColourRow<C extends readonly number[] = [number, number, number]>(props: ColourRowProps & {
alpha?: boolean;
onChange: (color: C) => void;
}): JSX.Element;A colour of the look of the map; with alpha, how much of it is seen too (an alpha slider in what opens): told as [r, g, b] where it is whole, as a colour written before alpha was, else [r, g, b, a]
ColourRowProps beta
export interface ColourRowPropsWhat a ColourRow is given, whether or not it says how much of the colour is seen
common beta
export declare function common<T>(items: readonly T[], get: (item: T) => unknown): unknown;What a list of things has in common for something: what it is for all of them, or MIXED. Of none, MIXED too: a panel asks once more as its selection empties, before it is taken away
createFold beta
export declare function createFold(title: string, defaultOpen?: boolean): {
open: import("solid-js").Accessor<boolean>;
ref: (made: HTMLElement) => HTMLElement;
onOpenChange: (details: {
open: boolean;
}) => void;
};What a fold needs to be shown by its title: whether it is open (open, onOpenChange) and its element (ref), on the folds the page keeps while it is drawn. For a Collapsible.Root with data-fold of the title. Open or folded as it was left (FoldMemory), defaultOpen for one never touched
DataFields beta
export declare function DataFields(props: {
client: PanelClient;
fields: MapFieldDef[];
data: Record<string, unknown> | undefined;
onChange: (id: string, value: unknown) => void;
reset?: (id: string) => void;
}): JSX.Element;Fields of the game's own, on one thing: the map, or a player. Each change goes through onChange
EitherRow beta
export declare function EitherRow(props: {
label: string;
hint?: string;
value: unknown;
options?: readonly string[];
orNumber?: 'number' | 'integer';
min?: number;
max?: number;
step?: number;
onChange: (value: boolean | string | number) => void;
reset?: () => void;
}): JSX.Element;A row of a value of more than one kind (EditableField's either): yes, no, one of its words, or a number where it may be one (orNumber), picked from a select; a number picked shows its field beside it, set to the least it may be until one is typed. Nothing picked shows none
Fold beta
export declare function Fold(props: {
title: string;
icon?: string;
children: JSX.Element;
}): JSX.Element;A part of the look of the map, folded away until wanted: made as it is opened, gone as it is folded. icon by its name, before its title
FoldMemory beta
export interface FoldMemoryWhere folds are remembered, by their titles: what the user opened or folded stays so the next time the panel is drawn, in a later session too (kept in this browser per game, editor-folds:<game>). Nothing remembered where the page gives none
FoldMemoryContext beta
FoldMemoryContext: import("solid-js").Context<FoldMemory | undefined>The folds' memory, where the page keeps one (the dock gives each panel the editor's)
FoldsContext beta
FoldsContext: import("solid-js").Context<FoldAnchors | undefined>The folds drawn, where the editor's page keeps them for the shell to show one (EditorShell.revealFold)
GameFields beta
export declare function GameFields(props: {
client: PanelClient;
objects: MapObject[];
camps: MapCamp[];
regions?: MapRegion[];
}): JSX.Element;The fields of the game's own for what is selected (see defineMapField): those that are fields of every one of them. What they mean is the game's business; the editor shows them by their kind, and keeps what they are set to
IdField beta
export declare function IdField(props: {
id: number;
}): JSX.Element;The id of the one thing selected, as the map keeps it, to copy: what code and the map's file name it by (world.get(id) for what the map places, the file's id)
MarkerChips beta
export declare function MarkerChips<T extends {
id: number;
name: string;
color?: [number, number, number];
}>(props: {
items: T[];
picked: number | undefined;
empty: string;
onPick: (item: T) => void;
onReorder?: (from: number, to: number) => void;
}): JSX.Element;Chips to pick one of a list of named things by, each in its colour
MIXED beta
MIXED: unique symbolWhat several things have for something, when it is not the same for all of them
NameField beta
export declare function NameField(props: {
name: string | undefined;
onChange: (field: HTMLInputElement) => void;
}): JSX.Element;The name of the one thing selected: what the rules of the game find it by
NumberRow beta
export declare function NumberRow(props: {
label: string;
hint?: string;
value: unknown;
placeholder?: string;
fallback?: number;
min?: number;
max?: number;
step?: number;
onChange: (value: number | undefined) => void;
reset?: () => void;
}): JSX.Element;A number of the inspector. Emptied, it goes back to what it is when nothing is said: the placeholder says what that is
renameMarker beta
export declare function renameMarker(client: PanelClient, target: Named, field: HTMLInputElement, before: string): void;Renames a point or a path; the field shows the name it has in the end
ResetDot beta
export declare function ResetDot(props: {
onReset: () => void;
label?: string;
}): JSX.Element;The dot of a field set apart from its default (EQ6), at the start of its row as the Data panel has one: a click takes it back to the default (the kind's for a thing, a new map's for the map). Its row is relative
SliderRow beta
export declare function SliderRow(props: {
label: string;
title?: string;
value: number;
min: number;
max: number;
step: number;
shown?: (value: number) => string;
onChange: (value: number) => void;
}): JSX.Element;A number of the look of the map, on a slider
TextRow beta
export declare function TextRow(props: {
label: string;
hint?: string;
value: unknown;
placeholder?: string;
onChange: (value: string | undefined) => void;
accepts?: readonly AssetKind[];
reset?: () => void;
}): JSX.Element;A line of words. One that names a file (accepts: a model, a sound...) takes one dragged from the Assets panel, as the field keeps it (assetDrop)
ToggleRow beta
export declare function ToggleRow(props: {
label: string;
hint?: string;
value: unknown;
onChange: (value: boolean) => void;
reset?: () => void;
}): JSX.Element;A row with a checkbox: its label, and what to do when it is ticked or cleared; shows a mixed value as unticked, marked (mixed)