Merge remote-tracking branch 'origin/interface2' into kinetic_text

This commit is contained in:
Johnny28 2024-06-26 18:27:21 +02:00
commit d1dbe31b6c
11 changed files with 69 additions and 47 deletions

View File

@ -40,7 +40,7 @@ init python:
def show():
astoria.show(force=True)
renpy.with_statement({"dolls": trans or d2})
renpy.with_statement({"dolls": trans or d1})
face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears}
temp_face = renpy.game.context().temporary_attributes
@ -79,8 +79,10 @@ init python:
astoria.xzoom = -1 if flip else 1
redraw = True
if redraw:
if redraw and not head_only:
show()
elif head_only:
astoria.hide()
# Figure out nickname
if name_astoria_genie != "Astoria":
@ -91,10 +93,9 @@ init python:
name_suffix = ""
if what:
character.astoria_say(what, who_prefix=name_prefix, who_suffix=name_suffix, **kwargs)
side_doll = At(astoria.image, doll_transform(astoria.pos, astoria.zoom, astoria.xzoom)) if head_only else None
character.astoria_say(what, who_prefix=name_prefix, who_suffix=name_suffix, show_side_doll=side_doll, **kwargs)
if temp_face:
astoria.set_face(**last_face)
if head_only:
astoria.hide()

View File

@ -38,7 +38,7 @@ init python in character:
def show():
renpy.store.cho.show(force=True)
renpy.with_statement({"dolls": trans or renpy.store.d2})
renpy.with_statement({"dolls": trans or renpy.store.d1})
face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears}
temp_face = renpy.game.context().temporary_attributes
@ -77,8 +77,10 @@ init python in character:
renpy.store.cho.xzoom = -1 if flip else 1
redraw = True
if redraw:
if redraw and not head_only:
show()
elif head_only:
renpy.store.cho.hide()
# Figure out nickname
if renpy.store.name_cho_genie != "Cho":
@ -89,10 +91,8 @@ init python in character:
name_suffix = ""
if what:
cho_say(what, who_prefix=name_prefix, who_suffix=name_suffix, **kwargs)
side_doll = At(renpy.store.cho.image, doll_transform(renpy.store.cho.pos, renpy.store.cho.zoom, renpy.store.cho.xzoom)) if head_only else None
cho_say(what, who_prefix=name_prefix, who_suffix=name_suffix, show_side_doll=side_doll, **kwargs)
if temp_face:
renpy.store.cho.set_face(**last_face)
if head_only:
renpy.store.cho.hide()

View File

@ -36,7 +36,7 @@ init python:
if renpy.showing("genie", layer=layer):
renpy.show(variant, layer=layer, tag="genie", at_list=at_list)
renpy.with_statement({"dolls": trans or d2})
renpy.with_statement({"dolls": trans or d1})
if flip is not None:
states.gen.image.xzoom = -1 if flip else 1

View File

@ -33,7 +33,7 @@ init python:
def show():
hermione.show(force=True)
renpy.with_statement({"dolls": trans or d2})
renpy.with_statement({"dolls": trans or d1})
face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears}
temp_face = renpy.game.context().temporary_attributes
@ -72,8 +72,10 @@ init python:
hermione.xzoom = -1 if flip else 1
redraw = True
if redraw:
if redraw and not head_only:
show()
elif head_only:
hermione.hide()
# Figure out nickname
if name_hermione_genie != "Hermione":
@ -84,13 +86,12 @@ init python:
name_suffix = ""
if what:
side_doll = At(hermione.image, doll_transform(hermione.pos, hermione.zoom, hermione.xzoom)) if head_only else None
character.hermione_say(what, who_prefix=name_prefix, who_suffix=name_suffix, **kwargs)
if temp_face:
hermione.set_face(**last_face)
if head_only:
hermione.hide()
label too_much:
stop music fadeout 2.0

View File

@ -24,7 +24,7 @@ init python:
def show():
hooch.show(force=True)
renpy.with_statement({"dolls": trans or d2})
renpy.with_statement({"dolls": trans or d1})
face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears}
temp_face = renpy.game.context().temporary_attributes
@ -63,14 +63,15 @@ init python:
hooch.xzoom = -1 if flip else 1
redraw = True
if redraw:
if redraw and not head_only:
show()
elif head_only:
hooch.hide()
if what:
character.hooch_say(what, **kwargs)
side_doll = At(hooch.image, doll_transform(hooch.pos, hooch.zoom, hooch.xzoom)) if head_only else None
character.hooch_say(what, show_side_doll=side_doll, **kwargs)
if temp_face:
hooch.set_face(**last_face)
if head_only:
hooch.hide()

View File

@ -36,7 +36,7 @@ init python:
def show():
luna.show(force=True)
renpy.with_statement({"dolls": trans or d2})
renpy.with_statement({"dolls": trans or d1})
face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears}
temp_face = renpy.game.context().temporary_attributes
@ -75,8 +75,10 @@ init python:
luna.xzoom = -1 if flip else 1
redraw = True
if redraw:
if redraw and not head_only:
show()
elif head_only:
luna.hide()
# Figure out nickname
if name_luna_genie != "Luna":
@ -87,10 +89,8 @@ init python:
name_suffix = ""
if what:
character.luna_say(what, who_prefix=name_prefix, who_suffix=name_suffix, **kwargs)
side_doll = At(luna.image, doll_transform(luna.pos, luna.zoom, luna.xzoom)) if head_only else None
character.luna_say(what, who_prefix=name_prefix, who_suffix=name_suffix, show_side_doll=side_doll, **kwargs)
if temp_face:
luna.set_face(**last_face)
if head_only:
luna.hide()

