summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-12-17 15:43:16 -0300
committerJesusaves <cpntb1@ymail.com>2020-12-17 15:43:16 -0300
commit95771eccb774946cb4533d454b99cc231599e658 (patch)
tree10f121fc7ddac518c077f1563961c105eda6eea0
parent55574bdf66cf0e93f3089e0702423dd74bb59715 (diff)
downloadclient-95771eccb774946cb4533d454b99cc231599e658.tar.gz
client-95771eccb774946cb4533d454b99cc231599e658.tar.bz2
client-95771eccb774946cb4533d454b99cc231599e658.tar.xz
client-95771eccb774946cb4533d454b99cc231599e658.zip
Move a few stuff from screens.rpy to gui/ folder
-rw-r--r--game/gui/help.rpy131
-rw-r--r--game/gui/nvl.rpy119
-rw-r--r--game/gui/transforms.rpy97
-rw-r--r--game/screens.rpy323
4 files changed, 347 insertions, 323 deletions
diff --git a/game/gui/help.rpy b/game/gui/help.rpy
new file mode 100644
index 0000000..641c0ac
--- /dev/null
+++ b/game/gui/help.rpy
@@ -0,0 +1,131 @@
+## 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.
+##
+## It is not used in Mana Spheres mobile client
+init offset = -1
+
+screen help():
+
+ tag menu
+
+ default device = "keyboard"
+
+ use game_menu(_("Help"), scroll="viewport"):
+
+ style_prefix "help"
+
+ vbox:
+ spacing 15
+
+ 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 _("Ctrl")
+ text _("Skips dialogue while held down.")
+
+ hbox:
+ label _("Tab")
+ text _("Toggles dialogue skipping.")
+
+ 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}.")
+
+
+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.")
+
+
+screen gamepad_help():
+
+ hbox:
+ label _("Right Trigger\nA/Bottom Button")
+ text _("Advances dialogue and activates the interface.")
+
+ hbox:
+ label _("D-Pad, Sticks")
+ text _("Navigate the interface.")
+
+ hbox:
+ label _("Start, Guide")
+ text _("Accesses the game menu.")
+
+ hbox:
+ label _("Y/Top Button")
+ text _("Hides the user interface.")
+
+ textbutton _("Calibrate") action GamepadCalibrate()
+
+
+style help_button is gui_button
+style help_button_text is gui_button_text
+style help_label is gui_label
+style help_label_text is gui_label_text
+style help_text is gui_text
+
+style help_button:
+ properties gui.button_properties("help_button")
+ xmargin 8
+
+style help_button_text:
+ properties gui.button_text_properties("help_button")
+
+style help_label:
+ xsize 250
+ right_padding 20
+
+style help_label_text:
+ size gui.text_size
+ xalign 1.0
+ text_align 1.0
+
diff --git a/game/gui/nvl.rpy b/game/gui/nvl.rpy
new file mode 100644
index 0000000..35b3033
--- /dev/null
+++ b/game/gui/nvl.rpy
@@ -0,0 +1,119 @@
+## NVL screen ##################################################################
+##
+## This screen is used for NVL-mode dialogue and menus.
+##
+## https://www.renpy.org/doc/html/screen_special.html#nvl
+##
+## It is not used in Mana Spheres.
+init offset = -1
+
+screen nvl(dialogue, items=None):
+
+ window:
+ style "nvl_window"
+
+ has vbox:
+ spacing gui.nvl_spacing
+
+ ## Displays dialogue in either a vpgrid or the vbox.
+ if gui.nvl_height:
+
+ vpgrid:
+ cols 1
+ yinitial 1.0
+
+ use nvl_dialogue(dialogue)
+
+ else:
+
+ use nvl_dialogue(dialogue)
+
+ ## Displays the menu, if given. The menu may be displayed incorrectly if
+ ## config.narrator_menu is set to True, as it is above.
+ 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 gui.nvl_height is None
+
+ 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 = gui.nvl_list_length
+
+style nvl_window is default
+style nvl_entry is default
+
+style nvl_label is say_label
+style nvl_dialogue is say_dialogue
+
+style nvl_button is button
+style nvl_button_text is button_text
+
+style nvl_window:
+ xfill True
+ yfill True
+
+ background Frame("gui/nvl.png", 0, 0)
+ padding gui.nvl_borders.padding
+
+style nvl_entry:
+ xfill True
+ ysize gui.nvl_height
+
+style nvl_label:
+ xpos gui.nvl_name_xpos
+ xanchor gui.nvl_name_xalign
+ ypos gui.nvl_name_ypos
+ yanchor 0.0
+ xsize gui.nvl_name_width
+ min_width gui.nvl_name_width
+ text_align gui.nvl_name_xalign
+
+style nvl_dialogue:
+ xpos gui.nvl_text_xpos
+ xanchor gui.nvl_text_xalign
+ ypos gui.nvl_text_ypos
+ xsize gui.nvl_text_width
+ min_width gui.nvl_text_width
+ text_align gui.nvl_text_xalign
+ layout ("subtitle" if gui.nvl_text_xalign else "tex")
+
+style nvl_thought:
+ xpos gui.nvl_thought_xpos
+ xanchor gui.nvl_thought_xalign
+ ypos gui.nvl_thought_ypos
+ xsize gui.nvl_thought_width
+ min_width gui.nvl_thought_width
+ text_align gui.nvl_thought_xalign
+ layout ("subtitle" if gui.nvl_text_xalign else "tex")
+
+style nvl_button:
+ properties gui.button_properties("nvl_button")
+ xpos gui.nvl_button_xpos
+ xanchor gui.nvl_button_xalign
+
+style nvl_button_text:
+ properties gui.button_text_properties("nvl_button")
+
diff --git a/game/gui/transforms.rpy b/game/gui/transforms.rpy
new file mode 100644
index 0000000..80a71af
--- /dev/null
+++ b/game/gui/transforms.rpy
@@ -0,0 +1,97 @@
+########################################################################################
+# This file is part of Spheres.
+# Copyright (C) 2019 Jesusalva
+
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+########################################################################################
+# Transforms for the displayables
+init offset = -1
+
+transform enemy1:
+ xalign 0.5
+ yalign 0.5
+
+transform enemy2:
+ xalign 1.0
+ yalign 0.5
+
+transform enemy3:
+ xalign 0.0
+ yalign 0.5
+
+transform party1:
+ xalign 0.2
+ yalign 1.0
+
+transform party2:
+ xalign 0.4
+ yalign 1.0
+
+transform party3:
+ xalign 0.6
+ yalign 1.0
+
+transform party4:
+ xalign 0.8
+ yalign 1.0
+
+transform party5:
+ xalign 1.0
+ yalign 1.0
+
+transform c_party1:
+ xalign 0.2
+ yalign 1.0
+ zoom 0.25
+
+transform c_party2:
+ xalign 0.4
+ yalign 1.0
+ zoom 0.25
+
+transform c_party3:
+ xalign 0.6
+ yalign 1.0
+ zoom 0.25
+
+transform c_party4:
+ xalign 0.8
+ yalign 1.0
+ zoom 0.25
+
+transform c_party5:
+ xalign 1.0
+ yalign 1.0
+ zoom 0.25
+
+transform czoom_70:
+ zoom 0.70
+
+transform czoom_75:
+ zoom 0.75
+
+
+transform prologue_right1:
+ xalign 0.67
+ yalign 1.0
+
+transform prologue_right2:
+ xalign 1.1
+ yalign 1.0
+
+transform prologue_center:
+ xalign 0.42
+ yalign 1.0
+
diff --git a/game/screens.rpy b/game/screens.rpy
index b466473..e6e31fc 100644
--- a/game/screens.rpy
+++ b/game/screens.rpy
@@ -1001,135 +1001,6 @@ style history_label_text:
xalign 0.5
-## 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"
-
- use game_menu(_("Help"), scroll="viewport"):
-
- style_prefix "help"
-
- vbox:
- spacing 15
-
- 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 _("Ctrl")
- text _("Skips dialogue while held down.")
-
- hbox:
- label _("Tab")
- text _("Toggles dialogue skipping.")
-
- 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}.")
-
-
-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.")
-
-
-screen gamepad_help():
-
- hbox:
- label _("Right Trigger\nA/Bottom Button")
- text _("Advances dialogue and activates the interface.")
-
- hbox:
- label _("D-Pad, Sticks")
- text _("Navigate the interface.")
-
- hbox:
- label _("Start, Guide")
- text _("Accesses the game menu.")
-
- hbox:
- label _("Y/Top Button")
- text _("Hides the user interface.")
-
- textbutton _("Calibrate") action GamepadCalibrate()
-
-
-style help_button is gui_button
-style help_button_text is gui_button_text
-style help_label is gui_label
-style help_label_text is gui_label_text
-style help_text is gui_text
-
-style help_button:
- properties gui.button_properties("help_button")
- xmargin 8
-
-style help_button_text:
- properties gui.button_text_properties("help_button")
-
-style help_label:
- xsize 250
- right_padding 20
-
-style help_label_text:
- size gui.text_size
- xalign 1.0
- text_align 1.0
-
-
################################################################################
## Additional screens
@@ -1311,81 +1182,6 @@ style confirm_button:
style confirm_button_text:
properties gui.button_text_properties("confirm_button")
-transform enemy1:
- xalign 0.5
- yalign 0.5
-
-transform enemy2:
- xalign 1.0
- yalign 0.5
-
-transform enemy3:
- xalign 0.0
- yalign 0.5
-
-transform party1:
- xalign 0.2
- yalign 1.0
-
-transform party2:
- xalign 0.4
- yalign 1.0
-
-transform party3:
- xalign 0.6
- yalign 1.0
-
-transform party4:
- xalign 0.8
- yalign 1.0
-
-transform party5:
- xalign 1.0
- yalign 1.0
-
-transform c_party1:
- xalign 0.2
- yalign 1.0
- zoom 0.25
-
-transform c_party2:
- xalign 0.4
- yalign 1.0
- zoom 0.25
-
-transform c_party3:
- xalign 0.6
- yalign 1.0
- zoom 0.25
-
-transform c_party4:
- xalign 0.8
- yalign 1.0
- zoom 0.25
-
-transform c_party5:
- xalign 1.0
- yalign 1.0
- zoom 0.25
-
-transform czoom_70:
- zoom 0.70
-
-transform czoom_75:
- zoom 0.75
-
-
-transform prologue_right1:
- xalign 0.67
- yalign 1.0
-
-transform prologue_right2:
- xalign 1.1
- yalign 1.0
-
-transform prologue_center:
- xalign 0.42
- yalign 1.0
## Skip indicator screen #######################################################
##
@@ -1482,125 +1278,6 @@ style notify_text:
properties gui.text_properties("notify")
-## 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 gui.nvl_spacing
-
- ## Displays dialogue in either a vpgrid or the vbox.
- if gui.nvl_height:
-
- vpgrid:
- cols 1
- yinitial 1.0
-
- use nvl_dialogue(dialogue)
-
- else:
-
- use nvl_dialogue(dialogue)
-
- ## Displays the menu, if given. The menu may be displayed incorrectly if
- ## config.narrator_menu is set to True, as it is above.
- 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 gui.nvl_height is None
-
- 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 = gui.nvl_list_length
-
-style nvl_window is default
-style nvl_entry is default
-
-style nvl_label is say_label
-style nvl_dialogue is say_dialogue
-
-style nvl_button is button
-style nvl_button_text is button_text
-
-style nvl_window:
- xfill True
- yfill True
-
- background Frame("gui/nvl.png", 0, 0)
- padding gui.nvl_borders.padding
-
-style nvl_entry:
- xfill True
- ysize gui.nvl_height
-
-style nvl_label:
- xpos gui.nvl_name_xpos
- xanchor gui.nvl_name_xalign
- ypos gui.nvl_name_ypos
- yanchor 0.0
- xsize gui.nvl_name_width
- min_width gui.nvl_name_width
- text_align gui.nvl_name_xalign
-
-style nvl_dialogue:
- xpos gui.nvl_text_xpos
- xanchor gui.nvl_text_xalign
- ypos gui.nvl_text_ypos
- xsize gui.nvl_text_width
- min_width gui.nvl_text_width
- text_align gui.nvl_text_xalign
- layout ("subtitle" if gui.nvl_text_xalign else "tex")
-
-style nvl_thought:
- xpos gui.nvl_thought_xpos
- xanchor gui.nvl_thought_xalign
- ypos gui.nvl_thought_ypos
- xsize gui.nvl_thought_width
- min_width gui.nvl_thought_width
- text_align gui.nvl_thought_xalign
- layout ("subtitle" if gui.nvl_text_xalign else "tex")
-
-style nvl_button:
- properties gui.button_properties("nvl_button")
- xpos gui.nvl_button_xpos
- xanchor gui.nvl_button_xalign
-
-style nvl_button_text:
- properties gui.button_text_properties("nvl_button")
-
-
-
################################################################################
## Mobile Variants
################################################################################