mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-01 02:03:47 +01:00
Remove the UI::EventReturn return values. Makes editing the UI nicer.
This commit is contained in:
1 parent
730fd4754e
commit
58456ae950
62 files changed
+516
-935
No files matched your search
@@ -552,14 +552,13 @@ std::string ListView::DescribeText() const {
|
||||
return DescribeListOrdered(u->T("List:"));
|
||||
}
|
||||
|
||||
EventReturn ListView::OnItemCallback(int num, EventParams &e) {
|
||||
void ListView::OnItemCallback(int num, EventParams &e) {
|
||||
EventParams ev{};
|
||||
ev.v = nullptr;
|
||||
ev.a = num;
|
||||
adaptor_->SetSelected(num);
|
||||
OnChoice.Trigger(ev);
|
||||
CreateAllItems();
|
||||
return EVENT_DONE;
|
||||
}
|
||||
|
||||
View *ChoiceListAdaptor::CreateItemView(int index, ImageID *optionalImageID) {
|
||||
@@ -570,13 +569,11 @@ View *ChoiceListAdaptor::CreateItemView(int index, ImageID *optionalImageID) {
|
||||
return choice;
|
||||
}
|
||||
|
||||
bool ChoiceListAdaptor::AddEventCallback(View *view, std::function<EventReturn(EventParams &)> callback) {
|
||||
void ChoiceListAdaptor::AddEventCallback(View *view, std::function<void(EventParams &)> callback) {
|
||||
Choice *choice = (Choice *)view;
|
||||
choice->OnClick.Add(callback);
|
||||
return EVENT_DONE;
|
||||
}
|
||||
|
||||
|
||||
View *StringVectorListAdaptor::CreateItemView(int index, ImageID *optionalImageID) {
|
||||
Choice *choice = new Choice(items_[index], "", index == selected_);
|
||||
if (optionalImageID) {
|
||||
@@ -585,10 +582,9 @@ View *StringVectorListAdaptor::CreateItemView(int index, ImageID *optionalImageI
|
||||
return choice;
|
||||
}
|
||||
|
||||
bool StringVectorListAdaptor::AddEventCallback(View *view, std::function<EventReturn(EventParams &)> callback) {
|
||||
void StringVectorListAdaptor::AddEventCallback(View *view, std::function<void(EventParams &)> callback) {
|
||||
Choice *choice = (Choice *)view;
|
||||
choice->OnClick.Add(callback);
|
||||
return EVENT_DONE;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
Reference in new issue
Block a user