Clone this repository to folder you need via git clone
command or add as submodule via git submodule
command.
This repository has a main part with library's source code and an example project, that you can use to understand how this library can be used. Keep in mind, in example project backend part stores in code/notifications
and frontend in ui/notifications
To activate library you must:
- Initialize
NotificationStack
in game script's constructor to store data; - Call
NotificationStack.Push
method from it in player's code (check "Notifications Library API") with data type you need; - Have fun.
If you want to make your own notification type with custom style, you need to do:
- Inherit your custom class from
Notification
;
- Open
styles/NotificationsStyle.scss
file and set style for your custom notification type. For example, since we wrote "yellow" in class, we should add&.yellow
class style realization. If you have any problems, check styles code above.
- Now you can call
NotificationStack.Push
method with your new type.