Search found 32 matches
- Thu Nov 12, 2020 2:13 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Using python code inside screen conditionals
- Replies: 1
- Views: 327
Using python code inside screen conditionals
Hi everyone, while writing some code I noticed that writing python code inside screen conditionals makes the python code run no matter if the condition is verified or not. This is an example: label start: $test_var = 0 call screen test_screen screen test_screen: frame: if test_var == 0: $print("test...
- Wed Oct 28, 2020 11:52 am
- Forum: Ren'Py Questions and Announcements
- Topic: Is it possible to show the children of a screen in a time sequence?
- Replies: 5
- Views: 307
Re: Is it possible to show the children of a screen in a time sequence?
define texts = ("a", "b", "c", "d", "e", "f", "g") screen something(): default ind = -1 if ind < len(texts): timer 1.0: repeat True action SetScreenVariable("ind", ind + 1) vbox: if ind != -1: for stext in texts[:ind + 1]: text stext Thank you very much hell_oh_world! It worked wonderfully! You cou...
- Sun Oct 25, 2020 4:48 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Is it possible to show the children of a screen in a time sequence?
- Replies: 5
- Views: 307
Re: Is it possible to show the children of a screen in a time sequence?
You could do something like this init python: my_list = ["hello", "how", "are", "you?"] el=0 screen my_screen(): text my_list[el] if el<len(my_list)-1: timer 1.0 action SetVariable("el", el+1) repeat True label start: call screen my_screen Thanks Grok, but I need them to be shown in a vbox. At the ...
- Sun Oct 25, 2020 3:26 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Is it possible to show the children of a screen in a time sequence?
- Replies: 5
- Views: 307
Is it possible to show the children of a screen in a time sequence?
Hi everyone, I'm trying to do something like this init python: my_list = ["hello", "how", "are", "you?"] screen my_screen(list): vbox: for el in my_list: text el #now pause 1 second before showing the next element of the list label start: call screen my_screen(my_list) So what the screen should do i...
- Wed Oct 14, 2020 3:53 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Show viewport scrollbar only when needed.
- Replies: 3
- Views: 433
Re: Show viewport scrollbar only when needed.
https://www.renpy.org/doc/html/style_properties.html#style-property-unscrollable Try... viewport: scrollbars "vertical" vscrollbar_unscrollable "hide" Thank you very much, I wasn't able to find any solution :) Do you know if there is also any way to return a value if the scrollbar is hidden/show? S...
- Wed Oct 14, 2020 10:47 am
- Forum: Ren'Py Questions and Announcements
- Topic: Show viewport scrollbar only when needed.
- Replies: 3
- Views: 433
Show viewport scrollbar only when needed.
Hi everyone, I'm trying to make a viewport with a scrollbar that shows only when the text inside it overflow the container. Here is the code I have: frame: xsize 300 ysize 300 viewport: scrollbars "vertical" text "A short text or a very very long text that causes overflow" Now, in case the "text" el...
- Tue Oct 06, 2020 3:47 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Is it possible to maintain the aspect ratio of a frame background?
- Replies: 6
- Views: 382
Re: Is it possible to maintain the aspect ratio of a frame background?
Are you trying to make an image only show 1/2 of the Y axis like some kind of window with the image behind it. Cover the image instead, a frame doesn't work like this. Yes, I'm trying to make an image show only a portion of itself (in this case an half) but still keep its proportions while being re...
- Tue Oct 06, 2020 10:54 am
- Forum: Ren'Py Questions and Announcements
- Topic: Is it possible to maintain the aspect ratio of a frame background?
- Replies: 6
- Views: 382
Re: Is it possible to maintain the aspect ratio of a frame background?
well, your frame's ratio is not proportional to the background's, having 200x100 while your background is 200x200. How about not using a Frame ? frame: xysize (200, 100) background Image("image_name.png", align=(0.5, 0.5)) Thanks for your answer hell_on_world, unfortunately the image overflows the ...
- Tue Oct 06, 2020 8:11 am
- Forum: Ren'Py Questions and Announcements
- Topic: Is it possible to maintain the aspect ratio of a frame background?
- Replies: 6
- Views: 382
Is it possible to maintain the aspect ratio of a frame background?
Hi everyone, I have this code: frame: xsize 200 ysize 100 background Frame("my_background.jpg") #this image is 200x200 is it possible to make it so that the image is: 1. Centered inside the "frame" but still maintain its aspect ratio 2. Whatever overflows becomes hidden Having some knowledge of html...
- Tue Jul 09, 2019 12:00 pm
- Forum: Ren'Py Questions and Announcements
- Topic: How to make the first line of a menu dynamic?
- Replies: 2
- Views: 404
- Tue Jul 09, 2019 11:16 am
- Forum: Ren'Py Questions and Announcements
- Topic: How to make the first line of a menu dynamic?
- Replies: 2
- Views: 404
How to make the first line of a menu dynamic?
Hi everyone, I'm trying to make something like this: define bman = Character("Bartender") $ number = renpy.random.randint(1,3) menu ask_for_a_drink: #First we have three condition that will decide what will appear in the textbox (the bartender is talking) if number == 1: bman "What's your poison?" i...
- Tue May 21, 2019 10:38 am
- Forum: Ren'Py Questions and Announcements
- Topic: Does something like "renpy.show_text" exists?
- Replies: 4
- Views: 667
Re: Does something like "renpy.show_text" exists?
Hi remix, thanks for your answer, but I need to put that code inside a python function. Is there a way to do that?Remix wrote: ↑Tue May 21, 2019 10:32 amCode: Select all
show expression Text("words") as my_text at truecenter "..." hide my_text
- Tue May 21, 2019 10:19 am
- Forum: Ren'Py Questions and Announcements
- Topic: Does something like "renpy.show_text" exists?
- Replies: 4
- Views: 667
Does something like "renpy.show_text" exists?
Hi guys! I'm trying to make some code like this run in a python function: show text "hey this is some new text!!" at truecenter with dissolve renpy.pause(2) hide text with dissolve the thing is that I don't know how to implement the: show text "...." hide text I've tried this one: init python: my_te...
- Sat Mar 02, 2019 5:34 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Make a button+text look like a vbox
- Replies: 1
- Views: 169
Make a button+text look like a vbox
Hi everyone! I'm trying to make something like this: vbox: button: xsize 100 ysize 100 idle_background "something_idle.jpg" hover_background "something_over.jpg" text "some text" xalign 0.5 idle_color "a color when idle" hover_color "a color when hover" now, the thing I'd like to achieve is to make ...
- Fri Mar 01, 2019 5:39 pm
- Forum: Ren'Py Questions and Announcements
- Topic: [SOLVED]Is it possible to emulate imagebutton idle/hover for a normal button?
- Replies: 2
- Views: 210