1
################################################################################
3
################################################################################
8
################################################################################
10
################################################################################
13
properties gui.text_properties()
17
properties gui.text_properties("input", accent=True)
21
properties gui.text_properties("hyperlink", accent=True)
25
properties gui.text_properties("interface")
29
properties gui.button_properties("button")
31
style button_text is gui_text:
32
properties gui.text_properties("button")
36
style label_text is gui_text:
37
properties gui.text_properties("label", accent=True)
39
style prompt_text is gui_text:
40
properties gui.text_properties("prompt")
45
left_bar Frame("gui/bar/left.png", gui.bar_borders, tile=gui.bar_tile)
46
right_bar Frame("gui/bar/right.png", gui.bar_borders, tile=gui.bar_tile)
50
top_bar Frame("gui/bar/top.png", gui.vbar_borders, tile=gui.bar_tile)
51
bottom_bar Frame("gui/bar/bottom.png", gui.vbar_borders, tile=gui.bar_tile)
54
ysize gui.scrollbar_size
55
base_bar Frame("gui/scrollbar/horizontal_[prefix_]bar.png", gui.scrollbar_borders, tile=gui.scrollbar_tile)
56
thumb Frame("gui/scrollbar/horizontal_[prefix_]thumb.png", gui.scrollbar_borders, tile=gui.scrollbar_tile)
59
xsize gui.scrollbar_size
60
base_bar Frame("gui/scrollbar/vertical_[prefix_]bar.png", gui.vscrollbar_borders, tile=gui.scrollbar_tile)
61
thumb Frame("gui/scrollbar/vertical_[prefix_]thumb.png", gui.vscrollbar_borders, tile=gui.scrollbar_tile)
65
base_bar Frame("gui/slider/horizontal_[prefix_]bar.png", gui.slider_borders, tile=gui.slider_tile)
66
thumb "gui/slider/horizontal_[prefix_]thumb.png"
70
base_bar Frame("gui/slider/vertical_[prefix_]bar.png", gui.vslider_borders, tile=gui.slider_tile)
71
thumb "gui/slider/vertical_[prefix_]thumb.png"
75
padding gui.frame_borders.padding
76
background Frame("gui/frame.png", gui.frame_borders, tile=gui.frame_tile)
80
################################################################################
82
################################################################################
85
## Écran des dialogues #########################################################
87
## L’écran des dialogues est utilisé pour afficher les dialogues du joueur. Il
88
## prend deux paramètres, who(qui) et what(quoi) qui sont respectivement le
89
## nom du personnage en train de parler et le texte à afficher. (Le paramètre
90
## who(qui) peut être None si aucun nom n’est donné.)
92
## Cet écran affiche le texte correspondant à what. Il peut également créer un
93
## texte avec le paramètre who et l’identifiant « window » est utilisé pour
94
## déterminer les styles à appliquer.
96
## https://www.renpy.org/doc/html/screen_special.html#say
98
screen say(who, what):
114
## Si il y a une side image, l'afficher au-dessus du texte. Ne pas
115
## l'afficher sur la version téléphone - pas assez de place.
116
if not renpy.variant("small"):
117
add SideImage() xalign 0.0 yalign 1.0
120
## Rendre la boîte du nom personnalisable à travers l'objet Character.
122
config.character_id_prefixes.append('namebox')
124
style window is default
125
style say_label is default
126
style say_dialogue is default
127
style say_thought is say_dialogue
129
style namebox is default
130
style namebox_label is say_label
136
yalign gui.textbox_yalign
137
ysize gui.textbox_height
139
background Image("gui/textbox.png", xalign=0.5, yalign=1.0)
143
xanchor gui.name_xalign
144
xsize gui.namebox_width
146
ysize gui.namebox_height
148
background Frame("gui/namebox.png", gui.namebox_borders, tile=gui.namebox_tile, xalign=gui.name_xalign)
149
padding gui.namebox_borders.padding
152
properties gui.text_properties("name", accent=True)
153
xalign gui.name_xalign
157
properties gui.text_properties("dialogue")
159
xpos gui.dialogue_xpos
160
xsize gui.dialogue_width
161
ypos gui.dialogue_ypos
165
## Écran de saisie #############################################################
167
## Cet écran est utilisé pour afficher renpy.input. Le paramètre prompt est
168
## utilisé pour passer le texte par défaut.
170
## This screen must create an input displayable with id "input" to accept the
171
## various input parameters.
173
## https://www.renpy.org/doc/html/screen_special.html#input
175
screen input(prompt):
181
xanchor gui.dialogue_text_xalign
182
xpos gui.dialogue_xpos
183
xsize gui.dialogue_width
184
ypos gui.dialogue_ypos
186
text prompt style "input_prompt"
189
style input_prompt is default
192
xalign gui.dialogue_text_xalign
193
properties gui.text_properties("input_prompt")
196
xalign gui.dialogue_text_xalign
197
xmaximum gui.dialogue_width
200
## Écran des choix #############################################################
202
## Cet écran est utilisé pour afficher les choix qui seront fait par le joueur
203
## dans le jeu. Le premier paramètre, items, est une liste d'objets contenant
204
## chacun des champs de texte et d'action.
206
## https://www.renpy.org/doc/html/screen_special.html#choice
208
screen choice(items):
209
style_prefix "choice"
213
textbutton i.caption action i.action
216
style choice_vbox is vbox
217
style choice_button is button
218
style choice_button_text is button_text
225
spacing gui.choice_spacing
227
style choice_button is default:
228
properties gui.button_properties("choice_button")
230
style choice_button_text is default:
231
properties gui.button_text_properties("choice_button")
234
## Écran des menus rapides #####################################################
236
## Les menus rapides sont affichés dans le jeu pour permettre un accès rapide à
237
## certaines fonctions.
241
## Assure qu'il apparaît au-dessus des autres screens.
252
textbutton _("Retour") action Rollback()
253
textbutton _("Historique") action ShowMenu('history')
254
textbutton _("Avance rapide") action Skip() alternate Skip(fast=True, confirm=True)
255
textbutton _("Auto") action Preference("auto-forward", "toggle")
256
textbutton _("Sauvegarde") action ShowMenu('save')
257
textbutton _("Sauvegarde R.") action QuickSave()
258
textbutton _("Chargement R.") action QuickLoad()
259
textbutton _("Préf.") action ShowMenu('preferences')
262
## Ce code garantit que le menu d’accès rapide sera affiché dans le jeu, tant
263
## que le joueur n’aura pas explicitement demandé à cacher l’interface.
265
config.overlay_screens.append("quick_menu")
267
default quick_menu = True
269
style quick_button is default
270
style quick_button_text is button_text
273
properties gui.button_properties("quick_button")
275
style quick_button_text:
276
properties gui.button_text_properties("quick_button")
279
################################################################################
280
## Screens du menu principal et du menu de jeu
281
################################################################################
283
## Écran de navigation #########################################################
285
## Cet écran est disponible dans le menu principal et dans le menu de jeu. Il
286
## fournit l’accès aux autres menus et permet le démarrage du jeu.
291
style_prefix "navigation"
293
xpos gui.navigation_xpos
296
spacing gui.navigation_spacing
300
textbutton _("Nouvelle partie") action Start()
304
textbutton _("Historique") action ShowMenu("history")
306
textbutton _("Sauvegarde") action ShowMenu("save")
308
textbutton _("Charger") action ShowMenu("load")
310
textbutton _("Préférences") action ShowMenu("preferences")
314
textbutton _("Fin de la rediffusion") action EndReplay(confirm=True)
318
textbutton _("Menu principal") action MainMenu()
320
textbutton _("À propos") action ShowMenu("about")
322
if renpy.variant("pc") or (renpy.variant("web") and not renpy.variant("mobile")):
324
## L'aide n’est ni nécessaire ni pertinente sur les appareils
326
textbutton _("Aide") action ShowMenu("help")
328
if renpy.variant("pc"):
330
## Le bouton pour quitter est banni sur iOS et inutile sur Android
332
textbutton _("Quitter") action Quit(confirm=not main_menu)
335
style navigation_button is gui_button
336
style navigation_button_text is gui_button_text
338
style navigation_button:
339
size_group "navigation"
340
properties gui.button_properties("navigation_button")
342
style navigation_button_text:
343
properties gui.button_text_properties("navigation_button")
346
## Écran du menu principal #####################################################
348
## Utilisé pour afficher le menu principal quand Ren'Py démarre.
350
## https://www.renpy.org/doc/html/screen_special.html#main-menu
354
## Ceci assure que tout autre screen de menu est remplacé.
357
add gui.main_menu_background
359
## Cette frame vide obscurcit le menu principal.
361
style "main_menu_frame"
363
## The use statement includes another screen inside this one. The actual
364
## contents of the main menu are in the navigation screen.
370
style "main_menu_vbox"
372
text "[config.name!t]":
373
style "main_menu_title"
375
text "[config.version]":
376
style "main_menu_version"
379
style main_menu_frame is empty
380
style main_menu_vbox is vbox
381
style main_menu_text is gui_text
382
style main_menu_title is main_menu_text
383
style main_menu_version is main_menu_text
385
style main_menu_frame:
389
background "gui/overlay/main_menu.png"
391
style main_menu_vbox:
398
style main_menu_text:
399
properties gui.text_properties("main_menu", accent=True)
401
style main_menu_title:
402
properties gui.text_properties("title")
404
style main_menu_version:
405
properties gui.text_properties("version")
408
## Écran du menu de jeu ########################################################
410
## This lays out the basic common structure of a game menu screen. It's called
411
## with the screen title, and displays the background, title, and navigation.
413
## The scroll parameter can be None, or one of "viewport" or "vpgrid". When
414
## this screen is intended to be used with one or more children, which are
415
## transcluded (placed) inside it.
417
screen game_menu(title, scroll=None, yinitial=0.0):
419
style_prefix "game_menu"
422
add gui.main_menu_background
424
add gui.game_menu_background
427
style "game_menu_outer_frame"
431
## Réserve de l'expace pour la section de navigation.
433
style "game_menu_navigation_frame"
436
style "game_menu_content_frame"
438
if scroll == "viewport":
442
scrollbars "vertical"
452
elif scroll == "vpgrid":
458
scrollbars "vertical"
473
textbutton _("Retour"):
474
style "return_button"
481
key "game_menu" action ShowMenu("main_menu")
484
style game_menu_outer_frame is empty
485
style game_menu_navigation_frame is empty
486
style game_menu_content_frame is empty
487
style game_menu_viewport is gui_viewport
488
style game_menu_side is gui_side
489
style game_menu_scrollbar is gui_vscrollbar
491
style game_menu_label is gui_label
492
style game_menu_label_text is gui_label_text
494
style return_button is navigation_button
495
style return_button_text is navigation_button_text
497
style game_menu_outer_frame:
501
background "gui/overlay/game_menu.png"
503
style game_menu_navigation_frame:
507
style game_menu_content_frame:
512
style game_menu_viewport:
515
style game_menu_vscrollbar:
516
unscrollable gui.unscrollable
518
style game_menu_side:
521
style game_menu_label:
525
style game_menu_label_text:
526
size gui.title_text_size
527
color gui.accent_color
531
xpos gui.navigation_xpos
536
## Écran « À propos... » #######################################################
538
## Cet écran présente le générique, les crédits et les informations de copyright
539
## relatives au jeu et à Ren’Py.
541
## Il n’y a rien de spécial sur cet écran. Par conséquent, il sert aussi
542
## d’exemple pour créer un écran personnalisé.
548
## Cette déclaration concerne l’écran game_menu. L’élément vbox est ensuite
549
## inclus dans la fenêtre de l'écran game_menu.
550
use game_menu(_("À propos"), scroll="viewport"):
556
label "[config.name!t]"
557
text _("Version [config.version!t]\n")
559
## gui.about est généralement initialisé dans le fichier
562
text "[gui.about!t]\n"
564
text _("Conçu avec {a=https://www.renpy.org/}Ren'Py{/a} [renpy.version_only].\n\n[renpy.license!t]")
567
style about_label is gui_label
568
style about_label_text is gui_label_text
569
style about_text is gui_text
571
style about_label_text:
572
size gui.label_text_size
575
## Écran de chargement et de sauvegarde ########################################
577
## Ces écrans permettent au joueur d’enregistrer le jeu et de le charger
578
## à nouveau. Comme ils partagent beaucoup d’éléments communs, ils sont
579
## tous les deux implémentés dans un troisième écran, appelé fichiers_slots
580
## (emplacement_de_fichier).
582
## https://www.renpy.org/doc/html/screen_special.html#save https://
583
## www.renpy.org/doc/html/screen_special.html#load
589
use file_slots(_("Sauvegarde"))
596
use file_slots(_("Charger"))
599
screen file_slots(title):
601
default page_name_value = FilePageNameInputValue(pattern=_("Page {}"), auto=_("Sauvegardes automatiques"), quick=_("Sauvegardes rapides"))
603
use game_menu(title):
607
## Cette instruction s’assure que l’évènement enter aura lieu avant
608
## que l’un des boutons ne fonctionne.
611
## Le nom de la page, qui peut être modifié en cliquant sur un
618
action page_name_value.Toggle()
621
style "page_label_text"
622
value page_name_value
624
## La grille des emplacements de fichiers.
625
grid gui.file_slot_cols gui.file_slot_rows:
631
spacing gui.slot_spacing
633
for i in range(gui.file_slot_cols * gui.file_slot_rows):
638
action FileAction(slot)
642
add FileScreenshot(slot) xalign 0.5
644
text FileTime(slot, format=_("{#file_time}%A %d %B %Y, %H:%M"), empty=_("emplacement vide")):
645
style "slot_time_text"
647
text FileSaveName(slot):
648
style "slot_name_text"
650
key "save_delete" action FileDelete(slot)
652
## Boutons pour accéder aux autres pages.
659
spacing gui.page_spacing
661
textbutton _("<") action FilePagePrevious()
663
if config.has_autosave:
664
textbutton _("{#auto_page}A") action FilePage("auto")
666
if config.has_quicksave:
667
textbutton _("{#quick_page}Q") action FilePage("quick")
669
## range(1, 10) donne les nombres de 1 à 9.
670
for page in range(1, 10):
671
textbutton "[page]" action FilePage(page)
673
textbutton _(">") action FilePageNext()
676
style page_label is gui_label
677
style page_label_text is gui_label_text
678
style page_button is gui_button
679
style page_button_text is gui_button_text
681
style slot_button is gui_button
682
style slot_button_text is gui_button_text
683
style slot_time_text is slot_button_text
684
style slot_name_text is slot_button_text
690
style page_label_text:
693
hover_color gui.hover_color
696
properties gui.button_properties("page_button")
698
style page_button_text:
699
properties gui.button_text_properties("page_button")
702
properties gui.button_properties("slot_button")
704
style slot_button_text:
705
properties gui.button_text_properties("slot_button")
708
## Écran des préférences #######################################################
710
## L’écran de préférences permet au joueur de configurer le jeu pour mieux
711
## correspondre à ses attentes.
713
## https://www.renpy.org/doc/html/screen_special.html#preferences
715
screen preferences():
719
use game_menu(_("Préférences"), scroll="viewport"):
726
if renpy.variant("pc") or renpy.variant("web"):
731
textbutton _("Fenêtre") action Preference("display", "window")
732
textbutton _("Plein écran") action Preference("display", "fullscreen")
736
label _("Avance rapide")
737
textbutton _("Texte non lu") action Preference("skip", "toggle")
738
textbutton _("Après les choix") action Preference("after choices", "toggle")
739
textbutton _("Transitions") action InvertSelected(Preference("transitions", "toggle"))
741
## Des boites vbox additionnelles de type "radio_pref" ou
742
## "check_pref" peuvent être ajoutées ici pour ajouter des
743
## préférences définies par le créateur du jeu.
745
null height (4 * gui.pref_spacing)
748
style_prefix "slider"
753
label _("Vitesse du texte")
755
bar value Preference("text speed")
757
label _("Avance automatique")
759
bar value Preference("auto-forward time")
764
label _("Volume de la musique")
767
bar value Preference("music volume")
771
label _("Volume des sons")
774
bar value Preference("sound volume")
776
if config.sample_sound:
777
textbutton _("Test") action Play("sound", config.sample_sound)
781
label _("Volume des voix")
784
bar value Preference("voice volume")
786
if config.sample_voice:
787
textbutton _("Test") action Play("voice", config.sample_voice)
789
if config.has_music or config.has_sound or config.has_voice:
790
null height gui.pref_spacing
792
textbutton _("Couper tous les sons"):
793
action Preference("all mute", "toggle")
794
style "mute_all_button"
797
style pref_label is gui_label
798
style pref_label_text is gui_label_text
799
style pref_vbox is vbox
801
style radio_label is pref_label
802
style radio_label_text is pref_label_text
803
style radio_button is gui_button
804
style radio_button_text is gui_button_text
805
style radio_vbox is pref_vbox
807
style check_label is pref_label
808
style check_label_text is pref_label_text
809
style check_button is gui_button
810
style check_button_text is gui_button_text
811
style check_vbox is pref_vbox
813
style slider_label is pref_label
814
style slider_label_text is pref_label_text
815
style slider_slider is gui_slider
816
style slider_button is gui_button
817
style slider_button_text is gui_button_text
818
style slider_pref_vbox is pref_vbox
820
style mute_all_button is check_button
821
style mute_all_button_text is check_button_text
824
top_margin gui.pref_spacing
827
style pref_label_text:
834
spacing gui.pref_button_spacing
837
properties gui.button_properties("radio_button")
838
foreground "gui/button/radio_[prefix_]foreground.png"
840
style radio_button_text:
841
properties gui.button_text_properties("radio_button")
844
spacing gui.pref_button_spacing
847
properties gui.button_properties("check_button")
848
foreground "gui/button/check_[prefix_]foreground.png"
850
style check_button_text:
851
properties gui.button_text_properties("check_button")
857
properties gui.button_properties("slider_button")
861
style slider_button_text:
862
properties gui.button_text_properties("slider_button")
868
## Écran de l'historique #######################################################
870
## Il s’agit d’un écran qui affiche l’historique des dialogues au joueur. Bien
871
## qu’il n'y ait rien de spécial sur cet écran, il doit accéder à l’historique
872
## de dialogue stocké dans _history_list.
874
## https://www.renpy.org/doc/html/history.html
880
## Cette instruction permet d’éviter de prédire cet écran, car il peut être
884
use game_menu(_("Historique"), scroll=("vpgrid" if gui.history_height else "viewport"), yinitial=1.0):
886
style_prefix "history"
888
for h in _history_list:
892
## Cela positionne correctement l'écran si history_height est
893
## initialisé à None.
903
## Utilise pour la couleur du texte, la couleur par
904
## défaut des dialogues du personnage si elle a été
906
if "color" in h.who_args:
907
text_color h.who_args["color"]
909
$ what = renpy.filter_text_tags(h.what, allow=gui.history_allow_tags)
913
if not _history_list:
914
label _("L'historique des dialogues est vide.")
917
## Ceci détermine quels tags peuvent être affichés sur le screen de
920
define gui.history_allow_tags = { "alt", "noalt", "rt", "rb", "art" }
923
style history_window is empty
925
style history_name is gui_label
926
style history_name_text is gui_label_text
927
style history_text is gui_text
929
style history_label is gui_label
930
style history_label_text is gui_label_text
932
style history_window:
934
ysize gui.history_height
937
xpos gui.history_name_xpos
938
xanchor gui.history_name_xalign
939
ypos gui.history_name_ypos
940
xsize gui.history_name_width
942
style history_name_text:
943
min_width gui.history_name_width
944
text_align gui.history_name_xalign
947
xpos gui.history_text_xpos
948
ypos gui.history_text_ypos
949
xanchor gui.history_text_xalign
950
xsize gui.history_text_width
951
min_width gui.history_text_width
952
text_align gui.history_text_xalign
953
layout ("subtitle" if gui.history_text_xalign else "tex")
958
style history_label_text:
962
## Écran d'aide ################################################################
964
## Cet écran fournit des informations sur les touches et les boutons de souris.
965
## En interne, il utilise d’autres écrans (keyboard_help, mouse_help et
966
## gamepad_help) pour afficher une aide dédiée.
972
default device = "keyboard"
974
use game_menu(_("Aide"), scroll="viewport"):
983
textbutton _("Clavier") action SetScreenVariable("device", "keyboard")
984
textbutton _("Souris") action SetScreenVariable("device", "mouse")
987
textbutton _("Manette") action SetScreenVariable("device", "gamepad")
989
if device == "keyboard":
991
elif device == "mouse":
993
elif device == "gamepad":
997
screen keyboard_help():
1001
text _("Avance dans les dialogues et active l’interface (effectue un choix).")
1005
text _("Avance dans les dialogues sans effectuer de choix.")
1008
label _("Flèches directionnelles")
1009
text _("Permet de se déplacer dans l’interface.")
1013
text _("Ouvre le menu du jeu.")
1017
text _("Fait défiler les dialogues tant que la touche est pressée.")
1021
text _("Active ou désactives les «sauts des dialogues».")
1024
label _("Page Haut")
1025
text _("Retourne au précédent dialogue.")
1029
text _("Avance jusqu'au prochain dialogue.")
1033
text _("Cache l’interface utilisateur.")
1037
text _("Prend une capture d’écran.")
1041
text _("Active la {a=https://www.renpy.org/l/voicing}{size=24}vocalisation automatique{/size}{/a}.")
1045
text _("Ouvre le menu d'accessibilité.")
1048
screen mouse_help():
1051
label _("Bouton gauche")
1052
text _("Avance dans les dialogues et active l’interface (effectue un choix).")
1055
label _("Bouton central")
1056
text _("Cache l’interface utilisateur.")
1059
label _("Bouton droit")
1060
text _("Ouvre le menu du jeu.")
1063
label _("Molette vers le haut\nClic sur le côté du Rollback")
1064
text _("Retourne au précédent dialogue.")
1067
label _("Molette vers le bas")
1068
text _("Avance jusqu'au prochain dialogue.")
1071
screen gamepad_help():
1074
label _("Bouton R1\nA/Bouton du bas")
1075
text _("Avance dans les dialogues et active l’interface (effectue un choix).")
1078
label _("Gâchettes gauche")
1079
text _("Retourne au précédent dialogue.")
1082
label _("Bouton R1")
1083
text _("Avance jusqu'au prochain dialogue.")
1087
label _("Boutons directionnels, stick gauche")
1088
text _("Permet de se déplacer dans l’interface.")
1091
label _("Start, Guide")
1092
text _("Ouvre le menu du jeu.")
1095
label _("Y/Bouton du haut")
1096
text _("Cache l’interface utilisateur.")
1098
textbutton _("Calibrage") action GamepadCalibrate()
1101
style help_button is gui_button
1102
style help_button_text is gui_button_text
1103
style help_label is gui_label
1104
style help_label_text is gui_label_text
1105
style help_text is gui_text
1108
properties gui.button_properties("help_button")
1111
style help_button_text:
1112
properties gui.button_text_properties("help_button")
1118
style help_label_text:
1125
################################################################################
1126
## Écrans additionnels
1127
################################################################################
1130
## Écran de confirmation #######################################################
1132
## Cet écran est appelé quand Ren'Py souhaite poser une question au joueur dont
1133
## la réponse est oui ou non.
1135
## https://www.renpy.org/doc/html/screen_special.html#confirm
1137
screen confirm(message, yes_action, no_action):
1139
## Cette instruction s’assure que les autres écrans resteront en arrière
1140
## plan tant que cet écran sera affiché.
1145
style_prefix "confirm"
1147
add "gui/overlay/confirm.png"
1157
style "confirm_prompt"
1164
textbutton _("Oui") action yes_action
1165
textbutton _("Non") action no_action
1167
## Le clic bouton droit et la touche Echap. correspondent à la réponse
1169
key "game_menu" action no_action
1172
style confirm_frame is gui_frame
1173
style confirm_prompt is gui_prompt
1174
style confirm_prompt_text is gui_prompt_text
1175
style confirm_button is gui_medium_button
1176
style confirm_button_text is gui_medium_button_text
1178
style confirm_frame:
1179
background Frame([ "gui/confirm_frame.png", "gui/frame.png"], gui.confirm_frame_borders, tile=gui.frame_tile)
1180
padding gui.confirm_frame_borders.padding
1184
style confirm_prompt_text:
1188
style confirm_button:
1189
properties gui.button_properties("confirm_button")
1191
style confirm_button_text:
1192
properties gui.button_text_properties("confirm_button")
1195
## Écran de l’indicateur d'avance rapide #######################################
1197
## L’écran skip_indicator est affiché pour indiquer qu’une avance rapide est en
1200
## https://www.renpy.org/doc/html/screen_special.html#skip-indicator
1202
screen skip_indicator():
1212
text _("Avance rapide")
1214
text "▸" at delayed_blink(0.0, 1.0) style "skip_triangle"
1215
text "▸" at delayed_blink(0.2, 1.0) style "skip_triangle"
1216
text "▸" at delayed_blink(0.4, 1.0) style "skip_triangle"
1219
## Cette transformation est utilisé pour faire clignoter les flèches l’une après
1221
transform delayed_blink(delay, cycle):
1234
style skip_frame is empty
1235
style skip_text is gui_text
1236
style skip_triangle is skip_text
1240
background Frame("gui/skip.png", gui.skip_frame_borders, tile=gui.frame_tile)
1241
padding gui.skip_frame_borders.padding
1244
size gui.notify_text_size
1246
style skip_triangle:
1247
## Nous devons utiliser une police qui a le glyphe BLACK RIGHT-POINTING
1249
font "DejaVuSans.ttf"
1252
## Écran de notification #######################################################
1254
## Cet écran est utilisé pour affiché un message au joueur. (Par exemple, quand
1255
## une sauvegarde rapide a eu lieu ou quand une capture d’écran vient d’être
1258
## https://www.renpy.org/doc/html/screen_special.html#notify-screen
1260
screen notify(message):
1263
style_prefix "notify"
1265
frame at notify_appear:
1268
timer 3.25 action Hide('notify')
1271
transform notify_appear:
1274
linear .25 alpha 1.0
1279
style notify_frame is empty
1280
style notify_text is gui_text
1283
ypos gui.notify_ypos
1285
background Frame("gui/notify.png", gui.notify_frame_borders, tile=gui.frame_tile)
1286
padding gui.notify_frame_borders.padding
1289
properties gui.text_properties("notify")
1292
## Écran NVL ###################################################################
1294
## Cet écran est utilisé pour les dialogues et les menus en mode NVL.
1296
## https://www.renpy.org/doc/html/screen_special.html#nvl
1299
screen nvl(dialogue, items=None):
1305
spacing gui.nvl_spacing
1307
## Les dialogues sont affichés soit dans une vpgrid soit dans une vbox.
1314
use nvl_dialogue(dialogue)
1318
use nvl_dialogue(dialogue)
1320
## Displays the menu, if given. The menu may be displayed incorrectly if
1321
## config.narrator_menu is set to True.
1324
textbutton i.caption:
1328
add SideImage() xalign 0.0 yalign 1.0
1331
screen nvl_dialogue(dialogue):
1339
yfit gui.nvl_height is None
1341
if d.who is not None:
1350
## Ce paramètre contrôle le maximum d’entrée dans le mode NVL qui peuvent être
1351
## affichée simultanément.
1352
define config.nvl_list_length = gui.nvl_list_length
1354
style nvl_window is default
1355
style nvl_entry is default
1357
style nvl_label is say_label
1358
style nvl_dialogue is say_dialogue
1360
style nvl_button is button
1361
style nvl_button_text is button_text
1367
background "gui/nvl.png"
1368
padding gui.nvl_borders.padding
1372
ysize gui.nvl_height
1375
xpos gui.nvl_name_xpos
1376
xanchor gui.nvl_name_xalign
1377
ypos gui.nvl_name_ypos
1379
xsize gui.nvl_name_width
1380
min_width gui.nvl_name_width
1381
text_align gui.nvl_name_xalign
1384
xpos gui.nvl_text_xpos
1385
xanchor gui.nvl_text_xalign
1386
ypos gui.nvl_text_ypos
1387
xsize gui.nvl_text_width
1388
min_width gui.nvl_text_width
1389
text_align gui.nvl_text_xalign
1390
layout ("subtitle" if gui.nvl_text_xalign else "tex")
1393
xpos gui.nvl_thought_xpos
1394
xanchor gui.nvl_thought_xalign
1395
ypos gui.nvl_thought_ypos
1396
xsize gui.nvl_thought_width
1397
min_width gui.nvl_thought_width
1398
text_align gui.nvl_thought_xalign
1399
layout ("subtitle" if gui.nvl_text_xalign else "tex")
1402
properties gui.button_properties("nvl_button")
1403
xpos gui.nvl_button_xpos
1404
xanchor gui.nvl_button_xalign
1406
style nvl_button_text:
1407
properties gui.button_text_properties("nvl_button")
1411
################################################################################
1412
## Variantes pour les mobiles
1413
################################################################################
1419
## Comme la souris peut ne pas être présente, nous remplaçons le menu rapide
1420
## avec une version qui utilise des boutons plus gros et qui sont plus faciles à
1421
## toucher du doigt.
1422
screen quick_menu():
1430
style_prefix "quick"
1435
textbutton _("Retour") action Rollback()
1436
textbutton _("Avance rapide") action Skip() alternate Skip(fast=True, confirm=True)
1437
textbutton _("Auto") action Preference("auto-forward", "toggle")
1438
textbutton _("Menu") action ShowMenu()
1443
background "gui/phone/textbox.png"
1447
foreground "gui/phone/button/radio_[prefix_]foreground.png"
1451
foreground "gui/phone/button/check_[prefix_]foreground.png"
1455
background "gui/phone/nvl.png"
1457
style main_menu_frame:
1459
background "gui/phone/overlay/main_menu.png"
1461
style game_menu_outer_frame:
1463
background "gui/phone/overlay/game_menu.png"
1465
style game_menu_navigation_frame:
1469
style game_menu_content_frame:
1480
left_bar Frame("gui/phone/bar/left.png", gui.bar_borders, tile=gui.bar_tile)
1481
right_bar Frame("gui/phone/bar/right.png", gui.bar_borders, tile=gui.bar_tile)
1486
top_bar Frame("gui/phone/bar/top.png", gui.vbar_borders, tile=gui.bar_tile)
1487
bottom_bar Frame("gui/phone/bar/bottom.png", gui.vbar_borders, tile=gui.bar_tile)
1491
ysize gui.scrollbar_size
1492
base_bar Frame("gui/phone/scrollbar/horizontal_[prefix_]bar.png", gui.scrollbar_borders, tile=gui.scrollbar_tile)
1493
thumb Frame("gui/phone/scrollbar/horizontal_[prefix_]thumb.png", gui.scrollbar_borders, tile=gui.scrollbar_tile)
1497
xsize gui.scrollbar_size
1498
base_bar Frame("gui/phone/scrollbar/vertical_[prefix_]bar.png", gui.vscrollbar_borders, tile=gui.scrollbar_tile)
1499
thumb Frame("gui/phone/scrollbar/vertical_[prefix_]thumb.png", gui.vscrollbar_borders, tile=gui.scrollbar_tile)
1503
ysize gui.slider_size
1504
base_bar Frame("gui/phone/slider/horizontal_[prefix_]bar.png", gui.slider_borders, tile=gui.slider_tile)
1505
thumb "gui/phone/slider/horizontal_[prefix_]thumb.png"
1509
xsize gui.slider_size
1510
base_bar Frame("gui/phone/slider/vertical_[prefix_]bar.png", gui.vslider_borders, tile=gui.slider_tile)
1511
thumb "gui/phone/slider/vertical_[prefix_]thumb.png"
1517
style slider_slider: