HaikuDepot: Select clicked featured packages
This commit is contained in:
parent
a3056e412a
commit
1f3c1ef1c5
@ -16,6 +16,7 @@
|
||||
#include <SpaceLayoutItem.h>
|
||||
|
||||
#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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user