event.load
extern.close("{APP_NAME}") // Only one instance allowed
app.init("{APP_ID}", "{APP_NAME}", "{APP_VERSION}", "{APP_BUILD}", "{CREATE_LOG}")
&brush = draw.mem.createFromFile(path.rsc("brush.bmp"))
app.booster(true)
// Scan the monitors to cover all
&minX = 0
&minY = 0
&maxW = 0
&maxH = 0
&screens = screen.monitor.count()
for(&ptr, 0, &screens)
if(screen.monitor.left(&ptr) < &minX)
&minX = screen.monitor.left(&ptr)
if.end
if(screen.monitor.top(&ptr) < &minY)
&minX = screen.monitor.left(&ptr)
if.end
if(screen.monitor.left(&ptr) + screen.monitor.width(&ptr) > &maxW)
&maxW = screen.monitor.left(&ptr) + screen.monitor.width(&ptr)
if.end
if(screen.monitor.top(&ptr) + screen.monitor.height(&ptr) > &maxH)
&maxH = screen.monitor.top(&ptr) + screen.monitor.height(&ptr)
if.end
for.next
window.main.canGoOut(true)
window.main.movable(false)
mouse.main.cursor(none)
window.main.pos.now(&minX,&minY,&maxW - &minX, &maxH - &minY)
draw.main.rect(0,0, &maxW - &minX, &maxH - &minY, num.rgb(0,0,0))
draw.main.paint()
doEvent.pen_loop()
event.end
event.mouse:down
&Doing = true
event.end
event.mouse:up
&Doing = false
event.end
event.mouse:dblClick
draw.main.rect(0,0, &maxW - &minX, &maxH - &minY, num.rgb(0,0,0))
draw.main.paint()
event.end
event.pen_loop()
&x = mouse.main.x()
&y = mouse.main.y()
&t = time.tick.get() / 1000
if(&Doing = true)
draw.main.brushFrom.&brush(0,0,84,83,&x-40, &y-40,num.rgb(num.sin(&t/80, 80)+80,num.cos(&t/100, 100)+150, num.cos(&t/120, 120)+130), 10)
draw.main.brushFrom.&brush(0,0,84,83,&x-20, &y-20,num.rgb(0,0,0), 15)
draw.main.paint(&x-250, &y-250,500,500)
if.end
doEvent.pen_loop()
event.end
|