add: module floaty; events.on('exit')
This commit is contained in:
@@ -65,7 +65,7 @@ require("__general__")(__runtime__, this);
|
||||
|
||||
(function(scope){
|
||||
var modules = ['app', 'automator', 'console', 'dialogs', 'io', 'selector', 'shell', 'web', 'ui',
|
||||
"images", "timers", "events", "engines", "RootAutomator", "http", "storages"];
|
||||
"images", "timers", "events", "engines", "RootAutomator", "http", "storages", "floaty"];
|
||||
var len = modules.length;
|
||||
for(var i = 0; i < len; i++) {
|
||||
var m = modules[i];
|
||||
|
||||
37
autojs/src/main/assets/modules/__floaty__.js
Normal file
37
autojs/src/main/assets/modules/__floaty__.js
Normal file
@@ -0,0 +1,37 @@
|
||||
|
||||
module.exports = function(__runtime__, scope){
|
||||
var floaty = {};
|
||||
|
||||
floaty.window = function(layout){
|
||||
if(typeof(layout) == 'xml'){
|
||||
layout = layout.toString();
|
||||
}
|
||||
return wrap(__runtime__.floaty.window(layout));
|
||||
}
|
||||
|
||||
function wrap(window){
|
||||
var proxyObject = new com.stardust.autojs.rhino.ProxyJavaObject(scope, window, window.getClass());
|
||||
proxyObject.__proxy__ = {
|
||||
set: function(name, value){
|
||||
window[name] = value;
|
||||
},
|
||||
get: function(name) {
|
||||
var value = window[name];
|
||||
if(typeof(value) == 'undefined'){
|
||||
value = window.getView(name);
|
||||
if(!value){
|
||||
value = undefined;
|
||||
}else{
|
||||
value = scope.ui.__decorate__(value);
|
||||
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
};
|
||||
return proxyObject;
|
||||
}
|
||||
|
||||
return floaty;
|
||||
}
|
||||
|
||||
@@ -83,6 +83,8 @@ module.exports = function(__runtime__, scope){
|
||||
return view;
|
||||
}
|
||||
|
||||
ui.__decorate__ = decorate;
|
||||
|
||||
var proxy = __runtime__.ui;
|
||||
proxy.__proxy__ = {
|
||||
set: function(name, value){
|
||||
|
||||
Reference in New Issue
Block a user