X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2FSDL-Tutorial.html-inc;h=444f72088a2d5a129de05e3fd3c96647c4289474;hb=505f308d8b092747da8b2f5e9781475a1f06dfe8;hp=5b8e725a91e3bf468c41910a15736d15b4ac63f7;hpb=ca0a3441dd72000cbbbb4be484b18d0d305fdb29;p=sdlgit%2FSDL-Site.git diff --git a/pages/SDL-Tutorial.html-inc b/pages/SDL-Tutorial.html-inc index 5b8e725..444f720 100644 --- a/pages/SDL-Tutorial.html-inc +++ b/pages/SDL-Tutorial.html-inc @@ -68,27 +68,27 @@ ask for a windowed surface with 640x480x16 resolution:

	use SDLx::App;
 
 	my $app = SDLx::App->new(
-		-width  => 640,
-		-height => 480,
-		-depth  => 16,
+		width  => 640,
+		height => 480,
+		depth  => 16,
 	);
 
 
-

You can get more creative, especially if you use the -title and -icon +

You can get more creative, especially if you use the title and icon attributes in a windowed application. Here's how to set the window title of the application to My SDL Program:

	use SDLx::App;
 
 	my $app = SDLx::App->new(
-		-height => 640,
-		-width  => 480,
-		-depth  => 16,
-		-title  => 'My SDL Program',
+		height => 640,
+		width  => 480,
+		depth  => 16,
+		title  => 'My SDL Program',
 	);
 
 

Setting an icon is a little more involved -- you have to load an image onto a -surface. That's a bit more complicated, but see the -name parameter to +surface. That's a bit more complicated, but see the name parameter to SDL::Surface-new()> if you want to skip ahead.