Loading animation is now based on the current context (global or application context)

This commit is contained in:
DanyLE
2022-05-24 15:39:58 +02:00
parent deae7bbc57
commit 8b23ebeeff
10 changed files with 145 additions and 7 deletions

View File

@ -24,6 +24,10 @@ namespace OS {
/**
* All running processes is stored in this variables
*/
/**
* Current active process ID
*/
export var pidactive: number = 0;
export var processes: GenericObject<BaseModel[]> = {};
/**
* Create a new process of application or service
@ -159,5 +163,19 @@ namespace OS {
p.quit(force);
}
}
/**
* Get the current active application
* @export
* @returns {BaseModel}
*/
export function getActiveApp():BaseModel
{
if(PM.pidactive === 0)
{
return undefined;
}
return PM.appByPid(PM.pidactive);
}
}
}