diff --git a/radio/src/thirdparty/libopenui/src/bufferedwindow.h b/radio/src/thirdparty/libopenui/src/bufferedwindow.h index 6e6aa4a2c..a7f693cc1 100644 --- a/radio/src/thirdparty/libopenui/src/bufferedwindow.h +++ b/radio/src/thirdparty/libopenui/src/bufferedwindow.h @@ -96,4 +96,24 @@ class TransparentBufferedWindow: public BufferedWindow } }; +class TransparentBitmapBackground: public TransparentBufferedWindow +{ + public: + TransparentBitmapBackground(Window * parent, const rect_t & rect, const BitmapBuffer * bitmap): + TransparentBufferedWindow(parent, rect, OPAQUE), + background(bitmap) + { + } + + protected: + const BitmapBuffer * background; + + void paintUpdate(BitmapBuffer * dc) override + { + if (background) { + dc->drawBitmap((width() - background->width()) / 2, (height() - background->height()) / 2, background); + } + } +}; + #endif // _BUFFERED_WINDOW_H_