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

@@ -16,6 +16,9 @@ import { helpers } from "../Netscript/NetscriptHelpers";
export function NetscriptUserInterface(): InternalAPI<IUserInterface> {
return {
windowSize: () => (): [number, number] => {
return [window.innerWidth, window.innerHeight];
},
getTheme: () => (): UserInterfaceTheme => {
return { ...Settings.theme };
},