浏览代码

Fix example/audio/audio_module_player.c help instructions and small bug (#3272)

* Fix example/audio/audio_module_player.c help instructions and small bug

* Update example/audio/audio_module_player.png screenshot
pull/3273/head
Asdqwe 1年前
committed by GitHub
父节点
当前提交
d047597244
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 2 个文件被更改,包括 10 次插入1 次删除
  1. +10
    -1
      examples/audio/audio_module_playing.c
  2. 二进制
      examples/audio/audio_module_playing.png

+ 10
- 1
examples/audio/audio_module_playing.c 查看文件

@ -79,6 +79,7 @@ int main(void)
{ {
StopMusicStream(music); StopMusicStream(music);
PlayMusicStream(music); PlayMusicStream(music);
pause = false;
} }
// Pause/Resume music playing // Pause/Resume music playing
@ -134,6 +135,14 @@ int main(void)
DrawRectangle(20, screenHeight - 20 - 12, (int)timePlayed, 12, MAROON); DrawRectangle(20, screenHeight - 20 - 12, (int)timePlayed, 12, MAROON);
DrawRectangleLines(20, screenHeight - 20 - 12, screenWidth - 40, 12, GRAY); DrawRectangleLines(20, screenHeight - 20 - 12, screenWidth - 40, 12, GRAY);
// Draw help instructions
DrawRectangle(20, 20, 425, 145, WHITE);
DrawRectangleLines(20, 20, 425, 145, GRAY);
DrawText("PRESS SPACE TO RESTART MUSIC", 40, 40, 20, BLACK);
DrawText("PRESS P TO PAUSE/RESUME", 40, 70, 20, BLACK);
DrawText("PRESS UP/DOWN TO CHANGE SPEED", 40, 100, 20, BLACK);
DrawText(TextFormat("SPEED: %f", pitch), 40, 130, 20, MAROON);
EndDrawing(); EndDrawing();
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
} }
@ -148,4 +157,4 @@ int main(void)
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
return 0; return 0;
}
}

二进制
examples/audio/audio_module_playing.png 查看文件

之前 之后
宽度: 800  |  高度: 450  |  大小: 47 KiB 宽度: 800  |  高度: 450  |  大小: 44 KiB

正在加载...
取消
保存