yukinovel
Version:
Yukinovel is a simple web visual novel engine.
26 lines (25 loc) • 863 B
TypeScript
import { Game } from '../Game.js';
export interface ConfirmModalOptions {
title: string;
message: string;
confirmText?: string;
cancelText?: string;
confirmType?: 'primary' | 'danger' | 'success';
onConfirm: () => void;
onCancel?: () => void;
}
export declare class ConfirmModal {
private game;
private container;
private modal;
private static instance;
constructor(game: Game);
static getInstance(game: Game): ConfirmModal;
render(container: HTMLElement): void;
private createModal;
show(options: ConfirmModalOptions): void;
hide(): void;
static confirm(game: Game, options: ConfirmModalOptions): void;
static danger(game: Game, title: string, message: string, onConfirm: () => void): void;
static success(game: Game, title: string, message: string, onConfirm: () => void): void;
}