I am trying to make the history screen in my game slightly shorter. As it is right now, it runs all the way to the bottom of the page, which I do not like since my game menu is at the very bottom of the page. The history screen is running into the game menu and it's a bit of an eyesore:
I was wondering if it's possible to change the menu so that the text doesn't run all the way to the bottom of the page? And if so, how? I've tried playing with padding and margins but that didn't seem to work. Here is the code for the history in my gui.rpy file:
Code: Select all
define config.history_length = 500
## The height of a history screen entry, or None to make the height variable at
## the cost of performance.
define gui.history_height = 80
## The position, width, and alignment of the label giving the name of the
## speaking character.
define gui.history_name_xpos = 140
define gui.history_name_ypos = 75
define gui.history_name_width = 150
define gui.history_name_xalign = 0
define gui.history_window_height = 300
## The position, width, and alignment of the dialogue text.
define gui.history_text_xpos = 140
define gui.history_text_ypos = 115
define gui.history_text_width = 922
define gui.history_text_height = 317
define gui.history_text_xalign = 0.0
Code: Select all
screen history():
tag menu
## Avoid predicting this screen, as it can be very large.
predict False
use game_menu(_(""), scroll=("vpgrid" if gui.history_height else "viewport")):
style_prefix "history"
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.")
add "gui/history-menu-title.png"
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
bottom_padding 300
bottom_margin 300
style history_name:
xpos gui.history_name_xpos
xanchor gui.history_name_xalign
ypos gui.history_name_ypos
xsize gui.history_name_width
bottom_padding 190
style history_name_text:
min_width gui.history_name_width
text_align gui.history_name_xalign
font gui.history_name_text_font
size gui.history_name_text_size
bottom_padding 40
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")
size gui.history_text_size
top_padding 30
style history_label:
xfill True
style history_label_text:
xalign 1.0