Skip to content

Commit

Permalink
Use the new play button icon in the retroachievement sound customizer
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Jul 24, 2023
1 parent 2baba83 commit fecd0b8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions UI/RetroAchievementScreens.cpp
Expand Up @@ -34,6 +34,10 @@ AudioFileChooser::AudioFileChooser(std::string *value, const std::string &title,
layoutParams_->width = FILL_PARENT;
layoutParams_->height = ITEM_HEIGHT;
}
Add(new Choice(ImageID("I_PLAY"), new LinearLayoutParams(ITEM_HEIGHT, ITEM_HEIGHT)))->OnClick.Add([=](UI::EventParams &) {
g_BackgroundAudio.SFX().Play(sound_, 0.6f);
return UI::EVENT_DONE;
});
Add(new FileChooserChoice(value, title, BrowseFileType::SOUND_EFFECT, new LinearLayoutParams(1.0f)))->OnChange.Add([=](UI::EventParams &e) {
// TODO: Check the file format here.
// Need to forward the event out.
Expand All @@ -50,10 +54,6 @@ AudioFileChooser::AudioFileChooser(std::string *value, const std::string &title,
}
return UI::EVENT_DONE;
});
Add(new Choice(ImageID("I_ARROW_RIGHT"), new LinearLayoutParams(ITEM_HEIGHT, ITEM_HEIGHT)))->OnClick.Add([=](UI::EventParams &) {
g_BackgroundAudio.SFX().Play(sound_, 0.6f);
return UI::EVENT_DONE;
});
Add(new Choice(ImageID("I_TRASHCAN"), new LinearLayoutParams(ITEM_HEIGHT, ITEM_HEIGHT)))->OnClick.Add([=](UI::EventParams &) {
g_BackgroundAudio.SFX().UpdateSample(sound, nullptr);
value->clear();
Expand Down

0 comments on commit fecd0b8

Please sign in to comment.