@mai3/phaser-sdk
Version:
A UI component library based on the Phaser game engine
25 lines • 819 B
TypeScript
import { LabelConfig, TextStyle } from '../types';
import { BaseScene } from "../game";
import { Panel } from './Panel';
export declare class Label extends Panel<LabelConfig> {
private _width?;
private _height?;
private label?;
protected _config: LabelConfig;
constructor(scene: BaseScene, config: LabelConfig);
reDraw(config: LabelConfig): void;
private validateConfig;
drawText(): void;
private createOrUpdateLabel;
private computedLabelSize;
private setLabelPosition;
private getLabelStyle;
get Text(): string;
set Text(text: string);
setWidth(width: number): void;
setStyle(textStyle: TextStyle): void;
get TextWidth(): number;
get Label(): Phaser.GameObjects.Text;
destroy(fromScene?: boolean): void;
}
//# sourceMappingURL=Label.d.ts.map