UNPKG

blaze-2d

Version:

A fast and simple WebGL 2 2D game engine written in TypeScript

59 lines (58 loc) 1.55 kB
import { vec2 } from "gl-matrix"; import BlazeTabBar from "../../ui/tabBar"; import EditorPane from "./pane"; export default class EditorPaneGroup extends EditorPane { titlebar: BlazeTabBar; protected panes: EditorPane[]; protected currentPane: EditorPane; /** * Creates an {@link EditorPaneGroup}. * * @param id The group's ID (must be a valid HTML id) * @param pos The top left corner of the group in the editor grid * @param width The width of the group in columns * @param height The height of the group in rows */ constructor(id: string, pos: vec2, width: number, height: number); /** * Updates all pane's in the group. */ update(): void; /** * Refresh the groups ui. */ refresh(): void; /** * Add the current pane's element to the dom. */ addCurrentPane(): void; /** * Remove the current pane's element from the dom. */ removeCurrentPane(): void; /** * Show the pane with the given id. * * @param id The id of the pane */ showPane(id: string): void; /** * Change the current pane to the one given. * * @param pane The pane to show */ showPane(pane: EditorPane): void; /** * Adds a pane to the group. * * @param pane The pane to add */ addPane(pane: EditorPane): void; /** * Removes a pane from the group. * * @param pane The pane to remove */ removePane(pane: EditorPane): boolean; addTitlebar(): void; }