event.load
extern.close("{APP_NAME}") // Only one instance allowed
app.init("{APP_ID}", "{APP_NAME}", "{APP_VERSION}", "{APP_BUILD}", "{CREATE_LOG}")
app.booster(true)
&Width = screen.width()
&Height = screen.height()
window.main.autoClose(true, true)
draw.main.rect(0, 0, &width, &height, num.rgb(100, 100, 100))
draw.main.paint()
window.main.pos.now(0, 0, &Width, &Height)
&AnimID = window.main.create(true)
window.&AnimID.movable(false)
window.&AnimID.pos.now(0, 0, &width, &height)
window.&AnimID.autoClose(false, false)
draw.&AnimID.rect(0, 0, &Width*2, &Height*2, 0)
// Brush
&Brush = Brush.load(Path.Rsc("BrushMed.bmp"))
&Small = Brush.load(Path.Rsc("BrushvMed.bmp"))
&mio = Brush.load(Path.Rsc("logo.bmp"))
doEvent.TimerBrush()
event.end
event.terminate
screen.resolution.restore()
event.end
event.mouse:right:click
app.close()
event.end
function.Brush:Load(&Filename)
&Brush@ID = draw.mem.create()
draw.&Brush@ID.load(&Filename)
return(&Brush@ID)
function.end
event.TimerBrush
&Pos = time.tick.get() / 500
Animate()
draw.&AnimID .paint()
doEvent.TimerBrush()
event.end
function.Animate()
&a = &Pos/20
&d = num.sin(&pos/10, 8)+18
draw.&AnimID.copyFrom.&AnimID(0, 0, &width, &height/2, 1, -&d, &width, &height/2)
draw.&AnimID.copyFrom.&AnimID(0, &height/2, &width, &height/2, 1, &height/2+&d, &width, &height/2)
draw.&AnimID.copyFrom.&AnimID(0, 0, &width/2, &height, -&d, 0, &width/2, &height)
draw.&AnimID.copyFrom.&AnimID(&width/2, 0, &width/2, &height, &width/2+&d, 0, &width/2, &height)
&x = num.cos(&a, num.sin(&a/3, 10))
&y = num.sin(&a, num.cos(&a/2, 5))
&x = num.cos(&pos*120, 8)+num.sin(&pos*200, 8)
&y = num.sin(&pos*80, 8)+num.cos(&pos*100, 8)
&color = num.rgb(num.sin(&a, 100)+100, num.sin(&a/2, 100)+100, num.sin(&a*2, 100)+100)
draw.&AnimID.brushFrom.&Brush(0, 0, draw.&Brush.width(), draw.&Brush.height(), &Width/2 + &x - 50, &Height/2 + &y - 50, &color, 15)
draw.&AnimID.brushFrom.&Brush(0, 0, draw.&Brush.width(), draw.&Brush.height(), &width/2-35+num.cos(&pos*2, 60), &height/2-35+num.sin(&pos*2, 60), num.rgb(0, 0, 0), 5)
draw.&AnimID.brushFrom.&Brush(0, 0, draw.&Brush.width(), draw.&Brush.height(), mouse.x()-35, mouse.y()-35, num.rgb(0, 0, 0), 15)
&x = num.cos(&pos/7+&ptr*2, 30) + num.cos(&pos/3+&ptr, 5)
&y = num.sin(&pos/5+&ptr, 30) + num.sin(&pos/2+&ptr*2, 5)
draw.&AnimID.brushFrom.&small(0, 0, draw.&Small.width(), draw.&Small.height(), &Width/2 + &x - 17, &height/2 + &y - 17, num.rgb(255, 255, 255), 15)
function.end
|