Hm. Ideally we need a small button somewhere to stop using matrix instead of asking after every click if you want to continue. Can it be done via the same rpy where I write the logic for the scene?
Though I suppose I can show another image somewhere and use its coordinates to quit tha matrix. But I wonder how difficult is to make an actual button.
Start an issue or I'll just add it to the screen on condition when I get the chance. I'll also remove the function and make it a proper screen, it looks weird the way it is now.It's done, we'll make the button pretty later. It's just one line of a code with a style and you can make it look like any button in the game.
scene bg story dark_room with dissolve
call screen poly_matrix("library/events/StoryI/coordinates.json", show_exit_button=(1.0, 1.0))
"Result: [_return]"
This is proper Ren'Py way, but if you have a lot of code you do not want to change:
scene bg story dark_room with dissolve
$ result = renpy.show_screen(poly_matrix, "library/events/StoryI/coordinates.json", show_exit_button=(1.0, 1.0)))
"Result: [result]"
will work just like before.
If a button is clicked False will be returned instead of a string so:
if not _return: # or result in the old code
# Do something
if _return:
menu:
bla bla bla
# If False was returned label will simply continue...
You can wrap this sh!t in a nice while loop as well...
PS: Do not provide the button argument at all if you do not want to see the button.