forked from Cavemanon/SnootGame
Merge remote-tracking branch 'origin/Monster-Update-6' into lazysnake/feature/ISSUE-3_CG_Gallery
This commit is contained in:
192
game/screens.rpy
192
game/screens.rpy
@ -102,11 +102,13 @@ screen say(who, what):
|
||||
id "window"
|
||||
|
||||
if who is not None:
|
||||
|
||||
background Image("gui/textbox.png", xalign=0.5, yalign=1.0)
|
||||
window:
|
||||
id "namebox"
|
||||
style "namebox"
|
||||
text who id "who"
|
||||
else:
|
||||
background Image("gui/textbox_no_hitch.png", xalign=0.5, yalign=1.0)
|
||||
|
||||
text what id "what"
|
||||
|
||||
@ -135,23 +137,23 @@ style window:
|
||||
xfill True
|
||||
yalign gui.textbox_yalign
|
||||
ysize gui.textbox_height
|
||||
|
||||
background Image("gui/textbox_no_hitch.png", xalign=0.5, yalign=1.0)
|
||||
xoffset 0
|
||||
yoffset gui.window_yoffset
|
||||
xcenter 0.5
|
||||
|
||||
style namebox:
|
||||
xalign 0.5
|
||||
xpos gui.name_xpos
|
||||
xanchor gui.name_xalign
|
||||
xsize gui.namebox_width
|
||||
ypos gui.name_ypos
|
||||
ysize gui.namebox_height
|
||||
|
||||
background Frame("gui/namebox.png", gui.namebox_borders, tile=gui.namebox_tile, xalign=gui.name_xalign)
|
||||
padding gui.namebox_borders.padding
|
||||
style namebox_large is namebox:
|
||||
xpos gui.name_large_xpos
|
||||
|
||||
style say_label:
|
||||
properties gui.text_properties("name", accent=True)
|
||||
xalign gui.name_xalign
|
||||
yalign 0.5
|
||||
xanchor gui.name_xalign
|
||||
|
||||
style say_dialogue:
|
||||
properties gui.text_properties("dialogue")
|
||||
@ -175,12 +177,13 @@ screen input(prompt):
|
||||
style_prefix "input"
|
||||
|
||||
window:
|
||||
|
||||
add Image("gui/textbox_no_hitch.png", xalign=0.5, yalign=1.0, yoffset=gui.input_yoffset) #for mobile OSK
|
||||
vbox:
|
||||
xalign gui.dialogue_text_xalign
|
||||
xpos gui.dialogue_xpos
|
||||
xsize gui.dialogue_width
|
||||
ypos gui.dialogue_ypos
|
||||
yoffset gui.input_yoffset #for mobile OSK
|
||||
|
||||
text prompt style "input_prompt"
|
||||
input id "input"
|
||||
@ -240,6 +243,21 @@ style choice_button_text is default:
|
||||
## The quick menu is displayed in-game to provide easy access to the out-of-game
|
||||
## menus.
|
||||
|
||||
screen quick_button(filename, label, function):
|
||||
button:
|
||||
xmaximum 80
|
||||
ymaximum 72
|
||||
action function
|
||||
fixed:
|
||||
add filename xalign 0.5 yalign 0.5 zoom 1
|
||||
text label xalign 0.5 yalign 0.5 xanchor 0.5 size 22 style "quick_button_text"
|
||||
|
||||
# label_functions is [ [ "label", function() ], [ "foobar", foobar() ], .. ]
|
||||
# Reuse the same image string and keep things 'neat'.
|
||||
screen quick_buttons(filename, label_functions):
|
||||
for l_f in label_functions:
|
||||
use quick_button(filename, l_f[0], l_f[1])
|
||||
|
||||
screen quick_menu():
|
||||
|
||||
## Ensure this appears on top of other screens.
|
||||
@ -251,14 +269,16 @@ screen quick_menu():
|
||||
ypos 0.977
|
||||
grid 1 4:
|
||||
style_prefix "quick"
|
||||
xalign 0.0
|
||||
yalign 0.0
|
||||
#imagebutton auto "gui/button/uioptionbuttons/skip_%s.png" action Rollback()
|
||||
imagebutton auto "gui/button/uioptionbuttons/skip_%s.png" action Skip() alternate Skip(fast=True, confirm=True)
|
||||
imagebutton auto "gui/button/uioptionbuttons/save_%s.png" action ShowMenu('save')
|
||||
imagebutton auto "gui/button/uioptionbuttons/auto_%s.png" action Preference("auto-forward", "toggle")
|
||||
imagebutton auto "gui/button/uioptionbuttons/load_%s.png" action ShowMenu('load')
|
||||
xalign -0.005
|
||||
yalign 0.010
|
||||
|
||||
use quick_buttons("gui/button/uioptionbuttons/template_idle.png", \
|
||||
[ \
|
||||
[ "Skip", Skip() ], \
|
||||
[ "Save", ShowMenu('save') ], \
|
||||
[ "Auto", Preference("auto-forward", "toggle") ], \
|
||||
[ "Load", ShowMenu('load') ] \
|
||||
] )
|
||||
|
||||
screen score_menu():
|
||||
zorder 100
|
||||
@ -275,7 +295,6 @@ screen score_menu():
|
||||
text "DEBUG SCORE CARD"
|
||||
|
||||
|
||||
|
||||
## This code ensures that the quick_menu screen is displayed in-game, whenever
|
||||
## the player has not explicitly hidden the interface.
|
||||
init python:
|
||||
@ -290,14 +309,17 @@ style quick_button:
|
||||
properties gui.button_properties("quick_button")
|
||||
|
||||
style quick_button_text:
|
||||
properties gui.button_text_properties("quick_button")
|
||||
#properties gui.button_text_properties("quick_button")
|
||||
color gui.selected_color
|
||||
hover_color gui.hover_color
|
||||
selected_color gui.accent_color
|
||||
|
||||
|
||||
################################################################################
|
||||
## Main and Game Menu Screens
|
||||
################################################################################
|
||||
|
||||
## Navigation screen ###########################################################
|
||||
## Navigation screen ##########################################################
|
||||
##
|
||||
## This screen is included in the main and game menus, and provides navigation
|
||||
## to other menus, and to start the game.
|
||||
@ -315,8 +337,10 @@ screen navigation():
|
||||
textbutton _("History") action ShowMenu("history")
|
||||
textbutton _("Save") action ShowMenu("save")
|
||||
textbutton _("Load") action ShowMenu("load")
|
||||
textbutton _("Delete") action ShowMenu("delete")
|
||||
textbutton _("Options") action ShowMenu("preferences")
|
||||
textbutton _("Extras") action ShowMenu("extras")
|
||||
textbutton _("Return") action Return()
|
||||
|
||||
|
||||
if _in_replay:
|
||||
@ -328,11 +352,11 @@ screen navigation():
|
||||
textbutton _("Main Menu") action MainMenu()
|
||||
#textbutton _("Debug Score Card") action ShowMenu("score_menu")
|
||||
|
||||
if renpy.variant("pc"):
|
||||
#if renpy.variant("pc"):
|
||||
|
||||
## The quit button is banned on iOS and unnecessary on Android and
|
||||
## Web.
|
||||
textbutton _("Quit") action Quit()
|
||||
#textbutton _("Quit") action Quit()
|
||||
|
||||
|
||||
style navigation_button is gui_button
|
||||
@ -352,6 +376,22 @@ style navigation_button_text:
|
||||
##
|
||||
## https://www.renpy.org/doc/html/screen_special.html#main-menu
|
||||
|
||||
#similar to quick_button funcs
|
||||
screen main_menu_button(filename, label, function):
|
||||
button:
|
||||
xmaximum 500
|
||||
ymaximum 129
|
||||
action function
|
||||
fixed:
|
||||
add filename xalign 0.5 yalign 0.5 zoom 1
|
||||
text label xalign 0.5 yalign 0.5 xanchor 0.5
|
||||
|
||||
# label_functions is [ [ "label", function() ], [ "foobar", foobar() ], .. ]
|
||||
# Reuse the same image string and keep things 'neat'.
|
||||
screen main_menu_buttons(filename, label_functions):
|
||||
for l_f in label_functions:
|
||||
use main_menu_button(filename, l_f[0], l_f[1])
|
||||
|
||||
screen main_menu():
|
||||
|
||||
## This ensures that any other menu screen is replaced.
|
||||
@ -369,13 +409,14 @@ screen main_menu():
|
||||
## The use statement includes another screen inside this one. The actual
|
||||
## contents of the main menu are in the navigation screen.
|
||||
vbox:
|
||||
xpos 1940
|
||||
yalign 0.03
|
||||
if persistent.splashtype == 1:
|
||||
add "gui/sneedgame.png"
|
||||
else:
|
||||
add "gui/snootgame.png"
|
||||
xpos 1940
|
||||
yalign 0.03
|
||||
if persistent.splashtype == 1:
|
||||
add "gui/sneedgame.png"
|
||||
else:
|
||||
add "gui/snootgame.png"
|
||||
vbox:
|
||||
<<<<<<< HEAD
|
||||
spacing 25
|
||||
xpos 1885
|
||||
yalign 0.9
|
||||
@ -384,6 +425,25 @@ screen main_menu():
|
||||
imagebutton auto "gui/button/menubuttons/optionsbutton_%s.png" action ShowMenu("preferences")
|
||||
imagebutton auto "gui/button/menubuttons/extrasbutton_%s.png" action ShowMenu("extras")
|
||||
imagebutton auto "gui/button/menubuttons/quitbutton_%s.png" action Quit(confirm=not main_menu)
|
||||
=======
|
||||
spacing 25
|
||||
xpos 1885
|
||||
yalign 0.9
|
||||
use main_menu_buttons("gui/button/menubuttons/template_idle.png",
|
||||
[ \
|
||||
[ "Start", Start() ], \
|
||||
[ "Load", ShowMenu("load") ], \
|
||||
[ "Options", ShowMenu("preferences") ], \
|
||||
[ "Help & About", ShowMenu("extras") ], \
|
||||
[ "Quit", Quit(confirm=not main_menu) ] \
|
||||
] )
|
||||
|
||||
# if gui.show_name:
|
||||
#
|
||||
# vbox:
|
||||
# text "[config.version]":
|
||||
# style "main_menu_version"
|
||||
>>>>>>> origin/Monster-Update-6
|
||||
|
||||
|
||||
style main_menu_frame is empty
|
||||
@ -403,10 +463,13 @@ style main_menu_vbox:
|
||||
xoffset -30
|
||||
xmaximum 1200
|
||||
yalign 1.0
|
||||
yoffset -30
|
||||
yoffset -60
|
||||
|
||||
style main_menu_text:
|
||||
properties gui.text_properties("main_menu", accent=True)
|
||||
properties gui.text_properties("main_menu") #, accent=True)
|
||||
color gui.main_menu_color
|
||||
hover_color gui.hover_color
|
||||
size gui.main_menu_text_size
|
||||
|
||||
style main_menu_title:
|
||||
properties gui.text_properties("title")
|
||||
@ -480,11 +543,6 @@ screen game_menu(title, scroll=None, yinitial=0.0):
|
||||
|
||||
use navigation
|
||||
|
||||
textbutton _("Return"):
|
||||
style "return_button"
|
||||
|
||||
action Return()
|
||||
|
||||
label title
|
||||
|
||||
if main_menu:
|
||||
@ -726,8 +784,13 @@ screen load():
|
||||
|
||||
use file_slots(_("Load"))
|
||||
|
||||
screen delete():
|
||||
|
||||
screen file_slots(title):
|
||||
tag menu
|
||||
|
||||
use file_slots(_("Delete"), True)
|
||||
|
||||
screen file_slots(title, flag=False):
|
||||
|
||||
default page_name_value = FilePageNameInputValue(pattern=_("Page {}"), auto=_("Automatic saves"), quick=_("Quick saves"))
|
||||
|
||||
@ -739,13 +802,13 @@ screen file_slots(title):
|
||||
## buttons do.
|
||||
order_reverse True
|
||||
|
||||
## The page name, which can be edited by clicking on a button.
|
||||
## The page name
|
||||
button:
|
||||
style "page_label"
|
||||
|
||||
key_events True
|
||||
xalign 0.5
|
||||
action page_name_value.Toggle()
|
||||
#action page_name_value.Toggle()
|
||||
|
||||
input:
|
||||
style "page_label_text"
|
||||
@ -765,13 +828,16 @@ screen file_slots(title):
|
||||
$ slot = i + 1
|
||||
|
||||
button:
|
||||
action FileAction(slot)
|
||||
if flag:
|
||||
action FileDelete(slot)
|
||||
else:
|
||||
action FileAction(slot)
|
||||
|
||||
has vbox
|
||||
|
||||
add FileScreenshot(slot) xalign 0.5
|
||||
|
||||
text FileTime(slot, format=_("{#file_time}%A, %B %d %Y, %H:%M"), empty=_("empty slot")):
|
||||
text FileTime(slot, format=_("{#file_time}%A, %B %d %Y, %H:%M"), empty=_("Empty Slot")):
|
||||
style "slot_time_text"
|
||||
|
||||
text FileSaveName(slot):
|
||||
@ -858,7 +924,7 @@ screen preferences():
|
||||
vbox:
|
||||
style_prefix "radio"
|
||||
label _("Display")
|
||||
textbutton _("Window") action Preference("display", "window")
|
||||
textbutton _("Window") action Preference("display", "any window")
|
||||
textbutton _("Fullscreen") action Preference("display", "fullscreen")
|
||||
|
||||
vbox:
|
||||
@ -872,6 +938,11 @@ screen preferences():
|
||||
label _("Naughty Stuff")
|
||||
textbutton _("Enable Lewd Images") action ToggleVariable("persistent.lewd", True, False)
|
||||
|
||||
vbox:
|
||||
style_prefix "check"
|
||||
label _("Requires Restart")
|
||||
textbutton _("Enable Forward-Scroll Movement") action ToggleVariable("persistent.scroll", True, False)
|
||||
|
||||
|
||||
vbox:
|
||||
style_prefix "check"
|
||||
@ -1695,28 +1766,33 @@ style pref_vbox:
|
||||
|
||||
## 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.
|
||||
|
||||
#redefine function
|
||||
screen quick_button(filename, label, function):
|
||||
variant "small"
|
||||
button:
|
||||
xmaximum 180
|
||||
ymaximum 100
|
||||
action function
|
||||
fixed:
|
||||
add filename xalign 0.5 yalign 0.5 zoom 1.75
|
||||
text label xalign 0.5 yalign 0.5 size 42 style "quick_button_text"
|
||||
|
||||
screen quick_menu():
|
||||
variant "touch"
|
||||
|
||||
variant "small"
|
||||
zorder 100
|
||||
|
||||
if quick_menu:
|
||||
|
||||
hbox:
|
||||
style_prefix "quick"
|
||||
|
||||
xalign 0.5
|
||||
yalign 1.0
|
||||
|
||||
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"
|
||||
yalign 0.975
|
||||
use quick_buttons("gui/button/uioptionbuttons/template_idle.png", \
|
||||
[ \
|
||||
[ "Back", Rollback() ], \
|
||||
[ "Skip", Skip() ], \
|
||||
[ "Auto", Preference("auto-forward", "toggle") ], \
|
||||
[ "Menu", ShowMenu() ] \
|
||||
] )
|
||||
|
||||
style radio_button:
|
||||
variant "small"
|
||||
@ -1730,10 +1806,6 @@ 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"
|
||||
|
Reference in New Issue
Block a user