diff --git a/game/scripts/gui/frame.rpy b/game/scripts/gui/frame.rpy index 52aa4e32..7bb6fb80 100644 --- a/game/scripts/gui/frame.rpy +++ b/game/scripts/gui/frame.rpy @@ -110,3 +110,4 @@ style frame_button_text is choice_text: insensitive_color "#888" image frame_spacer = Image("gui/creamy_pumpkin_pie/window_frame_spacer.png", oversample=4) +image frame_spacer_book = Image("gui/creamy_pumpkin_pie/book/book_spacer.png", oversample=4) diff --git a/game/scripts/gui/help.rpy b/game/scripts/gui/help.rpy index 906bdc13..f5b97364 100644 --- a/game/scripts/gui/help.rpy +++ b/game/scripts/gui/help.rpy @@ -142,120 +142,3 @@ style help_label_text is navigation_text: style help_text is navigation_text: size 16 first_indent 10 - -# screen controls_help(): - -# hbox: -# label _("Interaction") -# text _("Space, Enter or Left Mouse Button") - -# hbox: -# label _("Navigate Interface") -# text _("Arrow keys or mouse") - -# hbox: -# label _("Cancel/Menu") -# text _("Escape or Right Mouse Button") - -# hbox: -# label _("Skipping") -# text _("Ctrl") - -# hbox: -# label _("Toggle Skipping") -# text _("Tab") - -# hbox: -# label _("Roll Back") -# text _("Page Up or Mouse Wheel Up") - -# hbox: -# label _("Roll Forward") -# text _("Page Down or Mouse Wheel Down") - -# hbox: -# label "Hide Interface" -# text _("H or Middle Mouse Button") - -# hbox: -# label "Screenshot" -# text _("Print Screen") - -# hbox: -# label "Sleep" -# text _("s") - -# hbox: -# label "Map" -# text _("m") - -# hbox: -# label "Stats" -# text _("c") - -# hbox: -# label "Inventory" -# text _("i") - -# hbox: -# label "Fap-Fap-Fap" -# text _("f") - -# hbox: -# label "Highlight Interactive Objects" -# text _("Space") - -# screen gamepad_help(): - -# hbox: -# label _("Right Trigger\nA/Bottom Button") -# text _("Advances dialogue and activates the interface.") - -# hbox: -# label _("Left Trigger\nLeft Shoulder") -# text _("Rolls back to earlier dialogue.") - -# hbox: -# label _("Right Shoulder") -# text _("Rolls forward to later dialogue.") - - -# hbox: -# label _("D-Pad, Sticks") -# text _("Navigate the interface.") - -# hbox: -# label _("Start, Guide") -# text _("Accesses the game menu.") - -# hbox: -# label _("Y/Top Button") -# text _("Hides the user interface.") - -# textbutton _("Calibrate") action GamepadCalibrate() - -# screen about_help(): -# vbox: -# spacing gui.pref_spacing - -# if gui.about: -# text "[gui.about!t]\n" - -# text _("Made with {a=https://www.renpy.org/}Ren'Py{/a} [renpy.version_only].\n\n[renpy.license!t]") size 12 - -# style help_button is gui_button: -# background None -# xmargin 7 - -# style help_button_text is gui_button_text - -# style help_label is gui_label: -# xsize 209 -# right_padding 17 - -# style help_label_text is gui_label_text: -# xalign 1.0 -# text_align 1.0 -# outlines [(2, "#000", 0, 0)] - -# style help_text is gui_text diff --git a/game/scripts/gui/mods.rpy b/game/scripts/gui/mods.rpy index a8bf266d..58f3febf 100644 --- a/game/scripts/gui/mods.rpy +++ b/game/scripts/gui/mods.rpy @@ -2,115 +2,72 @@ init offset = -1 screen mods(): - tag menu + default selection = next(iter(mods_list.keys())) + default mods_enabled_now = set(persistent.mods_enabled) + $ awaits_restart = bool(mods_enabled_now != persistent.mods_enabled) - # use game_menu("Mods"): + frame style "navigation_page_left": + vbox: + label _("Mods") - # default selection = next(iter(mods_list.keys())) - # default checkbox_enabled = gui.theme("check_true") - # default checkbox_disabled = gui.theme("check_false") - # default mods_enabled_now = set(persistent.mods_enabled) - # $ awaits_restart = bool(mods_enabled_now != persistent.mods_enabled) + viewport: + ypos 32 + scrollbars "vertical" + mousewheel True + draggable "touch" + ymaximum 400 + vbox: + for mod in mods_list.values(): + $ name = mod["Name"] + $ desc = mod["Description"] + $ author = mod["Author"] + $ version = mod["Version"] + $ compat = version_float(mod["GameVer"]) + #$ order = mod["LoadOrder"] + $ logo = mod["Logo"] + $ enabled = bool(name in persistent.mods_enabled) + $ selected = (name == selection) - # fixed: + if selected: + $ action = ToggleMod(name) + else: + $ action = SetLocalVariable("selection", name) - # ## The grid of file slots. - # hbox: - # spacing 5 + fixed: + fit_first True + button: + style "navigation_checkbox_button" + hbox: + xpos 29 + add logo xysize (70, 50) + null width 5 + vbox: + yalign 0.5 + text "[name]": + if not compat >= mods_compatible: + color "#ff8000" + text "[version]" + action action + selected enabled + add "frame_spacer_book" xalign 0.5 xsize 300 - # vpgrid: - # cols 1 - # scrollbars "vertical" - # mousewheel True - # draggable True - # pagekeys True - # side_yfill True - # spacing gui.slot_spacing + frame style "navigation_page_right": + $ name = mods_list[selection]["Name"] + $ desc = mods_list[selection]["Description"] + $ author = mods_list[selection]["Author"] + $ version = mods_list[selection]["Version"] + $ compat = version_float(mods_list[selection]["GameVer"]) + #$ order = mods_list[selection]["LoadOrder"] + $ logo = mods_list[selection]["Logo"] + vbox: + xmaximum 300 + add logo xalign 0.5 size (320, 240) + text "[name]\n[version]" offset (6, 6) - # style_prefix gui.theme("slot") + if not compat >= mods_compatible: + text "{color=#ff8000}[compat]{/color}" align (1.0, 1.0) offset (-6, -3) + else: + text "{color=#228B22}[compat]{/color}" align (1.0, 1.0) offset (-6, -3) - # for mod in mods_list.values(): - # $ name = mod["Name"] - # $ desc = mod["Description"] - # $ author = mod["Author"] - # $ version = mod["Version"] - # $ compat = version_float(mod["GameVer"]) - # #$ order = mod["LoadOrder"] - # $ logo = mod["Logo"] - # $ enabled = bool(name in persistent.mods_enabled) - # $ selected = (name == selection) - - - # if selected: - # $ action = ToggleMod(name) - # else: - # $ action = SetScreenVariable("selection", name) - - # button: - # action action - # selected selected - # sensitive main_menu - - # has fixed - - # add logo pos (0, 0) size (70, 50) - - # vbox: - # xpos config.thumbnail_width - # xsize gui.slot_width - config.thumbnail_width - gui.slot_height - # yalign 0.5 - - # text "[name]": - # style "mods_text" - # size 16 - # if not compat >= mods_compatible: - # color "#ff8000" - - # text "[version]": - # style "mods_text" - - # if enabled: - # add checkbox_enabled align (0.95, 0.5) - # else: - # add checkbox_disabled align (0.95, 0.5) - - # if awaits_restart: - # text "Awaiting game restart to apply changes..." - - # frame: - # style gui.theme("frame") - # xfill True - # ymaximum 400 - - # $ name = mods_list[selection]["Name"] - # $ desc = mods_list[selection]["Description"] - # $ author = mods_list[selection]["Author"] - # $ version = mods_list[selection]["Version"] - # $ compat = version_float(mods_list[selection]["GameVer"]) - # #$ order = mods_list[selection]["LoadOrder"] - # $ logo = mods_list[selection]["Logo"] - - # vbox: - # spacing 3 - # xpos 3 - - # frame: - # style gui.theme("frame") - # xoffset -3 - # ysize 252 - # add logo xalign 0.5 size (320, 240) - # text "[name]\n[version]" offset (6, 6) - - # if not compat >= mods_compatible: - # text "{color=#ff8000}[compat]{/color}" align (1.0, 1.0) offset (-6, -3) - # else: - # text "{color=#228B22}[compat]{/color}" align (1.0, 1.0) offset (-6, -3) - - # text "Author:\n{size=-4}[author]{/size}" size 14 - # text "Description:\n{size=-4}[desc]{/size}" size 14 - -style mods_text is slot_button_text: - selected_color "#000" - -style mods_text_desc: - xalign 0.5 + text "Author:\n{size=-4}[author]{/size}" + text "Description:\n{size=-4}[desc]{/size}" diff --git a/game/scripts/gui/navigation.rpy b/game/scripts/gui/navigation.rpy index 1bade57a..43f4bde7 100644 --- a/game/scripts/gui/navigation.rpy +++ b/game/scripts/gui/navigation.rpy @@ -405,7 +405,6 @@ transform main_menu_background: rotate -12 Fixed(Image("gui/creamy_pumpkin_pie/book/book_note.png", oversample=8), Text("Nice ass!\n{size=+12}👀{/size}", color="#000", size=12, align=(0.5, 0.5), text_align=0.5), fit_first=True) - screen navigation(default_category="save", default_subcategory=None): style_prefix "navigation" @@ -456,6 +455,8 @@ screen navigation(default_category="save", default_subcategory=None): if not main_menu: textbutton _("Main Menu") action MainMenu() at navigation_tabs textbutton _("Credits") action Show("credits") at navigation_tabs + null height 35 + textbutton _("Mods") action [SetLocalVariable("subcategory", None), SetLocalVariable("category", "mods")] selected (category=="mods") sensitive main_menu at navigation_tabs at navigation_tabs_show @@ -554,6 +555,8 @@ screen navigation(default_category="save", default_subcategory=None): use help_tutorials elif subcategory == "controls": use help_controls + elif category == "mods": + use mods transform navigation_tabs: subpixel True diff --git a/game/scripts/minigames/mirror/menu.rpy b/game/scripts/minigames/mirror/menu.rpy index 8c38c1dc..5699e56e 100644 --- a/game/scripts/minigames/mirror/menu.rpy +++ b/game/scripts/minigames/mirror/menu.rpy @@ -1,217 +1,3 @@ -# init python: -# def mirror_sortfilter(item, sortby="A-z", filtering=None): -# if filtering == "Locked": -# item = [x for x in item if x.is_unlocked()] -# elif filtering == "Unlocked": -# item = [x for x in item if x.is_unlocked() is True] - -# # Always sort alphabetically first. -# item = sorted(item, key=lambda x: natsort_key(x.name)) - -# if sortby == "z-A": -# item = sorted(item, key=lambda x: natsort_key(x.name), reverse=True) - -# return item - -# label mirror: -# $ gui.in_context("mirror_menu") -# call screen room_menu - -# label mirror_menu(xx=150, yy=90): - -# python: -# mirror_categories = mirror.get_tags() - -# items_shown = 36 -# current_page = 0 -# current_category = mirror_categories[0] -# current_filter = "Unlocked" -# current_sorting = "A-z" - -# menu_items = mirror_sortfilter(mirror.get_instances_of_tag(current_category), current_sorting, current_filter) -# menu_items_length = len(menu_items) -# current_item = next(iter(menu_items), None) - -# show screen mirror(xx, yy) - -# label .after_init: -# $ renpy.dynamic(__choice = ui.interact()) - -# if __choice[0] == "select": -# $ current_item = __choice[1] -# $ current_item.seen = True -# elif __choice[0] == "category": -# $ current_category = __choice[1] - -# $ menu_items = mirror_sortfilter(mirror.get_instances_of_tag(current_category), current_sorting, current_filter) -# $ menu_items_length = len(menu_items) -# $ current_page = 0 -# $ current_item = next(iter(menu_items), None) -# elif __choice == "inc": -# $ current_page += 1 -# elif __choice == "dec": -# $ current_page += -1 -# elif __choice == "filter": -# if current_filter == "Unlocked": -# $ current_filter = None -# elif current_filter is None: -# $ current_filter = "Unlocked" - -# $ menu_items = mirror_sortfilter(mirror.get_instances_of_tag(current_category), current_sorting, current_filter) -# $ menu_items_length = len(menu_items) -# $ current_page = 0 -# $ current_item = next(iter(menu_items), None) -# elif __choice == "sort": -# if current_sorting == "A-z": -# $ current_sorting = "z-A" -# else: -# $ current_sorting = "A-z" - -# $ menu_items = mirror_sortfilter(mirror.get_instances_of_tag(current_category), current_sorting, current_filter) -# $ menu_items_length = len(menu_items) -# $ current_page = 0 -# $ current_item = next(iter(menu_items), None) -# elif __choice[0] == "play": -# $ __choice[1].play() -# $ renpy.jump_out_of_context("mirror") -# else: -# $ enable_game_menu() -# hide screen mirror -# return - -# jump .after_init - -# screen mirror(xx, yy): -# tag mirror -# zorder 30 -# modal True - -# add "gui_fade_both" - -# if renpy.mobile: -# use close_button_background - -# use close_button - -# fixed: -# if settings.get("animations"): -# at gui_animation -# use mirror_menu(xx, yy) -# use mirror_menuitem(xx, yy) - -# screen mirror_menu(xx, yy): -# window: -# style "empty" -# style_prefix gui.theme('achievements') -# pos (xx, yy) -# xysize (207, 454) - -# use invisible_button() - -# add gui.format("interface/achievements/{}/panel_left.webp") - -# vbox: -# style_prefix gui.theme('achievements_categories') -# pos (6, 41) -# for category in mirror_categories: -# vbox: -# textbutton category: -# selected (current_category == category) -# action Return(["category", category]) - -# add gui.format("interface/achievements/{}/spacer_left.webp") -# vbox: -# style_prefix gui.theme('achievements_filters') -# pos (6, 384) - -# if current_filter is None: -# textbutton "Show: All" action Return("filter") -# else: -# textbutton "Show: [current_filter]" action Return("filter") -# textbutton "Sort by: [current_sorting]" action Return("sort") - -# screen mirror_menuitem(xx, yy): -# window: -# style "empty" -# pos (xx+217, yy-53) -# xysize (560, 507) -# use invisible_button() - -# #add "interface/achievements/star.webp" -# add gui.format("interface/achievements/{}/panel.webp") - -# text "Mirror of Erised" size 22 xalign 0.5 ypos 65 - -# # Add items -# viewport: -# style_prefix gui.theme() -# draggable True -# mousewheel "vertical" -# scrollbars "vertical" -# maximum (512, 290) -# pos (24, 113) -# vbox: -# style_prefix "mirror" -# for ev in menu_items: -# $ authors = ", ".join(ev.authors) -# $ is_unlocked = ev.is_unlocked() -# button: -# ysize 30 -# selected_background Transform(gui.format("interface/achievements/{}/highlight.webp"), ysize=26) -# selected (current_item == ev) -# sensitive is_unlocked -# xfill True -# action Return(["select", ev]) -# if is_unlocked and not ev.seen: -# text "NEW" style "wardrobe_item_caption" align (1.0, 1.0) offset (-5, -5) -# if ev.played: -# add "interface/topbar/icon_check.webp" align (1.0, 1.0) offset (-5, -5) zoom 0.7 -# vbox: -# text ev.name -# text f"By {authors}" size 10 -# add gui.format("interface/achievements/{}/spacer_left.webp") - - -# if menu_items_length <= 0: -# text "Nothing here yet" align (0.5, 0.5) size 24 - -# if current_item: -# frame style "empty": -# xalign 0.5 -# ypos 412 - -# vbox: -# xalign 0.5 -# add gui.format("interface/achievements/{}/highlight.webp") -# add gui.format("interface/achievements/{}/spacer.webp") -# vbox: -# yoffset 6 -# xmaximum 400 -# text "[current_item.desc]" size 12 -# text "Tags:{}".format(", ".join(current_item.tags)) size 10 - -# text "[current_item.name]" xalign 0.5 ypos 3 size 16 - -# textbutton "Play": -# xalign 0.95 -# text_size 16 -# sensitive current_item.is_unlocked() -# action Return(["play", current_item]) - -# style mirror_button is empty - -# style mirror_button_text: -# color "#402313" -# insensitive_color "#40231380" -# hover_color "#FFF" -# outlines [] - -# style mirror_text is mirror_button_text: -# color "#402313" -# insensitive_color "#40231380" -# hover_color "#FFF" -# outlines [] - init python in mirror_of_erised: def select(item): scope = renpy.get_screen("mirror_interface").scope