diff --git a/gui.rpy b/gui.rpy index 4a5022a..4138dcf 100644 --- a/gui.rpy +++ b/gui.rpy @@ -87,7 +87,7 @@ define gui.title_text_size = 50 ## Main and Game Menus ######################################################### ## The images used for the main and game menus. -define gui.main_menu_background = "gui/mainmenu.png" +define gui.main_menu_background = "gui/main_menu.png" define gui.game_menu_background = "gui/game_menu.png" diff --git a/gui.rpyc b/gui.rpyc index 3cb1677..613f3ad 100644 Binary files a/gui.rpyc and b/gui.rpyc differ diff --git a/gui/main_menu.png b/gui/main_menu.png new file mode 100644 index 0000000..0ac5ac7 Binary files /dev/null and b/gui/main_menu.png differ diff --git a/gui/mainmenu.png b/gui/mainmenu.png deleted file mode 100644 index 8edaaac..0000000 Binary files a/gui/mainmenu.png and /dev/null differ diff --git a/gui/quick_button.png b/gui/quick_button.png index c55c5a4..4a4c957 100644 Binary files a/gui/quick_button.png and b/gui/quick_button.png differ diff --git a/gui/quick_button_nvl.png b/gui/quick_button_nvl.png deleted file mode 100644 index 4a4c957..0000000 Binary files a/gui/quick_button_nvl.png and /dev/null differ diff --git a/screens.rpy b/screens.rpy index 549979f..bbfe804 100644 --- a/screens.rpy +++ b/screens.rpy @@ -257,60 +257,33 @@ screen quick_menu(): if mode == "nvl": style "quick_menu_nvl" - - frame: - background Frame("gui/quick_button_nvl.png", 6, 6, 6, 6) - padding (10, 3, 10, 8) - - textbutton _("Back") action Rollback() - - frame: - background Frame("gui/quick_button_nvl.png", 6, 6, 6, 6) - padding (10, 3, 10, 8) - - textbutton _("History") action ShowMenu('history') - - frame: - background Frame("gui/quick_button_nvl.png", 6, 6, 6, 6) - padding (10, 3, 10, 8) - - textbutton _("Skip") action Skip() alternate Skip(fast=True, confirm=True) - - frame: - background Frame("gui/quick_button_nvl.png", 6, 6, 6, 6) - padding (10, 3, 10, 8) - - textbutton _("Auto") action Preference("auto-forward", "toggle") if mode == "say": style "quick_menu" - frame: - background Frame("gui/quick_button.png", 9, 9, 8, 8) - padding (10, 6, 10, 8) + frame: + background Frame("gui/quick_button.png", 6, 6, 6, 6) + padding (10, 3, 10, 8) - textbutton _("Back") action Rollback() + textbutton _("BACK") action Rollback() - frame: - background Frame("gui/quick_button.png", 9, 9, 8, 8) - padding (10, 6, 10, 8) + frame: + background Frame("gui/quick_button.png", 6, 6, 6, 6) + padding (10, 3, 10, 8) - textbutton _("History") action ShowMenu('history') + textbutton _("HISTORY") action ShowMenu('history') - frame: - background Frame("gui/quick_button.png", 9, 9, 8, 8) - padding (10, 6, 10, 8) + frame: + background Frame("gui/quick_button.png", 6, 6, 6, 6) + padding (10, 3, 10, 8) - textbutton _("Skip") action Skip() alternate Skip(fast=True, confirm=True) + textbutton _("SKIP") action Skip() alternate Skip(fast=True, confirm=True) - frame: - background Frame("gui/quick_button.png", 9, 9, 8, 8) - padding (10, 6, 10, 8) + frame: + background Frame("gui/quick_button.png", 6, 6, 6, 6) + padding (10, 3, 10, 8) - textbutton _("Auto") action Preference("auto-forward", "toggle") - - - + textbutton _("AUTO") action Preference("auto-forward", "toggle") # textbutton _("Save") action ShowMenu('save') # textbutton _("Q.Save") action QuickSave() # textbutton _("Q.Load") action QuickLoad() @@ -329,8 +302,12 @@ style quick_button is default style quick_button_text is button_text style quick_menu: - xalign 1.0 - yalign 1.0 + # hacky way to make them not show up for now but i dont really gaf. its easier than any of the other implementations ive played with so far + + xpos 50000 + ypos 50000 + # xalign 0.5 + # yalign 1.0 style quick_menu_nvl: xalign 0.92 @@ -422,34 +399,25 @@ screen main_menu(): add gui.main_menu_background - vbox: - # style_prefix "navigation" + ## This empty frame darkens the main menu. + frame: + style "main_menu_frame" - # xpos gui.navigation_xpos - xalign 0.19 - yalign 0.42 + ## The use statement includes another screen inside this one. The actual + ## contents of the main menu are in the navigation screen. + use navigation - spacing 1 + if gui.show_name: + + vbox: + style "main_menu_vbox" + + text "[config.name!t]": + style "main_menu_title" + + text "[config.version]": + style "main_menu_version" - textbutton _("Start"): - text_size 30 - xalign 0.5 - action Start() - textbutton _("Load"): - text_size 30 - xalign 0.5 - action ShowMenu("load") - textbutton _("Options"): - text_size 30 - xalign 0.5 - action ShowMenu("preferences") - textbutton _("Quit"): - text_size 30 - xalign 0.5 - action Quit(confirm=not main_menu) - - # textbutton _("About") action ShowMenu("about") - # textbutton _("Help") action ShowMenu("help") style main_menu_frame is empty style main_menu_vbox is vbox @@ -457,6 +425,12 @@ style main_menu_text is gui_text style main_menu_title is main_menu_text style main_menu_version is main_menu_text +style main_menu_frame: + xsize 280 + yfill True + + background "gui/overlay/main_menu.png" + style main_menu_vbox: xalign 1.0 xoffset -20 @@ -1480,4 +1454,210 @@ style nvl_button: xanchor gui.nvl_button_xalign style nvl_button_text: - properties gui.text_properties("nvl_button") \ No newline at end of file + properties gui.text_properties("nvl_button") + + +## Bubble screen ############################################################### +## +## The bubble screen is used to display dialogue to the player when using speech +## bubbles. The bubble screen takes the same parameters as the say screen, must +## create a displayable with the id of "what", and can create displayables with +## the "namebox", "who", and "window" ids. +## +## https://www.renpy.org/doc/html/bubble.html#bubble-screen + +screen bubble(who, what): + style_prefix "bubble" + + window: + id "window" + + if who is not None: + + window: + id "namebox" + style "bubble_namebox" + + text who: + id "who" + + text what: + id "what" + + default ctc = None + showif ctc: + add ctc + +style bubble_window is empty +style bubble_namebox is empty +style bubble_who is default +style bubble_what is default + +style bubble_window: + xpadding 30 + top_padding 5 + bottom_padding 5 + +style bubble_namebox: + xalign 0.5 + +style bubble_who: + xalign 0.5 + textalign 0.5 + color "#000" + +style bubble_what: + align (0.5, 0.5) + text_align 0.5 + layout "subtitle" + color "#000" + +define bubble.frame = Frame("gui/bubble.png", 55, 55, 55, 95) +define bubble.thoughtframe = Frame("gui/thoughtbubble.png", 55, 55, 55, 55) + +define bubble.properties = { + "bottom_left" : { + "window_background" : Transform(bubble.frame, xzoom=1, yzoom=1), + "window_bottom_padding" : 27, + }, + + "bottom_right" : { + "window_background" : Transform(bubble.frame, xzoom=-1, yzoom=1), + "window_bottom_padding" : 27, + }, + + "top_left" : { + "window_background" : Transform(bubble.frame, xzoom=1, yzoom=-1), + "window_top_padding" : 27, + }, + + "top_right" : { + "window_background" : Transform(bubble.frame, xzoom=-1, yzoom=-1), + "window_top_padding" : 27, + }, + + "thought" : { + "window_background" : bubble.thoughtframe, + } +} + +define bubble.expand_area = { + "bottom_left" : (0, 0, 0, 22), + "bottom_right" : (0, 0, 0, 22), + "top_left" : (0, 22, 0, 0), + "top_right" : (0, 22, 0, 0), + "thought" : (0, 0, 0, 0), +} + + + +################################################################################ +## Mobile Variants +################################################################################ + +style pref_vbox: + variant "medium" + xsize 450 + +## Since a mouse may not be present, we replace the quick menu with a version +## that uses fewer and bigger buttons that are easier to touch. +screen quick_menu(): + variant "touch" + + zorder 100 + + if quick_menu: + + hbox: + style "quick_menu" + style_prefix "quick" + + textbutton _("Back") action Rollback() + textbutton _("Skip") action Skip() alternate Skip(fast=True, confirm=True) + textbutton _("Auto") action Preference("auto-forward", "toggle") + textbutton _("Menu") action ShowMenu() + + +style window: + variant "small" + background "gui/phone/textbox.png" + +style radio_button: + variant "small" + foreground "gui/phone/button/radio_[prefix_]foreground.png" + +style check_button: + variant "small" + foreground "gui/phone/button/check_[prefix_]foreground.png" + +style nvl_window: + variant "small" + background "gui/phone/nvl.png" + +style main_menu_frame: + variant "small" + background "gui/phone/overlay/main_menu.png" + +style game_menu_outer_frame: + variant "small" + background "gui/phone/overlay/game_menu.png" + +style game_menu_navigation_frame: + variant "small" + xsize 340 + +style game_menu_content_frame: + variant "small" + top_margin 0 + +style game_menu_viewport: + variant "small" + xsize 870 + +style pref_vbox: + variant "small" + xsize 400 + +style bar: + variant "small" + ysize gui.bar_size + left_bar Frame("gui/phone/bar/left.png", gui.bar_borders, tile=gui.bar_tile) + right_bar Frame("gui/phone/bar/right.png", gui.bar_borders, tile=gui.bar_tile) + +style vbar: + variant "small" + xsize gui.bar_size + top_bar Frame("gui/phone/bar/top.png", gui.vbar_borders, tile=gui.bar_tile) + bottom_bar Frame("gui/phone/bar/bottom.png", gui.vbar_borders, tile=gui.bar_tile) + +style scrollbar: + variant "small" + ysize gui.scrollbar_size + base_bar Frame("gui/phone/scrollbar/horizontal_[prefix_]bar.png", gui.scrollbar_borders, tile=gui.scrollbar_tile) + thumb Frame("gui/phone/scrollbar/horizontal_[prefix_]thumb.png", gui.scrollbar_borders, tile=gui.scrollbar_tile) + +style vscrollbar: + variant "small" + xsize gui.scrollbar_size + base_bar Frame("gui/phone/scrollbar/vertical_[prefix_]bar.png", gui.vscrollbar_borders, tile=gui.scrollbar_tile) + thumb Frame("gui/phone/scrollbar/vertical_[prefix_]thumb.png", gui.vscrollbar_borders, tile=gui.scrollbar_tile) + +style slider: + variant "small" + ysize gui.slider_size + base_bar Frame("gui/phone/slider/horizontal_[prefix_]bar.png", gui.slider_borders, tile=gui.slider_tile) + thumb "gui/phone/slider/horizontal_[prefix_]thumb.png" + +style vslider: + variant "small" + xsize gui.slider_size + base_bar Frame("gui/phone/slider/vertical_[prefix_]bar.png", gui.vslider_borders, tile=gui.slider_tile) + thumb "gui/phone/slider/vertical_[prefix_]thumb.png" + +style slider_vbox: + variant "small" + xsize None + +style slider_slider: + variant "small" + xsize 600 diff --git a/screens.rpyc b/screens.rpyc index aaf7879..4fea07d 100644 Binary files a/screens.rpyc and b/screens.rpyc differ