Hello, I'm trying to create a visual novel in which the displayables should only appear on a particular place and size on the screen. Like the picture below,
I want my images to appear only inside the orange frame. Below and in the sides I want to create imagemaps for difference locations and such. My main content should only be inside the frame. How should I go about doing it? Thank you very much for your answeres in advance!
Want my images, videos to appear in a particular size and place on the screen!
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.
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.
- Ocelot
- Lemma-Class Veteran
- Posts: 2400
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: Want my images, videos to appear in a particular size and place on the screen!
You can create a separate layer for thise images and clip it to fit your need.
https://www.renpy.org/doc/html/config.h ... r_clipping
https://www.renpy.org/doc/html/config.h ... fig.layers
https://www.renpy.org/doc/html/config.h ... r_clipping
https://www.renpy.org/doc/html/config.h ... fig.layers
< < insert Rick Cook quote here > >
Re: Want my images, videos to appear in a particular size and place on the screen!
Thank you for the reply! I did as you comment and It works! but I have a problem right now. This is the result I'm getting using these codes.Ocelot wrote: ↑Tue May 11, 2021 3:13 am You can create a separate layer for thise images and clip it to fit your need.
https://www.renpy.org/doc/html/config.h ... r_clipping
https://www.renpy.org/doc/html/config.h ... fig.layers
Code: Select all
################################################-----Layers-----###################################################
define config.layers = [ 'master', 'transient', 'viewport' ,'screens', 'overlay' ]
define config.layer_clipping['viewport'] = (14, 14, 1536, 864)
################################################-----Layers-----###################################################
and
I want my smaller images to be in the center of the layer. Both horizontally and vertically. Searching the net, I think I should create a frame and use borders. Is that the correct way? If yes, how should I use it?
- Ocelot
- Lemma-Class Veteran
- Posts: 2400
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: Want my images, videos to appear in a particular size and place on the screen!
How do you show these images? What positional arguments do you provide to them?
< < insert Rick Cook quote here > >
Re: Want my images, videos to appear in a particular size and place on the screen!
I typed this code in the options.rpy
Code: Select all
################################################-----Layers-----###################################################
define config.layers = [ 'master', 'transient', 'viewport' ,'screens', 'overlay' ]
define config.layer_clipping['viewport'] = (14, 14, 1536, 864)
################################################-----Layers-----###################################################
show man_silhoutte onlayer viewport
Edit:
I can get the images to appear in the center of the layer using 'at truecenter'
show man_silhoutte at truecenter onlayer viewport.
This works, but wondering whether I can eliminate copy pasting 'at truecenter' by changing the layer's properties like 'borders'.
Also what if I want to edit the dimensions of the master layer itself?
- Ocelot
- Lemma-Class Veteran
- Posts: 2400
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: Want my images, videos to appear in a particular size and place on the screen!
You can replace config.default_transform variable to make everything appear at transform you want.
As for master layer, you can certainly crop it, but know that everything that usually gets placed on master layer would be affected by cropping.
https://www.renpy.org/doc/html/config.h ... _transform
As for master layer, you can certainly crop it, but know that everything that usually gets placed on master layer would be affected by cropping.
https://www.renpy.org/doc/html/config.h ... _transform
< < insert Rick Cook quote here > >
Who is online
Users browsing this forum: Ahrefs [Bot]