Remove the UI::EventReturn return values. Makes editing the UI nicer.

This commit is contained in:
Henrik Rydgård committed 2025-09-15 11:09:00 -06:00
1 parent 730fd4754e
commit 58456ae950
62 files changed
+516 -935

No files matched your search

+2 -4
View File
@@ -64,7 +64,7 @@ void ApplyBoundsBySpec(Bounds &bounds, MeasureSpec horiz, MeasureSpec vert) {
ApplyBoundBySpec(bounds.h, vert);
}
void Event::Add(std::function<EventReturn(EventParams&)> func) {
void Event::Add(std::function<void(EventParams&)> func) {
_dbg_assert_(!func_);
func_ = func;
}
@@ -78,10 +78,9 @@ void Event::Trigger(EventParams &e) {
}
// Call this from UI thread
EventReturn Event::Dispatch(EventParams &e) {
void Event::Dispatch(EventParams &e) {
if (func_)
func_(e);
return UI::EVENT_DONE;
}
Event::~Event() {
@@ -138,7 +137,6 @@ std::string View::DescribeLog() const {
return StringFromFormat("%0.1f,%0.1f %0.1fx%0.1f", bounds_.x, bounds_.y, bounds_.w, bounds_.h);
}
void View::PersistData(PersistStatus status, std::string anonId, PersistMap &storage) {
// Remember if this view was a focused view.
std::string tag = Tag();