mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 23:38:35 +02:00
API: Add API to minimize and expand tail windows (#2556)
This commit is contained in:
@@ -105,6 +105,19 @@ export function NetscriptUserInterface(): InternalAPI<IUserInterface> {
|
||||
else runningScriptObj.tailProps?.setFontSize(helpers.number(ctx, "pixel", _pixel));
|
||||
},
|
||||
|
||||
setTailMinimized:
|
||||
(ctx) =>
|
||||
(_minimized, _pid = ctx.workerScript.scriptRef.pid) => {
|
||||
const minimized = helpers.boolean(ctx, "minimized", _minimized);
|
||||
const pid = helpers.number(ctx, "pid", _pid);
|
||||
const runningScriptObj = helpers.getRunningScript(ctx, pid);
|
||||
if (runningScriptObj == null) {
|
||||
helpers.log(ctx, () => helpers.getCannotFindRunningScriptErrorMessage(pid));
|
||||
return;
|
||||
}
|
||||
runningScriptObj.tailProps?.setMinimized(minimized);
|
||||
},
|
||||
|
||||
windowSize: () => () => {
|
||||
return [window.innerWidth, window.innerHeight];
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user