Hi!
I am integrating OpenFeint to my game and i was wondering if anyone has tried to customize the notifications so they appear as cocos2d elements.
According to their instructions:
OFNotificationDelegate
Developers that wish to disable or customize notification pop-ups must supply an OFNotificationDelegate object during OpenFeint initialization.
- (BOOL)isOpenFeintNotificationAllowed:(OFNotificationData*)notificationData;
This method will be invoked when a pop-up needs to know if it should display or not. Developers can return YES to allow the notification, or NO to disallow it.
- (void)handleDisallowedNotification:(OFNotificationData*)notificationData;
This method will be invoked when isOpenFeintNotificationAllowed returns NO. We recommend developers display a custom notification here using the data provided in the OFNotificationData object. Please see the section on OFNotificationData below for more information.
- (void)notificationWillShow:(OFNotificationData*)notificationData;
This method will be invoked when a default OpenFeint notification is about to be displayed.
So, what i understand is that i must have a
- (BOOL)isOpenFeintNotificationAllowed:(OFNotificationData*)notificationData
{
return NO;
}
- (void)handleDisallowedNotification:(OFNotificationData*)notificationData
{
//Create cocos2d sprite for the background of the notification, its text, someaction to fade it in and out... ??
}
Also it says: Developers that wish to disable or customize notification pop-ups must supply an OFNotificationDelegate object during OpenFeint initialization.
How would i do that?
Thanks!