Compare commits
2 Commits
fe1cc62c5d
...
2680593bf6
Author | SHA1 | Date | |
---|---|---|---|
2680593bf6 | |||
d293b0c973 |
BIN
game/gui/creamy_pumpkin_pie/window_frame.png
(Stored with Git LFS)
Normal file
BIN
game/gui/creamy_pumpkin_pie/window_frame.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -2,9 +2,6 @@
|
||||
# GUI images
|
||||
#
|
||||
|
||||
image gui_fade:
|
||||
Solid("#00000080")
|
||||
|
||||
image game_menu:
|
||||
contains:
|
||||
zoom 0.5
|
||||
|
82
game/scripts/gui/frame.rpy
Normal file
82
game/scripts/gui/frame.rpy
Normal file
@ -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
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
@ -71,6 +71,12 @@ init python:
|
||||
d2 = Transform(Fixed(love_heart((15, 0), 12, 1), love_heart((20, -10), 6, 0.1), love_heart((10, 10), 6, 0.5), fit_first=True), xzoom=-1)
|
||||
return [(renpy.TEXT_DISPLAYABLE, d), (renpy.TEXT_TAG, "color=#ff69b4"), (renpy.TEXT_TEXT, text), (renpy.TEXT_TAG, "/color"), (renpy.TEXT_DISPLAYABLE, d2)]
|
||||
|
||||
@renpy.pure
|
||||
def text_tag_shudder(tag, argument, contents):
|
||||
text = contents[0][1]
|
||||
d = At(Text(text, style="what", color=argument, xsize=32), shudder_text)
|
||||
return [(renpy.TEXT_DISPLAYABLE, d)]
|
||||
|
||||
def random_timer(t, pause, rotation):
|
||||
return t(renpy.random.uniform(*pause), renpy.random.uniform(*rotation))
|
||||
|
||||
@ -131,6 +137,18 @@ transform shake_text:
|
||||
pos (240, -2) # Workaround; Xpos seems to not account for text box offset and text outline?
|
||||
function text_shake_func
|
||||
|
||||
transform shudder_text:
|
||||
animation
|
||||
subpixel True
|
||||
pos (240, -2) # Workaround; Xpos seems to not account for text box offset and text outline?
|
||||
easeout 0.1 xoffset -3
|
||||
easeout 0.1 xoffset 3
|
||||
easeout 0.1 xoffset -3
|
||||
easeout 0.1 xoffset 3
|
||||
easeout 0.1 xoffset 0
|
||||
pause 0.5
|
||||
repeat
|
||||
|
||||
transform love_heart(pos, size, pause):
|
||||
animation
|
||||
subpixel True
|
||||
@ -146,6 +164,7 @@ define config.custom_text_tags = {
|
||||
"bounce": text_tag_bounce,
|
||||
"love": text_tag_love,
|
||||
"shake": text_tag_shake,
|
||||
"shudder": text_tag_shudder,
|
||||
"pulse": text_tag_pulse,
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user