For the past two days, I've been trying and failing to customize the history screen. It's intended to be a transparent overlay over the current scene, with the text shown in the center area of the screen and scrollable with a bar like so: But every time I actually try to mess around with the existing History screen, it messes up in some way or another. I've gotten fairly close a couple of times, but then the text vanishes when I try to put the sliders in or some random bug shows up and I just give up.
The barebones of my latest retry:
Code: Select all
## History screen ##############################################################
##
## This is a screen that displays the dialogue history to the player. While
## there isn't anything special about this screen, it does have to access the
## dialogue history stored in _history_list.
##
## https://www.renpy.org/doc/html/history.html
screen history():
tag menu
add "gui/History/pg_history.png"
## Avoid predicting this screen, as it can be very large.
predict False
vpgrid:
style_prefix "history"
cols 1
yinitial 1.0
mousewheel True
draggable True
side_ysize 552
side_xsize 940
side_xpos 300
side_ypos 120
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"]
text h.what
if not _history_list:
label _("The dialogue history is empty.")
style history_window is empty
style history_name is gui_label
style history_name_text is gui_label_text
style history_text is gui_text
style history_text is gui_text
style history_label is gui_label
style history_label_text is gui_label_text
style history_window:
xfill True
ysize gui.history_height
style history_name:
xpos gui.history_name_xpos
xanchor gui.history_name_xalign
ypos gui.history_name_ypos
xsize gui.history_name_width
style history_name_text:
min_width gui.history_name_width
text_align gui.history_name_xalign
style history_text:
xpos gui.history_text_xpos
ypos gui.history_text_ypos
xanchor gui.history_text_xalign
xsize gui.history_text_width
min_width gui.history_text_width
text_align gui.history_text_xalign
layout ("subtitle" if gui.history_text_xalign else "tex")
style history_label:
xfill True
style history_label_text:
xalign 0.5
Any help would be immensely appreciated.