View File

@ -56,7 +56,7 @@ init python:
renpy.show(name=tag, at_list=at_list, layer=layer, what=sprite, zorder=states.sna.image.zorder)
renpy.with_statement({"dolls": trans or d2})
renpy.with_statement({"dolls": trans or d1})
if what:
character.snape_say(what, **kwargs)

View File

@ -35,7 +35,7 @@ init python:
def show():
susan.show(force=True)
renpy.with_statement({"dolls": trans or d2})
renpy.with_statement({"dolls": trans or d1})
face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears}
temp_face = renpy.game.context().temporary_attributes
@ -74,8 +74,10 @@ init python:
susan.xzoom = -1 if flip else 1
redraw = True
if redraw:
if redraw and not head_only:
show()
elif head_only:
tonks.hide()
# Figure out nickname
if name_susan_genie != "Susan":
@ -86,10 +88,9 @@ init python:
name_suffix = ""
if what:
character.susan_say(what, who_prefix=name_prefix, who_suffix=name_suffix, **kwargs)
side_doll = At(tonks.image, doll_transform(tonks.pos, tonks.zoom, tonks.xzoom)) if head_only else None
character.susan_say(what, who_prefix=name_prefix, who_suffix=name_suffix, show_side_doll=side_doll, **kwargs)
if temp_face:
susan.set_face(**last_face)
if head_only:
susan.hide()

View File

@ -46,7 +46,7 @@ init python:
def show():
tonks.show(force=True)
renpy.with_statement({"dolls": trans or d2})
renpy.with_statement({"dolls": trans or d1})
face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears}
temp_face = renpy.game.context().temporary_attributes
@ -94,8 +94,10 @@ init python:
tonks.xzoom = -1 if flip else 1
redraw = True
if redraw:
if redraw and not head_only:
show()
elif head_only:
tonks.hide()
# Figure out nickname
if name_tonks_genie != "Tonks":
@ -106,7 +108,8 @@ init python:
name_suffix = ""
if what:
character.tonks_say(what, who_prefix=name_prefix, who_suffix=name_suffix, **kwargs)
side_doll = At(tonks.image, doll_transform(tonks.pos, tonks.zoom, tonks.xzoom)) if head_only else None
character.tonks_say(what, who_prefix=name_prefix, who_suffix=name_suffix, show_side_doll=side_doll, **kwargs) # Weird Engine quirk; `show_` prefix required to pass arguments to screen.
if temp_face:
tonks.set_face(**last_face)
@ -114,5 +117,3 @@ init python:
if temp_hair:
tonks.get_equipped("hair").set_color(last_hair)
if head_only:
tonks.hide()

View File

@ -23,7 +23,7 @@ screen nvl(dialogue, items=None):
# config.all_character_callbacks.append(next_who)
screen say(who, what, side_image=None, icon=None):
screen say(who, what, side_doll=None, icon=None):
style_prefix "say"
layer "interface"
zorder 0
@ -55,10 +55,20 @@ screen say(who, what, side_image=None, icon=None):
use quickbox
add SideImage()
# Note: Weird quirk. As per documentation;
# Keyword arguments passed to the say character
# beginning with ``show_`` have the prefix
# stripped off, and are passed to the screen as arguments. For
# example, the value of ``show_myflag`` will become the value of
# the ``myflag`` variable in the screen. (The ``myflag`` variable isn't
# used by default, but can be used by a custom say screen.)
if side_doll:
add side_doll
else:
add SideImage()
screen hider():
variant "pc"
if states.settings.interface_hidden:
button action ToggleVariable("states.settings.interface_hidden", True, False) style "empty"
@ -73,8 +83,6 @@ default states.settings.interface_hidden = False
default states.settings.interface_alpha = 0.5
screen quickbox():
variant "pc"
window:
id "quickbox"
style "quickbox"
@ -83,7 +91,7 @@ screen quickbox():
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 ToggleVariable("states.settings.interface_hidden", True, False) tooltip _("Hide Interface") keysym "K_h" # 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)
@ -155,13 +163,21 @@ screen choice(items):
default has_icons = any(x is not None for x in [e.kwargs.get("icon", None) for e in items])
default columns = math.ceil(len(items) / 12)
key "K_h" action ToggleVariable("states.settings.interface_hidden", True, False)
if states.settings.interface_hidden:
use hider
hbox:
if states.settings.interface_hidden:
yoffset 1000
at gui_choice_show_hide
for column in range(columns):
vbox:
$ start_index = column * 12
$ end_index = start_index + 12
for i, entry in enumerate(items[start_index:end_index], 1):
$ scale = (1.0 * (28 / max(28, len(entry.caption))))
$ icon = entry.kwargs.get("icon", None)
@ -194,7 +210,7 @@ screen choice(items):
if progress:
bar value StaticValue(progress[0], progress[1]) offset (-16, 22)
if progress[0] == progress[1]:
text _("{wave}{size=20}Done!{/size}{/wave}") style "choice_progress" at transform:
rotate 12.5

View File

@ -127,7 +127,7 @@ define config.fadeout_audio = 1.0
define config.default_music_volume = 0.8
define config.default_sfx_volume = 1.0
# Transitions
# Transitions & Transforms
define config.enter_transition = None
define config.exit_transition = None
define config.intra_transition = d1
@ -145,6 +145,7 @@ define config.exit_yesno_transition = None
define config.enter_replay_transition = None
define config.exit_replay_transition = None
define config.say_attribute_transition = None
define config.side_image_same_transform = d1
# Engine Compatibility
define config.check_conflicting_properties = True