Use the new play button icon in the retroachievement sound customizer

This commit is contained in:
Henrik Rydgård 2023-07-24 14:56:35 +02:00
parent 2baba83f1a
commit fecd0b8cd7

View file

@ -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.
@ -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();