Choice progression

* Add completion status info to the choice menu
* Add style support for kinetic text tags
* Begin modal prompt screen implementation
* Cleanup
This commit is contained in:
LoafyLemon 2024-05-28 20:51:41 +01:00
parent ac9727bdf2
commit ee768b18ce
4 changed files with 38 additions and 120 deletions

BIN
game/gui/creamy_pumpkin_pie/choice_alt.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -43,7 +43,7 @@ transform gui_modal_popup:
on show:
zoom 0.0
alpha 0.0
easein_back 0.5 zoom 1.0 alpha 1.0
easein_back 0.4 zoom 1.0 alpha 1.0
on hide:
easeout_back 0.4 zoom 0.0 alpha 0.0
@ -55,7 +55,6 @@ style frame is empty:
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:
@ -79,4 +78,9 @@ style frame_text is what:
color "#fff"
outlines [(1, "#000000", 1, 1)]
hinting "bytecode"
size 12
size 12
style frame_button is button:
hover_background Frame(Image("gui/creamy_pumpkin_pie/choice_alt.png", oversample=4), 0, 4, 0, 4, tile=False)
style frame_button_text is choice_text:
align (0.5, 0.5)

File diff suppressed because it is too large Load Diff

View File

@ -3,9 +3,12 @@
init python:
def convert_tags_to_kwargs(contents):
kwargs = {}
kwargs = {"style": "what"}
for kind, text in contents:
if kind == renpy.TEXT_TAG:
if text.startswith("="):
kwargs["style"] = text.split("=")[1]
if text.startswith("color="):
kwargs["color"] = text.split("=")[1]
@ -20,6 +23,7 @@ init python:
if text == "i":
kwargs["italics"] = True
return kwargs
@renpy.pure
@ -54,7 +58,7 @@ init python:
end_pause = len(text)/100.0
for i, letter in enumerate(text):
start_pause = i/100.0
d = At(Text(letter, style="what", **kwargs), wave_text(start_pause, end_pause))
d = At(Text(letter, **kwargs), wave_text(start_pause, end_pause))
rv.append((renpy.TEXT_DISPLAYABLE, d))
else:
rv.append((kind, text))
@ -69,7 +73,7 @@ init python:
end_pause = len(text)/100.0
for i, letter in enumerate(text):
start_pause = i/100.0
d = At(Text(letter, style="what", **kwargs), bounce_text(start_pause, end_pause))
d = At(Text(letter, **kwargs), bounce_text(start_pause, end_pause))
rv.append((renpy.TEXT_DISPLAYABLE, d))
else:
rv.append((kind, text))
@ -82,7 +86,7 @@ init python:
for kind, text in contents:
if kind == renpy.TEXT_TEXT:
for i, letter in enumerate(text):
d = At(Text(letter, style="what", **kwargs), shake_text)
d = At(Text(letter, **kwargs), shake_text)
rv.append((renpy.TEXT_DISPLAYABLE, d))
else:
rv.append((kind, text))
@ -94,7 +98,7 @@ init python:
kwargs = convert_tags_to_kwargs(contents)
for kind, text in contents:
if kind == renpy.TEXT_TEXT:
d = At(Text(text, style="what", **kwargs), pulse_text)
d = At(Text(text, **kwargs), pulse_text)
rv.append((renpy.TEXT_DISPLAYABLE, d))
else:
rv.append((kind, text))
@ -106,7 +110,7 @@ init python:
kwargs = convert_tags_to_kwargs(contents)
for kind, text in contents:
if kind == renpy.TEXT_TEXT:
d = At(Text(text, style="what", **kwargs), shudder_text)
d = At(Text(text, **kwargs), shudder_text)
rv.append((renpy.TEXT_DISPLAYABLE, d))
else:
rv.append((kind, text))
@ -118,7 +122,7 @@ init python:
kwargs = convert_tags_to_kwargs(contents)
for kind, text in contents:
if kind == renpy.TEXT_TEXT:
d = Transform(At(Text(text, style="what", **kwargs), flip_text), pos=(240, -2))
d = Transform(At(Text(text, **kwargs), flip_text), pos=(240, -2))
rv.append((renpy.TEXT_DISPLAYABLE, d))
else:
rv.append((kind, text))
@ -131,7 +135,7 @@ init python:
for kind, text in contents:
if kind == renpy.TEXT_TEXT:
for i, letter in enumerate(text):
d = Transform(At(Text(letter, style="what", **kwargs), rotate_text), pos=(240, -2))
d = Transform(At(Text(letter, **kwargs), rotate_text), pos=(240, -2))
rv.append((renpy.TEXT_DISPLAYABLE, d))
else:
rv.append((kind, text))