Merge branch 'dev' into documentation-updates

This commit is contained in:
hydroflame
2022-01-15 17:47:17 -05:00
committed by GitHub
72 changed files with 1253 additions and 743 deletions

View File

@@ -109,12 +109,6 @@ interface RunningScript {
threads: number;
}
/**
* Filename or PID of a script.
* @public
*/
type FilenameOrPID = string | number;
/**
* Data representing the internal values of a crime.
* @public
@@ -3965,6 +3959,36 @@ interface UserInterface {
* RAM cost: cost: 0 GB
*/
resetTheme(): void;
/**
* Get the current styles
* @remarks
* RAM cost: cost: 0 GB
*
* @returns An object containing the player's styles
*/
getStyles(): IStyleSettings;
/**
* Sets the current styles
* @remarks
* RAM cost: cost: 0 GB
* @example
* Usage example (NS2)
* ```ts
* const styles = ns.ui.getStyles();
* styles.fontFamily = 'Comic Sans Ms';
* ns.ui.setStyles(styles);
* ```
*/
setStyles(newStyles: IStyleSettings): void;
/**
* Resets the player's styles to the default values
* @remarks
* RAM cost: cost: 0 GB
*/
resetStyles(): void;
}
/**
@@ -5719,7 +5743,7 @@ export interface NS extends Singularity {
* @param args - Formating arguments.
* @returns Formated text.
*/
sprintf(format: string, ...args: string[]): string;
sprintf(format: string, ...args: any[]): string;
/**
* Format a string with an array of arguments.
@@ -5731,7 +5755,7 @@ export interface NS extends Singularity {
* @param args - Formating arguments.
* @returns Formated text.
*/
vsprintf(format: string, args: string[]): string;
vsprintf(format: string, args: any[]): string;
/**
* Format a number
@@ -6443,3 +6467,12 @@ interface UserInterfaceTheme {
backgroundsecondary: string;
button: string;
}
/**
* Interface Styles
* @internal
*/
interface IStyleSettings {
fontFamily: string;
lineHeight: number;
}