examples: Use decl literals (#221)
This commit is contained in:
parent
03ec79ef85
commit
d4fc514d54
37 changed files with 323 additions and 323 deletions
|
|
@ -26,11 +26,11 @@ pub fn main() anyerror!void {
|
|||
ballPosition.y = @as(f32, @floatFromInt(rl.getMouseY()));
|
||||
|
||||
if (rl.isMouseButtonPressed(.left)) {
|
||||
ballColor = rl.Color.maroon;
|
||||
ballColor = .maroon;
|
||||
} else if (rl.isMouseButtonPressed(.middle)) {
|
||||
ballColor = rl.Color.lime;
|
||||
ballColor = .lime;
|
||||
} else if (rl.isMouseButtonPressed(.right)) {
|
||||
ballColor = rl.Color.dark_blue;
|
||||
ballColor = .dark_blue;
|
||||
}
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -39,11 +39,11 @@ pub fn main() anyerror!void {
|
|||
rl.beginDrawing();
|
||||
defer rl.endDrawing();
|
||||
|
||||
rl.clearBackground(rl.Color.ray_white);
|
||||
rl.clearBackground(.ray_white);
|
||||
|
||||
rl.drawCircleV(ballPosition, 40, ballColor);
|
||||
|
||||
rl.drawText("move ball with mouse and click mouse button to change color", 10, 10, 20, rl.Color.dark_gray);
|
||||
rl.drawText("move ball with mouse and click mouse button to change color", 10, 10, 20, .dark_gray);
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue