Notifications (368)

Any information about the fun attribute is given here.

Moderator: FranchuFranchu

User avatar
Bearbear65
Inhabitant of a Universe
Reactions:
Posts: 4225
Joined: Fri Feb 10, 2017 14:53
Location: Earth
Plugins: Show
Version: Beta
Phone: Asus zenpad 10

Re: Notifications (368)

Post by Bearbear65 » Fri May 04, 2018 12:14

JustAnyone wrote:
Mon Dec 18, 2017 19:33
Wait. How do you remove navigation button.
In case you wonder: the "z":1 puts a location button on the notification that navigates the user to the building that spawned it.
ImageJust my opinion

User avatar
JustAnyone
Feature manager
Reactions:
Posts: 1984
Joined: Sun Jul 23, 2017 12:45
Location: TheoTown command centre
Plugins: Show
Version: Beta
Phone: Xiaomi Redmi 3s

Re: Notifications (368)

Post by JustAnyone » Fri May 04, 2018 14:05

I already figured out.
With the new version something cool is coming for notifications.
Founder and owner of DSA
TheoTown discord manager
Developer of Plugin Creator Application.

User avatar
Bearbear65
Inhabitant of a Universe
Reactions:
Posts: 4225
Joined: Fri Feb 10, 2017 14:53
Location: Earth
Plugins: Show
Version: Beta
Phone: Asus zenpad 10

Re: Notifications (368)

Post by Bearbear65 » Thu May 24, 2018 4:27

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":[]
}]
ImageJust my opinion

Post Reply

Return to “Fun attribute”

Who is online

Users browsing this forum: No registered users and 1 guest