~klnavarro98/klnovels/pour_la_compagnie

« back to all changes in this revision

Viewing changes to game/screens.rpy

  • Committer: MiKael NAVARRO
  • Date: 2023-03-16 07:23:42 UTC
  • Revision ID: klnavarro@mailo.com-20230316072342-qofjmr0k36gsmv8k
Initialisation du projet Ren'py 7.5.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
################################################################################
 
2
## Initialisation
 
3
################################################################################
 
4
 
 
5
init offset = -1
 
6
 
 
7
 
 
8
################################################################################
 
9
## Styles
 
10
################################################################################
 
11
 
 
12
style default:
 
13
    properties gui.text_properties()
 
14
    language gui.language
 
15
 
 
16
style input:
 
17
    properties gui.text_properties("input", accent=True)
 
18
    adjust_spacing False
 
19
 
 
20
style hyperlink_text:
 
21
    properties gui.text_properties("hyperlink", accent=True)
 
22
    hover_underline True
 
23
 
 
24
style gui_text:
 
25
    properties gui.text_properties("interface")
 
26
 
 
27
 
 
28
style button:
 
29
    properties gui.button_properties("button")
 
30
 
 
31
style button_text is gui_text:
 
32
    properties gui.text_properties("button")
 
33
    yalign 0.5
 
34
 
 
35
 
 
36
style label_text is gui_text:
 
37
    properties gui.text_properties("label", accent=True)
 
38
 
 
39
style prompt_text is gui_text:
 
40
    properties gui.text_properties("prompt")
 
41
 
 
42
 
 
43
style bar:
 
44
    ysize gui.bar_size
 
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)
 
47
 
 
48
style vbar:
 
49
    xsize gui.bar_size
 
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)
 
52
 
 
53
style scrollbar:
 
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)
 
57
 
 
58
style vscrollbar:
 
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)
 
62
 
 
63
style slider:
 
64
    ysize gui.slider_size
 
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"
 
67
 
 
68
style vslider:
 
69
    xsize gui.slider_size
 
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"
 
72
 
 
73
 
 
74
style frame:
 
75
    padding gui.frame_borders.padding
 
76
    background Frame("gui/frame.png", gui.frame_borders, tile=gui.frame_tile)
 
77
 
 
78
 
 
79
 
 
80
################################################################################
 
81
## Écrans de jeu
 
82
################################################################################
 
83
 
 
84
 
 
85
## Écran des dialogues #########################################################
 
86
##
 
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é.)
 
91
##
 
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.
 
95
##
 
96
## https://www.renpy.org/doc/html/screen_special.html#say
 
97
 
 
98
screen say(who, what):
 
99
    style_prefix "say"
 
100
 
 
101
    window:
 
102
        id "window"
 
103
 
 
104
        if who is not None:
 
105
 
 
106
            window:
 
107
                id "namebox"
 
108
                style "namebox"
 
109
                text who id "who"
 
110
 
 
111
        text what id "what"
 
112
 
 
113
 
 
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
 
118
 
 
119
 
 
120
## Rendre la boîte du nom personnalisable à travers l'objet Character.
 
121
init python:
 
122
    config.character_id_prefixes.append('namebox')
 
123
 
 
124
style window is default
 
125
style say_label is default
 
126
style say_dialogue is default
 
127
style say_thought is say_dialogue
 
128
 
 
129
style namebox is default
 
130
style namebox_label is say_label
 
131
 
 
132
 
 
133
style window:
 
134
    xalign 0.5
 
135
    xfill True
 
136
    yalign gui.textbox_yalign
 
137
    ysize gui.textbox_height
 
138
 
 
139
    background Image("gui/textbox.png", xalign=0.5, yalign=1.0)
 
140
 
 
141
style namebox:
 
142
    xpos gui.name_xpos
 
143
    xanchor gui.name_xalign
 
144
    xsize gui.namebox_width
 
145
    ypos gui.name_ypos
 
146
    ysize gui.namebox_height
 
147
 
 
148
    background Frame("gui/namebox.png", gui.namebox_borders, tile=gui.namebox_tile, xalign=gui.name_xalign)
 
149
    padding gui.namebox_borders.padding
 
150
 
 
151
style say_label:
 
152
    properties gui.text_properties("name", accent=True)
 
153
    xalign gui.name_xalign
 
154
    yalign 0.5
 
155
 
 
156
style say_dialogue:
 
157
    properties gui.text_properties("dialogue")
 
158
 
 
159
    xpos gui.dialogue_xpos
 
160
    xsize gui.dialogue_width
 
161
    ypos gui.dialogue_ypos
 
162
 
 
163
    adjust_spacing False
 
164
 
 
165
## Écran de saisie #############################################################
 
166
##
 
167
## Cet écran est utilisé pour afficher renpy.input. Le paramètre prompt est
 
168
## utilisé pour passer le texte par défaut.
 
169
##
 
170
## This screen must create an input displayable with id "input" to accept the
 
171
## various input parameters.
 
172
##
 
173
## https://www.renpy.org/doc/html/screen_special.html#input
 
174
 
 
175
screen input(prompt):
 
176
    style_prefix "input"
 
177
 
 
178
    window:
 
179
 
 
180
        vbox:
 
181
            xanchor gui.dialogue_text_xalign
 
182
            xpos gui.dialogue_xpos
 
183
            xsize gui.dialogue_width
 
184
            ypos gui.dialogue_ypos
 
185
 
 
186
            text prompt style "input_prompt"
 
187
            input id "input"
 
188
 
 
189
style input_prompt is default
 
190
 
 
191
style input_prompt:
 
192
    xalign gui.dialogue_text_xalign
 
