diff --git a/game/gui/creamy_pumpkin_pie/book/book_vslider.png b/game/gui/creamy_pumpkin_pie/book/book_vslider.png new file mode 100644 index 00000000..ecd28e64 --- /dev/null +++ b/game/gui/creamy_pumpkin_pie/book/book_vslider.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6489bdc49ae8d403de667dc8d4d6e5a1f16f68e192384eb1a502a780895a457 +size 33237 diff --git a/game/gui/creamy_pumpkin_pie/book/book_vslider_thumb.png b/game/gui/creamy_pumpkin_pie/book/book_vslider_thumb.png new file mode 100644 index 00000000..0b52ba36 --- /dev/null +++ b/game/gui/creamy_pumpkin_pie/book/book_vslider_thumb.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d56c8082b26942782640877d7cfa798e4bee45fa60d93d9ac1812c178773dfb2 +size 7891 diff --git a/game/scripts/gui/_styles_.rpy b/game/scripts/gui/_styles_.rpy index ef2e4952..bf9414b4 100644 --- a/game/scripts/gui/_styles_.rpy +++ b/game/scripts/gui/_styles_.rpy @@ -57,6 +57,9 @@ style bar: ysize gui.scrollbar_size base_bar Frame("scrollbar_horizontal_[prefix_]bar", gui.slider_borders, tile=gui.slider_tile) thumb Frame("scrollbar_horizontal_[prefix_]thumb", gui.slider_borders, tile=gui.slider_tile) + hover_sound "sounds/qubodup-hover1.ogg" + activate_sound "sounds/qubodup-click2.ogg" + mouse "button" # style vbar: # unscrollable gui.unscrollable @@ -69,12 +72,18 @@ style scrollbar: ysize gui.scrollbar_size base_bar Frame("scrollbar_horizontal_[prefix_]bar", gui.slider_borders, tile=gui.slider_tile) thumb Frame("scrollbar_horizontal_[prefix_]thumb", gui.slider_borders, tile=gui.slider_tile) + hover_sound "sounds/qubodup-hover1.ogg" + activate_sound "sounds/qubodup-click2.ogg" + mouse "button" style vscrollbar: unscrollable gui.unscrollable xsize gui.scrollbar_size base_bar Frame("scrollbar_vertical_[prefix_]bar", gui.slider_borders, tile=gui.slider_tile) thumb Frame("scrollbar_vertical_[prefix_]thumb", gui.slider_borders, tile=gui.slider_tile) + hover_sound "sounds/qubodup-hover1.ogg" + activate_sound "sounds/qubodup-click2.ogg" + mouse "button" # style dark_vscrollbar: # unscrollable gui.unscrollable diff --git a/game/scripts/gui/credits.rpy b/game/scripts/gui/credits.rpy index 24fb1ae1..ca1018ef 100644 --- a/game/scripts/gui/credits.rpy +++ b/game/scripts/gui/credits.rpy @@ -101,7 +101,7 @@ define credits = credits.convert(_(f"""{{image=game_logo}}{{vspace=10}} - MedicBear - perniciousducks -### Mirror of Erised +### Mirror of Erised ### Content Creators - Livvypoo - NotTera @@ -227,9 +227,9 @@ define credits = credits.convert(_(f"""{{image=game_logo}}{{vspace=10}} {{image=engine_logo}} ### Ren'Py Engine v[renpy.version_only] -- [renpy.license!t]{{vspace=300}} - -# Thank you for playing!{{vspace=300}} +- [renpy.license!t] +{{vspace=400}} +# Thank you for playing!{{vspace=400}} """)) style credits_header1: @@ -283,7 +283,7 @@ transform credits_scroll(duration): parallel: linear (duration - 1) ypos (config.screen_height) pause 7 - + linear 1.0 alpha 0.0 transform credits_fade_image(start, duration): @@ -299,7 +299,7 @@ screen credits(): modal True predict False style_prefix "credits" - + default duration = 180 default pauses = 13 @@ -325,4 +325,4 @@ screen credits(): use player((0.025, 0.88)) - timer duration+pauses action [Hide("credits"), Function(achievements.unlock, "Credits")] \ No newline at end of file + timer duration+pauses action [Hide("credits"), Function(achievements.unlock, "Credits")] diff --git a/game/scripts/gui/history.rpy b/game/scripts/gui/history.rpy index ba3a28de..edce4b2f 100644 --- a/game/scripts/gui/history.rpy +++ b/game/scripts/gui/history.rpy @@ -1,20 +1,76 @@ -# -# History screen -# -# This is a screen that displays the dialogue history to the player. While -# there isn't anything special about this screen, it does have to access the -# dialogue history stored in _history_list. -# -# https://www.renpy.org/doc/html/history.html - init offset = -1 screen history(): + layer "interface" + predict False - tag menu + 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 + # predict False # use game_menu(_("History"), scroll=("vpgrid" if gui.history_height else "viewport"), yinitial=1.0): @@ -58,40 +114,4 @@ screen history(): # if not _history_list: # label _("The dialogue history is empty.") - -# Tags that are allowed to be displayed on the history screen -define gui.history_allow_tags = ("number", "heart", "unicode") - -# Height of a history screen entry, or None for variable height at the cost of performance -define gui.history_height = None #117 - -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: - color "#402313" - -style history_window is empty: - xfill True - ysize gui.history_height - padding (0,6) - -style history_name: - align (0.1, 0.5) - size 22 - -style history_name_text: - text_align 1.0 - -style history_text: - text_align 0.0 - -style history_label: - xfill True - -style history_label_text: - xalign 0.5 +define gui.history_allow_tags = ("number", "unicode", "color") diff --git a/game/scripts/gui/navigation.rpy b/game/scripts/gui/navigation.rpy index ad8ab25e..91c70988 100644 --- a/game/scripts/gui/navigation.rpy +++ b/game/scripts/gui/navigation.rpy @@ -174,6 +174,8 @@ screen navigation(): default page_right_atl = None default page_left_atl = None + on "show" action Play("sound", "sounds/bookopen.ogg") + add last_frame at navigation_last_frame_atl # add "gui_fade_both" at gui_fade @@ -194,8 +196,9 @@ screen navigation(): textbutton _("Settings") action [SetLocalVariable("subcategory", "general"), SetLocalVariable("category", "settings")] at navigation_tabs textbutton _("Main Menu") action MainMenu() at navigation_tabs null height 35 - textbutton _("Return") action [SetScreenVariable("navigation_last_frame_atl", navigation_last_frame_hide), SetScreenVariable("navigation_atl", navigation_hide), SetScreenVariable("navigation_exit", True)] keysym "game_menu" at navigation_tabs + textbutton _("Return") action [SetScreenVariable("navigation_last_frame_atl", navigation_last_frame_hide), SetScreenVariable("navigation_atl", navigation_hide), SetScreenVariable("navigation_exit", True)] keysym "game_menu" activate_sound "sounds/bookclose.ogg" at navigation_tabs null height 35 + textbutton _("History") action [SetLocalVariable("subcategory", None), SetLocalVariable("category", "history")] selected (category=="history") at navigation_tabs textbutton _("Credits") action Show("credits") at navigation_tabs if category == "save": @@ -241,6 +244,8 @@ screen navigation(): use settings_display elif subcategory == "general": use settings_general + elif category == "history": + use history transform navigation_tabs: subpixel True @@ -315,6 +320,7 @@ style navigation_tabs_button: background Frame(Image("gui/creamy_pumpkin_pie/book/book_tab.png", oversample=4), 0, 0, 80, 0, tile=False) selected_background Frame(Transform(Image("gui/creamy_pumpkin_pie/book/book_tab.png", oversample=4), matrixcolor=HueMatrix(180.0)), 0, 0, 80, 0, tile=False) insensitive_background Frame(Transform(Image("gui/creamy_pumpkin_pie/book/book_tab.png", oversample=4), matrixcolor=SaturationMatrix(0.0)), 0, 0, 80, 0, tile=False) + activate_sound "sounds/pageflip.ogg" style navigation_tabs_button_text is who: color "#ffffff" @@ -340,6 +346,7 @@ style navigation_subtabs_button: background Frame(Transform(Image("gui/creamy_pumpkin_pie/book/book_tab.png", oversample=4), xzoom=-1), 80, 0, 0, 0, tile=False) selected_background Frame(Transform(Image("gui/creamy_pumpkin_pie/book/book_tab.png", oversample=4), xzoom=-1, matrixcolor=HueMatrix(180.0)), 80, 0, 0, 0, tile=False) insensitive_background Frame(Transform(Image("gui/creamy_pumpkin_pie/book/book_tab.png", oversample=4), xzoom=-1, matrixcolor=SaturationMatrix(0.0)), 80, 0, 0, 0, tile=False) + activate_sound "sounds/pageflip.ogg" style navigation_subtabs_button_text is navigation_tabs_button_text: selected_xoffset -15 @@ -412,7 +419,7 @@ style navigation_radio_button_text is navigation_text: first_indent 24 insensitive_color "#704F3280" -style navigation_slider is empty: +style navigation_slider: xalign 0.5 xmaximum 300 ysize 20 @@ -421,14 +428,22 @@ style navigation_slider is empty: thumb Image("gui/creamy_pumpkin_pie/book/book_slider_thumb.png", oversample=4) thumb_offset 16 -style navigation_bar is empty: +style navigation_vscrollbar: + xalign 0.5 + xsize 20 + base_bar Frame(Image("gui/creamy_pumpkin_pie/book/book_vslider.png", oversample=4), 8, 40, 8, 40, tile=False) + thumb Image("gui/creamy_pumpkin_pie/book/book_vslider_thumb.png", oversample=4) + thumb_offset 1 + +style navigation_bar: xalign 0.5 xmaximum 300 ysize 20 - left_bar Frame(Image("gui/creamy_pumpkin_pie/book/book_bar_full.png", oversample=4), tile=False) - right_bar Frame(Image("gui/creamy_pumpkin_pie/book/book_bar_empty.png", oversample=4), tile=False) - hover_right_bar Fixed(Frame(Image("gui/creamy_pumpkin_pie/book/book_select.png", oversample=4), 20, 4, 20, 4, tile=False), Frame(Image("gui/creamy_pumpkin_pie/book/book_bar_empty.png", oversample=4), tile=False)) - hover_left_bar Fixed(Frame(Image("gui/creamy_pumpkin_pie/book/book_select.png", oversample=4), 20, 4, 20, 4, tile=False), Frame(Image("gui/creamy_pumpkin_pie/book/book_bar_full.png", oversample=4), tile=False)) + left_bar Frame(Image("gui/creamy_pumpkin_pie/book/book_bar_full.png", oversample=4), 40, 8, 40, 8, tile=False) + right_bar Frame(Image("gui/creamy_pumpkin_pie/book/book_bar_empty.png", oversample=4), 40, 8, 40, 8, tile=False) + hover_right_bar Fixed(Frame(Image("gui/creamy_pumpkin_pie/book/book_select.png", oversample=4), 20, 4, 20, 4, tile=False), Frame(Image("gui/creamy_pumpkin_pie/book/book_bar_empty.png", oversample=4), 40, 8, 40, 8, tile=False)) + hover_left_bar Fixed(Frame(Image("gui/creamy_pumpkin_pie/book/book_select.png", oversample=4), 20, 4, 20, 4, tile=False), Frame(Image("gui/creamy_pumpkin_pie/book/book_bar_full.png", oversample=4), 40, 8, 40, 8, tile=False)) + thumb None style navigation_note: padding (6, 4) @@ -440,4 +455,4 @@ image doodle_letter = Image("gui/creamy_pumpkin_pie/book/book_doodles_letter.png image doodle_owl = Image("gui/creamy_pumpkin_pie/book/book_doodles_owl.png", oversample=4) image doodle_panties = Image("gui/creamy_pumpkin_pie/book/book_doodles_panties.png", oversample=4) image doodle_snitch = Image("gui/creamy_pumpkin_pie/book/book_doodles_snitch.png", oversample=4) -image doodle_glasses = Image("gui/creamy_pumpkin_pie/book/book_doodles_glasses.png", oversample=4) \ No newline at end of file +image doodle_glasses = Image("gui/creamy_pumpkin_pie/book/book_doodles_glasses.png", oversample=4) diff --git a/game/scripts/gui/settings.rpy b/game/scripts/gui/settings.rpy index 7689aa82..a1bf86d5 100644 --- a/game/scripts/gui/settings.rpy +++ b/game/scripts/gui/settings.rpy @@ -14,7 +14,7 @@ screen settings_general(): textbutton _("System Cursor") action Preference("system cursor", "toggle") textbutton _("Autosaves") action ToggleField(store, "_autosave") textbutton _("Automatic Update Checks") action settings.Toggle("updates") - textbutton _("Kinetic Text") action settings.Toggle("kinetictext") + textbutton _("Kinetic Text") action settings.Toggle("kinetictext") tooltip "{bounce}Kinetic Text Example.{/bounce}" text _("Skipping") textbutton _("Skip Unseen Text") action Preference("skip", "toggle") @@ -27,7 +27,7 @@ screen settings_general(): bar value Preference("auto-forward time") style "navigation_bar" textbutton _("Power-saving") action Preference("gl powersave", "toggle") - textbutton _("multithreading") action settings.Toggle("multithreading") tooltip "Improves performance by executing tasks asynchronously. (Requires restart)" + textbutton _("multithreading") action settings.Toggle("multithreading") tooltip "Improves performance by executing tasks asynchronously. (Requires restart)" frame style "navigation_page_right": if settings.get("tooltip"): add "doodle_hermione" align (0.5, 0.5) diff --git a/game/scripts/utility/text_tags.rpy b/game/scripts/utility/text_tags.rpy index 18a98c03..f2698ad9 100644 --- a/game/scripts/utility/text_tags.rpy +++ b/game/scripts/utility/text_tags.rpy @@ -28,6 +28,11 @@ init python: return kwargs + @renpy.pure + def text_tag_icon(tag, argument): + """Insert a unicode heart symbol. Usage {heart}""" + return [(renpy.TEXT_DISPLAYABLE, Transform(argument, xysize=(32, 32)))] + @renpy.pure def text_tag_unicode(tag, argument, contents): """Render contents using a font that supports all/most Unicode characters. Usage {unicode}☺{/unicode}""" @@ -273,6 +278,7 @@ define config.custom_text_tags = { } define config.self_closing_custom_text_tags = { + "icon": text_tag_icon, "heart": text_tag_heart, "hearts": text_tag_hearts, "number": text_tag_number,