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

@ -56,7 +56,7 @@ public class RectangleScaling
CheckCollisionPointRec(mousePosition, area))
{
mouseScaleReady = true;
if (IsMouseButtonPressed(MouseButton.MOUSE_LEFT_BUTTON))
if (IsMouseButtonPressed(MouseButton.Left))
{
mouseScaleMode = true;
}
@ -82,7 +82,7 @@ public class RectangleScaling
rec.Height = MOUSE_SCALE_MARK_SIZE;
}
if (IsMouseButtonReleased(MouseButton.MOUSE_LEFT_BUTTON))
if (IsMouseButtonReleased(MouseButton.Left))
{
mouseScaleMode = false;
}
@ -92,19 +92,19 @@ public class RectangleScaling
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(Color.RAYWHITE);
ClearBackground(Color.RayWhite);
DrawText("Scale rectangle dragging from bottom-right corner!", 10, 10, 20, Color.GRAY);
DrawRectangleRec(rec, ColorAlpha(Color.GREEN, 0.5f));
DrawText("Scale rectangle dragging from bottom-right corner!", 10, 10, 20, Color.Gray);
DrawRectangleRec(rec, ColorAlpha(Color.Green, 0.5f));
if (mouseScaleReady)
{
DrawRectangleLinesEx(rec, 1, Color.RED);
DrawRectangleLinesEx(rec, 1, Color.Red);
DrawTriangle(
new Vector2(rec.X + rec.Width - MOUSE_SCALE_MARK_SIZE, rec.Y + rec.Height),
new Vector2(rec.X + rec.Width, rec.Y + rec.Height),
new Vector2(rec.X + rec.Width, rec.Y + rec.Height - MOUSE_SCALE_MARK_SIZE),
Color.RED
Color.Red
);
}