3 Star 0 Fork 0

asst_tech/gdt_hb

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
monitor.js 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
weimeittx 提交于 2020-10-28 13:26 . --
var monitor = {};
monitor.LOCK_ACTIVITY = "LOCK_ACTIVITY";
monitor.UN_LOCK_ACTIVITY = "UN_LOCK_ACTIVITY";
monitor.lockActivity = function(activity){
events.broadcast.emit(this.LOCK_ACTIVITY, activity);
}
monitor.unLockActivity = function(){
events.broadcast.emit(this.UN_LOCK_ACTIVITY);
}
monitor.alert = function(){
var w = floaty.rawWindow(
<frame id="frame" gravity="center" bg="#ffff0000">
<text id="example" text="" gravity="center" textSize="50sp" />
</frame>
);
media.playMusic(files.cwd() + "/gdt_hb/music/科技.mp3")
w.setSize(-1, -1);
// w.setTouchable(false);
// setTimeout(()=>{
// w.close();
// }, 60000);
var f = true;
var t = threads.start(function(){
sleep(3000);
media.playMusic(files.cwd() + "/gdt_hb/music/警报.mp3", 1, true)
while(true){
if (f) {
w.frame.attr("bg", "#00ff0000");
} else {
w.frame.attr("bg", "#ffff0000");
}
f = !f;
sleep(500);
}
})
// setTimeout(function(){
// clearInterval(id);
// }, 5000);
w.frame.on("click", function(){
media.stopMusic();
media.playMusic(files.cwd() + "/gdt_hb/music/科技.mp3");
t.interrupt();
});
}
module.exports = monitor;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/asst_tech/gdt_hb.git
git@gitee.com:asst_tech/gdt_hb.git
asst_tech
gdt_hb
gdt_hb
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385