193
    properties gui.text_properties("input_prompt")
 
194
 
 
195
style input:
 
196
    xalign gui.dialogue_text_xalign
 
197
    xmaximum gui.dialogue_width
 
198
 
 
199
 
 
200
## Écran des choix #############################################################
 
201
##
 
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.
 
205
##
 
206
## https://www.renpy.org/doc/html/screen_special.html#choice
 
207
 
 
208
screen choice(items):
 
209
    style_prefix "choice"
 
210
 
 
211
    vbox:
 
212
        for i in items:
 
213
            textbutton i.caption action i.action
 
214
 
 
215
 
 
216
style choice_vbox is vbox
 
217
style choice_button is button
 
218
style choice_button_text is button_text
 
219
 
 
220
style choice_vbox:
 
221
    xalign 0.5
 
222
    ypos 270
 
223
    yanchor 0.5
 
224
 
 
225
    spacing gui.choice_spacing
 
226
 
 
227
style choice_button is default:
 
228
    properties gui.button_properties("choice_button")
 
229
 
 
230
style choice_button_text is default:
 
231
    properties gui.button_text_properties("choice_button")
 
232
 
 
233
 
 
234
## Écran des menus rapides #####################################################
 
235
##
 
236
## Les menus rapides sont affichés dans le jeu pour permettre un accès rapide à
 
237
## certaines fonctions.
 
238
 
 
239
screen quick_menu():
 
240
 
 
241
    ## Assure qu'il apparaît au-dessus des autres screens.
 
242
    zorder 100
 
243
 
 
244
    if quick_menu:
 
245
 
 
246
        hbox:
 
247
            style_prefix "quick"
 
248
 
 
249
            xalign 0.5
 
250
            yalign 1.0
 
251
 
 
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')
 
260
 
 
261
 
 
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.
 
264
init python:
 
265
    config.overlay_screens.append("quick_menu")
 
266
 
 
267
default quick_menu = True
 
268
 
 
269
style quick_button is default
 
270
style quick_button_text is button_text
 
271
 
 
272
style quick_button:
 
273
    properties gui.button_properties("quick_button")
 
274
 
 
275
style quick_button_text:
 
276
    properties gui.button_text_properties("quick_button")
 
277
 
 
278
 
 
279
################################################################################
 
280
## Screens du menu principal et du menu de jeu
 
281
################################################################################
 
282
 
 
283
## Écran de navigation #########################################################
 
284
##
 
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.
 
287
 
 
288
screen navigation():
 
289
 
 
290
    vbox:
 
291
        style_prefix "navigation"
 
292
 
 
293
        xpos gui.navigation_xpos
 
294
        yalign 0.5
 
295
 
 
296
        spacing gui.navigation_spacing
 
297
 
 
298
        if main_menu:
 
299
 
 
300
            textbutton _("Nouvelle partie") action Start()
 
301
 
 
302
        else:
 
303
 
 
304
            textbutton _("Historique") action ShowMenu("history")
 
305
 
 
306
            textbutton _("Sauvegarde") action ShowMenu("save")
 
307
 
 
308
        textbutton _("Charger") action ShowMenu("load")
 
309
 
 
310
        textbutton _("Préférences") action ShowMenu("preferences")
 
311
 
 
312
        if _in_replay:
 
313
 
 
314
            textbutton _("Fin de la rediffusion") action EndReplay(confirm=True)
 
315
 
 
316
        elif not main_menu:
 
317
 
 
318
            textbutton _("Menu principal") action MainMenu()
 
319
 
 
320
        textbutton _("À propos") action ShowMenu("about")
 
321
 
 
322
        if renpy.variant("pc") or (renpy.variant("web") and not renpy.variant("mobile")):
 
323
 
 
324
            ## L'aide n’est ni nécessaire ni pertinente sur les appareils
 
325
            ## mobiles.
 
326
            textbutton _("Aide") action ShowMenu("help")
 
327
 
 
328
        if renpy.variant("pc"):
 
329
 
 
330
            ## Le bouton pour quitter est banni sur iOS et inutile sur Android
 
331
            ## et sur le Web.
 
332
            textbutton _("Quitter") action Quit(confirm=not main_menu)
 
333
 
 
334
 
 
335
style navigation_button is gui_button
 
336
style navigation_button_text is gui_button_text
 
337
 
 
338
style navigation_button:
 
339
    size_group "navigation"
 
340
    properties gui.button_properties("navigation_button")
 
341
 
 
342
style navigation_button_text:
 
343
    properties gui.button_text_properties("navigation_button")
 
344
 
 
345
 
 
346
## Écran du menu principal #####################################################
 
347
##
 
348
## Utilisé pour afficher le menu principal quand Ren'Py démarre.
 
349
##
 
350
## https://www.renpy.org/doc/html/screen_special.html#main-menu
 
351
 
 
352
screen main_menu():
 
353
 
 
354
    ## Ceci assure que tout autre screen de menu est remplacé.
 
355
    tag menu
 
356
 
 
357
    add gui.main_menu_background
 
358
 
 
359
    ## Cette frame vide obscurcit le menu principal.
 
360
    frame:
 
361
        style "main_menu_frame"
 
362
 
 
363
    ## The use statement includes another screen inside this one. The actual
 
364
    ## contents of the main menu are in the navigation screen.
 
365
    use navigation
 
366
 
 
367
    if gui.show_name:
 
368
 
 
369
        vbox:
 
370
            style "main_menu_vbox"
 
371
 
 
372
            text "[config.name!t]":
 
373
                style "main_menu_title"
 
374
 
 
375
            text "[config.version]":
 
376
                style "main_menu_version"
 
377
 
 
378
 
 
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
 
384
 
 
385
style main_menu_frame:
 
386
    xsize 280
 
387
    yfill True
 
388
 
 
389
    background "gui/overlay/main_menu.png"
 
390
 
 
391
style main_menu_vbox:
 
392
    xalign 1.0
 
393
    xoffset -20
 
394
    xmaximum 800
 
395
    yalign 1.0
 
396
    yoffset -20
 
397
 
 
398
style main_menu_text:
 
399
    properties gui.text_properties("main_menu", accent=True)
 
400
 
 
401
style main_menu_title:
 
402
    properties gui.text_properties("title")
 
403
 
 
404
style main_menu_version:
 
405
    properties gui.text_properties("version")
 
406
 
 
407
 
 
408
## Écran du menu de jeu ########################################################
 
409
##
 
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.
 
412
##
 
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.
 
416
 
 
417
screen game_menu(title, scroll=None, yinitial=0.0):
 
418
 
 
419
    style_prefix "game_menu"
 
420
 
 
421
    if main_menu:
 
422
        add gui.main_menu_background
 
423
    else:
 
424
        add gui.game_menu_background
 
425
 
 
426
    frame:
 
427
        style "game_menu_outer_frame"
 
428
 
 
429
        hbox:
 
430
 
 
431
            ## Réserve de l'expace pour la section de navigation.
 
432
            frame:
 
433
                style "game_menu_navigation_frame"
 
434
 
 
435
            frame:
 
436
                style "game_menu_content_frame"
 
437
 
 
438
                if scroll == "viewport":
 
439
 
 
440
                    viewport:
 
441
                        yinitial yinitial
 
442
                        scrollbars "vertical"
 
443
                        mousewheel True
 
444
                        draggable True
 
445
                        pagekeys True
 
446
 
 
447
                        side_yfill True
 
448
 
 
449
                        vbox:
 
450
                            transclude
 
451
 
 
452
                elif scroll == "vpgrid":
 
453
 
 
454
                    vpgrid:
 
455
                        cols 1
 
456
                        yinitial yinitial
 
457
 
 
458
                        scrollbars "vertical"
 
459
                        mousewheel True
 
460
                        draggable True
 
461
                        pagekeys True
 
462
 
 
463
                        side_yfill True
 
464
 
 
465
                        transclude
 
466
 
 
467
                else:
 
468
 
 
469
                    transclude
 
470
 
 
471
    use navigation
 
472
 
 
473
    textbutton _("Retour"):
 
474
        style "return_button"
 
475
 
 
476
        action Return()
 
477
 
 
478
    label title
 
479
 
 
480
    if main_menu:
 
481
        key "game_menu" action ShowMenu("main_menu")
 
482
 
 
483
 
 
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
 
490
 
 
491
style game_menu_label is gui_label
 
492
style game_menu_label_text is gui_label_text
 
493
 
 
494
style return_button is navigation_button
 
495
style return_button_text is navigation_button_text
 
496
 
 
497
style game_menu_outer_frame:
 
498
    bottom_padding 30
 
499
    top_padding 120
 
500
 
 
501
    background "gui/overlay/game_menu.png"
 
502
 
 
503
style game_menu_navigation_frame:
 
504
    xsize 280
 
505
    yfill True
 
506
 
 
507
style game_menu_content_frame:
 
508
    left_margin 40
 
509
    right_margin 20
 
510
    top_margin 10
 
511
 
 
512
style game_menu_viewport:
 
513
    xsize 920
 
514
 
 
515
style game_menu_vscrollbar:
 
516
    unscrollable gui.unscrollable
 
517
 
 
518
style game_menu_side:
 
519
    spacing 10
 
520
 
 
521
style game_menu_label:
 
522
    xpos 50
 
523
    ysize 120
 
524
 
 
525
style game_menu_label_text:
 
526
    size gui.title_text_size
 
527
    color gui.accent_color
 
528
    yalign 0.5
 
529
 
 
530
style return_button:
 
531
    xpos gui.navigation_xpos
 
532
    yalign 1.0
 
533
    yoffset -30
 
534
 
 
535
 
 
536
## Écran « À propos... » #######################################################
 
537
##
 
538
## Cet écran présente le générique, les crédits et les informations de copyright
 
539
## relatives au jeu et à Ren’Py.
 
540
##
 
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é.
 
543
 
 
544
screen about():
 
545
 
 
546
    tag menu
 
547
 
 
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"):
 
551
 
 
552
        style_prefix "about"
 
553
 
 
554
        vbox:
 
555
 
 
556
            label "[config.name!t]"
 
557
            text _("Version [config.version!t]\n")
 
558
 
 
559
            ## gui.about est généralement initialisé dans le fichier
 
560
            ## options.rpy.
 
561
            if gui.about:
 
562
                text "[gui.about!t]\n"
 
563
 
 
564
            text _("Conçu avec {a=https://www.renpy.org/}Ren'Py{/a} [renpy.version_only].\n\n[renpy.license!t]")
 
565
 
 
566
 
 
567
style about_label is gui_label
 
568
style about_label_text is gui_label_text
 
569
style about_text is gui_text
 
570
 
 
571
style about_label_text:
 
572
    size gui.label_text_size
 
573
 
 
574
 
 
575
## Écran de chargement et de sauvegarde ########################################
 
576
##
 
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).
 
581
##
 
582
## https://www.renpy.org/doc/html/screen_special.html#save https://
 
583
## www.renpy.org/doc/html/screen_special.html#load
 
584
 
 
585
screen save():
 
586
 
 
587
    tag menu
 
588
 
 
589
    use file_slots(_("Sauvegarde"))
 
