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.
Alright so I'm trying to fiddle with the history screen to make it a smaller window inside another screen. I just sort of extracted the default code out and put it in a new screen to see what happened, but the result is pictured below. What should I do to fix this? Any styles here are still there in the code, still whatever they said by default.
screen page2():
tag menu
predict False
viewport:
xpos 80
ypos 80
yinitial 1.0
scrollbars "vertical"
mousewheel True
draggable True
xsize 400
ysize 400
side_yfill False
for h in _history_list:
window:
## This lays things out properly if history_height is None.
has fixed:
yfit True
if h.who:
label h.who:
style "history_name"
## Take the color of the who text from the Character, if
## set.
if "color" in h.who_args:
text_color h.who_args["color"]
$ what = renpy.filter_text_tags(h.what, allow=gui.history_allow_tags)
text what
if not _history_list:
label _("The dialogue history is empty.")
Last edited by TellerFarsight on Tue Jun 05, 2018 10:50 pm, edited 1 time in total.
screen page2():
tag menu
predict False
viewport:
xpos 80
ypos 80
yinitial 1.0
scrollbars "vertical"
mousewheel True
draggable True
xsize 400
ysize 400
side_yfill False
for h in _history_list:
vbox:
for h in _history_list:
window:
## This lays things out properly if history_height is None.
has fixed:
yfit True
if h.who:
label h.who:
style "history_name"
## Take the color of the who text from the Character, if
## set.
if "color" in h.who_args:
text_color h.who_args["color"]
$ what = renpy.filter_text_tags(h.what, allow=gui.history_allow_tags)
text what
if not _history_list:
label _("The dialogue history is empty.")
mitoky wrote: ↑Mon Jun 04, 2018 2:26 am
I had the exact same problem few days ago! You have to add a vbox. + i noticed "for h in _history_list:" is missing. it should be like this:
Double check your code, you've left two versions of for h in _history_list in there
TellerFarsight:
As mitoky said, you need the vbox: because Renpy's screen language doesn't display stuff like conventional text processor - it doesn't assume that each line of text goes underneath another, without explicitly being told so (vbox to go line by line to bottom, hbox for column by column to the right).
It's worth refreshing your knowledge of the screen language by reading the screen language page and understand what each of the properties are for.
mitoky wrote: ↑Mon Jun 04, 2018 2:26 am
I had the exact same problem few days ago! You have to add a vbox. + i noticed "for h in _history_list:" is missing. it should be like this:
Double check your code, you've left two versions of for h in _history_list in there
TellerFarsight:
As mitoky said, you need the vbox: because Renpy's screen language doesn't display stuff like conventional text processor - it doesn't assume that each line of text goes underneath another, without explicitly being told so (vbox to go line by line to bottom, hbox for column by column to the right).
It's worth refreshing your knowledge of the screen language by reading the screen language page and understand what each of the properties are for.
Whoops, you are right! Thanks for pointing that out!
I thought were was none as it was moved into the viewport and i didntvsaw.
Delete that one inside the viewport and leave the one inside the vbox!
Oh, duh, of course that's it! I was working on it pretty late before I went to sleep, so I wasn't really thinking straight. I just grabbed a chunk of code and moved it to see what happened, so I didn't really have the energy to figure it out. Thanks! I'll try it out when I get home (I'm at work rn) and I assume it'll work, but I'm concerned about the appearance of the textbox there. Hopefully that'll disappear when I change it, but why is it here now?
Ok, so that did work, but like I thought, for some reason the textbox also appeared. I decided to put the history style_prefix in and work backwards from there instead.
The code is still the same, but I put style_prefix "history" back where it is by default, and vbox where you guys suggested.
What I have now is this:
I want to extend the window of the history screen further to the right and further down. Also, the scrollbar's thumb image that I have is a small green square, and I want it to remain a square instead of tiling out to what you see in the picture. Any suggestions for either of these problems?