Improve wrong arg user message and add ui.windowSize

This commit is contained in:
Olivier Gagnon
2022-08-29 18:07:17 -04:00
parent a2fad677d3
commit c9a0998cc1
6 changed files with 147 additions and 25 deletions

View File

@@ -4356,6 +4356,15 @@ interface Infiltration {
* @public
*/
interface UserInterface {
/**
* Get the current window size
* @remarks
* RAM cost: 0 GB
*
* @returns An array of 2 value containing the window width and height.
*/
windowSize(): [number, number];
/**
* Get the current theme
* @remarks
@@ -5014,6 +5023,32 @@ export interface NS {
*/
tail(fn?: FilenameOrPID, host?: string, ...args: (string | number | boolean)[]): void;
/**
* Move a tail window
* @remarks
* RAM cost: 0 GB
*
* Moves a tail window. Coordinates are in screenspace pixels (top left is 0,0)
*
* @param x - x coordinate.
* @param y - y coordinate.
* @param pid - Optional. PID of the script having its tail moved. If omitted, the current script is used.
*/
moveTail(x: number, y: number, pid?: number): void;
/**
* Resize a tail window
* @remarks
* RAM cost: 0 GB
*
* Resize a tail window. Size are in pixel
*
* @param width - width of the window.
* @param height - height of the window.
* @param pid - Optional. PID of the script having its tail resized. If omitted, the current script is used.
*/
resizeTail(width: number, height: number, pid?: number): void;
/**
* Close the tail window of a script.
* @remarks