ソースを参照

Formatted example

Jan Hönig 5 年 前
コミット
afae27014b
3 ファイル変更26 行追加7 行削除
  1. 15 0
      example/.gitignore
  2. 5 3
      example/dub.json
  3. 6 4
      example/source/app.d

+ 15 - 0
example/.gitignore

@@ -0,0 +1,15 @@
+.dub
+docs.json
+__dummy.html
+docs/
+/example
+example.so
+example.dylib
+example.dll
+example.a
+example.lib
+example-test-*
+*.exe
+*.o
+*.obj
+*.lst

+ 5 - 3
example/dub.json

@@ -6,8 +6,10 @@
 	"dependencies": {
 		"raylib-d": "~>3.0.0"
 	},
-  "libs": [ "raylib" ],
+	"libs": [
+		"raylib"
+	],
 	"description": "A minimal D application.",
-	"license": "zlib License",
+	"license": "Zlib",
 	"name": "example"
-}
+}

+ 6 - 4
example/source/app.d

@@ -4,20 +4,22 @@ import raylib;
 
 void main()
 {
-	writeln("Starting a raylib example.");
+  writeln("Starting a raylib example.");
 
   SetTargetFPS(60);
   InitWindow(800, 640, "Hello, World!");
-  scope(exit) CloseWindow(); // see https://dlang.org/spec/statement.html#scope-guard-statement
+  scope (exit)
+    CloseWindow(); // see https://dlang.org/spec/statement.html#scope-guard-statement
 
   while (!WindowShouldClose())
   {
     BeginDrawing();
-    scope(exit) EndDrawing();
+    scope (exit)
+      EndDrawing();
 
     ClearBackground(RAYWHITE);
     DrawText("Hello, World!", 330, 300, 28, BLACK);
   }
 
-	writeln("Ending a raylib example.");
+  writeln("Ending a raylib example.");
 }