From 8d50133b79ce6b12c388c2f3b5895f019815bbf8 Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Tue, 14 May 2024 21:54:03 +0100 Subject: [PATCH] New Textbox * Implemented new textbox * Implemented nickname handling for the namebox * Implemented new reworked fonts * Implemented PC parts of the textbox * Recalculated sprite positions, offsets and zooms. --- .../fonts/MaterialDesignIconsDesktop.ttf | 3 + .../fonts/creativeblock-bb.bold.ttf | 3 + .../fonts/creativeblock-bb.regular.ttf | 3 + game/gui/creamy_pumpkin_pie/namebox.png | 3 + game/gui/creamy_pumpkin_pie/textbox.png | 3 + game/scripts/characters/astoria/common.rpy | 10 +- game/scripts/characters/cho/common.rpy | 10 +- game/scripts/characters/genie/vars.rpy | 6 +- game/scripts/characters/genie/wardrobe.rpy | 1 + game/scripts/characters/hermione/common.rpy | 10 +- game/scripts/characters/luna/common.rpy | 10 +- game/scripts/characters/susan/common.rpy | 10 +- game/scripts/characters/tonks/common.rpy | 10 +- game/scripts/doll/main.rpy | 2 +- game/scripts/doll/transforms.rpy | 2 +- game/scripts/gui/_gui_.rpy | 10 +- game/scripts/gui/_styles_.rpy | 466 +++++++++--------- game/scripts/gui/say.rpy | 247 ++++++---- game/scripts/utility/dialogue.rpy | 21 +- 19 files changed, 484 insertions(+), 346 deletions(-) create mode 100644 game/gui/creamy_pumpkin_pie/fonts/MaterialDesignIconsDesktop.ttf create mode 100644 game/gui/creamy_pumpkin_pie/fonts/creativeblock-bb.bold.ttf create mode 100644 game/gui/creamy_pumpkin_pie/fonts/creativeblock-bb.regular.ttf create mode 100644 game/gui/creamy_pumpkin_pie/namebox.png create mode 100644 game/gui/creamy_pumpkin_pie/textbox.png diff --git a/game/gui/creamy_pumpkin_pie/fonts/MaterialDesignIconsDesktop.ttf b/game/gui/creamy_pumpkin_pie/fonts/MaterialDesignIconsDesktop.ttf new file mode 100644 index 00000000..75314dd8 --- /dev/null +++ b/game/gui/creamy_pumpkin_pie/fonts/MaterialDesignIconsDesktop.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67fea4592f605890e9a0a4c4bd701ba3b4cbd19a547161d82041deac6392b5af +size 1043020 diff --git a/game/gui/creamy_pumpkin_pie/fonts/creativeblock-bb.bold.ttf b/game/gui/creamy_pumpkin_pie/fonts/creativeblock-bb.bold.ttf new file mode 100644 index 00000000..3af49b58 --- /dev/null +++ b/game/gui/creamy_pumpkin_pie/fonts/creativeblock-bb.bold.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b7a2d724a30ef2751d3a92155f9370379c980bdc80deb0ac1e7159b262a36a41 +size 22176 diff --git a/game/gui/creamy_pumpkin_pie/fonts/creativeblock-bb.regular.ttf b/game/gui/creamy_pumpkin_pie/fonts/creativeblock-bb.regular.ttf new file mode 100644 index 00000000..aa083d03 --- /dev/null +++ b/game/gui/creamy_pumpkin_pie/fonts/creativeblock-bb.regular.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc1a313090cf27d41709e9977b9e468d5b7a4f74ebdb110346be13b4e3375475 +size 22244 diff --git a/game/gui/creamy_pumpkin_pie/namebox.png b/game/gui/creamy_pumpkin_pie/namebox.png new file mode 100644 index 00000000..e0109a7d --- /dev/null +++ b/game/gui/creamy_pumpkin_pie/namebox.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37bac66bae95b84b3d156728df06bab78ff4b1dc32fd7c754ec3fc305750cf48 +size 1699 diff --git a/game/gui/creamy_pumpkin_pie/textbox.png b/game/gui/creamy_pumpkin_pie/textbox.png new file mode 100644 index 00000000..1053d9c9 --- /dev/null +++ b/game/gui/creamy_pumpkin_pie/textbox.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7914a63b10892ed506f16e067ee9c530746b113380c2883accd0956d249e9eb5 +size 296581 diff --git a/game/scripts/characters/astoria/common.rpy b/game/scripts/characters/astoria/common.rpy index 083826ef..9a7e1c4f 100644 --- a/game/scripts/characters/astoria/common.rpy +++ b/game/scripts/characters/astoria/common.rpy @@ -83,8 +83,16 @@ init python: if redraw: show() + # Figure out nickname + if name_astoria_genie != "Astoria": + name_prefix = "Astoria {size=-20}\"" + name_suffix = "\"{/size}" + else: + name_prefix = "" + name_suffix = "" + if what: - character.astoria_say(what, **kwargs) + character.astoria_say(what, who_prefix=name_prefix, who_suffix=name_suffix, **kwargs) if temp_face: astoria.set_face(**last_face) diff --git a/game/scripts/characters/cho/common.rpy b/game/scripts/characters/cho/common.rpy index 5c1b8183..a38b14df 100644 --- a/game/scripts/characters/cho/common.rpy +++ b/game/scripts/characters/cho/common.rpy @@ -81,8 +81,16 @@ init python in character: if redraw: show() + # Figure out nickname + if name_cho_genie != "Cho": + name_prefix = "Cho {size=-20}\"" + name_suffix = "\"{/size}" + else: + name_prefix = "" + name_suffix = "" + if what: - cho_say(what, **kwargs) + cho_say(what, who_prefix=name_prefix, who_suffix=name_suffix, **kwargs) if temp_face: renpy.store.cho.set_face(**last_face) diff --git a/game/scripts/characters/genie/vars.rpy b/game/scripts/characters/genie/vars.rpy index d76fae90..2b8d440e 100644 --- a/game/scripts/characters/genie/vars.rpy +++ b/game/scripts/characters/genie/vars.rpy @@ -5,12 +5,12 @@ default states.gen.masturbating = False # Image states -default states.gen.image.xpos = 200 +default states.gen.image.xpos = 0 default states.gen.image.ypos = 0 -default states.gen.image.offset = (0, 600) +default states.gen.image.offset = (0, 0) default states.gen.image.zorder = 15 default states.gen.image.xzoom = 1 -default states.gen.image.zoom = 0.2 +default states.gen.image.zoom = 0.42 # Event flags diff --git a/game/scripts/characters/genie/wardrobe.rpy b/game/scripts/characters/genie/wardrobe.rpy index bcfad0ce..544256fd 100644 --- a/game/scripts/characters/genie/wardrobe.rpy +++ b/game/scripts/characters/genie/wardrobe.rpy @@ -5,6 +5,7 @@ init python: trans.zoom = states.gen.image.zoom trans.xzoom = states.gen.image.xzoom trans.offset = states.gen.image.offset + trans.anchor = (0.5, 1.0) return 0 layeredimage genie_stats: diff --git a/game/scripts/characters/hermione/common.rpy b/game/scripts/characters/hermione/common.rpy index 24f9ae13..90d99606 100644 --- a/game/scripts/characters/hermione/common.rpy +++ b/game/scripts/characters/hermione/common.rpy @@ -76,8 +76,16 @@ init python: if redraw: show() + # Figure out nickname + if name_hermione_genie != "Hermione": + name_prefix = "Hermione {size=-20}\"" + name_suffix = "\"{/size}" + else: + name_prefix = "" + name_suffix = "" + if what: - character.hermione_say(what, **kwargs) + character.hermione_say(what, who_prefix=name_prefix, who_suffix=name_suffix, **kwargs) if temp_face: hermione.set_face(**last_face) diff --git a/game/scripts/characters/luna/common.rpy b/game/scripts/characters/luna/common.rpy index 3084c3d1..a87252e8 100644 --- a/game/scripts/characters/luna/common.rpy +++ b/game/scripts/characters/luna/common.rpy @@ -79,8 +79,16 @@ init python: if redraw: show() + # Figure out nickname + if name_luna_genie != "Luna": + name_prefix = "Luna {size=-20}\"" + name_suffix = "\"{/size}" + else: + name_prefix = "" + name_suffix = "" + if what: - character.luna_say(what, **kwargs) + character.luna_say(what, who_prefix=name_prefix, who_suffix=name_suffix, **kwargs) if temp_face: luna.set_face(**last_face) diff --git a/game/scripts/characters/susan/common.rpy b/game/scripts/characters/susan/common.rpy index 2782cc8a..5b24252d 100644 --- a/game/scripts/characters/susan/common.rpy +++ b/game/scripts/characters/susan/common.rpy @@ -78,8 +78,16 @@ init python: if redraw: show() + # Figure out nickname + if name_susan_genie != "Susan": + name_prefix = "Susan {size=-20}\"" + name_suffix = "\"{/size}" + else: + name_prefix = "" + name_suffix = "" + if what: - character.susan_say(what, **kwargs) + character.susan_say(what, who_prefix=name_prefix, who_suffix=name_suffix, **kwargs) if temp_face: susan.set_face(**last_face) diff --git a/game/scripts/characters/tonks/common.rpy b/game/scripts/characters/tonks/common.rpy index f28c2f16..dbc2c74b 100644 --- a/game/scripts/characters/tonks/common.rpy +++ b/game/scripts/characters/tonks/common.rpy @@ -98,8 +98,16 @@ init python: if redraw: show() + # Figure out nickname + if name_tonks_genie != "Tonks": + name_prefix = "Tonks {size=-20}\"" + name_suffix = "\"{/size}" + else: + name_prefix = "" + name_suffix = "" + if what: - character.tonks_say(what, **kwargs) + character.tonks_say(what, who_prefix=name_prefix, who_suffix=name_suffix, **kwargs) if temp_face: tonks.set_face(**last_face) diff --git a/game/scripts/doll/main.rpy b/game/scripts/doll/main.rpy index 32ed62ad..bf90e437 100644 --- a/game/scripts/doll/main.rpy +++ b/game/scripts/doll/main.rpy @@ -70,7 +70,7 @@ init python: # Transform properties self.pos = (0, 0) - self.zoom = 0.5 + self.zoom = 1.0 self.xzoom = 1 self.modpath = "mods/" + posixpath.normpath(modpath) if modpath else "" diff --git a/game/scripts/doll/transforms.rpy b/game/scripts/doll/transforms.rpy index a9984b58..1dec0315 100644 --- a/game/scripts/doll/transforms.rpy +++ b/game/scripts/doll/transforms.rpy @@ -2,4 +2,4 @@ transform doll_transform(pos, zoom, xzoom): pos pos zoom zoom xzoom xzoom - #align align Need to recalculate base positions + align (0.5, 1.0) diff --git a/game/scripts/gui/_gui_.rpy b/game/scripts/gui/_gui_.rpy index 04588e02..460d2356 100644 --- a/game/scripts/gui/_gui_.rpy +++ b/game/scripts/gui/_gui_.rpy @@ -97,9 +97,9 @@ define gui.muted_color = "#88888844" # "#512800" define gui.hover_muted_color = "#ee770044" # "#7a3d00" # Fonts -define gui.text_font = "gui/CreativeBlockRegular.ttf" -define gui.bold_font = "gui/CreativeBlockBold.ttf" -define gui.glyph_font = "DejaVuSans.ttf" +define gui.text_font = "gui/creamy_pumpkin_pie/fonts/creativeblock-bb.regular.ttf" +define gui.bold_font = "gui/creamy_pumpkin_pie/fonts/creativeblock-bb.bold.ttf" +define gui.glyph_font = "gui/creamy_pumpkin_pie/fonts/MaterialDesignIconsDesktop.ttf" # Main and game menus define gui.main_menu_background = "main_menu" @@ -139,3 +139,7 @@ define gui.slider_tile = False define gui.slider_borders = Borders(10, 10, 10, 10) define gui.unscrollable = "hide" + +style default: + font gui.text_font + color "#ffffff" diff --git a/game/scripts/gui/_styles_.rpy b/game/scripts/gui/_styles_.rpy index 3c9f46f2..2695de96 100644 --- a/game/scripts/gui/_styles_.rpy +++ b/game/scripts/gui/_styles_.rpy @@ -1,287 +1,287 @@ -# -# Common styles -# - -init offset = -1 - -style default: - language 'unicode' - font gui.bold_font - color "#402313" - size 16 - outline_scaling "linear" - -style input: - adjust_spacing False - -style hyperlink_text: - underline False - hover_color "#4cf" - idle_color "#08f" - -style gui_text: - font gui.text_font - color "#000" - -style dark_gui_text: - color settings.get('text_color_night') - -style light_gui_text: - color settings.get('text_color_day') - -style gui_button: - padding (4, 4, 4, 4) - background None - -style gui_button_text is gui_text: - yalign 0.5 - idle_color gui.idle_color - hover_color gui.hover_color - selected_color gui.selected_color - insensitive_color gui.insensitive_color - -style label_text is gui_text: - # font gui.bold_font - color gui.accent_color - -style dark_label_text is dark_gui_text: - font gui.bold_font - -style light_label_text is light_gui_text: - font gui.bold_font - -style prompt_text is gui_text - -style bar: - unscrollable gui.unscrollable - 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) - -style vbar: - unscrollable gui.unscrollable - xsize gui.scrollbar_size - base_bar "scrollbar_horizontal_[prefix_]bar" #Frame("scrollbar_vertical_[prefix_]bar", gui.slider_borders, tile=gui.slider_tile) - thumb "scrollbar_vertical_[prefix_]thumb" #Frame("scrollbar_vertical_[prefix_]thumb", gui.slider_borders, tile=gui.slider_tile) - -style scrollbar: - unscrollable gui.unscrollable - 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) - -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) - -style dark_vscrollbar: - unscrollable gui.unscrollable - xsize gui.scrollbar_size - base_bar Frame(Solid("#FFFFFF16"), gui.slider_borders, tile=gui.slider_tile) - thumb Frame("gui/scrollbar/dark_vertical_idle_bar.png", gui.slider_borders, tile=gui.slider_tile) - hover_thumb Frame(image_hover("gui/scrollbar/dark_vertical_idle_bar.png"), gui.slider_borders, tile=gui.slider_tile) - -style light_vscrollbar: - unscrollable gui.unscrollable - xsize gui.scrollbar_size - base_bar Frame(Solid("#FFFFFF16"), gui.slider_borders, tile=gui.slider_tile) - thumb Frame("gui/scrollbar/vertical_idle_bar.png", gui.slider_borders, tile=gui.slider_tile) - hover_thumb Frame(image_hover("gui/scrollbar/vertical_idle_bar.png"), gui.slider_borders, tile=gui.slider_tile) - -style slider: - ysize gui.slider_size - base_bar Frame(Solid(gui.muted_color)) - thumb Frame("slider_horizontal_[prefix_]thumb", gui.slider_borders, tile=gui.slider_tile, xsize=gui.thumb_size) +# # +# # Common styles +# # + +# init offset = -1 + +# style default: +# language 'unicode' +# font gui.bold_font +# color "#402313" +# size 16 +# outline_scaling "linear" + +# style input: +# adjust_spacing False + +# style hyperlink_text: +# underline False +# hover_color "#4cf" +# idle_color "#08f" + +# style gui_text: +# font gui.text_font +# color "#000" + +# style dark_gui_text: +# color settings.get('text_color_night') + +# style light_gui_text: +# color settings.get('text_color_day') + +# style gui_button: +# padding (4, 4, 4, 4) +# background None + +# style gui_button_text is gui_text: +# yalign 0.5 +# idle_color gui.idle_color +# hover_color gui.hover_color +# selected_color gui.selected_color +# insensitive_color gui.insensitive_color + +# style label_text is gui_text: +# # font gui.bold_font +# color gui.accent_color + +# style dark_label_text is dark_gui_text: +# font gui.bold_font + +# style light_label_text is light_gui_text: +# font gui.bold_font + +# style prompt_text is gui_text + +# style bar: +# unscrollable gui.unscrollable +# 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) + +# style vbar: +# unscrollable gui.unscrollable +# xsize gui.scrollbar_size +# base_bar "scrollbar_horizontal_[prefix_]bar" #Frame("scrollbar_vertical_[prefix_]bar", gui.slider_borders, tile=gui.slider_tile) +# thumb "scrollbar_vertical_[prefix_]thumb" #Frame("scrollbar_vertical_[prefix_]thumb", gui.slider_borders, tile=gui.slider_tile) + +# style scrollbar: +# unscrollable gui.unscrollable +# 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) + +# 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) + +# style dark_vscrollbar: +# unscrollable gui.unscrollable +# xsize gui.scrollbar_size +# base_bar Frame(Solid("#FFFFFF16"), gui.slider_borders, tile=gui.slider_tile) +# thumb Frame("gui/scrollbar/dark_vertical_idle_bar.png", gui.slider_borders, tile=gui.slider_tile) +# hover_thumb Frame(image_hover("gui/scrollbar/dark_vertical_idle_bar.png"), gui.slider_borders, tile=gui.slider_tile) + +# style light_vscrollbar: +# unscrollable gui.unscrollable +# xsize gui.scrollbar_size +# base_bar Frame(Solid("#FFFFFF16"), gui.slider_borders, tile=gui.slider_tile) +# thumb Frame("gui/scrollbar/vertical_idle_bar.png", gui.slider_borders, tile=gui.slider_tile) +# hover_thumb Frame(image_hover("gui/scrollbar/vertical_idle_bar.png"), gui.slider_borders, tile=gui.slider_tile) + +# style slider: +# ysize gui.slider_size +# base_bar Frame(Solid(gui.muted_color)) +# thumb Frame("slider_horizontal_[prefix_]thumb", gui.slider_borders, tile=gui.slider_tile, xsize=gui.thumb_size) -style dark_slider: - left_bar Frame("dark_slider_full", gui.slider_borders, tile=gui.slider_tile) - right_bar Frame("dark_slider_empty", gui.slider_borders, tile=gui.slider_tile) - thumb Frame(Transform("gui/dark_frame.png", alpha=0.5), gui.slider_borders, tile=gui.slider_tile, xsize=gui.thumb_size) - hover_thumb Frame("gui/dark_frame.png", gui.slider_borders, tile=gui.slider_tile, xsize=gui.thumb_size) +# style dark_slider: +# left_bar Frame("dark_slider_full", gui.slider_borders, tile=gui.slider_tile) +# right_bar Frame("dark_slider_empty", gui.slider_borders, tile=gui.slider_tile) +# thumb Frame(Transform("gui/dark_frame.png", alpha=0.5), gui.slider_borders, tile=gui.slider_tile, xsize=gui.thumb_size) +# hover_thumb Frame("gui/dark_frame.png", gui.slider_borders, tile=gui.slider_tile, xsize=gui.thumb_size) -style light_slider: - left_bar Frame("light_slider_full", gui.slider_borders, tile=gui.slider_tile) - right_bar Frame("light_slider_empty", gui.slider_borders, tile=gui.slider_tile) - thumb Frame(Transform("gui/light_frame.png", alpha=0.5), gui.slider_borders, tile=gui.slider_tile, xsize=gui.thumb_size) - hover_thumb Frame("gui/light_frame.png", gui.slider_borders, tile=gui.slider_tile, xsize=gui.thumb_size) +# style light_slider: +# left_bar Frame("light_slider_full", gui.slider_borders, tile=gui.slider_tile) +# right_bar Frame("light_slider_empty", gui.slider_borders, tile=gui.slider_tile) +# thumb Frame(Transform("gui/light_frame.png", alpha=0.5), gui.slider_borders, tile=gui.slider_tile, xsize=gui.thumb_size) +# hover_thumb Frame("gui/light_frame.png", gui.slider_borders, tile=gui.slider_tile, xsize=gui.thumb_size) -style vslider: - xsize gui.slider_size - base_bar Frame("slider_vertical_[prefix_]bar", gui.slider_borders, tile=gui.slider_tile) - thumb "slider_vertical_[prefix_]thumb" +# style vslider: +# xsize gui.slider_size +# base_bar Frame("slider_vertical_[prefix_]bar", gui.slider_borders, tile=gui.slider_tile) +# thumb "slider_vertical_[prefix_]thumb" -# Button +# # Button -style imagemap: - activate_sound "sounds/qubodup-click2.ogg" +# style imagemap: +# activate_sound "sounds/qubodup-click2.ogg" -style button: - activate_sound "sounds/qubodup-click2.ogg" - hover_sound "sounds/qubodup-hover1.ogg" - insensitive_background "#463b3be6" - selected_background "#766a6ae6" - padding (5, 5, 5, 5) +# style button: +# activate_sound "sounds/qubodup-click2.ogg" +# hover_sound "sounds/qubodup-hover1.ogg" +# insensitive_background "#463b3be6" +# selected_background "#766a6ae6" +# padding (5, 5, 5, 5) -style dark_button: - background "#5d5151e6" - hover_background "#897e75" - insensitive_background "#3e3636" +# style dark_button: +# background "#5d5151e6" +# hover_background "#897e75" +# insensitive_background "#3e3636" -style light_button: - background "#ac8d5ae6" - hover_background "#97681f" - insensitive_background "#d1a02eb3" +# style light_button: +# background "#ac8d5ae6" +# hover_background "#97681f" +# insensitive_background "#d1a02eb3" -style button_text: - hover_color "#fff" - insensitive_color "#50443c" - selected_color "#eedfd5" - selected_hover_color "#fff" - outlines [(1, "#00000080", 1, 0)] +# style button_text: +# hover_color "#fff" +# insensitive_color "#50443c" +# selected_color "#eedfd5" +# selected_hover_color "#fff" +# outlines [(1, "#00000080", 1, 0)] -style dark_button_text: - color "#9b8d84" - hover_color "#d7d1cd" +# style dark_button_text: +# color "#9b8d84" +# hover_color "#d7d1cd" -style light_button_text: - color "#f9d592" - hover_color "#fefaf4" +# style light_button_text: +# color "#f9d592" +# hover_color "#fefaf4" -style dark_overlay_button is empty: - hover_foreground "#7d75aa40" +# style dark_overlay_button is empty: +# hover_foreground "#7d75aa40" -style light_overlay_button is empty: - hover_foreground "#e3ba7140" +# style light_overlay_button is empty: +# hover_foreground "#e3ba7140" -style dark_overlay_button_text is dark_button_text -style light_overlay_button_text is light_button_text +# style dark_overlay_button_text is dark_button_text +# style light_overlay_button_text is light_button_text -# Frame +# # Frame -style frame: - padding (4, 4, 4, 4) +# style frame: +# padding (4, 4, 4, 4) -style dark_frame is dark_gui_frame +# style dark_frame is dark_gui_frame -style light_frame is light_gui_frame +# style light_frame is light_gui_frame -style gui_frame: - padding (6, 6, 6, 6) +# style gui_frame: +# padding (6, 6, 6, 6) -style dark_gui_frame: - background Transform(Frame("gui/dark_frame.png", 8, 8)) +# style dark_gui_frame: +# background Transform(Frame("gui/dark_frame.png", 8, 8)) -style light_gui_frame: - background Transform(Frame("gui/light_frame.png", 8, 8)) +# style light_gui_frame: +# background Transform(Frame("gui/light_frame.png", 8, 8)) -# Tabs +# # Tabs -style tab_hbox: - spacing gui.pref_spacing - margin (-6, -6) +# style tab_hbox: +# spacing gui.pref_spacing +# margin (-6, -6) -style tab_button is gui_button: - padding (12, 12) +# style tab_button is gui_button: +# padding (12, 12) -style dark_tab_button: - take dark_gui_frame - selected_background Frame("gui/dark_frame_tab_selected.png", 8, 8) +# style dark_tab_button: +# take dark_gui_frame +# selected_background Frame("gui/dark_frame_tab_selected.png", 8, 8) -style light_tab_button: - take light_gui_frame - selected_background Frame("gui/light_frame_tab_selected.png", 8, 8) +# style light_tab_button: +# take light_gui_frame +# selected_background Frame("gui/light_frame_tab_selected.png", 8, 8) -style tab_button_text is gui_button_text +# style tab_button_text is gui_button_text -# Say label +# # Say label -style say_label is default: - bold False - text_align 0.5 - align (0.5, 0.5) +# style say_label is default: +# bold False +# text_align 0.5 +# align (0.5, 0.5) -style dark_say_label: - color settings.get('text_color_night') +# style dark_say_label: +# color settings.get('text_color_night') -style light_say_label: - color settings.get('text_color_day') +# style light_say_label: +# color settings.get('text_color_day') -style say_label is say_dialogue +# style say_label is say_dialogue -# Say dialogue +# # Say dialogue -style dark_say_dialogue: - color settings.get('text_color_night') +# style dark_say_dialogue: +# color settings.get('text_color_night') -style light_say_dialogue: - color settings.get('text_color_day') +# style light_say_dialogue: +# color settings.get('text_color_day') -style say_dialogue is default: - color "#ffffff" - outlines [(2, "#000000", 0, 0)] +# style say_dialogue is default: +# color "#ffffff" +# outlines [(2, "#000000", 0, 0)] -style say_thought is say_dialogue -style dark_say_thought is dark_say_dialogue -style light_say_thought is light_say_dialogue +# style say_thought is say_dialogue +# style dark_say_thought is dark_say_dialogue +# style light_say_thought is light_say_dialogue -# Window +# # Window -style window is gui_frame: - xalign 0.5 - xfill True - # yalign gui.textbox_yalign - # ysize gui.textbox_height +# style window is gui_frame: +# xalign 0.5 +# xfill True +# # yalign gui.textbox_yalign +# # ysize gui.textbox_height -style dark_window is dark_gui_frame: - take window +# style dark_window is dark_gui_frame: +# take window -style light_window is light_gui_frame: - take window +# style light_window is light_gui_frame: +# take window -# Say window +# # Say window -style dark_say_window is dark_window: - take say_window - background "interface/frames/gray/frame.webp" +# style dark_say_window is dark_window: +# take say_window +# background "interface/frames/gray/frame.webp" -style light_say_window is light_window: - take say_window - background "interface/frames/gold/frame.webp" +# style light_say_window is light_window: +# take say_window +# background "interface/frames/gold/frame.webp" -style say_window: - ysize 143 - padding (250, 40, 250, 0) - top_margin 22 - yalign 1.0 - background "fade_gradient" +# style say_window: +# ysize 143 +# padding (250, 40, 250, 0) +# top_margin 22 +# yalign 1.0 +# background "fade_gradient" -# Namebox +# # Namebox -style namebox is gui_frame: - xpadding 15 - pos (-15, -50) - ysize 32 - xminimum 164 - text_align 0.5 +# style namebox is gui_frame: +# xpadding 15 +# pos (-15, -50) +# ysize 32 +# xminimum 164 +# text_align 0.5 -style dark_namebox is dark_gui_frame: - take namebox - # background Transform(Frame("gui/dark_namebox.png", 8, 8)) +# style dark_namebox is dark_gui_frame: +# take namebox +# # background Transform(Frame("gui/dark_namebox.png", 8, 8)) -style light_namebox is light_gui_frame: - take namebox - # background Transform(Frame("gui/light_namebox.png", 8, 8)) +# style light_namebox is light_gui_frame: +# take namebox +# # background Transform(Frame("gui/light_namebox.png", 8, 8)) -# Text +# # Text -style dark_text: - color settings.get('text_color_night') - outlines [(1, settings.get('text_outline'), 1, 0)] +# style dark_text: +# color settings.get('text_color_night') +# outlines [(1, settings.get('text_outline'), 1, 0)] -style light_text: - color settings.get('text_color_day') - outlines [(1, settings.get('text_outline'), 1, 0)] +# style light_text: +# color settings.get('text_color_day') +# outlines [(1, settings.get('text_outline'), 1, 0)] diff --git a/game/scripts/gui/say.rpy b/game/scripts/gui/say.rpy index 522d034a..8358dbf6 100644 --- a/game/scripts/gui/say.rpy +++ b/game/scripts/gui/say.rpy @@ -1,123 +1,194 @@ -# -# Narration screens -# - init offset = -1 screen nvl(dialogue, items=None): null -# Say screen -# -# The say screen is used to display dialogue to the player. It takes two -# parameters, who and what, which are the name of the speaking character and -# the text to be displayed, respectively. (The who parameter can be None if no -# name is given.) -# -# This screen must create a text displayable with id "what", as Ren'Py uses -# this to manage text display. It can also create displayables with id "who" -# and id "window" to apply style properties. -# -# https://www.renpy.org/doc/html/screen_special.html#say - -init python: - import re - def text_inner_thought(string, pattern=re.compile(r"\(([^)]+)\)")): - return re.findall(pattern, string) +# init python: + # import re + # def text_inner_thought(string, pattern=re.compile(r"\(([^)]+)\)")): + # return re.findall(pattern, string) screen say(who, what, side_image=None, icon=None): - zorder 31 + style_prefix "say" + layer "interface" + zorder 55 - if _windows_hidden: - use invisible_button(action=SetVariable("_windows_hidden", False)) - else: - if not renpy.get_screen("choice"): - use invisible_button(action=Function(ui.saybehavior), keysym="dismiss") + if states.settings.interface_hidden: + use hider - # TODO: While this works, there might be a better way to add effects based on contents of the dialogue. + window: + id "textbox" + style "textbox" - if text_inner_thought(what): - add "fade_gradient" - - add "interface/bld.webp": - if _windows_hidden: - ypos 1000 - - if side_image: - add side_image yalign 1.0 zoom 0.5 - else: - add SideImage() - - window id "window": - style "say_window" + # Ren'py hard crashes without textbox windows, + # this is the workaround that just works. + if states.settings.interface_hidden: + yoffset 1000 if who: + window: id "namebox" style "namebox" - text who: - style "say_label" + text who id "who" style "who" - text what: - id "what" - style "say_dialogue" + text what id "what" style "what" - if _windows_hidden: - ypos 1000 + use quickbox - if _game_menu_screen: - use quick_menu + add SideImage() - if renpy.android: - button: - style "empty" +screen hider(): + variant "pc" + if states.settings.interface_hidden: + button action ToggleVariable("states.settings.interface_hidden", True, False) style "empty" - xysize (235, 100) - align (0.0, 1.0) - action Rollback() + window: + id "hider" + style "hider" + style_prefix "hider" + textbutton "󰈈" action ToggleVariable("states.settings.interface_hidden", True, False) tooltip _("Unhide Interface") - insensitive_child Transform(gui.format("interface/frames/{}/arrow.webp"), xalign=1.0, alpha=0.5) - add Transform(gui.format("interface/frames/{}/arrow.webp"), xalign=1.0) +default states.settings.quickbox_expanded = True +default states.settings.interface_hidden = False +default states.settings.interface_alpha = 0.5 - button: - style "empty" +screen quickbox(): + variant "pc" - xysize (235, 100) - align (1.0, 1.0) - action Skip(fast=True, confirm=True) + window: + id "quickbox" + style "quickbox" + style_prefix "quickbox" - add Transform(gui.format("interface/frames/{}/arrow.webp"), xzoom=-1.0) + hbox: + xalign 1.0 + if states.settings.quickbox_expanded: + textbutton "󰈉" action ToggleVariable("states.settings.interface_hidden", True, False) tooltip _("Hide Interface") # Hide Interface (\F0209) + textbutton "󰇚" action QuickSave() tooltip _("Quick Save") # File Save (\F01DA) + textbutton "󰕒" action QuickLoad() tooltip _("Quick Load") # File Load (\F0552) + textbutton "󰁪" action Preference("auto-forward", "toggle") tooltip _("Auto-Forward Dialogue") # Autoplay (\F18F2) + textbutton "󰒓" action ShowMenu("preferences") tooltip _("Game Options") # Settings (\F0493) + textbutton "󰮫" action ToggleVariable("states.settings.quickbox_expanded", True, False) tooltip _("Toggle Quick Action Box") # Menu (\F0BAB) + +style quickbox_button +style quickbox_button_text: + font gui.glyph_font + color "#bbbbbb" + hover_color "#ffffff" + selected_color "#EA8E61" + outlines [(3, "#000000", 1, 1)] + size 36 + +style textbox: + ysize 250 + yalign 1.0 + background Transform(Image("gui/creamy_pumpkin_pie/textbox.png", xalign=0.5, yalign=1.0, oversample=2), alpha=0.5) + +style what: + xpos 0.25 + ypos 20 + xmaximum 1000 + color "#fff" + outlines [(3, "#000000", 1, 1)] + hinting "bytecode" + size 32 + justify True + +style namebox: + ysize 43 # Halved due to oversampling + padding (50, 0, 50, 0) + fit_first True + xpos 0.5 + yalign 1.0 + xanchor 0.0 + offset (-570, -250) + background Transform(Frame("gui/creamy_pumpkin_pie/namebox.png", 48, 0, 48, 0, oversample=2, tile=True), alpha=0.5) + +style who: + color "#EA8E61" + outlines [(3, "#000000", 1, 1)] + hinting "auto" + font gui.bold_font + size 42 + +style quickbox is namebox: + padding (50, 0, 50, 0) + xanchor 1.0 + xoffset 570 + +style hider is namebox: + align (0.5, 1.0) + offset (0, 0) + padding (50, 0, 50, 0) + +style hider_button is quickbox_button +style hider_button_text is quickbox_button_text + +# screen say(who, what, side_image=None, icon=None): +# zorder 31 + +# if _windows_hidden: +# use invisible_button(action=SetVariable("_windows_hidden", False)) +# else: +# if not renpy.get_screen("choice"): +# use invisible_button(action=Function(ui.saybehavior), keysym="dismiss") + +# if side_image: +# add side_image yalign 1.0 zoom 0.5 +# else: +# add SideImage() + +# window id "window": +# style "say_window" + +# if who: +# window: +# id "namebox" +# style "namebox" +# text who: +# style "say_label" + +# text what: +# id "what" +# style "say_dialogue" + +# if _windows_hidden: +# ypos 1000 + +# if _game_menu_screen: +# use quick_menu # Quick menu screen # # The quick menu is displayed in-game to provide easy access to the out-of-game menus. -screen quick_menu(): - hbox: - style_prefix "quick" - xalign 1.0 - yoffset -30 +# screen quick_menu(): +# hbox: +# style_prefix "quick" +# xalign 1.0 +# yoffset -30 - textbutton _("Q.Save") action QuickSave() - textbutton _("Q.Load") action QuickLoad() - textbutton _("Skip") action Skip() - textbutton _("Auto") action Preference("auto-forward", "toggle") - textbutton _("Preferences") action ShowMenu("preferences") +# textbutton _("Q.Save") action QuickSave() +# textbutton _("Q.Load") action QuickLoad() +# textbutton _("Skip") action Skip() +# textbutton _("Auto") action Preference("auto-forward", "toggle") +# textbutton _("Preferences") action ShowMenu("preferences") -style quick_button is default: - activate_sound "sounds/qubodup-click2.ogg" - hover_sound "sounds/qubodup-hover2.ogg" - background None - xpadding 8 - ypadding 8 +# style quick_button is default: +# activate_sound "sounds/qubodup-click2.ogg" +# hover_sound "sounds/qubodup-hover2.ogg" +# background None +# xpadding 8 +# ypadding 8 -style quick_button_text: - size 10 - idle_color "#8888" - hover_color "#fff" - insensitive_color "#4448" - idle_outlines [(1, "#0008", 1, 1)] - hover_outlines [(1, "#000", 1, 1)] +# style quick_button_text: +# size 10 +# idle_color "#8888" +# hover_color "#fff" +# insensitive_color "#4448" +# idle_outlines [(1, "#0008", 1, 1)] +# hover_outlines [(1, "#000", 1, 1)] # Choice screen # diff --git a/game/scripts/utility/dialogue.rpy b/game/scripts/utility/dialogue.rpy index 410fc58c..4dfa7595 100644 --- a/game/scripts/utility/dialogue.rpy +++ b/game/scripts/utility/dialogue.rpy @@ -3,22 +3,21 @@ define sprite_pos = { "x": { - "base": 640, - "default": 640, - "far_right": 650, - "mid": 300, - "left": 200, - "far_left": 25, - "right": 400, - "wardrobe": 540, - "close": 540 + "base": 1480, + "default": 1480, + "far_right": 1490, + "mid": 1140, + "left": 1040, + "far_left": 250, + "right": 1240, + "close": 1380 }, "y": { "base": 0, "default": 0, - "head": 200, - "low": 170 + "head": 900, + "low": 650 } }