From 1f3c1ef1c5a1d36390fb72946cd92eb2fa09d469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sun, 2 Nov 2014 01:06:29 +0100 Subject: [PATCH] HaikuDepot: Select clicked featured packages --- src/apps/haikudepot/ui/FeaturedPackagesView.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/apps/haikudepot/ui/FeaturedPackagesView.cpp b/src/apps/haikudepot/ui/FeaturedPackagesView.cpp index e48531a965..e502284bbe 100644 --- a/src/apps/haikudepot/ui/FeaturedPackagesView.cpp +++ b/src/apps/haikudepot/ui/FeaturedPackagesView.cpp @@ -16,6 +16,7 @@ #include #include "BitmapView.h" +#include "MainWindow.h" #include "MessagePackageListener.h" #include "RatingView.h" #include "ScrollableGroupView.h" @@ -40,6 +41,7 @@ public: new(std::nothrow) OnePackageMessagePackageListener(this)) { SetViewColor(255, 255, 255); + SetEventMask(B_POINTER_EVENTS); fIconView = new BitmapView("package icon view"); fTitleView = new BStringView("package title view", ""); @@ -106,6 +108,15 @@ public: } } } + + virtual void MouseDown(BPoint where) + { + if (Bounds().Contains(where)) { + BMessage message(MSG_PACKAGE_SELECTED); + message.AddString("title", PackageTitle()); + Window()->PostMessage(&message); + } + } void SetPackage(const PackageInfoRef& package) {