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(,cocos2d::CCNode*icon,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 functions10
voidsetString()
No description provided
voidsetIcon()
No description provided
voidsetIcon(cocos2d::CCNode*icon)
No description provided
cocos2d::CCNode*getIcon()
No description provided
floatgetTime()
No description provided
boolisShowing()
No description provided
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 prematurely 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 functions7
boolinit(,cocos2d::CCNode*icon,floattime)
No description provided
voidupdateLayout()
No description provided
voidshowNextNotification()
No description provided
voidwaitThenHide()
No description provided
geode::NineSlice*getBG()
No description provided
cocos2d::CCLabelBMFont*getLabel()
No description provided
cocos2d::CCNodeRGBA*getContent()
No description provided