mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
Review ALL examples
This commit is contained in:
@ -13,19 +13,19 @@
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
int main()
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
int screenWidth = 800;
|
||||
int screenHeight = 450;
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - drop files");
|
||||
|
||||
|
||||
int count = 0;
|
||||
char **droppedFiles = { 0 };
|
||||
|
||||
SetTargetFPS(60);
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
@ -49,15 +49,15 @@ int main()
|
||||
else
|
||||
{
|
||||
DrawText("Dropped files:", 100, 40, 20, DARKGRAY);
|
||||
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
if (i%2 == 0) DrawRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.5f));
|
||||
else DrawRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.3f));
|
||||
|
||||
|
||||
DrawText(droppedFiles[i], 120, 100 + 40*i, 10, GRAY);
|
||||
}
|
||||
|
||||
|
||||
DrawText("Drop new files...", 100, 110 + 40*count, 20, DARKGRAY);
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ int main()
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
ClearDroppedFiles(); // Clear internal buffers
|
||||
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user