Sdl.Net is a wrapper to SDL lib use the Tao Framework, it makes easy and simple the access to the common Sdl functions together a Boo (one programming language) is possible to write code meaningful (it isn´t a painfull experience) to make graphics into cross platform. I wrote the next code and works fine to me. I hope that enjoy the same...
import SdlDotNet
import SdlDotNet.Graphics from SdlDotNet
import SdlDotNet.Core from SdlDotNet
#// Make Window - Crear la ventana
screen = Video.SetVideoMode(640,480)
#// Enable Quit Event - Cerrar la ventana
Events.Quit += Events.QuitApplication
#// Give the main loop to application - Habilitar los eventos
Events.Run()
P.S.: Yes, only 6 Lines of Source Code to make ONE black WINDOW (size: 640x480 pixels), to continue with the process, you could add extra line after the "screen" creation and before first "Events" Line
Video.WindowCaption = "This is a simplest sample"
To give caption to this sample, if you ask about how to run just only type in one terminal:
$ booi fileName.boo
P.S. Aditional: This sample works fine, but need some libraries:
Sdl.Net, Tao Framework, .Net/Mono Framework and run into MS Windows and GNU/Linux. :P
mm, u r not alone!!! yet :P
0 comments:
Post a Comment