Taking in-game screenshots. Calling them back.
Posted: Wed Oct 10, 2018 4:19 am
Hi all,
I want to take screenshots of drawings the player will do in-game (see thread: viewtopic.php?f=8&t=51370) and call them back soon after.
Here's my code so far:
In script.rpy:
In screens.rpy:
And then I want to show the drawing/ screenshot:
My issue is that when a screenshot is taken, dialogue shows up in the top left saying one is saved to the game folder which breaks immersion. And I also don't know how to "show" a screenshot that maybe called "screenshot01" or "screenshot99" depending on how many play-throughs you've done. How do I call the last screenshot? And how can I show it again later (in the gallery or in the credits)?
Thanks.
I want to take screenshots of drawings the player will do in-game (see thread: viewtopic.php?f=8&t=51370) and call them back soon after.
Here's my code so far:
In script.rpy:
Code: Select all
call screen freehand_draw
Code: Select all
screen freehand_draw():
vbox:
hbox:
frame:
background "#FFF"
padding (0, 0)
xsize 800
ysize 360
add freehand_canvas
hbox:
style "draw_ui"
for colour in colours:
button:
xsize 32
ysize 32
background colour
action SetField(freehand_canvas, 'colour', colour)
textbutton "New sheet" action Function(freehand_canvas.clear)
textbutton "Thicker pen" action SetField(freehand_canvas, 'line_width', 8)
textbutton "Done" action [Function(Screenshot()), Return] ## this is the screenshot function
Code: Select all
## show recent screenshot?
k "Hahaha!"
m "Don't laugh! I drew that."
#etc
Thanks.