Notifications (368)

Any information about the fun attribute is given here.

Moderator: Plugin Moderators

User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5730
Joined: 10 Feb 2017, 14:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

Re: Notifications (368)

#26

Post by Bearbear76 »

How to make your notifications into a question

To make a notification into a question add the following code to your JSON

Code: Select all

"question":true,
Default is false

Next add a function for what will happen depending on the response
For example:

Code: Select all

"ok fun":[{"actions":[{"type":"toast", "id":"I'm a toast!"}]
"cancel fun":[]
Ok fun is activated when the user pressed ok
cancel fun is activated when the user pressed cancel

By writing the following nothing will happen when pressed

Code: Select all

"cancel/ok fun":[]
Here is an example JSON

Code: Select all

[{
"id":"question_notify",
"type":"notification",
"frames":[{"bmp":"person.png"}],
"text":"would you like to see a toast?",
"question":true,
"ok fun":[{"actions":[{"type":"toast", "id":"I'm a toast!"}],
"cancel fun":[]
}]

User avatar
AngelPandaEarth
Small-town resident
Reactions:
Posts: 32
Joined: 11 Jun 2018, 04:14
Location: United States
Plugins: Showcase Store
Contact:

Plugin Creator

Platform

Re: Notifications (368)

#27

Post by AngelPandaEarth »

?
Attachments
Screenshot_20190404-161533.png

User avatar
CommanderABab
AB
Reactions:
Posts: 11086
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Notifications (368)

#28

Post by CommanderABab »

Code: Select all

"actions":[{}]
needs to be within a pair of

Code: Select all

{}
.

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2220
Joined: 07 Jul 2016, 22:50
Location: 'Merica
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Notifications (368)

#29

Post by KINGTUT10101 »

How can I add those optional tags like "show once" to a notification shown via Lua?

User avatar
JustAnyone
Developer
Reactions:
Posts: 3474
Joined: 23 Jul 2017, 12:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Notifications (368)

#30

Post by JustAnyone »

Yes.

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2220
Joined: 07 Jul 2016, 22:50
Location: 'Merica
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Notifications (368)

#31

Post by KINGTUT10101 »

That's helpful...

User avatar
JustAnyone
Developer
Reactions:
Posts: 3474
Joined: 23 Jul 2017, 12:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Notifications (368)

#32

Post by JustAnyone »


User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2220
Joined: 07 Jul 2016, 22:50
Location: 'Merica
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Notifications (368)

#33

Post by KINGTUT10101 »

You sly dog :bt

Post Reply Previous topicNext topic

Return to “Fun attribute”