All right, I was about to upload a quick project to show you a way to do that but since it's just a few lines of code, here it is:
(script.rpy)
Note: I did not use any bool and I return to basically nothingness, it is clearly not meant to be used like this but it was a way to show how you can "pause" the dialogue for good while you show the phone screen and then resume (return) to the old dialogue or even go to another dialogue to tell what happened and then resume to the old one, up to you.
(script.rpy)
Code:
define e = Character("Eileen")
init python:
#1.We make a button, once clicked, we go to another "label".
def phone_button():
ui.vbox(xpos=0, ypos=0, xanchor='left', yanchor='top')
ui.textbutton("Phone", clicked=ui.callsinnewcontext("phone"), xminimum=40, yminimum=20)
ui.close()
config.overlay_functions.append(phone_button)
label start:
scene bg room
show eileen happy
e "Click the phone button text on the top left!"
e "Quickly, before I return to the main menu!"
e "... ... ..."
e "... ..."
e "..."
return
label phone:
#2.There can be other dialogue, call the phone interface but most importantly, we hard pause.
e "I have decided to check my phone..."
scene bg room
call screen phone
$renpy.pause(hard=True)
e "This will not run."
e "No matter what, it will not run."
e "You will never see this, I swear!"
label phone_closed:
e "I took my phone..."
e "I did various things, like texting my friends!"
return
screen phone:
#3 The phone interface and stuff
fixed:
textbutton "Close phone" xalign 0.5 yalign 0.5 action Call("phone_closed")