diff --git a/game/gui/creamy_pumpkin_pie/window_frame.png b/game/gui/creamy_pumpkin_pie/window_frame.png new file mode 100644 index 00000000..2a726890 --- /dev/null +++ b/game/gui/creamy_pumpkin_pie/window_frame.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b030e54ac04126438cbd0357c1dfeb98343c082c607aac59ddae6aab5d648479 +size 154990 diff --git a/game/scripts/gui/_images_.rpy b/game/scripts/gui/_images_.rpy index 39ddc9e9..e792c4b8 100644 --- a/game/scripts/gui/_images_.rpy +++ b/game/scripts/gui/_images_.rpy @@ -2,9 +2,6 @@ # GUI images # -image gui_fade: - Solid("#00000080") - image game_menu: contains: zoom 0.5 diff --git a/game/scripts/gui/frame.rpy b/game/scripts/gui/frame.rpy new file mode 100644 index 00000000..53efbe96 --- /dev/null +++ b/game/scripts/gui/frame.rpy @@ -0,0 +1,82 @@ +label modal_popup(title, entry, img=None, confirm="Okay"): + $ disable_game_menu() + play sound "sounds/pop01.ogg" + call screen modal_popup(title, entry, img, confirm) + $ enable_game_menu() + return + +screen modal_popup(title, entry, img=None, confirm="Okay", xysize=(600, 350)): + modal True + layer "interface" + zorder 5 + style_prefix "frame" + + default img = img and renpy.loadable(img) + + add "gui_fade_both" at gui_fade + + frame: + at gui_modal_popup + xysize xysize + label title + + vbox: + ypos 20 + + add img xalign 0.5 + + text entry + + textbutton confirm align (1.0, 1.0) action Return(True) + +transform gui_fade: + + on show: + alpha 0.0 + easein 1.0 alpha 1.0 + on hide: + easeout 0.5 alpha 0.0 + +transform gui_modal_popup: + subpixel True + + on show: + zoom 0.0 + alpha 0.0 + easein_back 0.5 zoom 1.0 alpha 1.0 + on hide: + easeout_back 0.4 zoom 0.0 alpha 0.0 + +image gui_fade_both = Fixed(Frame(Image("gui/creamy_pumpkin_pie/fade_top.png", oversample=4)), Frame(Image("gui/creamy_pumpkin_pie/fade_bottom.png", oversample=4))) + +style frame is empty: + align (0.5, 0.5) + fit_first True + xfill False + yfill False + padding (50, 10) + # background Frame(Image("gui/creamy_pumpkin_pie/window_bottom.png", oversample=4), 8, 8, 8, 75, tile=False) + background Frame(Image("gui/creamy_pumpkin_pie/window_frame.png", oversample=4), 50, 100, 50, 75, tile=False) + +style frame_vbox: + xalign 0.5 + first_spacing 0 + yspacing 5 + fit_first True + xfill False + yfill False + +style frame_label: + xalign 0.5 + yoffset -8 + +style frame_label_text is who: + size 24 + color "#fff" + outlines [(2, "#000000", 1, 1)] + +style frame_text is what: + color "#fff" + outlines [(1, "#000000", 1, 1)] + hinting "bytecode" + size 12 \ No newline at end of file diff --git a/game/scripts/gui/misc.rpy b/game/scripts/gui/misc.rpy index 54316b16..e0fe9d22 100644 --- a/game/scripts/gui/misc.rpy +++ b/game/scripts/gui/misc.rpy @@ -13,51 +13,28 @@ init offset = -1 screen confirm(message, yes_action=Return(True), no_action=Return(False)): modal True + layer "interface" + zorder 5 + style_prefix "frame" - zorder 200 - - style_prefix gui.theme() - - add "gui_fade" + add "gui_fade_both" at gui_fade frame: - padding (34, 34, 34, 34) - xalign 0.5 - yalign 0.5 + at gui_modal_popup + xysize (500, 250) vbox: - spacing 25 + ypos 20 - if isinstance(message, str): - text "[message!t]": - xalign 0.5 - text_align 0.5 - else: - text message: - xalign 0.5 - text_align 0.5 + text message hbox: - xalign 0.5 - spacing 84 - textbutton _("Yes") action yes_action textbutton _("No") action no_action ## Right-click and escape answer "no". key "game_menu" action no_action -style confirm_frame is gui_frame: - padding (34, 34, 34, 34) - xalign 0.5 - yalign 0.5 - -style dark_confirm_frame is dark_gui_frame: - take confirm_frame - -style light_confirm_frame is light_gui_frame: - take confirm_frame - # Skip indicator screen # # The skip_indicator screen is displayed to indicate that skipping is in diff --git a/game/scripts/interface/popup.rpy b/game/scripts/interface/popup.rpy index 03c872b9..b20ac81e 100644 --- a/game/scripts/interface/popup.rpy +++ b/game/scripts/interface/popup.rpy @@ -32,38 +32,3 @@ label give_reward(text=_("You found something!"), gift="interface/icons/box_blue with d3 return - -label modal_popup(title, entry, img=None, confirm="Ok"): - $ disable_game_menu() - play sound "sounds/pop01.ogg" - call screen modal_popup(title, entry, img, confirm) - $ enable_game_menu() - return - -screen modal_popup(title, entry, img, confirm): - modal True - - add "gui_fade" - - frame: - style_prefix gui.theme() - xsize 518 - align (0.5, 0.5) - padding (12 + 6, 6, 12 + 6, 12 + 6) - - vbox: - spacing 12 - first_spacing 0 - - fixed: - ysize 24 - add gui.format("interface/achievements/{}/highlight.webp") xalign 0.5 - add gui.format("interface/achievements/{}/spacer.webp") align (0.5, 1.0) - text title size 16 xalign 0.5 yalign 0.5 - - if img and renpy.loadable(img): - add img xalign 0.5 - - text entry size 12 - - textbutton confirm align (1.0, 1.0) action Return(True) diff --git a/game/scripts/interface/tutorials.rpy b/game/scripts/interface/tutorials.rpy index 58279a1b..e21bc171 100644 --- a/game/scripts/interface/tutorials.rpy +++ b/game/scripts/interface/tutorials.rpy @@ -20,47 +20,11 @@ init python: return tutorial_dict[entry][2] label tutorial(entry): - if not tutorial_dict[entry][2] and settings.get('tutorials'): + if not tutorial_is_done(entry): $ tutorial_dict[entry][2] = True play sound "sounds/pop01.ogg" $ renpy.music.set_volume(0.5, 3.0) - $ gui.in_context("tutorial.display", entry) + call screen modal_popup(tutorial_dict[entry][0], tutorial_dict[entry][1], f"interface/tutorials/{entry}.webp", "Okay") $ renpy.music.set_volume(1.0, 3.0) $ enable_game_menu() - return - - label .display(entry): - call screen tutorial(entry) - return - -screen tutorial(entry): - modal True - layer "interface" - zorder 5 - - add "gui_fade" - - frame: - style_prefix gui.theme() - xsize 518 - align (0.5, 0.5) - padding (12 + 6, 6, 12 + 6, 12 + 6) - - vbox: - spacing 12 - first_spacing 0 - - fixed: - ysize 24 - add gui.format("interface/achievements/{}/highlight.webp") xalign 0.5 - add gui.format("interface/achievements/{}/spacer.webp") align (0.5, 1.0) - text "Tutorial" size 10 yalign 0.5 - text tutorial_dict[entry][0] size 16 xalign 0.5 yalign 0.5 - - $ formated = f"interface/tutorials/{entry}.webp" - if renpy.loadable(formated): - add formated xalign 0.5 - - text tutorial_dict[entry][1] size 12 - - textbutton "Ok" align (1.0, 1.0) action Return(True) + return \ No newline at end of file