NETSCRIPT: Added changing tail font size through scripts (#1852)

This commit is contained in:
G4mingJon4s
2025-01-05 01:51:13 +01:00
committed by GitHub
parent 3db190c9a0
commit c622291eff
9 changed files with 97 additions and 1 deletions

View File

@@ -192,6 +192,8 @@ interface TailProperties {
width: number;
/** Height of the log window content area */
height: number;
/** The font size of the tail window. Defaults to the font size set in the style editor. */
fontSize: number;
}
/**
@@ -6467,6 +6469,25 @@ export interface NS {
*/
setTitle(title: string | ReactNode, pid?: number): void;
/**
* Set the font size of the tail window of a script.
* @remarks
* RAM cost: 0 GB
*
* This overwrites the tail font size and forces an update of the tail window's contents.
*
* If ran without a filename or pid, this will affect the current script's tail window.
*
* Otherwise, the PID or filename, hostname/ip, and args… arguments can be used to target the tail window from another script.
* Remember that scripts are uniquely identified by both their names and arguments.
*
* @param pixel - Optional. The new font size in pixels. If omitted, the default tail font size is used.
* @param fn - Optional. Filename or PID of the target script. If omitted, the current script is used.
* @param host - Optional. Hostname of the target script. Defaults to the server this script is running on. If args are specified, this is not optional.
* @param args - Arguments for the target script.
*/
setTailFontSize(pixel?: number, fn?: FilenameOrPID, host?: string, ...args: ScriptArg[]): void;
/**
* Get the list of servers connected to a server.
* @remarks