@mai3/phaser-sdk
Version:
A UI component library based on the Phaser game engine
105 lines • 3.41 kB
TypeScript
import { Wallet, WalletApp as walletApp } from "../../game";
import { Checkbox } from "../../ui/Checkbox";
import { CheckboxGroup } from "../../ui/CheckboxGroup";
import { Container } from "../../ui/Container";
import { ImageButton } from "../../ui/ImageButton";
import { Label } from "../../ui/Label";
import { ProgressBar } from "../../ui/ProgressBar";
import { RoundedButton } from "../../ui/RoundedButton";
import { Slider } from "../../ui/Slider";
import { TextBox } from "../../ui/TextBox";
import { TextButton } from "../../ui/TextButton";
import { VolumeSlider } from "../../ui/VolumeSlider";
import Phaser from "phaser";
export type OrientationTypes = "horizontal" | "vertical";
export type Mai3Component = TextButton | ImageButton | RoundedButton | Checkbox | CheckboxGroup | Label | ProgressBar | Slider | VolumeSlider | TextBox;
export type BackgroundType = Phaser.GameObjects.Sprite | Phaser.GameObjects.Rectangle | Phaser.GameObjects.Graphics | Phaser.GameObjects.RenderTexture;
export type TextStyle = Phaser.Types.GameObjects.Text.TextStyle;
export type PhaserTextPadding = Phaser.Types.GameObjects.Text.TextPadding;
export type RoundedRectRadius = Phaser.Types.GameObjects.Graphics.RoundedRectRadius | number;
export type WalletApp = walletApp;
export type Styles = "light" | "dark";
export type Locales = "en" | "ru";
export interface Locale {
connectWallet: string;
disconnectWallet: string;
copyAddress: string;
addressCopied: string;
}
export interface LocalesDictionary {
en: Locale;
ru: Locale;
[k: string]: Locale;
}
export interface HandleError {
(error: Error | unknown): void;
}
export interface Padding extends PhaserTextPadding {
all?: number;
}
export type BorderWidths = Padding;
export type Margin = Padding;
export interface BorderRadius {
all?: number;
borderTopLeftRadius?: number;
borderTopRightRadius?: number;
borderBottomRightRadius?: number;
borderBottomLeftRadius?: number;
}
export declare const BorderStyle: {
dotted: string;
dashed: string;
solid: string;
double: string;
groove: string;
ridge: string;
inset: string;
outset: string;
none: string;
hidden: string;
};
export declare const FontStyle: {
normal: string;
italic: string;
oblique: string;
};
export declare const FontWeight: {
normal: string;
bold: string;
};
export interface Alignment {
horizontal: "left" | "center" | "right";
vertical: "top" | "middle" | "bottom";
}
export interface CheckboxItem {
label?: string;
value?: number;
}
export interface CssStyle {
width?: number;
height?: number;
borderWidths?: BorderWidths;
borderStyle?: string;
borderColor?: string;
backgroundColor?: string;
borderRadius?: BorderRadius;
boxSizing?: string;
color?: string;
fontSize?: number;
fontFamily?: string;
fontStyle?: string;
fontWeight?: string;
paddings?: Padding;
zIndex?: number;
}
export interface DragHandlers {
handleDragStart?: (child: Container, pointer: Phaser.Input.Pointer, dragX: number, dragY: number) => void;
handleDrag?: (pointer: Phaser.Input.Pointer, dragX: number, dragY: number) => void;
handleDragEnd?: (pointer: Phaser.Input.Pointer) => void;
}
export type { Wallet };
export interface WordWrap {
width?: number;
useAdvancedWrap?: boolean;
}
//# sourceMappingURL=index.d.ts.map