diff --git a/firmware/common/ui.cpp b/firmware/common/ui.cpp index 4fd40088..d6d881d6 100644 --- a/firmware/common/ui.cpp +++ b/firmware/common/ui.cpp @@ -57,4 +57,9 @@ Rect& Rect::operator+=(const Rect& p) { return *this; } +Rect& Rect::operator+=(const Point& p) { + pos += p; + return *this; +} + } /* namespace ui */ diff --git a/firmware/common/ui.hpp b/firmware/common/ui.hpp index 0a10a9f2..f363a841 100644 --- a/firmware/common/ui.hpp +++ b/firmware/common/ui.hpp @@ -208,6 +208,7 @@ struct Rect { } Rect& operator+=(const Rect& p); + Rect& operator+=(const Point& p); operator bool() const { return !size.is_empty();