|
Monkey Amiga Target 0.24
0.24 is live
the Monkey code for this picture:
Code:
Import amigaos3
Class myApp extends App
Field mx:Int
Field my:int
Field time:Int
Field FPS:Int
Field tmpFPS:Int
Field tmpTime:int
Field lastFPS:Int
Field fnt:Font
Field lastX:Int
Field lastY:Int
Method OnCreate()
fnt = LoadFont("helvetica.font", 16)
SetFont(fnt)
AppTitle("draw with Monkey")
SetColor(255, 255, 0)
ClsColor(200, 90, 0)
Cls()
lastX = 0
lastY = 0
End
Method OnUpdate()
mx = MouseX()
my = MouseY()
tmpFPS = tmpFPS + 1
tmpTime = MilliSecs()
if tmpTime - time > 1000
FPS = tmpFPS
tmpFPS = 0
time = tmpTime
EndIf
End
Method OnRender()
if MouseDown()
DrawCircle(mx-1, my-1, 3)
if lastX > 0 And lastY > 0 DrawLine(lastX, lastY, mx, my)
lastX = mx
lastY = my
EndIf
if tmpTime <> time DrawText("FPS: " + FPS + " Time: " + time, 10, 10)
End
End
Function Main()
New myApp
End
changes in 0.24
Quote:
12/11/2011 v0.24
added : Window.DrawLine:Void(x1:Int, y1:Int, x2:Int, y2:Int)
added : DrawLine:Void(win:Window, x1:Int, y1:Int, x2:Int, y2:Int)
added : DrawLine:Void(x1:Int, y1:Int, x2:Int, y2:Int) [Mojo Style]
added : Window.DrawEllipse:Void(x:Int, y:Int, width:Int, height:Int)
added : DrawEllipse:Void(win:Window, x:Int, y:Int, width:Int, height:Int)
added : DrawEllipse:Void(x:Int, y:Int, width:Int, height:Int) [Mojo Style]
added : Window.DrawOval:Void(x:Int, y:Int, width:Int, height:Int)
added : DrawOval:Void(win:Window, x:Int, y:Int, width:Int, height:Int)
added : DrawOval:Void(x:Int, y:Int, width:Int, height:Int) [Mojo Style]
added : Window.DrawCircle:Void(x:Int, y:Int, radius:Int)
added : DrawCircle:Void(win:Window, x:Int, y:Int, radius:Int)
added : DrawCircle:Void(x:Int, y:Int, radius:Int) [Mojo Style]
changed : at start Monkey stets BPen to pen number 0
|
the archive includes executables for AOS3.x, AROSi386 and ARO-PPC.
have fun!
|