mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Fix a small bug in the sound chooser. Cleanup
This commit is contained in:
1 parent
54f4910cda
commit
afdafaa68e
2 files changed
+8
-3
No files matched your search
@@ -237,13 +237,13 @@ void ChoiceStrip::AddChoice(ImageID buttonImage) {
|
||||
}
|
||||
|
||||
void ChoiceStrip::AddBackButton() {
|
||||
Choice *c = new Choice(ImageID("I_NAVIGATE_BACK"));
|
||||
Choice *c = new Choice(ImageID("I_NAVIGATE_BACK"), new LinearLayoutParams(ITEM_HEIGHT, ITEM_HEIGHT));
|
||||
c->OnClick.Add([](EventParams &e) {
|
||||
e.bubbleResult = DR_BACK;
|
||||
});
|
||||
// c->OnClick.Handle(this, &UIScreen::OnBack);
|
||||
Add(c);
|
||||
Add(new Spacer(5.0f));
|
||||
Add(new Spacer(8.0f));
|
||||
}
|
||||
|
||||
void ChoiceStrip::OnChoiceClick(EventParams &e) {
|
||||
|
||||
@@ -49,10 +49,15 @@ AudioFileChooser::AudioFileChooser(RequesterToken token, std::string *value, std
|
||||
value->clear();
|
||||
}
|
||||
});
|
||||
Add(new Choice(ImageID("I_TRASHCAN"), new LinearLayoutParams(ITEM_HEIGHT, ITEM_HEIGHT)))->OnClick.Add([=](UI::EventParams &) {
|
||||
Choice *trash = new Choice(ImageID("I_TRASHCAN"), new LinearLayoutParams(ITEM_HEIGHT, ITEM_HEIGHT));
|
||||
trash->OnClick.Add([=](UI::EventParams &) {
|
||||
g_BackgroundAudio.SFX().UpdateSample(sound, nullptr);
|
||||
value->clear();
|
||||
});
|
||||
Add(trash);
|
||||
trash->SetEnabledFunc([=]() {
|
||||
return !value->empty();
|
||||
});
|
||||
}
|
||||
|
||||
void RetroAchievementsListScreen::CreateTabs() {
|
||||
|
||||
Reference in new issue
Block a user