Initial commit
This commit is contained in:
commit
d0a3798dd2
67 changed files with 4612 additions and 0 deletions
36
game/screens/choice_screen.rpy
Normal file
36
game/screens/choice_screen.rpy
Normal file
|
@ -0,0 +1,36 @@
|
|||
|
||||
## Choice screen ###############################################################
|
||||
##
|
||||
## This screen is used to display the in-game choices presented by the menu
|
||||
## statement. The one parameter, items, is a list of objects, each with caption
|
||||
## and action fields.
|
||||
##
|
||||
## https://www.renpy.org/doc/html/screen_special.html#choice
|
||||
|
||||
screen choice(items):
|
||||
style_prefix "choice"
|
||||
|
||||
vbox:
|
||||
for i in items:
|
||||
textbutton i.caption action i.action
|
||||
|
||||
|
||||
style choice_vbox:
|
||||
xalign 0.5
|
||||
ypos 405
|
||||
yanchor 0.5
|
||||
spacing 33
|
||||
|
||||
style choice_button:
|
||||
is default # This means it doesn't use the usual button styling
|
||||
xysize (926, None)
|
||||
background Frame("gui/button/choice_[prefix_]background.png",
|
||||
150, 25, 150, 25, tile=False)
|
||||
padding (12, 12)
|
||||
|
||||
style choice_button_text:
|
||||
is default # This means it doesn't use the usual button text styling
|
||||
xalign 0.5 yalign 0.5
|
||||
idle_color "#ccc"
|
||||
hover_color "#fff"
|
||||
insensitive_color "#444"
|
284
game/screens/dialogue_screens.rpy
Normal file
284
game/screens/dialogue_screens.rpy
Normal file
|
@ -0,0 +1,284 @@
|
|||
|
||||
## 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
|
||||
|
||||
screen say(who, what):
|
||||
style_prefix "say"
|
||||
|
||||
window:
|
||||
id "window"
|
||||
|
||||
if who is not None:
|
||||
|
||||
window:
|
||||
id "namebox"
|
||||
style "namebox"
|
||||
text who id "who"
|
||||
|
||||
text what id "what"
|
||||
|
||||
## If there's a side image, display it in front of the text.
|
||||
add SideImage() xalign 0.0 yalign 1.0
|
||||
|
||||
|
||||
## Make the namebox available for styling through the Character object.
|
||||
init python:
|
||||
config.character_id_prefixes.append('namebox')
|
||||
|
||||
# Style for the dialogue window
|
||||
style window:
|
||||
xalign 0.5
|
||||
yalign 1.0
|
||||
xysize (1231, 277)
|
||||
padding (40, 10, 40, 40)
|
||||
background Image("gui/textbox.png", xalign=0.5, yalign=1.0)
|
||||
|
||||
# Style for the dialogue
|
||||
style say_dialogue:
|
||||
adjust_spacing False
|
||||
ypos 60
|
||||
|
||||
# The style for dialogue said by the narrator
|
||||
style say_thought:
|
||||
is say_dialogue
|
||||
|
||||
# Style for the box containing the speaker's name
|
||||
style namebox:
|
||||
xpos 20
|
||||
xysize (None, None)
|
||||
background Frame("gui/namebox.png", 5, 5, 5, 5, tile=False, xalign=0.0)
|
||||
padding (5, 5, 5, 5)
|
||||
|
||||
# Style for the text with the speaker's name
|
||||
style say_label:
|
||||
color '#f93c3e'
|
||||
xalign 0.0
|
||||
yalign 0.5
|
||||
size gui.name_text_size
|
||||
font gui.name_text_font
|
||||
|
||||
|
||||
## Quick Menu screen ###########################################################
|
||||
##
|
||||
## The quick menu is displayed in-game to provide easy access to the out-of-game
|
||||
## menus.
|
||||
|
||||
screen quick_menu():
|
||||
|
||||
## Ensure this appears on top of other screens.
|
||||
zorder 100
|
||||
|
||||
if quick_menu:
|
||||
|
||||
hbox:
|
||||
style_prefix "quick"
|
||||
|
||||
textbutton _("Back") action Rollback()
|
||||
textbutton _("History") action ShowMenu('history')
|
||||
textbutton _("Skip") action Skip() alternate Skip(fast=True, confirm=True)
|
||||
textbutton _("Auto") action Preference("auto-forward", "toggle")
|
||||
textbutton _("Save") action ShowMenu('save')
|
||||
textbutton _("Prefs") action ShowMenu('preferences')
|
||||
|
||||
|
||||
## This code ensures that the quick_menu screen is displayed in-game, whenever
|
||||
## the player has not explicitly hidden the interface.
|
||||
init python:
|
||||
config.overlay_screens.append("quick_menu")
|
||||
|
||||
default quick_menu = True
|
||||
|
||||
style quick_hbox:
|
||||
xalign 0.5
|
||||
yalign 1.0 yoffset -8
|
||||
spacing 8
|
||||
|
||||
style quick_button:
|
||||
background None
|
||||
padding (15, 6, 15, 0)
|
||||
|
||||
style quick_button_text:
|
||||
size 21
|
||||
selected_color '#f93c3e'
|
||||
idle_color "#aaa"
|
||||
|
||||
## NVL screen ##################################################################
|
||||
##
|
||||
## This screen is used for NVL-mode dialogue and menus.
|
||||
##
|
||||
## https://www.renpy.org/doc/html/screen_special.html#nvl
|
||||
|
||||
|
||||
screen nvl(dialogue, items=None):
|
||||
|
||||
window:
|
||||
style "nvl_window"
|
||||
|
||||
has vbox
|
||||
spacing 15
|
||||
|
||||
use nvl_dialogue(dialogue)
|
||||
|
||||
## Displays the menu, if given. The menu may be displayed incorrectly if
|
||||
## config.narrator_menu is set to True.
|
||||
for i in items:
|
||||
|
||||
textbutton i.caption:
|
||||
action i.action
|
||||
style "nvl_button"
|
||||
|
||||
add SideImage() xalign 0.0 yalign 1.0
|
||||
|
||||
|
||||
screen nvl_dialogue(dialogue):
|
||||
|
||||
for d in dialogue:
|
||||
|
||||
window:
|
||||
id d.window_id
|
||||
|
||||
fixed:
|
||||
yfit True
|
||||
|
||||
if d.who is not None:
|
||||
|
||||
text d.who:
|
||||
id d.who_id
|
||||
|
||||
text d.what:
|
||||
id d.what_id
|
||||
|
||||
|
||||
## This controls the maximum number of NVL-mode entries that can be displayed at
|
||||
## once.
|
||||
define config.nvl_list_length = 6
|
||||
|
||||
# The style for the NVL "textbox"
|
||||
style nvl_window:
|
||||
is default
|
||||
xfill True yfill True
|
||||
background "gui/nvl.png"
|
||||
padding (0, 15, 0, 30)
|
||||
|
||||
# The style for the text of the speaker's name
|
||||
style nvl_label:
|
||||
is say_label
|
||||
xpos 645 xanchor 1.0
|
||||
ypos 0 yanchor 0.0
|
||||
xsize 225
|
||||
min_width 225
|
||||
textalign 1.0
|
||||
|
||||
# The style for dialogue in NVL
|
||||
style nvl_dialogue:
|
||||
is say_dialogue
|
||||
xpos 675
|
||||
ypos 12
|
||||
xsize 885
|
||||
min_width 885
|
||||
|
||||
# The style for dialogue said by the narrator in NVL
|
||||
style nvl_thought:
|
||||
is nvl_dialogue
|
||||
|
||||
style nvl_button:
|
||||
xpos 675
|
||||
xanchor 0.0
|
||||
|
||||
|
||||
## Bubble screen ###############################################################
|
||||
##
|
||||
## The bubble screen is used to display dialogue to the player when using speech
|
||||
## bubbles. The bubble screen takes the same parameters as the say screen, must
|
||||
## create a displayable with the id of "what", and can create displayables with
|
||||
## the "namebox", "who", and "window" ids.
|
||||
##
|
||||
## https://www.renpy.org/doc/html/bubble.html#bubble-screen
|
||||
|
||||
screen bubble(who, what):
|
||||
style_prefix "bubble"
|
||||
|
||||
window:
|
||||
id "window"
|
||||
|
||||
if who is not None:
|
||||
|
||||
window:
|
||||
id "namebox"
|
||||
style "bubble_namebox"
|
||||
|
||||
text who:
|
||||
id "who"
|
||||
|
||||
text what:
|
||||
id "what"
|
||||
|
||||
style bubble_window:
|
||||
is empty
|
||||
xpadding 30
|
||||
top_padding 5
|
||||
bottom_padding 5
|
||||
|
||||
style bubble_namebox:
|
||||
is empty
|
||||
xalign 0.5
|
||||
|
||||
style bubble_who:
|
||||
is default
|
||||
xalign 0.5
|
||||
textalign 0.5
|
||||
color "#000"
|
||||
|
||||
style bubble_what:
|
||||
is default
|
||||
align (0.5, 0.5)
|
||||
text_align 0.5
|
||||
layout "subtitle"
|
||||
color "#000"
|
||||
|
||||
define bubble.frame = Frame("gui/bubble.png", 55, 55, 55, 95)
|
||||
define bubble.thoughtframe = Frame("gui/thoughtbubble.png", 55, 55, 55, 55)
|
||||
|
||||
define bubble.properties = {
|
||||
"bottom_left" : {
|
||||
"window_background" : Transform(bubble.frame, xzoom=1, yzoom=1),
|
||||
"window_bottom_padding" : 27,
|
||||
},
|
||||
|
||||
"bottom_right" : {
|
||||
"window_background" : Transform(bubble.frame, xzoom=-1, yzoom=1),
|
||||
"window_bottom_padding" : 27,
|
||||
},
|
||||
|
||||
"top_left" : {
|
||||
"window_background" : Transform(bubble.frame, xzoom=1, yzoom=-1),
|
||||
"window_top_padding" : 27,
|
||||
},
|
||||
|
||||
"top_right" : {
|
||||
"window_background" : Transform(bubble.frame, xzoom=-1, yzoom=-1),
|
||||
"window_top_padding" : 27,
|
||||
},
|
||||
|
||||
"thought" : {
|
||||
"window_background" : bubble.thoughtframe,
|
||||
}
|
||||
}
|
||||
|
||||
define bubble.expand_area = {
|
||||
"bottom_left" : (0, 0, 0, 22),
|
||||
"bottom_right" : (0, 0, 0, 22),
|
||||
"top_left" : (0, 22, 0, 0),
|
||||
"top_right" : (0, 22, 0, 0),
|
||||
"thought" : (0, 0, 0, 0),
|
||||
}
|
87
game/screens/game_menu.rpy
Normal file
87
game/screens/game_menu.rpy
Normal file
|
@ -0,0 +1,87 @@
|
|||
## Game Menu screen ############################################################
|
||||
##
|
||||
## This lays out the basic common structure of a game menu screen. It's called
|
||||
## with the screen title, and displays the title and navigation.
|
||||
##
|
||||
## This screen no longer includes a background, and it no longer transcludes
|
||||
## its contents. It is intended to be easily removable from any given menu
|
||||
## screen and thus you are required to do some of the heavy lifting for
|
||||
## setting up containers for the contents of your menu screens.
|
||||
##
|
||||
|
||||
screen game_menu(title):
|
||||
|
||||
style_prefix "game_menu"
|
||||
|
||||
vbox:
|
||||
xpos 60 yalign 0.5
|
||||
spacing 6
|
||||
|
||||
if main_menu:
|
||||
|
||||
textbutton _("Start") action Start()
|
||||
|
||||
else:
|
||||
|
||||
textbutton _("History") action ShowMenu("history")
|
||||
|
||||
textbutton _("Save") action ShowMenu("save")
|
||||
|
||||
textbutton _("Load") action ShowMenu("load")
|
||||
|
||||
textbutton _("Preferences") action ShowMenu("preferences")
|
||||
|
||||
if _in_replay:
|
||||
|
||||
textbutton _("End Replay") action EndReplay(confirm=True)
|
||||
|
||||
elif not main_menu:
|
||||
|
||||
textbutton _("Main Menu") action MainMenu()
|
||||
|
||||
textbutton _("About") action ShowMenu("about")
|
||||
|
||||
if renpy.variant("pc") or (renpy.variant("web") and not renpy.variant("mobile")):
|
||||
|
||||
## Help isn't necessary or relevant to mobile devices.
|
||||
textbutton _("Help") action ShowMenu("help")
|
||||
|
||||
if renpy.variant("pc"):
|
||||
|
||||
## The quit button is banned on iOS and
|
||||
## unnecessary on Android and Web.
|
||||
textbutton _("Quit") action Quit(confirm=not main_menu)
|
||||
|
||||
textbutton _("Return"):
|
||||
style "return_button"
|
||||
action Return()
|
||||
|
||||
## Remove this line if you don't want to show the screen
|
||||
## title text as a label (for example, if it's baked into
|
||||
## the background image.)
|
||||
label title
|
||||
|
||||
if main_menu:
|
||||
key "game_menu" action ShowMenu("main_menu")
|
||||
|
||||
style return_button:
|
||||
xpos 60
|
||||
yalign 1.0
|
||||
yoffset -45
|
||||
|
||||
style game_menu_viewport:
|
||||
xsize config.screen_width-420
|
||||
ysize config.screen_height-200
|
||||
align (0.5, 0.5)
|
||||
|
||||
style game_menu_side:
|
||||
yfill True
|
||||
align (1.0, 0.5)
|
||||
|
||||
style game_menu_vscrollbar:
|
||||
unscrollable "hide"
|
||||
|
||||
style game_menu_label:
|
||||
padding (10, 10)
|
||||
style game_menu_label_text:
|
||||
size 45
|
87
game/screens/history_screen.rpy
Normal file
87
game/screens/history_screen.rpy
Normal file
|
@ -0,0 +1,87 @@
|
|||
|
||||
## History screen ##############################################################
|
||||
##
|
||||
## This is a screen that displays the dialogue history to the player. While
|
||||
## there isn't anything special about this screen, it does have to access the
|
||||
## dialogue history stored in _history_list.
|
||||
##
|
||||
## https://www.renpy.org/doc/html/history.html
|
||||
|
||||
define config.history_length = 250
|
||||
|
||||
screen history():
|
||||
|
||||
tag menu
|
||||
|
||||
## Avoid predicting this screen, as it can be very large.
|
||||
predict False
|
||||
|
||||
add HBox(Transform("#292835", xsize=350), "#21212db2") # The background; can be whatever
|
||||
|
||||
use game_menu(_("History"))
|
||||
|
||||
viewport:
|
||||
style_prefix 'game_menu'
|
||||
mousewheel True draggable True pagekeys True
|
||||
scrollbars "vertical" yinitial 1.0
|
||||
|
||||
has vbox
|
||||
|
||||
style_prefix "history"
|
||||
|
||||
for h in _history_list:
|
||||
|
||||
frame:
|
||||
has hbox
|
||||
if h.who:
|
||||
label h.who style 'history_name':
|
||||
substitute False
|
||||
## Take the color of the who text
|
||||
## from the Character, if set
|
||||
if "color" in h.who_args:
|
||||
text_color h.who_args["color"]
|
||||
xsize 200 # this number and the null width
|
||||
# number should be the same
|
||||
else:
|
||||
null width 200
|
||||
|
||||
$ what = renpy.filter_text_tags(h.what, allow=gui.history_allow_tags)
|
||||
text what:
|
||||
substitute False
|
||||
|
||||
if not _history_list:
|
||||
label _("The dialogue history is empty.")
|
||||
|
||||
|
||||
## This determines what tags are allowed to be displayed on the history screen.
|
||||
|
||||
define gui.history_allow_tags = { "alt", "noalt", "rt", "rb", "art" }
|
||||
|
||||
|
||||
style history_frame:
|
||||
xsize 1400
|
||||
ysize None
|
||||
background None
|
||||
|
||||
style history_hbox:
|
||||
spacing 20
|
||||
|
||||
style history_vbox:
|
||||
spacing 20
|
||||
|
||||
style history_name:
|
||||
xalign 1.0
|
||||
|
||||
style history_name_text:
|
||||
textalign 1.0
|
||||
align (1.0, 0.0)
|
||||
color '#f93c3e'
|
||||
|
||||
style history_text:
|
||||
textalign 0.0
|
||||
|
||||
style history_label:
|
||||
xfill True
|
||||
|
||||
style history_label_text:
|
||||
xalign 0.5
|
30
game/screens/input.rpy
Normal file
30
game/screens/input.rpy
Normal file
|
@ -0,0 +1,30 @@
|
|||
|
||||
## Input screen ################################################################
|
||||
##
|
||||
## This screen is used to display renpy.input. The prompt parameter is used to
|
||||
## pass a text prompt in.
|
||||
##
|
||||
## This screen must create an input displayable with id "input" to accept the
|
||||
## various input parameters.
|
||||
##
|
||||
## https://www.renpy.org/doc/html/screen_special.html#input
|
||||
|
||||
screen input(prompt):
|
||||
style_prefix "input"
|
||||
|
||||
window:
|
||||
# This makes the background the same as the ADV dialogue box
|
||||
|
||||
vbox:
|
||||
xanchor 0.0 ypos 20 spacing 10
|
||||
text prompt style "input_prompt"
|
||||
input id "input"
|
||||
|
||||
style input_prompt:
|
||||
xalign 0.0
|
||||
|
||||
style input:
|
||||
xalign 0.0
|
||||
xmaximum 1116
|
||||
|
||||
|
44
game/screens/main_menu.rpy
Normal file
44
game/screens/main_menu.rpy
Normal file
|
@ -0,0 +1,44 @@
|
|||
|
||||
## Main Menu screen ############################################################
|
||||
##
|
||||
## Used to display the main menu when Ren'Py starts.
|
||||
##
|
||||
## https://www.renpy.org/doc/html/screen_special.html#main-menu
|
||||
|
||||
## Replace this with your background image, if you like
|
||||
image main_menu_background = HBox(
|
||||
Solid("#292835", xsize=350),
|
||||
Solid("#21212d")
|
||||
)
|
||||
|
||||
screen main_menu():
|
||||
|
||||
## This ensures that any other menu screen is replaced.
|
||||
tag menu
|
||||
|
||||
add "main_menu_background"
|
||||
|
||||
vbox:
|
||||
xpos 60
|
||||
yalign 0.5
|
||||
spacing 6
|
||||
|
||||
textbutton _("Start") action Start()
|
||||
|
||||
textbutton _("Load") action ShowMenu("load")
|
||||
|
||||
textbutton _("Preferences") action ShowMenu("preferences")
|
||||
|
||||
textbutton _("About") action ShowMenu("about")
|
||||
|
||||
if renpy.variant("pc") or (renpy.variant("web") and not renpy.variant("mobile")):
|
||||
|
||||
## Help isn't necessary or relevant to mobile devices.
|
||||
textbutton _("Help") action ShowMenu("help")
|
||||
|
||||
if renpy.variant("pc"):
|
||||
|
||||
## The quit button is banned on iOS and unnecessary on Android and
|
||||
## Web.
|
||||
textbutton _("Quit") action Quit(confirm=not main_menu)
|
||||
|
200
game/screens/other_screens.rpy
Normal file
200
game/screens/other_screens.rpy
Normal file
|
@ -0,0 +1,200 @@
|
|||
|
||||
## About screen ################################################################
|
||||
##
|
||||
## This screen gives credit and copyright information about the game and Ren'Py.
|
||||
##
|
||||
## There's nothing special about this screen, and hence it also serves as an
|
||||
## example of how to make a custom screen.
|
||||
|
||||
## Text that is placed on the game's about screen. Place the text between the
|
||||
## triple-quotes, and leave a blank line between paragraphs.
|
||||
|
||||
define gui.about = _p("""
|
||||
EasyRenPyGui is made by {a=https://github.com/shawna-p}Feniks{/a} {a=https://feniksdev.com/}@feniksdev.com{/a}
|
||||
""")
|
||||
|
||||
|
||||
screen about():
|
||||
|
||||
tag menu
|
||||
|
||||
add "#21212db2" # The background; can be whatever
|
||||
|
||||
use game_menu(_("About"))
|
||||
|
||||
viewport:
|
||||
style_prefix 'game_menu'
|
||||
mousewheel True draggable True pagekeys True
|
||||
scrollbars "vertical"
|
||||
|
||||
has vbox
|
||||
style_prefix "about"
|
||||
|
||||
label "[config.name!t]"
|
||||
text _("Version [config.version!t]\n")
|
||||
|
||||
if gui.about:
|
||||
text "[gui.about!t]\n"
|
||||
|
||||
text _("Made with {a=https://www.renpy.org/}Ren'Py{/a} [renpy.version_only].\n\n[renpy.license!t]")
|
||||
|
||||
|
||||
style about_label_text:
|
||||
size 36
|
||||
|
||||
|
||||
## Help screen #################################################################
|
||||
##
|
||||
## A screen that gives information about key and mouse bindings. It uses other
|
||||
## screens (keyboard_help, mouse_help, and gamepad_help) to display the actual
|
||||
## help.
|
||||
|
||||
screen help():
|
||||
|
||||
tag menu
|
||||
|
||||
default device = "keyboard"
|
||||
|
||||
add HBox(Transform("#292835", xsize=350), "#21212db2") # The background; can be whatever
|
||||
|
||||
use game_menu(_("Help"))
|
||||
|
||||
viewport:
|
||||
style_prefix 'game_menu'
|
||||
mousewheel True draggable True pagekeys True
|
||||
scrollbars "vertical"
|
||||
|
||||
has vbox
|
||||
style_prefix "help"
|
||||
spacing 23
|
||||
|
||||
hbox:
|
||||
|
||||
textbutton _("Keyboard") action SetScreenVariable("device", "keyboard")
|
||||
textbutton _("Mouse") action SetScreenVariable("device", "mouse")
|
||||
|
||||
if GamepadExists():
|
||||
textbutton _("Gamepad") action SetScreenVariable("device", "gamepad")
|
||||
|
||||
if device == "keyboard":
|
||||
use keyboard_help
|
||||
elif device == "mouse":
|
||||
use mouse_help
|
||||
elif device == "gamepad":
|
||||
use gamepad_help
|
||||
|
||||
|
||||
screen keyboard_help():
|
||||
|
||||
hbox:
|
||||
label _("Enter")
|
||||
text _("Advances dialogue and activates the interface.")
|
||||
|
||||
hbox:
|
||||
label _("Space")
|
||||
text _("Advances dialogue without selecting choices.")
|
||||
|
||||
hbox:
|
||||
label _("Arrow Keys")
|
||||
text _("Navigate the interface.")
|
||||
|
||||
hbox:
|
||||
label _("Escape")
|
||||
text _("Accesses the game menu.")
|
||||
|
||||
hbox:
|
||||
label _("Ctrl")
|
||||
text _("Skips dialogue while held down.")
|
||||
|
||||
hbox:
|
||||
label _("Tab")
|
||||
text _("Toggles dialogue skipping.")
|
||||
|
||||
hbox:
|
||||
label _("Page Up")
|
||||
text _("Rolls back to earlier dialogue.")
|
||||
|
||||
hbox:
|
||||
label _("Page Down")
|
||||
text _("Rolls forward to later dialogue.")
|
||||
|
||||
hbox:
|
||||
label "H"
|
||||
text _("Hides the user interface.")
|
||||
|
||||
hbox:
|
||||
label "S"
|
||||
text _("Takes a screenshot.")
|
||||
|
||||
hbox:
|
||||
label "V"
|
||||
text _("Toggles assistive {a=https://www.renpy.org/l/voicing}self-voicing{/a}.")
|
||||
|
||||
hbox:
|
||||
label "Shift+A"
|
||||
text _("Opens the accessibility menu.")
|
||||
|
||||
|
||||
screen mouse_help():
|
||||
|
||||
hbox:
|
||||
label _("Left Click")
|
||||
text _("Advances dialogue and activates the interface.")
|
||||
|
||||
hbox:
|
||||
label _("Middle Click")
|
||||
text _("Hides the user interface.")
|
||||
|
||||
hbox:
|
||||
label _("Right Click")
|
||||
text _("Accesses the game menu.")
|
||||
|
||||
hbox:
|
||||
label _("Mouse Wheel Up\nClick Rollback Side")
|
||||
text _("Rolls back to earlier dialogue.")
|
||||
|
||||
hbox:
|
||||
label _("Mouse Wheel Down")
|
||||
text _("Rolls forward to later dialogue.")
|
||||
|
||||
|
||||
screen gamepad_help():
|
||||
|
||||
hbox:
|
||||
label _("Right Trigger\nA/Bottom Button")
|
||||
text _("Advances dialogue and activates the interface.")
|
||||
|
||||
hbox:
|
||||
label _("Left Trigger\nLeft Shoulder")
|
||||
text _("Rolls back to earlier dialogue.")
|
||||
|
||||
hbox:
|
||||
label _("Right Shoulder")
|
||||
text _("Rolls forward to later dialogue.")
|
||||
|
||||
|
||||
hbox:
|
||||
label _("D-Pad, Sticks")
|
||||
text _("Navigate the interface.")
|
||||
|
||||
hbox:
|
||||
label _("Start, Guide, B/Right Button")
|
||||
text _("Accesses the game menu.")
|
||||
|
||||
hbox:
|
||||
label _("Y/Top Button")
|
||||
text _("Hides the user interface.")
|
||||
|
||||
textbutton _("Calibrate") action GamepadCalibrate()
|
||||
|
||||
|
||||
style help_button:
|
||||
xmargin 12
|
||||
|
||||
style help_label:
|
||||
xsize 375
|
||||
right_padding 30
|
||||
|
||||
style help_label_text:
|
||||
xalign 1.0
|
||||
textalign 1.0
|
157
game/screens/popup_screens.rpy
Normal file
157
game/screens/popup_screens.rpy
Normal file
|
@ -0,0 +1,157 @@
|
|||
|
||||
## Confirm screen ##############################################################
|
||||
##
|
||||
## The confirm screen is called when Ren'Py wants to ask the player a yes or no
|
||||
## question.
|
||||
##
|
||||
## https://www.renpy.org/doc/html/screen_special.html#confirm
|
||||
|
||||
screen confirm(message, yes_action, no_action=None):
|
||||
|
||||
## Ensure other screens do not get input while this screen is displayed.
|
||||
modal True
|
||||
|
||||
zorder 200
|
||||
|
||||
style_prefix "confirm"
|
||||
|
||||
add "#0008" # You can replace this with your own overlay image
|
||||
|
||||
frame:
|
||||
has vbox
|
||||
|
||||
label _(message) style "confirm_prompt"
|
||||
|
||||
hbox:
|
||||
|
||||
textbutton _("Confirm") action yes_action
|
||||
# Modified so you can just have a confirmation prompt
|
||||
if no_action is not None:
|
||||
textbutton _("Cancel") action no_action
|
||||
|
||||
## Right-click and escape answer "no".
|
||||
if no_action is not None:
|
||||
key "game_menu" action no_action
|
||||
else:
|
||||
key "game_menu" action yes_action
|
||||
|
||||
style confirm_frame:
|
||||
background Frame("gui/frame.png", 60, 60, 60, 60, tile=False)
|
||||
padding (60, 60, 60, 60)
|
||||
xalign 0.5
|
||||
yalign 0.5
|
||||
|
||||
style confirm_vbox:
|
||||
align (0.5, 0.5)
|
||||
spacing 45
|
||||
|
||||
style confirm_prompt:
|
||||
xalign 0.5
|
||||
|
||||
style confirm_prompt_text:
|
||||
textalign 0.5
|
||||
align (0.5, 0.5)
|
||||
layout "subtitle"
|
||||
|
||||
style confirm_hbox:
|
||||
xalign 0.5
|
||||
spacing 150
|
||||
|
||||
style confirm_button:
|
||||
xalign 0.5
|
||||
|
||||
style confirm_button_text:
|
||||
textalign 0.5
|
||||
|
||||
|
||||
## Skip indicator screen #######################################################
|
||||
##
|
||||
## The skip_indicator screen is displayed to indicate that skipping is in
|
||||
## progress.
|
||||
##
|
||||
## https://www.renpy.org/doc/html/screen_special.html#skip-indicator
|
||||
|
||||
screen skip_indicator():
|
||||
|
||||
zorder 100
|
||||
style_prefix "skip"
|
||||
|
||||
frame:
|
||||
has hbox
|
||||
|
||||
text _("Skipping")
|
||||
|
||||
text "▸" at delayed_blink(0.0, 1.0) style "skip_triangle"
|
||||
text "▸" at delayed_blink(0.2, 1.0) style "skip_triangle"
|
||||
text "▸" at delayed_blink(0.4, 1.0) style "skip_triangle"
|
||||
|
||||
|
||||
## This transform is used to blink the arrows one after another.
|
||||
transform delayed_blink(delay, cycle):
|
||||
alpha .5
|
||||
|
||||
pause delay
|
||||
|
||||
block:
|
||||
linear .2 alpha 1.0
|
||||
pause .2
|
||||
linear .2 alpha 0.5
|
||||
pause (cycle - .4)
|
||||
repeat
|
||||
|
||||
style skip_hbox:
|
||||
spacing 9
|
||||
|
||||
style skip_frame:
|
||||
is empty
|
||||
ypos 15
|
||||
background Frame("gui/skip.png", 24, 8, 75, 8, tile=False)
|
||||
padding (24, 8, 75, 8)
|
||||
|
||||
style skip_text:
|
||||
size 24
|
||||
|
||||
style skip_triangle:
|
||||
is skip_text
|
||||
## We have to use a font that has the BLACK RIGHT-POINTING SMALL TRIANGLE
|
||||
## glyph in it.
|
||||
font "DejaVuSans.ttf"
|
||||
|
||||
## Notify screen ###############################################################
|
||||
##
|
||||
## The notify screen is used to show the player a message. (For example, when
|
||||
## the game is quicksaved or a screenshot has been taken.)
|
||||
##
|
||||
## https://www.renpy.org/doc/html/screen_special.html#notify-screen
|
||||
|
||||
screen notify(message):
|
||||
|
||||
zorder 100
|
||||
style_prefix "notify"
|
||||
|
||||
frame at notify_appear:
|
||||
text "[message!tq]"
|
||||
|
||||
timer 3.25 action Hide('notify')
|
||||
|
||||
|
||||
transform notify_appear:
|
||||
on show:
|
||||
alpha 0
|
||||
linear .25 alpha 1.0
|
||||
on hide:
|
||||
linear .5 alpha 0.0
|
||||
|
||||
|
||||
style notify_frame:
|
||||
is empty
|
||||
ypos 68
|
||||
|
||||
background Frame("gui/notify.png", 24, 8, 60, 8, tile=False)
|
||||
padding (24, 8, 60, 8)
|
||||
|
||||
style notify_text:
|
||||
size 24
|
||||
|
||||
|
||||
|
151
game/screens/preferences.rpy
Normal file
151
game/screens/preferences.rpy
Normal file
|
@ -0,0 +1,151 @@
|
|||
|
||||
## Preferences screen ##########################################################
|
||||
##
|
||||
## The preferences screen allows the player to configure the game to better suit
|
||||
## themselves.
|
||||
##
|
||||
## https://www.renpy.org/doc/html/screen_special.html#preferences
|
||||
|
||||
screen preferences():
|
||||
|
||||
tag menu
|
||||
|
||||
add HBox(Transform("#292835", xsize=350), "#21212db2") # The background; can be whatever
|
||||
|
||||
use game_menu(_("Preferences"))
|
||||
|
||||
viewport:
|
||||
style_prefix 'game_menu'
|
||||
mousewheel True draggable True pagekeys True
|
||||
scrollbars "vertical"
|
||||
has vbox
|
||||
|
||||
hbox:
|
||||
box_wrap True
|
||||
|
||||
if renpy.variant("pc") or renpy.variant("web"):
|
||||
# Only need fullscreen/windowed on desktop and web builds
|
||||
|
||||
vbox:
|
||||
style_prefix "radio"
|
||||
label _("Display")
|
||||
textbutton _("Window"):
|
||||
# Ensures this button is selected when
|
||||
# not in fullscreen.
|
||||
selected not preferences.fullscreen
|
||||
action Preference("display", "window")
|
||||
textbutton _("Fullscreen"):
|
||||
action Preference("display", "fullscreen")
|
||||
|
||||
vbox:
|
||||
style_prefix "check"
|
||||
label _("Skip")
|
||||
textbutton _("Unseen Text"):
|
||||
action Preference("skip", "toggle")
|
||||
textbutton _("After Choices"):
|
||||
action Preference("after choices", "toggle")
|
||||
textbutton _("Transitions"):
|
||||
action InvertSelected(Preference("transitions", "toggle"))
|
||||
|
||||
## Additional vboxes of type "radio_pref" or "check_pref" can be
|
||||
## added here, to add additional creator-defined preferences.
|
||||
|
||||
null height 60
|
||||
|
||||
hbox:
|
||||
style_prefix "slider"
|
||||
box_wrap True
|
||||
|
||||
vbox:
|
||||
|
||||
label _("Text Speed")
|
||||
bar value Preference("text speed")
|
||||
|
||||
label _("Auto-Forward Time")
|
||||
bar value Preference("auto-forward time")
|
||||
|
||||
vbox:
|
||||
|
||||
if config.has_music:
|
||||
label _("Music Volume")
|
||||
hbox:
|
||||
bar value Preference("music volume")
|
||||
|
||||
if config.has_sound:
|
||||
label _("Sound Volume")
|
||||
hbox:
|
||||
bar value Preference("sound volume")
|
||||
if config.sample_sound:
|
||||
textbutton _("Test") action Play("sound", config.sample_sound)
|
||||
|
||||
|
||||
if config.has_voice:
|
||||
label _("Voice Volume")
|
||||
hbox:
|
||||
bar value Preference("voice volume")
|
||||
if config.sample_voice:
|
||||
textbutton _("Test") action Play("voice", config.sample_voice)
|
||||
|
||||
if config.has_music or config.has_sound or config.has_voice:
|
||||
null height 15
|
||||
textbutton _("Mute All"):
|
||||
style_prefix "check"
|
||||
action Preference("all mute", "toggle")
|
||||
|
||||
### PREF
|
||||
style pref_label:
|
||||
top_margin 15
|
||||
bottom_margin 3
|
||||
|
||||
style pref_label_text:
|
||||
yalign 1.0
|
||||
|
||||
style pref_vbox:
|
||||
xsize 338
|
||||
|
||||
## RADIO
|
||||
style radio_label:
|
||||
is pref_label
|
||||
|
||||
style radio_label_text:
|
||||
is pref_label_text
|
||||
|
||||
style radio_vbox:
|
||||
is pref_vbox
|
||||
spacing 0
|
||||
|
||||
style radio_button:
|
||||
foreground "gui/button/radio_[prefix_]foreground.png"
|
||||
padding (35, 6, 6, 6)
|
||||
|
||||
## CHECK
|
||||
style check_label:
|
||||
is pref_label
|
||||
style check_label_text:
|
||||
is pref_label_text
|
||||
|
||||
style check_vbox:
|
||||
is pref_vbox
|
||||
spacing 0
|
||||
|
||||
style check_button:
|
||||
foreground "gui/button/check_[prefix_]foreground.png"
|
||||
padding (35, 6, 6, 6)
|
||||
|
||||
## SLIDER
|
||||
style slider_label:
|
||||
is pref_label
|
||||
style slider_label_text:
|
||||
is pref_label_text
|
||||
|
||||
style slider_slider:
|
||||
xsize 525
|
||||
|
||||
style slider_button:
|
||||
yalign 0.5
|
||||
left_margin 15
|
||||
|
||||
style slider_vbox:
|
||||
is pref_vbox
|
||||
xsize 675
|
||||
|
158
game/screens/save_load.rpy
Normal file
158
game/screens/save_load.rpy
Normal file
|
@ -0,0 +1,158 @@
|
|||
## Load and Save screens #######################################################
|
||||
##
|
||||
## These screens are responsible for letting the player save the game and load
|
||||
## it again. Since they share nearly everything in common, both are implemented
|
||||
## in terms of a third screen, file_slots.
|
||||
##
|
||||
## https://www.renpy.org/doc/html/screen_special.html#save
|
||||
## https://www.renpy.org/doc/html/screen_special.html#load
|
||||
|
||||
|
||||
## The width and height of thumbnails used by the save slots.
|
||||
define config.thumbnail_width = 384
|
||||
define config.thumbnail_height = 216
|
||||
|
||||
|
||||
screen save():
|
||||
|
||||
tag menu
|
||||
|
||||
add HBox(Transform("#292835", xsize=350), "#21212db2") # The background; can be whatever
|
||||
|
||||
use file_slots(_("Save"))
|
||||
|
||||
|
||||
screen load():
|
||||
|
||||
tag menu
|
||||
|
||||
add HBox(Transform("#292835", xsize=350), "#21212db2") # The background; can be whatever
|
||||
|
||||
use file_slots(_("Load"))
|
||||
|
||||
|
||||
screen file_slots(title):
|
||||
|
||||
default page_name_value = FilePageNameInputValue(
|
||||
pattern=_("Page {}"), auto=_("Automatic saves"),
|
||||
quick=_("Quick saves"))
|
||||
|
||||
use game_menu(title)
|
||||
|
||||
fixed:
|
||||
xsize 1500 xalign 1.0
|
||||
## This ensures the input will get the enter event before any of the
|
||||
## buttons do.
|
||||
order_reverse True
|
||||
|
||||
## The page name, which can be edited by clicking on it.
|
||||
## This can be pretty easily removed if you want.
|
||||
## Don't forget to also remove the `default` at the top if so.
|
||||
button:
|
||||
style "page_label"
|
||||
key_events True
|
||||
action page_name_value.Toggle()
|
||||
|
||||
input:
|
||||
style "page_label_text"
|
||||
value page_name_value
|
||||
|
||||
## The grid of file slots.
|
||||
grid 3 2:
|
||||
style_prefix "slot"
|
||||
|
||||
for i in range(3*2):
|
||||
$ slot = i + 1
|
||||
|
||||
button:
|
||||
action FileAction(slot)
|
||||
has vbox
|
||||
|
||||
add FileScreenshot(slot) xalign 0.5
|
||||
|
||||
## https://www.fabriziomusacchio.com/blog/2021-08-15-strftime_Cheat_Sheet/
|
||||
text FileTime(slot,
|
||||
format=_("{#file_time}%A, %B %d %Y, %H:%M"),
|
||||
empty=_("empty slot")):
|
||||
style "slot_time_text"
|
||||
|
||||
text FileSaveName(slot) style "slot_name_text"
|
||||
|
||||
# This means the player can hover this save
|
||||
# slot and hit delete to delete it
|
||||
key "save_delete" action FileDelete(slot)
|
||||
|
||||
## Buttons to access other pages.
|
||||
vbox:
|
||||
style_prefix "page"
|
||||
hbox:
|
||||
textbutton _("<") action FilePagePrevious()
|
||||
|
||||
if config.has_autosave:
|
||||
textbutton _("{#auto_page}A") action FilePage("auto")
|
||||
|
||||
if config.has_quicksave:
|
||||
textbutton _("{#quick_page}Q") action FilePage("quick")
|
||||
|
||||
## range(1, 10) gives the numbers from 1 to 9.
|
||||
for page in range(1, 10):
|
||||
textbutton "[page]" action FilePage(page)
|
||||
|
||||
textbutton _(">") action FilePageNext()
|
||||
|
||||
if config.has_sync:
|
||||
if CurrentScreenName() == "save":
|
||||
textbutton _("Upload Sync"):
|
||||
action UploadSync()
|
||||
else:
|
||||
textbutton _("Download Sync"):
|
||||
action DownloadSync()
|
||||
|
||||
|
||||
style page_label:
|
||||
xpadding 75
|
||||
ypadding 5
|
||||
xalign 0.5
|
||||
|
||||
style page_label_text:
|
||||
textalign 0.5
|
||||
layout "subtitle"
|
||||
hover_color '#ff8335'
|
||||
|
||||
style slot_grid:
|
||||
xalign 0.5
|
||||
yalign 0.5
|
||||
spacing 15
|
||||
|
||||
style slot_time_text:
|
||||
size 25
|
||||
xalign 0.5
|
||||
|
||||
style slot_vbox:
|
||||
spacing 12
|
||||
|
||||
style slot_button:
|
||||
xysize (414, 309)
|
||||
padding (15, 15, 15, 15)
|
||||
background "gui/button/slot_[prefix_]background.png"
|
||||
|
||||
style slot_button_text:
|
||||
size 21
|
||||
xalign 0.5
|
||||
idle_color '#aaaaaa'
|
||||
hover_color '#ff8335'
|
||||
selected_idle_color '#ffffff'
|
||||
|
||||
style page_hbox:
|
||||
xalign 0.5
|
||||
spacing 5
|
||||
|
||||
style page_vbox:
|
||||
xalign 0.5
|
||||
yalign 1.0
|
||||
spacing 5
|
||||
|
||||
style page_button:
|
||||
padding (15, 6, 15, 6)
|
||||
xalign 0.5
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue