打字就减bug
鼠标双击也减bug
看看有多少bug够你减的
使用方法:
1、将资源附件解压缩,里面的文件夹,放到aardio\plugin\plugins 目录
2、aardio 启动插件 → 插件设置 → 选中“今日减bug” → 保存。
3、重启 aardio,等aardio加载完毕,测试一下效果。
import win.ui;
import win.ui.atom;
import godking.paint
/*DSG{{*/
var winform = win.form(text="aardio form";right=149;bottom=329;border="none";exmode="toolwindow";max=false;min=false;mode="popup";sysmenu=false;title=false;topmost=1;)
winform.add()
/*}}*/
var atom,hwnd/*冲突窗口的句柄,该函数会自动激活此窗口*/ = winform.atom("D18F84F4-C594-4493-8ECB-062F38A6F113");
if(!atom){
win.quitMessage(); return;
}
var count=0;
var muchuijiao = 0;
var muchuifangxiang = 0;
var bugs={};
winform.transparent(true)
winform.wndproc = function(hwnd,message,wParam,lParam){
if message === 0x201/*_WM_LBUTTONDOWN*/ winform.hitCaption();
elseif message === 0x202/*_WM_LBUTTONUP*/ muchuifangxiang = -1;
}
winform.setInterval(
function(){
..gdi.layeredBuffer( winform.hwnd,
function( hdc,hMemDc,hMemBitmap,width,height ){
var p = godking.paint.fromHdc(hMemDc)
p.textAntiAlias = true;
p.drawImageF(0,150,150,150,"~\plugin\plugins\今日减bug\heshang.png"/*图片*/,/*透明度或图片属性*/,/*保持比例*/)
if muchuifangxiang===-1 { //向下
muchuijiao=muchuijiao-5;
if muchuijiao<=-30 {
muchuijiao=-30;
muchuifangxiang=1;
count++;
table.push(bugs,{x=..math.random(0,10),y=250,color=..gdi.ARGB( ..math.random(100,255),
..math.random(100,255),
..math.random(1,255),255)})
}
} elseif muchuifangxiang===1 { //向上
muchuijiao=muchuijiao+5;
if muchuijiao>=0 {
muchuijiao=0;
muchuifangxiang=0;
}
}
if muchuifangxiang === 0 {
p.drawImageF(0,150,150,150,"~\plugin\plugins\今日减bug\yanjing.png"/*图片*/,/*透明度或图片属性*/,/*保持比例*/)
}
if muchuifangxiang === 1 {
p.drawImageF(0,150,150,150,"~\plugin\plugins\今日减bug\huo.png"/*图片*/,/*透明度或图片属性*/,/*保持比例*/)
}
p.rotateAt(31+35/*x*/, 150+92+25/*y*/,muchuijiao/*旋转角度*/)
p.drawImageF(31,150+92,35,25,"~\plugin\plugins\今日减bug\muchui.png"/*图片*/,/*透明度或图片属性*/,/*保持比例*/)
p.resetTransform()
for(i=#bugs;1;-1){
p.drawTextF(bugs[i].x,bugs[i].y/*y*/,200/*宽*/,150/*高*/,"bug-1",::LOGFONT(name="宋体";h=18;color=bugs[i].color;brush=null),0,0,0)
bugs[i].y=bugs[i].y-3;
if bugs[i].y<0 ..table.remove(bugs,i);
}
p.fillRoundRectF(0,300/*y1*/,150,30,20,0x10FFFFFF);
p.drawTextF(0,300/*y*/,150/*宽*/,34/*高*/,"今日bug减了"++count,::LOGFONT(name="黑体";h=15;color=0xFFFF0000;brush=null),0,1,1)
..gdi.updateLayeredWindow( winform.hwnd,hMemDc,::SIZE(width,height) ,..gdi.blendFunction(255/*透明度*/) );
}
)
},10
)
win.delay(10);
var x = win.getScreen();
winform.setPos(x-500,100);
import key.hotkey;
var hk = key.hotkey(winform);
hk.onKeyDown = function(vk){
muchuifangxiang = -1;
}
winform.show();
win.loopMessage();