Page 1 of 1
[EOS] Notification button removes itself after click
Posted: Tue Aug 06, 2024 9:10 am
by goranko
I make a notification with a button "Pause" (the intended action is a simple say that waits for user to unpause, which works). The problem is as soon as the button is clicked, it disappears. The idea was that it should always be visible/available. I already searched the forum, couldn't find any information, sorry if duplicate, and thanks for any help.
Re: [EOS] Notification button removes itself after click
Posted: Tue Aug 06, 2024 3:34 pm
by kerkersklave
why not just add the notification again when the user clicks unpause?
Re: [EOS] Notification button removes itself after click
Posted: Tue Aug 06, 2024 4:10 pm
by indyc
kerkersklave wrote: Tue Aug 06, 2024 3:34 pm
why not just add the notification again when the user clicks unpause?
This is the current solution for when you need to do this less than 8 times or so. Each time you nest a notification within a notification it grows the file size exponentially and can crash if you do it too many times.
Many have asked for a solution to "count edges" or other applications. It sure would be nice to have a toggle that does exactly that built into EOS because I could have tons of uses for it!
Re: [EOS] Notification button removes itself after click
Posted: Tue Aug 06, 2024 8:34 pm
by kerkersklave
indyc wrote: Tue Aug 06, 2024 4:10 pm
This is the current solution for when you need to do this less than 8 times or so. Each time you nest a notification within a notification it grows the file size exponentially and can crash if you do it too many times.
What do you mean by nesting? Do you put the following content inside the action of the notification button?
For counting edges on a page I would do this, assuming the page is a linear sequence of actions:
Introduce a variable called "progress" initialized to 0.
Put each action (or small groups of actions, like an image and a few lines of text) into an if-action that skips the action if "progress" is over a certain value. Add a eval action icreasing progress by 1.
At the start of the page put the notification action with the edge-button, when pressed, increase the edge counter. As progress has increased, the page starts at a later point.
For a pause/continue thing I would do a similar thing.
I've quickly build that mechanism:
https://milovana.com/webteases/showteas ... c040ca75d4
It is a bit tedious to setup but not too bad. Also, you lose the previous messages, but that's usually not that important, and could in theory be supported by immediate say actions in the else parts. All of this just makes the tease bigger by a small factor, not exponentially. If you do not know how to get to the code of the tease, I get make it available to you

Re: [EOS] Notification button removes itself after click
Posted: Wed Aug 07, 2024 4:28 pm
by indyc
First - thanks ever so much in building the example!
Yeah, by nesting I mean I've often put copies or variations of a notification within itself to do what I want.
I was assuming you were going to loop pages with go-to and it looks like that's what you did. That may work for a wide audience of Milovana but it doesn't work for massive teases where you need lots of dialog or things to happen on each page because it will reset the entire page progress. Let me know if I'm missing something (I often do haha) but thanks again!