examples: Use decl literals (#221)

This commit is contained in:
Mike Will 2025-03-12 16:21:15 -04:00 committed by GitHub
parent 03ec79ef85
commit d4fc514d54
Failed to generate hash of commit
37 changed files with 323 additions and 323 deletions

View file

@ -28,8 +28,8 @@ pub fn main() !void {
{
// Update
//----------------------------------------------------------------------------------
if (rl.isKeyPressed(rl.KeyboardKey.space)) rl.playSound(fxWav); // Play WAV sound
if (rl.isKeyPressed(rl.KeyboardKey.enter)) rl.playSound(fxOgg); // Play OGG sound
if (rl.isKeyPressed(.space)) rl.playSound(fxWav); // Play WAV sound
if (rl.isKeyPressed(.enter)) rl.playSound(fxOgg); // Play OGG sound
//----------------------------------------------------------------------------------
// Draw
@ -37,10 +37,10 @@ pub fn main() !void {
rl.beginDrawing();
defer rl.endDrawing();
rl.clearBackground(rl.Color.white);
rl.clearBackground(.white);
rl.drawText("Press SPACE to PLAY the WAV sound!", 200, 180, 20, rl.Color.light_gray);
rl.drawText("Press ENTER to PLAY the OGG sound!", 200, 220, 20, rl.Color.light_gray);
rl.drawText("Press SPACE to PLAY the WAV sound!", 200, 180, 20, .light_gray);
rl.drawText("Press ENTER to PLAY the OGG sound!", 200, 220, 20, .light_gray);
//----------------------------------------------------------------------------------
}
}