api: floaty

This commit is contained in:
hyb1996
2017-12-30 15:23:48 +08:00
parent f39516a4b4
commit 6d9fda6862
15 changed files with 142 additions and 42 deletions

View File

@@ -4,6 +4,8 @@ var window = floaty.window(
</frame>
);
window.exitOnClose();
window.text.click(()=>{
window.setAdjustEnabled(!window.isAdjustEnabled());
});

View File

@@ -4,6 +4,8 @@ var window = floaty.window(
</frame>
);
window.exitOnClose();
window.text.click(()=>{
window.setAdjustEnabled(!window.isAdjustEnabled());
});

View File

@@ -9,6 +9,8 @@ var window = floaty.window(
</frame>
);
window.exitOnClose();
var execution = null;
window.action.click(()=>{

View File

@@ -9,6 +9,8 @@ var window = floaty.window(
</frame>
);
setInterval(()=>{}, 1000);
var execution = null;
//记录按键被按下时的触摸坐标
@@ -33,7 +35,7 @@ window.action.setOnTouchListener(function(view, event){
windowY + (event.getRawY() - y));
//如果按下的时间超过1.5秒判断为长按,退出脚本
if(new Date().getTime() - downTime > 1500){
exit();
exit();
}
return true;
case event.ACTION_UP:
@@ -58,5 +60,4 @@ function onClick(){
}
}
setInterval(()=>{}, 1000);