History Text getting cut off [SOLVED]

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.
Post Reply
Message
Author
User avatar
sasquatchii
Miko-Class Veteran
Posts: 552
Joined: Fri Jul 04, 2014 7:48 am
Completed: A Day in the Life of a Slice of Bread
Deviantart: sasquatchix
Soundcloud: sasquatchii
itch: sasquatchii
Location: South Carolina
Contact:

History Text getting cut off [SOLVED]

#1 Post by sasquatchii »

Hi guys,
I am working on customizing my history screen, and am trying to move the text (names + dialogue) over to the left. However, when I try to do so, it gets cut off, and looks like this:

Image

It's like there is an invisible window that I need to scooch to the left, but I don't know what controls it or how to do it.

Here is my code for the gui.rpy file:

Code: Select all

## The number of blocks of dialogue history Ren'Py will keep.
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 = 140

## The position, width, and alignment of the label giving the name of the
## speaking character.
define gui.history_name_xpos = 10
define gui.history_name_ypos = 10
define gui.history_name_width = 150
define gui.history_name_xalign = 1.0

## The position, width, and alignment of the dialogue text.
define gui.history_text_xpos = 100
define gui.history_text_ypos = 5
define gui.history_text_width = 1240
define gui.history_text_xalign = 0.8
And here's what I have for the screens.rpy file:

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

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 1.0
Any help or insight is much appreciated!
ImageImage

User avatar
sasquatchii
Miko-Class Veteran
Posts: 552
Joined: Fri Jul 04, 2014 7:48 am
Completed: A Day in the Life of a Slice of Bread
Deviantart: sasquatchix
Soundcloud: sasquatchii
itch: sasquatchii
Location: South Carolina
Contact:

Re: History Text getting cut off [SOLVED]

#2 Post by sasquatchii »

After some further poking & prodding, I realized the game menu was the culprit for cutting off the screen. I went in & changed the game menu's width & a few other margins to 0, and now things are working well!
ImageImage

Post Reply

Who is online

Users browsing this forum: No registered users