40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
/**
|
|
* Copyright (c) 2026 Dominic Masters
|
|
*
|
|
* This software is released under the MIT License.
|
|
* https://opensource.org/licenses/MIT
|
|
*/
|
|
|
|
/** A full-screen color overlay. */
|
|
interface UIFullboxInstance {
|
|
/**
|
|
* Sets the overlay to a solid color with no animation.
|
|
* Returns a Promise that resolves immediately.
|
|
* @param color - The color to apply.
|
|
*/
|
|
setColor(color: Color): Promise<void>;
|
|
|
|
/**
|
|
* Animates the overlay from one color to another.
|
|
* Returns a Promise that resolves when the transition completes.
|
|
* Starting a new transition while one is in progress resolves the
|
|
* old Promise immediately before beginning the new one.
|
|
* @param from - Starting color.
|
|
* @param to - Ending color.
|
|
* @param duration - Duration in seconds.
|
|
* @param easing - Optional EASING_* constant (default: EASING_LINEAR).
|
|
*/
|
|
transition(
|
|
from: Color,
|
|
to: Color,
|
|
duration: number,
|
|
easing?: number
|
|
): Promise<void>;
|
|
}
|
|
|
|
/** Full-screen overlay drawn on top of all UI elements. */
|
|
declare var UIFullboxOver: UIFullboxInstance;
|
|
|
|
/** Full-screen overlay drawn below all UI elements. */
|
|
declare var UIFullboxUnder: UIFullboxInstance;
|