[Solved] USe screenshot as screen BG

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
AERenoir
Veteran
Posts: 320
Joined: Fri May 27, 2011 8:23 pm
Contact:

[Solved] USe screenshot as screen BG

#1 Post by AERenoir »

I looked at this tutorial: viewtopic.php?f=51&t=35619

I didn't exactly need the blur effect, so I just put "add FileCurrentScreenshot()" in my script without the "at Blur".

But when I did a test-run, the screenshot wouldn't appear full-screen. It only shows up as a tiny thumbnail like 100 pixels wide, just as it would have been in the save/load screen. Is the tutorial flawed or is there some kind of setting I should've modified to make it show full-screen?
Last edited by AERenoir on Sun Sep 04, 2016 10:10 am, edited 1 time in total.

User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: USe screenshot as screen BG

#2 Post by namastaii »

Code: Select all

#called just right before overlay menu is appeared.
def SetThumbnailFull:
    config.thumbnail_width = config.screen_width
    config.thumbnail_height = config.screen_height

#called just right after overlay menu is disappeared. This function is needed because save file also use thumbnail.
#If you don't call this, you gonna see huge sized thumbnail of your save file on load/save menu.
def SetThumbnailOriginal:
    config.thumbnail_width = ORIGINAL VALUE
    config.thumbnail_height = ORIGINAL VALUE
That first part should do it... so I'm not sure what could be wrong.

User avatar
AERenoir
Veteran
Posts: 320
Joined: Fri May 27, 2011 8:23 pm
Contact:

Re: USe screenshot as screen BG

#3 Post by AERenoir »

Where do I put this? In Script or in Screen?

User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: USe screenshot as screen BG

#4 Post by namastaii »

Somewhere under an init Python. Maybe just put it in your options page.
However there is already original code in your screens page under your save and load screen stuff. Either delete that or put the code there and replace it.


Ohh.. I didn't read the comments. I guess you need to call them in a certain spot haha

User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: USe screenshot as screen BG

#5 Post by namastaii »

You're doing this because you want to bring up a menu and have the background still showing right?
You could just simply make your menu images smaller and even kinda transparent if you want and when it opens, it'll just show on top of your background. That's what I have for my game. I just wanted the background to be darkened slightly so I added a transparent gray/black border around the edges of my smaller menu that is placed in the middle..if that makes sense.

User avatar
AERenoir
Veteran
Posts: 320
Joined: Fri May 27, 2011 8:23 pm
Contact:

Re: USe screenshot as screen BG

#6 Post by AERenoir »

Yeah, I already put that part in :( :( :( :( :( :( :(
But I don't know how to call/activate it

User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: USe screenshot as screen BG

#7 Post by namastaii »

If you don't need the blur, I think the way I described in my last response is the easiest route :)

User avatar
AERenoir
Veteran
Posts: 320
Joined: Fri May 27, 2011 8:23 pm
Contact:

Re: [Solved] USe screenshot as screen BG

#8 Post by AERenoir »

Ah, no, it has to be a screenshot because it involves the on-screen user input (yours! XD). So whatever text the player input needs to be visible.

Finally I made it work using the manual setting:
#somewhere on option.rpy file
config.thumbnail_width = config.screen_width
config.thumbnail_height = config.screen_height[/code]

Code: Select all

            for i in range(1, 5):
                    # Each file slot is a button.
                button:
                    xmaximum 345
                    ymaximum 220
                    action FileAction(i)
                    add FileScreenshot(i) xoffset 0 yoffset 10 size(320,180)
                    text ( FileTime(i, empty=_("Empty Slot."))) xpos 10 ypos 190 size 20 color '#FFFFFF'

User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: [Solved] USe screenshot as screen BG

#9 Post by namastaii »

Okay, I'm glad it works. I still don't think you need to use a screenshot. You don't need to make the input see-through to have your background showing but hopefully this solution works good for you.

Post Reply

Who is online

Users browsing this forum: No registered users