







screen history():
    tag menu
    add persistent_a_cursor zoom 1.2
    imagemap:
        idle "gui/new_ui/history_icon.png"
        xalign 0.113
        yalign 0.092
    textbutton _("HISTORY"):
        style "shadow_text"
        text_style "shadow_text"
        xanchor 0.0
        xpos 300
        if _preferences.language == 'SimplifiedChinese' or _preferences.language == 'TraditionalChinese' or _preferences.language == 'Korean' or _preferences.language == 'Japanese':
            yalign 0.092
        else:
            yalign 0.1
    predict False

    use game_menu(_("HISTORY"), scroll="viewport", yinitial=1.0):

        style_prefix "history"

        frame:
            xpos 80
            ypos 50
            xsize 1400
            ysize 660
            background None

            has viewport
            xmaximum 1400
            ymaximum 660
            draggable True
            mousewheel True
            scrollbars "vertical"

            vbox:
                spacing -140
                xmaximum 1000

                for h in _history_list:
                    window:
                        has fixed yfit True

                        if h.who:
                            label h.who:
                                style "glow_button_text_02x"
                                text_style "glow_button_text_02x"
                                substitute False

                                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:
                            substitute False

                if not _history_list:
                    label _("The dialogue history is empty.")




define gui.history_allow_tags = { "alt", "noalt", "rt", "rb", "art" }


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_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
return
# Decompiled by unrpyc: https://github.com/CensoredUsername/unrpyc