590
 
 
591
 
 
592
screen load():
 
593
 
 
594
    tag menu
 
595
 
 
596
    use file_slots(_("Charger"))
 
597
 
 
598
 
 
599
screen file_slots(title):
 
600
 
 
601
    default page_name_value = FilePageNameInputValue(pattern=_("Page {}"), auto=_("Sauvegardes automatiques"), quick=_("Sauvegardes rapides"))
 
602
 
 
603
    use game_menu(title):
 
604
 
 
605
        fixed:
 
606
 
 
607
            ## Cette instruction s’assure que l’évènement enter aura lieu avant
 
608
            ## que l’un des boutons ne fonctionne.
 
609
            order_reverse True
 
610
 
 
611
            ## Le nom de la page, qui peut être modifié en cliquant sur un
 
612
            ## bouton.
 
613
            button:
 
614
                style "page_label"
 
615
 
 
616
                key_events True
 
617
                xalign 0.5
 
618
                action page_name_value.Toggle()
 
619
 
 
620
                input:
 
621
                    style "page_label_text"
 
622
                    value page_name_value
 
623
 
 
624
            ## La grille des emplacements de fichiers.
 
625
            grid gui.file_slot_cols gui.file_slot_rows:
 
626
                style_prefix "slot"
 
627
 
 
628
                xalign 0.5
 
629
                yalign 0.5
 
630
 
 
631
                spacing gui.slot_spacing
 
632
 
 
633
                for i in range(gui.file_slot_cols * gui.file_slot_rows):
 
634
 
 
635
                    $ slot = i + 1
 
636
 
 
637
                    button:
 
638
                        action FileAction(slot)
 
639
 
 
640
                        has vbox
 
641
 
 
642
                        add FileScreenshot(slot) xalign 0.5
 
643
 
 
644
                        text FileTime(slot, format=_("{#file_time}%A %d %B %Y, %H:%M"), empty=_("emplacement vide")):
 
645
                            style "slot_time_text"
 
646
 
 
647
                        text FileSaveName(slot):
 
648
                            style "slot_name_text"
 
649
 
 
650
                        key "save_delete" action FileDelete(slot)
 
651
 
 
652
            ## Boutons pour accéder aux autres pages.
 
653
            hbox:
 
654
                style_prefix "page"
 
655
 
 
656
                xalign 0.5
 
657
                yalign 1.0
 
658
 
 
659
                spacing gui.page_spacing
 
660
 
 
661
                textbutton _("<") action FilePagePrevious()
 
662
 
 
663
                if config.has_autosave:
 
664
                    textbutton _("{#auto_page}A") action FilePage("auto")
 
665
 
 
666
                if config.has_quicksave:
 
667
                    textbutton _("{#quick_page}Q") action FilePage("quick")
 
668
 
 
669
                ## range(1, 10) donne les nombres de 1 à 9.
 
670
                for page in range(1, 10):
 
671
                    textbutton "[page]" action FilePage(page)
 
672
 
 
673
                textbutton _(">") action FilePageNext()
 
674
 
 
675
 
 
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
 
680
 
 
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
 
685
 
 
686
style page_label:
 
687
    xpadding 50
 
688
    ypadding 3
 
689
 
 
690
style page_label_text:
 
691
    text_align 0.5
 
692
    layout "subtitle"
 
693
    hover_color gui.hover_color
 
694
 
 
695
style page_button:
 
696
    properties gui.button_properties("page_button")
 
697
 
 
698
style page_button_text:
 
699
    properties gui.button_text_properties("page_button")
 
700
 
 
701
style slot_button:
 
702
    properties gui.button_properties("slot_button")
 
703
 
 
704
style slot_button_text:
 
705
    properties gui.button_text_properties("slot_button")
 
706
 
 
707
 
 
708
## Écran des préférences #######################################################
 
709
##
 
710
## L’écran de préférences permet au joueur de configurer le jeu pour mieux
 
711
## correspondre à ses attentes.
 
712
##
 
713
## https://www.renpy.org/doc/html/screen_special.html#preferences
 
714
 
 
715
screen preferences():
 
716
 
 
717
    tag menu
 
718
 
 
719
    use game_menu(_("Préférences"), scroll="viewport"):
 
720
 
 
721
        vbox:
 
722
 
 
723
            hbox:
 
724
                box_wrap True
 
725
 
 
726
                if renpy.variant("pc") or renpy.variant("web"):
 
727
 
 
728
                    vbox:
 
729
                        style_prefix "radio"
 
730
                        label _("Affichage")
 
731
                        textbutton _("Fenêtre") action Preference("display", "window")
 
732
                        textbutton _("Plein écran") action Preference("display", "fullscreen")
 
733
 
 
734
                vbox:
 
735
                    style_prefix "check"
 
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"))
 
740
 
 
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.
 
744
 
 
745
            null height (4 * gui.pref_spacing)
 
746
 
 
747
            hbox:
 
748
                style_prefix "slider"
 
749
                box_wrap True
 
750
 
 
751
                vbox:
 
752
 
 
753
                    label _("Vitesse du texte")
 
754
 
 
755
                    bar value Preference("text speed")
 
756
 
 
757
                    label _("Avance automatique")
 
758
 
 
759
                    bar value Preference("auto-forward time")
 
760
 
 
761
                vbox:
 
762
 
 
763
                    if config.has_music:
 
764
                        label _("Volume de la musique")
 
765
 
 
766
                        hbox:
 
767
                            bar value Preference("music volume")
 
768
 
 
769
                    if config.has_sound:
 
770
 
 
771
                        label _("Volume des sons")
 
772
 
 
773
                        hbox:
 
