mirror of
https://github.com/allankoechke/raylib-cpp.git
synced 2026-11-30 10:59:00 +00:00
Update
This commit is contained in:
@@ -21,7 +21,9 @@ int main()
|
||||
raylib::Window w(screenWidth, screenHeight, "raylib [core] example - mouse input");
|
||||
|
||||
raylib::Vector2 ballPosition(-100.0f, -100.0f);
|
||||
raylib::Color background(RAYWHITE);
|
||||
raylib::Color ballColor(DARKBLUE);
|
||||
raylib::Color textColor(DARKGRAY);
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//---------------------------------------------------------------------------------------
|
||||
@@ -42,15 +44,15 @@ int main()
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
background.ClearBackground();
|
||||
|
||||
DrawCircleV(ballPosition, 40, ballColor);
|
||||
ballPosition.DrawCircle(40, ballColor);
|
||||
|
||||
DrawText("move ball with mouse and click mouse button to change color", 10, 10, 20, DARKGRAY);
|
||||
textColor.DrawText("move ball with mouse and click mouse button to change color", 10, 10, 20);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user