mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 07:18:38 +02:00
Add ns.ui.setTheme() and ns.ui.resetTheme()
This commit is contained in:
25
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
25
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@@ -1321,10 +1321,10 @@ export interface Singularity {
|
||||
|
||||
/**
|
||||
* SF4.1 - Workout at the gym.
|
||||
*
|
||||
*
|
||||
* @remarks
|
||||
* RAM cost: 2 GB
|
||||
*
|
||||
*
|
||||
|
||||
* This function will automatically set you to start working out at a gym to train
|
||||
* a particular stat. If you are already in the middle of some “working” action
|
||||
@@ -3833,6 +3833,27 @@ interface UserInterface {
|
||||
* @returns An object containing the theme's colors
|
||||
*/
|
||||
getTheme(): UserInterfaceTheme;
|
||||
|
||||
/**
|
||||
* Sets the current theme
|
||||
* @remarks
|
||||
* RAM cost: cost: 0 GB
|
||||
* @example
|
||||
* Usage example (NS2)
|
||||
* ```ts
|
||||
* const theme = ns.ui.getTheme();
|
||||
* theme.primary = '#ff5500';
|
||||
* ns.ui.setTheme(theme);
|
||||
* ```
|
||||
*/
|
||||
setTheme(newTheme: UserInterfaceTheme): void;
|
||||
|
||||
/**
|
||||
* Resets the player's theme to the default values
|
||||
* @remarks
|
||||
* RAM cost: cost: 0 GB
|
||||
*/
|
||||
resetTheme(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user