774
                            bar value Preference("sound volume")
 
775
 
 
776
                            if config.sample_sound:
 
777
                                textbutton _("Test") action Play("sound", config.sample_sound)
 
778
 
 
779
 
 
780
                    if config.has_voice:
 
781
                        label _("Volume des voix")
 
782
 
 
783
                        hbox:
 
784
                            bar value Preference("voice volume")
 
785
 
 
786
                            if config.sample_voice:
 
787
                                textbutton _("Test") action Play("voice", config.sample_voice)
 
788
 
 
789
                    if config.has_music or config.has_sound or config.has_voice:
 
790
                        null height gui.pref_spacing
 
791
 
 
792
                        textbutton _("Couper tous les sons"):
 
793
                            action Preference("all mute", "toggle")
 
794
                            style "mute_all_button"
 
795
 
 
796
 
 
797
style pref_label is gui_label
 
798
style pref_label_text is gui_label_text
 
799
style pref_vbox is vbox
 
800
 
 
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
 
806
 
 
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
 
812
 
 
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
 
819
 
 
820
style mute_all_button is check_button
 
821
style mute_all_button_text is check_button_text
 
822
 
 
823
style pref_label:
 
824
    top_margin gui.pref_spacing
 
825
    bottom_margin 2
 
826
 
 
827
style pref_label_text:
 
828
    yalign 1.0
 
829
 
 
830
style pref_vbox:
 
831
    xsize 225
 
832
 
 
833
style radio_vbox:
 
834
    spacing gui.pref_button_spacing
 
835
 
 
836
style radio_button:
 
837
    properties gui.button_properties("radio_button")
 
838
    foreground "gui/button/radio_[prefix_]foreground.png"
 
839
 
 
840
style radio_button_text:
 
841
    properties gui.button_text_properties("radio_button")
 
842
 
 
843
style check_vbox:
 
844
    spacing gui.pref_button_spacing
 
845
 
 
846
style check_button:
 
847
    properties gui.button_properties("check_button")
 
848
    foreground "gui/button/check_[prefix_]foreground.png"
 
849
 
 
850
style check_button_text:
 
851
    properties gui.button_text_properties("check_button")
 
852
 
 
853
style slider_slider:
 
854
    xsize 350
 
855
 
 
856
style slider_button:
 
857
    properties gui.button_properties("slider_button")
 
858
    yalign 0.5
 
859
    left_margin 10
 
860
 
 
861
style slider_button_text:
 
862
    properties gui.button_text_properties("slider_button")
 
863
 
 
864
style slider_vbox:
 
865
    xsize 450
 
866
 
 
867
 
 
868
## Écran de l'historique #######################################################
 
869
##
 
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.
 
873
##
 
874
## https://www.renpy.org/doc/html/history.html
 
875
 
 
876
screen history():
 
877
 
 
878
    tag menu
 
879
 
 
880
    ## Cette instruction permet d’éviter de prédire cet écran, car il peut être
 
881
    ## très large
 
882
    predict False
 
883
 
 
884
    use game_menu(_("Historique"), scroll=("vpgrid" if gui.history_height else "viewport"), yinitial=1.0):
 
885
 
 
886
        style_prefix "history"
 
887
 
 
888
        for h in _history_list:
 
889
 
 
890
            window:
 
891
 
 
892
                ## Cela positionne correctement l'écran si history_height est
 
893
                ## initialisé à None.
 
894
                has fixed:
 
895
                    yfit True
 
896
 
 
897
                if h.who:
 
898
 
 
899
                    label h.who:
 
900
                        style "history_name"
 
901
                        substitute False
 
902
 
 
903
                        ## Utilise pour la couleur du texte, la couleur par
 
904
                        ## défaut des dialogues du personnage si elle a été
 
905
                        ## initialisée.
 
906
                        if "color" in h.who_args:
 
907
                            text_color h.who_args["color"]
 
908
 
 
909
                $ what = renpy.filter_text_tags(h.what, allow=gui.history_allow_tags)
 
910
                text what:
 
911
                    substitute False
 
912
 
 
913
        if not _history_list:
 
914
            label _("L'historique des dialogues est vide.")
 
915
 
 
916
 
 
917
## Ceci détermine quels tags peuvent être affichés sur le screen de
 
918
## l'historique.
 
919
 
 
920
define gui.history_allow_tags = { "alt", "noalt", "rt", "rb", "art" }
 
921
 
 
922
 
 
923
style history_window is empty
 
924
 
 
925
style history_name is gui_label
 
926
style history_name_text is gui_label_text
 
927
style history_text is gui_text
 
928
 
 
929
style history_label is gui_label
 
930
style history_label_text is gui_label_text
 
931
 
 
932
style history_window:
 
933
    xfill True
 
934
    ysize gui.history_height
 
935
 
 
936
style history_name:
 
937
    xpos gui.history_name_xpos
 
938
    xanchor gui.history_name_xalign
 
939
    ypos gui.history_name_ypos
 
940
    xsize gui.history_name_width
 
941
 
 
942
style history_name_text:
 
943
    min_width gui.history_name_width
 
944
    text_align gui.history_name_xalign
 
945
 
 
946
style history_text:
 
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")
 
954
 
 
955
style history_label:
 
956
    xfill True
 
957
 
 
958
style history_label_text:
 
959
    xalign 0.5
 
960
 
 
961
 
 
962
## Écran d'aide ################################################################
 
963
##
 
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.
 
967
 
 
968
screen help():
 
969
 
 
970
    tag menu
 
971
 
 
972
    default device = "keyboard"
 
973
 
 
974
    use game_menu(_("Aide"), scroll="viewport"):
 
