Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

55 rindas
2.2 KiB

pirms 5 gadiem
pirms 5 gadiem
pirms 5 gadiem
  1. /*******************************************************************************************
  2. *
  3. * raylib [shapes] example - Draw raylib logo using basic shapes
  4. *
  5. * This example has been created using raylib 1.0 (www.raylib.com)
  6. * raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
  7. *
  8. * Copyright (c) 2014 Ramon Santamaria (@raysan5)
  9. *
  10. ********************************************************************************************/
  11. #include "raylib.h"
  12. int main(void)
  13. {
  14. // Initialization
  15. //--------------------------------------------------------------------------------------
  16. const int screenWidth = 800;
  17. const int screenHeight = 450;
  18. InitWindow(screenWidth, screenHeight, "raylib [shapes] example - raylib logo using shapes");
  19. SetTargetFPS(60); // Set our game to run at 60 frames-per-second
  20. //--------------------------------------------------------------------------------------
  21. // Main game loop
  22. while (!WindowShouldClose()) // Detect window close button or ESC key
  23. {
  24. // Update
  25. //----------------------------------------------------------------------------------
  26. // TODO: Update your variables here
  27. //----------------------------------------------------------------------------------
  28. // Draw
  29. //----------------------------------------------------------------------------------
  30. BeginDrawing();
  31. ClearBackground(RAYWHITE);
  32. DrawRectangle(screenWidth/2 - 128, screenHeight/2 - 128, 256, 256, BLACK);
  33. DrawRectangle(screenWidth/2 - 112, screenHeight/2 - 112, 224, 224, RAYWHITE);
  34. DrawText("raylib", screenWidth/2 - 44, screenHeight/2 + 48, 50, BLACK);
  35. DrawText("this is NOT a texture!", 350, 370, 10, GRAY);
  36. EndDrawing();
  37. //----------------------------------------------------------------------------------
  38. }
  39. // De-Initialization
  40. //--------------------------------------------------------------------------------------
  41. CloseWindow(); // Close window and OpenGL context
  42. //--------------------------------------------------------------------------------------
  43. return 0;
  44. }