Create a notification, similar to TextAlertPopup but more customizable
Class Notification
#include <Geode/ui/Notification.hpp>
classNotification:publiccocos2d::CCNodeRGBA{ ... }
No description provided
Examples0
Public static methods2
staticgeode::Notification*create(,,floattime)
text
Notification text
icon
Icon to show in the notification
time
Time to show the notification on screen; pass 0 to show the notification indefinitely until hide() is called
The new notification. Make sure to call show() to show the notification
staticgeode::Notification*create(,,floattime)
Create a notification with a custom icon
text
Notification text
icon
Icon to show in the notification
time
Time to show the notification on screen; pass 0 to show the notification indefinitely until hide() is called
The new notification. Make sure to call show() to show the notification
Public member functions8
voidsetString()
No description provided
voidsetIcon()
No description provided
voidsetIcon()
No description provided
voidwaitAndHide()
Set the wait time to default, wait the time and hide the notification. Equivalent to setTime(NOTIFICATION_DEFAULT_TIME)
voidshow()
Adds the notification to the current scene if it doesn’t have a parent yet, and displays the show animation. If the time for the notification was specified, the notification waits that time and then automatically hides
voidhide()
Hide the notification. If you passed a time to the create function, this function doesn’t need to be called manually, unless you want to prematurily hide the notification
voidcancel()
Cancels the showing of the notification if it’s in the queue. Otherwise, it hides the notification if it’s currently showing.
Fields0
Protected member functions6
Protected fields5
;
No description provided
cocos2d::CCLabelBMFont*m_label;
No description provided
cocos2d::CCSprite*m_icon;
No description provided
floatm_time;
No description provided
boolm_showing;
No description provided