975
 
 
976
        style_prefix "help"
 
977
 
 
978
        vbox:
 
979
            spacing 15
 
980
 
 
981
            hbox:
 
982
 
 
983
                textbutton _("Clavier") action SetScreenVariable("device", "keyboard")
 
984
                textbutton _("Souris") action SetScreenVariable("device", "mouse")
 
985
 
 
986
                if GamepadExists():
 
987
                    textbutton _("Manette") action SetScreenVariable("device", "gamepad")
 
988
 
 
989
            if device == "keyboard":
 
990
                use keyboard_help
 
991
            elif device == "mouse":
 
992
                use mouse_help
 
993
            elif device == "gamepad":
 
994
                use gamepad_help
 
995
 
 
996
 
 
997
screen keyboard_help():
 
998
 
 
999
    hbox:
 
1000
        label _("Entrée")
 
1001
        text _("Avance dans les dialogues et active l’interface (effectue un choix).")
 
1002
 
 
1003
    hbox:
 
1004
        label _("Espace")
 
1005
        text _("Avance dans les dialogues sans effectuer de choix.")
 
1006
 
 
1007
    hbox:
 
1008
        label _("Flèches directionnelles")
 
1009
        text _("Permet de se déplacer dans l’interface.")
 
1010
 
 
1011
    hbox:
 
1012
        label _("Echap.")
 
1013
        text _("Ouvre le menu du jeu.")
 
1014
 
 
1015
    hbox:
 
1016
        label _("Ctrl")
 
1017
        text _("Fait défiler les dialogues tant que la touche est pressée.")
 
1018
 
 
1019
    hbox:
 
1020
        label _("Tab")
 
1021
        text _("Active ou désactives les «sauts des dialogues».")
 
1022
 
 
1023
    hbox:
 
1024
        label _("Page Haut")
 
1025
        text _("Retourne au précédent dialogue.")
 
1026
 
 
1027
    hbox:
 
1028
        label _("Page Bas")
 
1029
        text _("Avance jusqu'au prochain dialogue.")
 
1030
 
 
1031
    hbox:
 
1032
        label "H"
 
1033
        text _("Cache l’interface utilisateur.")
 
1034
 
 
1035
    hbox:
 
1036
        label "S"
 
1037
        text _("Prend une capture d’écran.")
 
1038
 
 
1039
    hbox:
 
1040
        label "V"
 
1041
        text _("Active la {a=https://www.renpy.org/l/voicing}{size=24}vocalisation automatique{/size}{/a}.")
 
1042
 
 
1043
    hbox:
 
1044
        label "Shift+A"
 
1045
        text _("Ouvre le menu d'accessibilité.")
 
1046
 
 
1047
 
 
1048
screen mouse_help():
 
1049
 
 
1050
    hbox:
 
1051
        label _("Bouton gauche")
 
1052
        text _("Avance dans les dialogues et active l’interface (effectue un choix).")
 
1053
 
 
1054
    hbox:
 
1055
        label _("Bouton central")
 
1056
        text _("Cache l’interface utilisateur.")
 
1057
 
 
1058
    hbox:
 
1059
        label _("Bouton droit")
 
1060
        text _("Ouvre le menu du jeu.")
 
1061
 
 
1062
    hbox:
 
1063
        label _("Molette vers le haut\nClic sur le côté du Rollback")
 
1064
        text _("Retourne au précédent dialogue.")
 
1065
 
 
1066
    hbox:
 
1067
        label _("Molette vers le bas")
 
1068
        text _("Avance jusqu'au prochain dialogue.")
 
1069
 
 
1070
 
 
1071
screen gamepad_help():
 
1072
 
 
1073
    hbox:
 
1074
        label _("Bouton R1\nA/Bouton du bas")
 
1075
        text _("Avance dans les dialogues et active l’interface (effectue un choix).")
 
1076
 
 
1077
    hbox:
 
1078
        label _("Gâchettes gauche")
 
1079
        text _("Retourne au précédent dialogue.")
 
1080
 
 
1081
    hbox:
 
1082
        label _("Bouton R1")
 
1083
        text _("Avance jusqu'au prochain dialogue.")
 
1084
 
 
1085
 
 
1086
    hbox:
 
1087
        label _("Boutons directionnels, stick gauche")
 
1088
        text _("Permet de se déplacer dans l’interface.")
 
1089
 
 
1090
    hbox:
 
1091
        label _("Start, Guide")
 
1092
        text _("Ouvre le menu du jeu.")
 
1093
 
 
1094
    hbox:
 
1095
        label _("Y/Bouton du haut")
 
1096
        text _("Cache l’interface utilisateur.")
 
1097
 
 
1098
    textbutton _("Calibrage") action GamepadCalibrate()
 
1099
 
 
1100
 
 
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
 
1106
 
 
1107
style help_button:
 
1108
    properties gui.button_properties("help_button")
 
1109
    xmargin 8
 
1110
 
 
1111
style help_button_text:
 
1112
    properties gui.button_text_properties("help_button")
 
1113
 
 
1114
style help_label:
 
1115
    xsize 250
 
1116
    right_padding 20
 
1117
 
 
1118
style help_label_text:
 
1119
    size gui.text_size
 
1120
    xalign 1.0
 
1121
    text_align 1.0
 
1122
 
 
1123
 
 
1124
 
 
1125
################################################################################
 
1126
## Écrans additionnels
 
1127
################################################################################
 
1128
 
 
1129
 
 
1130
## Écran de confirmation #######################################################
 
1131
##
 
1132
## Cet écran est appelé quand Ren'Py souhaite poser une question au joueur dont
 
1133
## la réponse est oui ou non.
 
