Page 2 of 2
Re: Notifications (368)
Posted: 05 Nov 2017, 12:37
by TheFennekin
Maybe
@KoalaGuy[Posts][PM]'s problem is not to use "once": true and use once: true just like
@Lobby[Posts][PM] said in the codes.
Re: Notifications (368)
Posted: 05 Nov 2017, 12:47
by Lobby
It will be fixed, and it will be renamed to
@TheFennekin I omitted the quotes as some json standards allow it for names without spaces. However, it's better to use them unless you're lazy
Re: Notifications (368)
Posted: 18 Dec 2017, 19:33
by JustAnyone
Wait. How do you remove navigation button.
Re: Notifications (368)
Posted: 04 May 2018, 12:14
by Bearbear76
JustAnyone wrote: ↑18 Dec 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.
Re: Notifications (368)
Posted: 04 May 2018, 14:05
by JustAnyone
I already figured out.
With the new version something cool is coming for notifications.
Re: Notifications (368)
Posted: 24 May 2018, 04:27
by Bearbear76
How to make your notifications into a question
To make a notification into a question add the following code to your JSON
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
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":[]
}]
Re: Notifications (368)
Posted: 04 Apr 2019, 22:16
by AngelPandaEarth
?
Re: Notifications (368)
Posted: 04 Apr 2019, 23:55
by CommanderABab
needs to be within a pair of
.
Re: Notifications (368)
Posted: 26 Oct 2019, 19:58
by KINGTUT10101
How can I add those optional tags like "show once" to a notification shown via Lua?
Re: Notifications (368)
Posted: 26 Oct 2019, 22:09
by JustAnyone
Yes.
Re: Notifications (368)
Posted: 26 Oct 2019, 22:20
by KINGTUT10101
That's helpful...
Re: Notifications (368)
Posted: 26 Oct 2019, 23:47
by JustAnyone
Re: Notifications (368)
Posted: 27 Oct 2019, 03:02
by KINGTUT10101
You sly dog