init offset = -1 screen history(): layer "interface" predict False frame style "navigation_page_left": has vbox label _("History") null height 10 viewport: style_prefix "history" yinitial 1.0 scrollbars "vertical" mousewheel not renpy.android vbox: style "history_vbox" for entry in _history_list: button: style "history_entry" action Confirm("Rollback to the selected statement?\nThis will lose unsaved progress.", RollbackToIdentifier(entry.rollback_identifier)) vbox: spacing 0 if entry.who: $ who = renpy.filter_text_tags(entry.who, allow=gui.history_allow_tags) hbox: if (icon := entry.show_args.get("icon", None)): $ icon = f"interface/icons/head/{icon}.webp" add icon xysize (32, 32) text who style "history_text_who" $ what = renpy.filter_text_tags(entry.what, allow=gui.history_allow_tags) text what style "history_text_what": substitute False frame style "navigation_page_right": pass style history_viewport: xmaximum 300 ymaximum 400 style history_vscrollbar is navigation_vscrollbar style history_vbox: spacing 10 xmaximum 295 style history_entry: xfill True padding (4, 6) background Frame(Image("gui/creamy_pumpkin_pie/book/book_select.png", oversample=4), 20, 8, 20, 8, tile=False) hover_background Fixed("#C69D65", Frame(Image("gui/creamy_pumpkin_pie/book/book_select.png", oversample=4), 20, 8, 20, 8, tile=False)) style history_text_what is navigation_text: # color "#fff" # outlines [(1, "#000000", 1, 1)] # hinting "bytecode" size 10 style history_text_who is navigation_text: # color "#EA8E61" # outlines [(1, "#000000", 1, 1)] hinting "auto" font gui.bold_font size 12 # Avoid predicting this screen, as it can be very large # predict False # use game_menu(_("History"), scroll=("vpgrid" if gui.history_height else "viewport"), yinitial=1.0): # style_prefix gui.theme("history") # has vbox # spacing 12 # default last_who = "" # for entry in _history_list: # vbox: # xfill True # spacing 12 # if not last_who == entry.who: # hbox: # spacing 12 # if "icon" in entry.show_args: # $ icon = entry.show_args["icon"] # add Fixed(gui.format("interface/achievements/{}/iconbox.webp"), Transform(f"interface/icons/head/{icon}.webp", xzoom=-1, size=(40, 40), align=(0.5, 0.5)), fit_first=True) # if entry.who: # text entry.who: # style "history_name" # substitute False # if "color" in entry.who_args: # color entry.who_args["color"] # vbox: # spacing 6 # $ what = renpy.filter_text_tags(entry.what, allow=gui.history_allow_tags) # text what: # substitute False # $ last_who = entry.who # if not _history_list: # label _("The dialogue history is empty.") define gui.history_allow_tags = ("number", "unicode", "color")