mirror of
https://github.com/raylib-cs/raylib-cs
synced 2025-07-02 19:13:43 -04:00
Update enum/color names to match C# naming convention (#224)
This commit is contained in:
@ -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();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user