2022-05-16 23:48:22 +00:00
|
|
|
init offset = -1
|
|
|
|
|
|
|
|
screen history():
|
2024-06-17 18:25:20 +00:00
|
|
|
layer "interface"
|
|
|
|
predict False
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2024-06-17 18:25:20 +00:00
|
|
|
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"
|
2024-06-18 17:45:13 +00:00
|
|
|
|
|
|
|
if not _history_list:
|
|
|
|
text "Nothing here yet..." style "navigation_text"
|
|
|
|
|
2024-06-17 18:25:20 +00:00
|
|
|
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
|
2024-06-18 17:45:13 +00:00
|
|
|
|
2024-06-17 18:25:20 +00:00
|
|
|
frame style "navigation_page_right":
|
2024-06-18 16:43:54 +00:00
|
|
|
add "doodle_mountains" align (0.5, 0.5)
|
2024-06-17 18:25:20 +00:00
|
|
|
|
|
|
|
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:
|
2024-06-18 18:46:57 +00:00
|
|
|
size 16
|
2024-06-17 18:25:20 +00:00
|
|
|
|
|
|
|
style history_text_who is navigation_text:
|
|
|
|
hinting "auto"
|
|
|
|
font gui.bold_font
|
2024-06-18 18:46:57 +00:00
|
|
|
size 16
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2024-06-17 18:25:20 +00:00
|
|
|
define gui.history_allow_tags = ("number", "unicode", "color")
|