1134
##
 
1135
## https://www.renpy.org/doc/html/screen_special.html#confirm
 
1136
 
 
1137
screen confirm(message, yes_action, no_action):
 
1138
 
 
1139
    ## Cette instruction s’assure que les autres écrans resteront en arrière
 
1140
    ## plan tant que cet écran sera affiché.
 
1141
    modal True
 
1142
 
 
1143
    zorder 200
 
1144
 
 
1145
    style_prefix "confirm"
 
1146
 
 
1147
    add "gui/overlay/confirm.png"
 
1148
 
 
1149
    frame:
 
1150
 
 
1151
        vbox:
 
1152
            xalign .5
 
1153
            yalign .5
 
1154
            spacing 30
 
1155
 
 
1156
            label _(message):
 
1157
                style "confirm_prompt"
 
1158
                xalign 0.5
 
1159
 
 
1160
            hbox:
 
1161
                xalign 0.5
 
1162
                spacing 100
 
1163
 
 
1164
                textbutton _("Oui") action yes_action
 
1165
                textbutton _("Non") action no_action
 
1166
 
 
1167
    ## Le clic bouton droit et la touche Echap. correspondent à la réponse
 
1168
    ## "non".
 
1169
    key "game_menu" action no_action
 
1170
 
 
1171
 
 
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
 
1177
 
 
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
 
1181
    xalign .5
 
1182
    yalign .5
 
1183
 
 
1184
style confirm_prompt_text:
 
1185
    text_align 0.5
 
1186
    layout "subtitle"
 
1187
 
 
1188
style confirm_button:
 
1189
    properties gui.button_properties("confirm_button")
 
1190
 
 
1191
style confirm_button_text:
 
1192
    properties gui.button_text_properties("confirm_button")
 
1193
 
 
1194
 
 
1195
## Écran de l’indicateur d'avance rapide #######################################
 
1196
##
 
1197
## L’écran skip_indicator est affiché pour indiquer qu’une avance rapide est en
 
1198
## cours.
 
1199
##
 
1200
## https://www.renpy.org/doc/html/screen_special.html#skip-indicator
 
1201
 
 
1202
screen skip_indicator():
 
1203
 
 
1204
    zorder 100
 
1205
    style_prefix "skip"
 
1206
 
 
1207
    frame:
 
1208
 
 
1209
        hbox:
 
1210
            spacing 6
 
1211
 
 
1212
            text _("Avance rapide")
 
1213
 
 
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"
 
1217
 
 
1218
 
 
1219
## Cette transformation est utilisé pour faire clignoter les flèches l’une après
 
1220
## l’autre.
 
1221
transform delayed_blink(delay, cycle):
 
1222
    alpha .5
 
1223
 
 
1224
    pause delay
 
1225
 
 
1226
    block:
 
1227
        linear .2 alpha 1.0
 
1228
        pause .2
 
1229
        linear .2 alpha 0.5
 
1230
        pause (cycle - .4)
 
1231
        repeat
 
1232
 
 
1233
 
 
1234
style skip_frame is empty
 
1235
style skip_text is gui_text
 
1236
style skip_triangle is skip_text
 
1237
 
 
1238
style skip_frame:
 
1239
    ypos gui.skip_ypos
 
1240
    background Frame("gui/skip.png", gui.skip_frame_borders, tile=gui.frame_tile)
 
1241
    padding gui.skip_frame_borders.padding
 
1242
 
 
1243
style skip_text:
 
1244
    size gui.notify_text_size
 
1245
 
 
1246
style skip_triangle:
 
1247
    ## Nous devons utiliser une police qui a le glyphe BLACK RIGHT-POINTING
 
1248
    ## SMALL TRIANGLE.
 
1249
    font "DejaVuSans.ttf"
 
1250
 
 
1251
 
 
1252
## Écran de notification #######################################################
 
1253
##
 
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
 
1256
## réalisée.)
 
1257
##
 
1258
## https://www.renpy.org/doc/html/screen_special.html#notify-screen
 
1259
 
 
1260
screen notify(message):
 
1261
 
 
1262
    zorder 100
 
1263
    style_prefix "notify"
 
1264
 
 
1265
    frame at notify_appear:
 
1266
        text "[message!tq]"
 
1267
 
 
1268
    timer 3.25 action Hide('notify')
 
1269
 
 
1270
 
 
1271
transform notify_appear:
 
1272
    on show:
 
1273
        alpha 0
 
1274
        linear .25 alpha 1.0
 
1275
    on hide:
 
1276
        linear .5 alpha 0.0
 
1277
 
 
1278
 
 
1279
style notify_frame is empty
 
1280
style notify_text is gui_text
 
1281
 
 
1282
style notify_frame:
 
1283
    ypos gui.notify_ypos
 
1284
 
 
1285
    background Frame("gui/notify.png", gui.notify_frame_borders, tile=gui.frame_tile)
 
1286
    padding gui.notify_frame_borders.padding
 
1287
 
 
1288
style notify_text:
 
1289
    properties gui.text_properties("notify")
 
1290
 
 
1291
 
 
1292
## Écran NVL ###################################################################
 
1293
##
 
1294
## Cet écran est utilisé pour les dialogues et les menus en mode NVL.
 
1295
##
 
1296
## https://www.renpy.org/doc/html/screen_special.html#nvl
 
1297
 
 
1298
 
 
1299
screen nvl(dialogue, items=None):
 
1300
 
 
1301
    window:
 
1302
        style "nvl_window"
 
1303
 
 
1304
        has vbox:
 
1305
            spacing gui.nvl_spacing
 
