Watch
2
0
Fork
You've already forked raylib-cs
0

Update enum/color names to match C# naming convention (#224)

This commit is contained in:
Danil 2024-01-18 21:00:57 +02:00 committed by GitHub
commit 70d86837d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
123 changed files with 1846 additions and 1850 deletions

View file

@ -26,7 +26,7 @@ public class InputMouse
InitWindow(screenWidth, screenHeight, "raylib [core] example - mouse input");
Vector2 ballPosition = new(-100.0f, -100.0f);
Color ballColor = Color.DARKBLUE;
Color ballColor = Color.DarkBlue;
SetTargetFPS(60);
//---------------------------------------------------------------------------------------
@ -38,28 +38,28 @@ public class InputMouse
//----------------------------------------------------------------------------------
ballPosition = GetMousePosition();
if (IsMouseButtonPressed(MouseButton.MOUSE_LEFT_BUTTON))
if (IsMouseButtonPressed(MouseButton.Left))
{
ballColor = Color.MAROON;
ballColor = Color.Maroon;
}
else if (IsMouseButtonPressed(MouseButton.MOUSE_MIDDLE_BUTTON))
else if (IsMouseButtonPressed(MouseButton.Middle))
{
ballColor = Color.LIME;
ballColor = Color.Lime;
}
else if (IsMouseButtonPressed(MouseButton.MOUSE_RIGHT_BUTTON))
else if (IsMouseButtonPressed(MouseButton.Right))
{
ballColor = Color.DARKBLUE;
ballColor = Color.DarkBlue;
}
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(Color.RAYWHITE);
ClearBackground(Color.RayWhite);
DrawCircleV(ballPosition, 40, ballColor);
DrawText("move ball with mouse and click mouse button to change color", 10, 10, 20, Color.DARKGRAY);
DrawText("move ball with mouse and click mouse button to change color", 10, 10, 20, Color.DarkGray);
EndDrawing();
//----------------------------------------------------------------------------------