1306
 
 
1307
        ## Les dialogues sont affichés soit dans une vpgrid soit dans une vbox.
 
1308
        if gui.nvl_height:
 
1309
 
 
1310
            vpgrid:
 
1311
                cols 1
 
1312
                yinitial 1.0
 
1313
 
 
1314
                use nvl_dialogue(dialogue)
 
1315
 
 
1316
        else:
 
1317
 
 
1318
            use nvl_dialogue(dialogue)
 
1319
 
 
1320
        ## Displays the menu, if given. The menu may be displayed incorrectly if
 
1321
        ## config.narrator_menu is set to True.
 
1322
        for i in items:
 
1323
 
 
1324
            textbutton i.caption:
 
1325
                action i.action
 
1326
                style "nvl_button"
 
1327
 
 
1328
    add SideImage() xalign 0.0 yalign 1.0
 
1329
 
 
1330
 
 
1331
screen nvl_dialogue(dialogue):
 
1332
 
 
1333
    for d in dialogue:
 
1334
 
 
1335
        window:
 
1336
            id d.window_id
 
1337
 
 
1338
            fixed:
 
1339
                yfit gui.nvl_height is None
 
1340
 
 
1341
                if d.who is not None:
 
1342
 
 
1343
                    text d.who:
 
1344
                        id d.who_id
 
1345
 
 
1346
                text d.what:
 
1347
                    id d.what_id
 
1348
 
 
1349
 
 
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
 
1353
 
 
1354
style nvl_window is default
 
1355
style nvl_entry is default
 
1356
 
 
1357
style nvl_label is say_label
 
1358
style nvl_dialogue is say_dialogue
 
1359
 
 
1360
style nvl_button is button
 
1361
style nvl_button_text is button_text
 
1362
 
 
1363
style nvl_window:
 
1364
    xfill True
 
1365
    yfill True
 
1366
 
 
1367
    background "gui/nvl.png"
 
1368
    padding gui.nvl_borders.padding
 
1369
 
 
1370
style nvl_entry:
 
1371
    xfill True
 
1372
    ysize gui.nvl_height
 
1373
 
 
1374
style nvl_label:
 
1375
    xpos gui.nvl_name_xpos
 
1376
    xanchor gui.nvl_name_xalign
 
1377
    ypos gui.nvl_name_ypos
 
1378
    yanchor 0.0
 
1379
    xsize gui.nvl_name_width
 
1380
    min_width gui.nvl_name_width
 
1381
    text_align gui.nvl_name_xalign
 
1382
 
 
1383
style nvl_dialogue:
 
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")
 
1391
 
 
1392
style nvl_thought:
 
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")
 
1400
 
 
1401
style nvl_button:
 
1402
    properties gui.button_properties("nvl_button")
 
1403
    xpos gui.nvl_button_xpos
 
1404
    xanchor gui.nvl_button_xalign
 
1405
 
 
1406
style nvl_button_text:
 
1407
    properties gui.button_text_properties("nvl_button")
 
1408
 
 
1409
 
 
1410
 
 
1411
################################################################################
 
1412
## Variantes pour les mobiles
 
1413
################################################################################
 
1414
 
 
1415
style pref_vbox:
 
1416
    variant "medium"
 
1417
    xsize 450
 
1418
 
 
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():
 
1423
    variant "touch"
 
1424
 
 
1425
    zorder 100
 
1426
 
 
1427
    if quick_menu:
 
1428
 
 
1429
        hbox:
 
1430
            style_prefix "quick"
 
1431
 
 
1432
            xalign 0.5
 
1433
            yalign 1.0
 
1434
 
 
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()
 
1439
 
 
1440
 
 
1441
style window:
 
1442
    variant "small"
 
1443
    background "gui/phone/textbox.png"
 
1444
 
 
1445
style radio_button:
 
1446
    variant "small"
 
1447
    foreground "gui/phone/button/radio_[prefix_]foreground.png"
 
1448
 
 
1449
style check_button:
 
1450
    variant "small"
 
1451
    foreground "gui/phone/button/check_[prefix_]foreground.png"
 
1452
 
 
1453
style nvl_window:
 
1454
    variant "small"
 
1455
    background "gui/phone/nvl.png"
 
1456
 
 
1457
style main_menu_frame:
 
1458
    variant "small"
 
1459
    background "gui/phone/overlay/main_menu.png"
 
1460
 
 
1461
style game_menu_outer_frame:
 
1462
    variant "small"
 
1463
    background "gui/phone/overlay/game_menu.png"
 
1464
 
 
1465
style game_menu_navigation_frame:
 
1466
    variant "small"
 
1467
    xsize 340
 
1468
 
 
1469
style game_menu_content_frame:
 
1470
    variant "small"
 
1471
    top_margin 0
 
1472
 
 
1473
style pref_vbox:
 
1474
    variant "small"
 
1475
    xsize 400
 
1476
 
 
1477
style bar:
 
1478
    variant "small"
 
1479
    ysize gui.bar_size
 
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)
 
1482
 
 
1483
style vbar:
 
1484
    variant "small"
 
1485
    xsize gui.bar_size
 
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)
 
1488
 
 
1489
style scrollbar:
 
1490
    variant "small"
 
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)
 
1494
 
 
1495
style vscrollbar:
 
1496
    variant "small"
 
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)
 
1500
 
 
1501
style slider:
 
1502
    variant "small"
 
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"
 
1506
 
 
1507
style vslider:
 
1508
    variant "small"
 
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"
 
1512
 
 
1513
style slider_vbox:
 
1514
    variant "small"
 
1515
    xsize None
 
1516
 
 
1517
style slider_slider:
 
1518
    variant "small"
 
1519
    xsize 600