File: Customizing_the_Interface.html

package info (click to toggle)
renpy 6.6.2.dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 8,740 kB
  • ctags: 3,407
  • sloc: python: 22,153; ansic: 3,724; makefile: 138; lisp: 128; sh: 14
file content (1085 lines) | stat: -rw-r--r-- 70,709 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
<html><head><title>renpy/doc/reference/Customizing the Interface - Ren'Py</title><link href="../shared.css" rel="stylesheet"><link href="../monobook.css" rel="stylesheet"><link href="../common.css" rel="stylesheet"><link href="../monobook2.css" rel="stylesheet"><link href="../docs.css" rel="stylesheet" /></link></link></link></link></head><body><div id="bodyContent">
			<p class="docnav"><a href="../index.html">documentation index</a> &#9702; <a href="Reference_Manual.html">reference manual</a> &#9702; <a href="Function_Index.html">function index</a></p><table class="toc" id="toc" summary="Contents">
<tr>
<td>
<div id="toctitle">
<h2>Contents</h2>
</div>
<ul>
<li class="toclevel-1"><a href="#Customizing_the_Interface"><span class="tocnumber">1</span> <span class="toctext">Customizing the Interface</span></a>
<ul>
<li class="toclevel-2"><a href="#Order_of_Customizations"><span class="tocnumber">1.1</span> <span class="toctext">Order of Customizations</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="#Layouts"><span class="tocnumber">2</span> <span class="toctext">Layouts</span></a>
<ul>
<li class="toclevel-2"><a href="#main_menu_layouts"><span class="tocnumber">2.1</span> <span class="toctext">main_menu layouts</span></a></li>
<li class="toclevel-2"><a href="#navigation_layouts"><span class="tocnumber">2.2</span> <span class="toctext">navigation layouts</span></a></li>
<li class="toclevel-2"><a href="#load_save_layouts"><span class="tocnumber">2.3</span> <span class="toctext">load_save layouts</span></a></li>
<li class="toclevel-2"><a href="#yesno_prompt_layouts"><span class="tocnumber">2.4</span> <span class="toctext">yesno_prompt layouts</span></a></li>
<li class="toclevel-2"><a href="#preferences_layouts"><span class="tocnumber">2.5</span> <span class="toctext">preferences layouts</span></a></li>
<li class="toclevel-2"><a href="#joystick_preferences_layouts"><span class="tocnumber">2.6</span> <span class="toctext">joystick_preferences layouts</span></a></li>
<li class="toclevel-2"><a href="#standalone_layouts"><span class="tocnumber">2.7</span> <span class="toctext">standalone layouts</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="#Defining_New_Layouts"><span class="tocnumber">3</span> <span class="toctext">Defining New Layouts</span></a>
<ul>
<li class="toclevel-2"><a href="#main_menu_layouts_2"><span class="tocnumber">3.1</span> <span class="toctext">main_menu layouts</span></a></li>
<li class="toclevel-2"><a href="#navigation_layouts_2"><span class="tocnumber">3.2</span> <span class="toctext">navigation layouts</span></a></li>
<li class="toclevel-2"><a href="#load_save_layouts_2"><span class="tocnumber">3.3</span> <span class="toctext">load_save layouts</span></a></li>
<li class="toclevel-2"><a href="#yesno_prompt_layouts_2"><span class="tocnumber">3.4</span> <span class="toctext">yesno_prompt layouts</span></a></li>
<li class="toclevel-2"><a href="#preferences_layouts_2"><span class="tocnumber">3.5</span> <span class="toctext">preferences layouts</span></a></li>
<li class="toclevel-2"><a href="#joystick_preferences_layouts_2"><span class="tocnumber">3.6</span> <span class="toctext">joystick_preferences layouts</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="#Themes"><span class="tocnumber">4</span> <span class="toctext">Themes</span></a>
<ul>
<li class="toclevel-2"><a href="#Theme_Functions"><span class="tocnumber">4.1</span> <span class="toctext">Theme Functions</span></a>
<ul>
<li class="toclevel-3"><a href="#Component_functions"><span class="tocnumber">4.1.1</span> <span class="toctext">Component functions</span></a></li>
<li class="toclevel-3"><a href="#Component_functions_2"><span class="tocnumber">4.1.2</span> <span class="toctext">Component functions</span></a></li>
</ul>
</li>
<li class="toclevel-2"><a href="#Theme_Modifiers"><span class="tocnumber">4.2</span> <span class="toctext">Theme Modifiers</span></a></li>
<li class="toclevel-2"><a href="#Custom_Theme"><span class="tocnumber">4.3</span> <span class="toctext">Custom Theme</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="#Main_and_Game_Menus"><span class="tocnumber">5</span> <span class="toctext">Main and Game Menus</span></a>
<ul>
<li class="toclevel-2"><a href="#Main_Menu"><span class="tocnumber">5.1</span> <span class="toctext">Main Menu</span></a></li>
<li class="toclevel-2"><a href="#Game_Menu"><span class="tocnumber">5.2</span> <span class="toctext">Game Menu</span></a></li>
<li class="toclevel-2"><a href="#Entering_the_Game_Menu"><span class="tocnumber">5.3</span> <span class="toctext">Entering the Game Menu</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="#Compatibility_Mode"><span class="tocnumber">6</span> <span class="toctext">Compatibility Mode</span></a></li>
</ul>
</td>
</tr>
</table>
<script type="text/javascript">
//
 if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } 
//
</script>
<p><a id="Customizing_the_Interface" name="Customizing_the_Interface"></a></p>
<h1><span class="mw-headline">Customizing the Interface</span></h1>
<p>In Ren'Py, there are four ways that one can customize the out-of-game menus:</p>
<ul>
<li><a href="../reference/Layouts.html" title="renpy/doc/reference/Layouts">Layouts</a> control the feel of the various screens that make up the game menu. They control the placement of components on those screen, and what those components do if they interact.</li>
<li><a href="../reference/Themes.html" title="renpy/doc/reference/Themes">Themes</a> control the look of buttons, bars, frames, labels, and prompts.</li>
<li>One can <a href="../reference/Customizing_the_Main_and_Game_Menus.html" title="renpy/doc/reference/Customizing the Main and Game Menus">customize the main and game menus</a> to add additional choices to those menus, over and above the ones provided by the layouts.</li>
<li>Finally, one can use the <a href="../reference/Properties_and_Styles.html" title="renpy/doc/reference/Properties and Styles">style system</a> to further customize the look and layout of the various out-of-game menu screens.</li>
</ul>
<p>Of these, the only mandatory customization is the selection of a theme.</p>
<p><a id="Order_of_Customizations" name="Order_of_Customizations"></a></p>
<h3><span class="mw-headline">Order of Customizations</span></h3>
<p>We expect customization of the game to occur in the following order:</p>
<ol>
<li>If necessary, setting the script version (<a href="../reference/Configuration_Variables#config.script_version" title="renpy/doc/reference/Configuration Variables">config.script_version</a>), screen width (<a href="../reference/Configuration_Variables#config.screen_width" title="renpy/doc/reference/Configuration Variables">config.screen_width</a>). and screen height (<a href="../reference/Configuration_Variables#config.screen_height" title="renpy/doc/reference/Configuration Variables">config.screen_height</a>).</li>
<li>If necessary, selecting one or more layouts.</li>
<li>Selecting a master theme.</li>
<li>If necessary, selecting one or more theme components that override portions of the master theme.</li>
<li>If necessary, <a href="../reference/Customizing_the_Main_and_Game_Menus.html" title="renpy/doc/reference/Customizing the Main and Game Menus">customize the main and game menus</a>, and using the <a href="../reference/Properties_and_Styles.html" title="renpy/doc/reference/Properties and Styles">style system</a> to further customize the interface.</li>
</ol>
<p><a id="Layouts" name="Layouts"></a></p>
<h1><span class="mw-headline">Layouts</span></h1>
<p>Layouts control the feel of the out-of-game menus. There are five main kinds of layouts:</p>
<ul>
<li><b>main_menu</b> layouts control the feel of the main menu.</li>
<li><b>navigation</b> layouts control the feel of the game menu navigation.</li>
<li><b>load_save</b> layouts control the feel of the load and save screens.</li>
<li><b>yesno_prompt</b> layouts control the feel of asking the user a yes or no question.</li>
<li><b>preferences</b> layouts control the feel of the preference screens.</li>
<li><b>joystick_preferences</b> layouts control the feel of the joystick preference screens.</li>
</ul>
<p>There are also standalone layouts which do not fall into any of these categories. While a game needs exactly one of each of the five main kinds of layouts to function properly, it can have as many standalone layouts as it needs.</p>
<p>Each kind of layout provides certain functionality to the interface. The functionality provided by each kind of layout is described below. The selection of layouts is expected to occur before the selection of a theme. If no layout of a given kind is selected, then the classic variant is used. For example, if no yesno_prompt layout has been selected, then <a href="../reference/functions/layout.classic_yesno_prompt.html" title="renpy/doc/reference/functions/layout.classic yesno prompt">layout.classic_yesno_prompt</a> is used.</p>
<p>Note that there are combinations of layouts and themes that will not look reasonable together. This is not a bug... it's impossible to have every layout work with every other layout and every theme, and still have an unlimited range of layouts and themes. Caveat factor.</p>
<p><br /></p>
<p><a id="main_menu_layouts" name="main_menu_layouts"></a></p>
<h2><span class="mw-headline">main_menu layouts</span></h2>
<p>The main_menu layouts are responsible for defining the look of the main menu. This includes the background of the main menu, and the buttons that are used to go to the game menu or start a game.</p>
<p><br /></p>
<div class="thumb tright">
<div class="thumbinner" style="width:182px;"><a class="image" href="http://www.renpy.org/wiki/Image:classic_main_menu.png" title="classic main menu.png"><img alt="" border="0" class="thumbimage" height="135" src="../images/180px-classic_main_menu.png" width="180" /></a>
<div class="thumbcaption">
</div>
</div>
</div>
<p><span id="layout.classic_main_menu" /></p>
<table>
<tr>
<td valign="top">Function:</td>
<td valign="top"><b><a href="../reference/functions/layout.classic_main_menu.html" title="renpy/doc/reference/functions/layout.classic main menu">layout.classic_main_menu</a></b></td>
<td valign="top">():</td>
</tr>
</table>
<div class="renpy-doc">
<p>This displays the classic main menu, which stacks the main menu buttons vertically.</p>
</div>
<p><br clear="both" /></p>
<p><br /></p>
<div class="thumb tright">
<div class="thumbinner" style="width:182px;"><a class="image" href="http://www.renpy.org/wiki/Image:grouped_main_menu.png" title="grouped main menu.png"><img alt="" border="0" class="thumbimage" height="135" src="../images/180px-grouped_main_menu.png" width="180" /></a>
<div class="thumbcaption">
</div>
</div>
</div>
<p><span id="layout.grouped_main_menu" /></p>
<table>
<tr>
<td valign="top">Function:</td>
<td valign="top"><b><a href="../reference/functions/layout.grouped_main_menu.html" title="renpy/doc/reference/functions/layout.grouped main menu">layout.grouped_main_menu</a></b></td>
<td valign="top">():</td>
</tr>
</table>
<div class="renpy-doc">
<p>This defines a main menu layout that groups buttons into rows horizontally, and then stacks those rows vertically.</p>
<p><span id="config.main_menu_per_group" /></p>
<table>
<tr>
<td valign="top">Variable:</td>
<td valign="top"><b>config.main_menu_per_group</b></td>
<td valign="top">= 2</td>
</tr>
</table>
<div class="renpy-doc">
<p>The number of buttons placed in to each horizontal row.</p>
</div>
</div>
<p><br clear="both" /></p>
<p><br /></p>
<div class="thumb tright">
<div class="thumbinner" style="width:182px;"><a class="image" href="http://www.renpy.org/wiki/Image:imagemap_main_menu.jpg" title="imagemap main menu.jpg"><img alt="" border="0" class="thumbimage" height="135" src="../images/180px-imagemap_main_menu.jpg" width="180" /></a>
<div class="thumbcaption">
</div>
</div>
</div>
<p><span id="layout.imagemap_main_menu" /></p>
<table>
<tr>
<td valign="top">Function:</td>
<td valign="top"><b><a href="../reference/functions/layout.imagemap_main_menu.html" title="renpy/doc/reference/functions/layout.imagemap main menu">layout.imagemap_main_menu</a></b></td>
<td valign="top">(ground, selected, hotspots):</td>
</tr>
</table>
<div class="renpy-doc">
<p><i>ground</i> - The ground image. This is used for hotspots that are not selected.</p>
<p><i>selected</i> - The selected image. This used for hotspots that are selected.</p>
<p><i>hotspots</i> - A list of tuples defining the hotspot. Each tuple consists of:</p>
<ol>
<li>The x-coordinate of the left side.</li>
<li>The y-coordinate of the top side.</li>
<li>The x-coordinate of the right side.</li>
<li>The y-coordinate of the bottoms side.</li>
<li>Either the (untranslated) name of the main menu button this hotspot is equivalent to, or, a label in the program to jump to when this hotspot is clicked.</li>
</ol>
</div>
<p><br clear="both" /></p>
<p><br /></p>
<p><a id="navigation_layouts" name="navigation_layouts"></a></p>
<h2><span class="mw-headline">navigation layouts</span></h2>
<p>The navigation layouts are responsible for defining the navigation through the game menu. This includes the background of the game menus and the buttons that are used to go between game menu screens.</p>
<p><br /></p>
<div class="thumb tright">
<div class="thumbinner" style="width:182px;"><a class="image" href="http://www.renpy.org/wiki/Image:classic_navigation.png" title="classic navigation.png"><img alt="" border="0" class="thumbimage" height="135" src="../images/180px-classic_navigation.png" width="180" /></a>
<div class="thumbcaption">
</div>
</div>
</div>
<p><span id="layout.classic_navigation" /></p>
<table>
<tr>
<td valign="top">Function:</td>
<td valign="top"><b><a href="../reference/functions/layout.classic_navigation.html" title="renpy/doc/reference/functions/layout.classic navigation">layout.classic_navigation</a></b></td>
<td valign="top">():</td>
</tr>
</table>
<div class="renpy-doc">
<p>This displays the navigation buttons in a vertical box.</p>
</div>
<p><br clear="both" /></p>
<p><br /></p>
<div class="thumb tright">
<div class="thumbinner" style="width:182px;"><a class="image" href="http://www.renpy.org/wiki/Image:grouped_navigation.png" title="grouped navigation.png"><img alt="" border="0" class="thumbimage" height="135" src="../images/180px-grouped_navigation.png" width="180" /></a>
<div class="thumbcaption">
</div>
</div>
</div>
<p><span id="layout.grouped_navigation" /></p>
<table>
<tr>
<td valign="top">Function:</td>
<td valign="top"><b><a href="../reference/functions/layout.grouped_navigation.html" title="renpy/doc/reference/functions/layout.grouped navigation">layout.grouped_navigation</a></b></td>
<td valign="top">():</td>
</tr>
</table>
<div class="renpy-doc">
<p>This displays the navigation buttons in horizontal groups, which are then stacked vertically.</p>
<p><span id="config.navigation_per_group" /></p>
<table>
<tr>
<td valign="top">Variable:</td>
<td valign="top"><b>config.navigation_per_group</b></td>
<td valign="top">= 2</td>
</tr>
</table>
<div class="renpy-doc">
<p>The number of navigation buttons per horizontal group.</p>
</div>
</div>
<p><br clear="both" /></p>
<p><br /></p>
<p><a id="load_save_layouts" name="load_save_layouts"></a></p>
<h2><span class="mw-headline">load_save layouts</span></h2>
<p>The load_save layouts are responsible for defining the load and save screens.</p>
<p><br /></p>
<div class="thumb tright">
<div class="thumbinner" style="width:182px;"><a class="image" href="http://www.renpy.org/wiki/Image:classic_load_save.png" title="classic load save.png"><img alt="" border="0" class="thumbimage" height="135" src="../images/180px-classic_load_save.png" width="180" /></a>
<div class="thumbcaption">
</div>
</div>
</div>
<p><span id="layout.classic_load_save" /></p>
<table>
<tr>
<td valign="top">Function:</td>
<td valign="top"><b><a href="../reference/functions/layout.classic_load_save.html" title="renpy/doc/reference/functions/layout.classic load save">layout.classic_load_save</a></b></td>
<td valign="top">():</td>
</tr>
</table>
<div class="renpy-doc">
<p>This layout displays the the load and save screens as having a certain number of rows and columns of slots, with a row of navigation buttons on top.</p>
<p><span id="config.file_page_rows" /></p>
<table>
<tr>
<td valign="top">Variable:</td>
<td valign="top"><b>config.file_page_rows</b></td>
<td valign="top">= 5</td>
</tr>
</table>
<div class="renpy-doc">
<p>The number of rows of file slots to display.</p>
</div>
<p><span id="config.file_page_cols" /></p>
<table>
<tr>
<td valign="top">Variable:</td>
<td valign="top"><b>config.file_page_cols</b></td>
<td valign="top">= 2</td>
</tr>
</table>
<div class="renpy-doc">
<p>The number of columns of file slots to display.</p>
</div>
<p><span id="config.file_quick_access_pages" /></p>
<table>
<tr>
<td valign="top">Variable:</td>
<td valign="top"><b>config.file_quick_access_pages</b></td>
<td valign="top">= 8</td>
</tr>
</table>
<div class="renpy-doc">
<p>The number of pages of files to provide quick access buttons for.</p>
</div>
<p><span id="config.disable_file_pager" /></p>
<table>
<tr>
<td valign="top">Variable:</td>
<td valign="top"><b>config.disable_file_pager</b></td>
<td valign="top">= False</td>
</tr>
</table>
<div class="renpy-doc">
<p>If True, the pager is disabled. This prevents access to pages other than the first page of files.</p>
</div>
<p><span id="config.disable_thumbnails" /></p>
<table>
<tr>
<td valign="top">Variable:</td>
<td valign="top"><b>config.disable_thumbnails</b></td>
<td valign="top">= False</td>
</tr>
</table>
<div class="renpy-doc">
<p>If True, thumbnails are not shown.</p>
</div>
<p><span id="config.time_format" /></p>
<table>
<tr>
<td valign="top">Variable:</td>
<td valign="top"><b>config.time_format</b></td>
<td valign="top">= &quot;%b&#160;%d,&#160;%H:%M&quot;</td>
</tr>
</table>
<div class="renpy-doc">
<p>The format used for file times in the file entry slots.</p>
</div>
<p><span id="config.file_entry_format" /></p>
<table>
<tr>
<td valign="top">Variable:</td>
<td valign="top"><b>config.file_entry_format</b></td>
<td valign="top">= "%(time)s\n%(save_name)s"</td>
</tr>
</table>
<div class="renpy-doc">
<p>The format of file entries in the file entry slots.</p>
</div>
</div>
<p><br clear="both" /></p>
<p><br /></p>
<div class="thumb tright">
<div class="thumbinner" style="width:182px;"><a class="image" href="http://www.renpy.org/wiki/Image:scrolling_load_save.png" title="scrolling load save.png"><img alt="" border="0" class="thumbimage" height="135" src="../images/180px-scrolling_load_save.png" width="180" /></a>
<div class="thumbcaption">
</div>
</div>
</div>
<p><span id="layout.scrolling_load_save" /></p>
<table>
<tr>
<td valign="top">Function:</td>
<td valign="top"><b><a href="../reference/functions/layout.scrolling_load_save.html" title="renpy/doc/reference/functions/layout.scrolling load save">layout.scrolling_load_save</a></b></td>
<td valign="top">():</td>
</tr>
</table>
<div class="renpy-doc">
<p>This uses a scrolling area that contains file picker entries. The user picks one of these entries to load or save a file. There is one big thumbnail to the right of the screen, which corresponds to the currently hovered entry. (<a href="../reference/Configuration_Variables#config.thumbnail_width" title="renpy/doc/reference/Configuration Variables">config.thumbnail_width</a> and <a href="../reference/Configuration_Variables#config.thumbnail_height" title="renpy/doc/reference/Configuration Variables">config.thumbnail_height</a> control the size of this thumbnail.)</p>
<p><span id="config.load_save_slots" /></p>
<table>
<tr>
<td valign="top">Variable:</td>
<td valign="top"><b>config.load_save_slots</b></td>
<td valign="top">= 50</td>
</tr>
</table>
<div class="renpy-doc">
<p>The number of normal slots to show.</p>
</div>
<p><span id="config.load_save_auto_slots" /></p>
<table>
<tr>
<td valign="top">Variable:</td>
<td valign="top"><b>config.load_save_auto_slots</b></td>
<td valign="top">= 5</td>
</tr>
</table>
<div class="renpy-doc">
<p>The number of autosave slots to show.</p>
</div>
<p><span id="config.load_save_quick_slots" /></p>
<table>
<tr>
<td valign="top">Variable:</td>
<td valign="top"><b>config.load_save_quick_slots</b></td>
<td valign="top">= 5</td>
</tr>
</table>
<div class="renpy-doc">
<p>The number of quicksave slots to show.</p>
</div>
<p><span id="config.load_save_empty_thumbnail" /></p>
<table>
<tr>
<td valign="top">Variable:</td>
<td valign="top"><b>config.load_save_empty_thumbnail</b></td>
<td valign="top">= None</td>
</tr>
</table>
<div class="renpy-doc">
<p>When not None, this should be a displayable that will be shown in the thumbnail frame when no save slot has been hovered.</p>
</div>
<p><span id="config.time_format" /></p>
<table>
<tr>
<td valign="top">Variable:</td>
<td valign="top"><b>config.time_format</b></td>
<td valign="top">= &quot;%b&#160;%d,&#160;%H:%M&quot;</td>
</tr>
</table>
<div class="renpy-doc">
<p>The format used for file times in the file entry slots.</p>
</div>
<p><span id="config.file_entry_format" /></p>
<table>
<tr>
<td valign="top">Variable:</td>
<td valign="top"><b>config.file_entry_format</b></td>
<td valign="top">= "%(time)s\n%(save_name)s"</td>
</tr>
</table>
<div class="renpy-doc">
<p>The format of file entries in the file entry slots.</p>
</div>
</div>
<p><br clear="both" /></p>
<p><br /></p>
<p><a id="yesno_prompt_layouts" name="yesno_prompt_layouts"></a></p>
<h2><span class="mw-headline">yesno_prompt layouts</span></h2>
<p>The yesno_prompt layouts are responsible for defining yes/no prompt screens.</p>
<p><br /></p>
<div class="thumb tright">
<div class="thumbinner" style="width:182px;"><a class="image" href="http://www.renpy.org/wiki/Image:classic_yesno_prompt.png" title="classic yesno prompt.png"><img alt="" border="0" class="thumbimage" height="135" src="../images/180px-classic_yesno_prompt.png" width="180" /></a>
<div class="thumbcaption">
</div>
</div>
</div>
<p><span id="layout.classic_yesno_prompt" /></p>
<table>
<tr>
<td valign="top">Function:</td>
<td valign="top"><b><a href="../reference/functions/layout.classic_yesno_prompt.html" title="renpy/doc/reference/functions/layout.classic yesno prompt">layout.classic_yesno_prompt</a></b></td>
<td valign="top">():</td>
</tr>
</table>
<div class="renpy-doc">
<p>This displays the classic yes/no prompt, which is just a prompt above two buttons.</p>
</div>
<p><br clear="both" /></p>
<p><br /></p>
<p><a id="preferences_layouts" name="preferences_layouts"></a></p>
<h2><span class="mw-headline">preferences layouts</span></h2>
<p>The preferences layouts are used to define the preferences screen.</p>
<p><br /></p>
<div class="thumb tright">
<div class="thumbinner" style="width:182px;"><a class="image" href="http://www.renpy.org/wiki/Image:classic_preferences.png" title="classic preferences.png"><img alt="" border="0" class="thumbimage" height="135" src="../images/180px-classic_preferences.png" width="180" /></a>
<div class="thumbcaption">
</div>
</div>
</div>
<p><span id="layout.classic_preferences" /></p>
<table>
<tr>
<td valign="top">Function:</td>
<td valign="top"><b><a href="../reference/functions/layout.classic_preferences.html" title="renpy/doc/reference/functions/layout.classic preferences">layout.classic_preferences</a></b></td>
<td valign="top">():</td>
</tr>
</table>
<div class="renpy-doc">
<p>This uses a three-column preferences layout. <span id="config.sample_sound" /></p>
<table>
<tr>
<td valign="top">Variable:</td>
<td valign="top"><b>config.sample_sound</b></td>
<td valign="top">= None</td>
</tr>
</table>
<div class="renpy-doc">
<p>A sound file used to test the sound volume.</p>
</div>
<p><span id="config.sample_voice.3DNone" /></p>
<table>
<tr>
<td valign="top">Variable:</td>
<td valign="top"><b>config.sample_voice=None</b></td>
<td valign="top">= None</td>
</tr>
</table>
<div class="renpy-doc">
<p>A sound file used to test the voice volume.</p>
</div>
<p><span id="config.has_transitions" /></p>
<table>
<tr>
<td valign="top">Variable:</td>
<td valign="top"><b>config.has_transitions</b></td>
<td valign="top">= True</td>
</tr>
</table>
<div class="renpy-doc">
<p>If True, the option to enable or disable transitions is shown.</p>
</div>
<p><span id="config.has_cps" /></p>
<table>
<tr>
<td valign="top">Variable:</td>
<td valign="top"><b>config.has_cps</b></td>
<td valign="top">= True</td>
</tr>
</table>
<div class="renpy-doc">
<p>If True, the option to control text speed is shown.</p>
</div>
<p><span id="config.has_afm" /></p>
<table>
<tr>
<td valign="top">Variable:</td>
<td valign="top"><b>config.has_afm</b></td>
<td valign="top">= True</td>
</tr>
</table>
<div class="renpy-doc">
<p>If True, the option to control auto-forward mode is shown.</p>
</div>
<p><span id="config.has_skipping" /></p>
<table>
<tr>
<td valign="top">Variable:</td>
<td valign="top"><b>config.has_skipping</b></td>
<td valign="top">= True</td>
</tr>
</table>
<div class="renpy-doc">
<p>If True, the option to control skipping read messages or not is shown</p>
</div>
<p><span id="config.has_skip_after_choice" /></p>
<table>
<tr>
<td valign="top">Variable:</td>
<td valign="top"><b>config.has_skip_after_choice</b></td>
<td valign="top">= True</td>
</tr>
</table>
<div class="renpy-doc">
<p>If True, the option to control skipping after choices is shown</p>
</div>
<p><span id="config.always_has_joystick" /></p>
<table>
<tr>
<td valign="top">Variable:</td>
<td valign="top"><b>config.always_has_joystick</b></td>
<td valign="top">= False</td>
</tr>
</table>
<div class="renpy-doc">
<p>If True, the link to the joystick page is always active.</p>
</div>
<p><span id="config.has_joystick" /></p>
<table>
<tr>
<td valign="top">Variable:</td>
<td valign="top"><b>config.has_joystick</b></td>
<td valign="top">= True</td>
</tr>
</table>
<div class="renpy-doc">
<p>If True, the link to the joystick page is shown.</p>
</div>
</div>
<p><br clear="both" /></p>
<p><br /></p>
<div class="thumb tright">
<div class="thumbinner" style="width:182px;"><a class="image" href="http://www.renpy.org/wiki/Image:two_column_preferences.png" title="two column preferences.png"><img alt="" border="0" class="thumbimage" height="135" src="../images/180px-two_column_preferences.png" width="180" /></a>
<div class="thumbcaption">
</div>
</div>
</div>
<p><span id="layout.two_column_preferences" /></p>
<table>
<tr>
<td valign="top">Function:</td>
<td valign="top"><b><a href="../reference/functions/layout.two_column_preferences.html" title="renpy/doc/reference/functions/layout.two column preferences">layout.two_column_preferences</a></b></td>
<td valign="top">():</td>
</tr>
</table>
<div class="renpy-doc">
<p>This uses a two-column preferences layout. Configuration variables are the same as for <a href="../reference/functions/layout.classic_preferences.html" title="renpy/doc/reference/functions/layout.classic preferences">layout.classic_preferences</a>.</p>
</div>
<p><br clear="both" /></p>
<p><br /></p>
<div class="thumb tright">
<div class="thumbinner" style="width:182px;"><a class="image" href="http://www.renpy.org/wiki/Image:one_column_preferences.png" title="one column preferences.png"><img alt="" border="0" class="thumbimage" height="135" src="../images/180px-one_column_preferences.png" width="180" /></a>
<div class="thumbcaption">
</div>
</div>
</div>
<p><span id="layout.one_column_preferences" /></p>
<table>
<tr>
<td valign="top">Function:</td>
<td valign="top"><b><a href="../reference/functions/layout.one_column_preferences.html" title="renpy/doc/reference/functions/layout.one column preferences">layout.one_column_preferences</a></b></td>
<td valign="top">():</td>
</tr>
</table>
<div class="renpy-doc">
<p>This uses a one-column preferences layout. Configuration variables are the same as for <a href="../reference/functions/layout.classic_preferences.html" title="renpy/doc/reference/functions/layout.classic preferences">layout.classic_preferences</a>.</p>
</div>
<p><br clear="both" /></p>
<p><br /></p>
<p><a id="joystick_preferences_layouts" name="joystick_preferences_layouts"></a></p>
<h2><span class="mw-headline">joystick_preferences layouts</span></h2>
<p>The joystick_preferences layout are used to define the joystick preferences screen.</p>
<p><br /></p>
<div class="thumb tright">
<div class="thumbinner" style="width:182px;"><a class="image" href="http://www.renpy.org/wiki/Image:classic_joystick_preferences.png" title="classic joystick preferences.png"><img alt="" border="0" class="thumbimage" height="135" src="../images/180px-classic_joystick_preferences.png" width="180" /></a>
<div class="thumbcaption">
</div>
</div>
</div>
<p><span id="layout.classic_joystick_preferences" /></p>
<table>
<tr>
<td valign="top">Function:</td>
<td valign="top"><b><a href="../reference/functions/layout.classic_joystick_preferences.html" title="renpy/doc/reference/functions/layout.classic joystick preferences">layout.classic_joystick_preferences</a></b></td>
<td valign="top">():</td>
</tr>
</table>
<div class="renpy-doc">
<p>The standard joystick preferences layout.</p>
</div>
<p><br clear="both" /></p>
<p><br /></p>
<p><a id="standalone_layouts" name="standalone_layouts"></a></p>
<h2><span class="mw-headline">standalone layouts</span></h2>
<p>These provide interesting functionality to Ren'Py games, and they stand alone, so it's possible to call as many of them as you want.</p>
<p><br /></p>
<div class="thumb tright">
<div class="thumbinner" style="width:182px;"><a class="image" href="http://www.renpy.org/wiki/Image:button_menu.png" title="button menu.png"><img alt="" border="0" class="thumbimage" height="135" src="../images/180px-button_menu.png" width="180" /></a>
<div class="thumbcaption">
</div>
</div>
</div>
<p><span id="layout.button_menu" /></p>
<table>
<tr>
<td valign="top">Function:</td>
<td valign="top"><b><a href="../reference/functions/layout.button_menu.html" title="renpy/doc/reference/functions/layout.button menu">layout.button_menu</a></b></td>
<td valign="top">():</td>
</tr>
</table>
<div class="renpy-doc">
<p>This changes the in-game menus to use buttons defined in the current theme.</p>
</div>
<p><br clear="both" /></p>
<p><br /></p>
<p><a id="Defining_New_Layouts" name="Defining_New_Layouts"></a></p>
<h1><span class="mw-headline">Defining New Layouts</span></h1>
<p>This section contains some notes on how to define your own layouts. If you're not interested in defining your own labels, then you can safely ignore this section.</p>
<p>When it comes to defining layouts, there are two important principles you should follow:</p>
<ol>
<li><a href="../reference/functions/layout.provides.html" title="renpy/doc/reference/functions/layout.provides">layout.provides</a> must be called with the type of layout being defined, and it must be called before any theme function is called. For example, if a navigation layout is being defined, then <tt>layout.provides("navigation")</tt> should be called.</li>
<li>The layout needs to implement the contract of it's layout kind. These contracts are described below.</li>
</ol>
<p>While the default layouts are enable through the use of functions on the <tt>layout</tt> object, this is by no means the only way to supply a layout. For a user-defined layout, it should be enough to place the call to <a href="../reference/functions/layout.provides.html" title="renpy/doc/reference/functions/layout.provides">layout.provides</a> in an <tt>init -2 python</tt> block, with the rest of the code residing in init blocks or labels as appropriate.</p>
<p>If your layout defines new configuration variables, you should set <a href="../reference/Configuration_Variables#config.locked" title="renpy/doc/reference/Configuration Variables">config.locked</a> to False before creating them, and then back to True when you're done creating them. We suggest that configuration variables should be prefixed with the type of layout they're used by. Load/save variables should be prefixed by <code>config.load_save_</code>, navigation variables with <code>config.navigation_</code> and so on. (For compatibility reasons, the default layouts do not conform to this standard.)</p>
<p><a id="main_menu_layouts_2" name="main_menu_layouts_2"></a></p>
<h2><span class="mw-headline">main_menu layouts</span></h2>
<p>Main_menu layouts need to call:</p>
<pre>
    layout<span class="sym">.</span><span class="kwd">provides</span><span class="sym">(</span><span class="str">'main_menu'</span><span class="sym">)</span>
</pre>
<p>Main menu layouts are expected to define a <tt>main_menu_screen</tt> label. This label is expected to:</p>
<ul>
<li>Show a fullscreen window of type mm_root. The code to do this is:</li>
</ul>
<pre>
    <span class="kwa">python</span><span class="sym">:</span>
        ui<span class="sym">.</span><span class="kwd">window</span><span class="sym">(</span>style<span class="sym">=</span><span class="str">'mm_root'</span><span class="sym">)</span>
        ui<span class="sym">.</span><span class="kwd">null</span><span class="sym">()</span>
</pre>
<ul>
<li>Create a keymap that disables the game_menu binding. (This is optional, but it can prevent transitions from the main menu to itself.)</li>
</ul>
<pre>
    <span class="kwa">python</span><span class="sym">:</span>
        ui<span class="sym">.</span><span class="kwd">keymap</span><span class="sym">(</span>game_menu<span class="sym">=</span>ui<span class="sym">.</span><span class="kwd">returns</span><span class="sym">(</span><span class="kwa">None</span><span class="sym">))</span>
</pre>
<ul>
<li>Displays the main menu on the screen. How this is done is generally up to the layout itself, but we strongly recommend you use <a href="../reference/Configuration_Variables#config.main_menu" title="renpy/doc/reference/Configuration Variables">config.main_menu</a> to control the generation of the menu. Note that the documentation for config.main_menu says that bare strings cause a jump out of context to occur; use <a href="../reference/functions/ui.jumpsoutofcontext.html" title="renpy/doc/reference/functions/ui.jumpsoutofcontext">ui.jumpsoutofcontext</a> to implement this properly. Using config.main_menu ensures that your layout will work even with extensions (like image galleries) that add options to the main menu.</li>
</ul>
<p><a id="navigation_layouts_2" name="navigation_layouts_2"></a></p>
<h2><span class="mw-headline">navigation layouts</span></h2>
<p>Navigation layouts need to call:</p>
<pre>
    layout<span class="sym">.</span><span class="kwd">provides</span><span class="sym">(</span><span class="str">'navigation'</span><span class="sym">)</span>
</pre>
<p>Navigation layouts are expected to redefine the layout.navigation function. The way to do this is to first define a function in an <tt>init python</tt> block, and then assign that function to layout.navigation.</p>
<p><br />
<span id="layout.navigation" /></p>
<table>
<tr>
<td valign="top">Function:</td>
<td valign="top"><b><a href="../reference/functions/layout.navigation.html" title="renpy/doc/reference/functions/layout.navigation">layout.navigation</a></b></td>
<td valign="top">(screen):</td>
</tr>
</table>
<div class="renpy-doc">
<p>This function is intended to be set by a navigation layout. It's legitimate to replace this function with one of your choosing, provided the signature remains the same.</p>
<p>This function displays the navigation on the game menu. It's expected to set the background of the game menu. If <i>screen</i> is not None, it's also expected to display the navigation buttons defined in <a href="../reference/Configuration_Variables#config.game_menu" title="renpy/doc/reference/Configuration Variables">config.game_menu</a>, highlighting the one named in <i>screen</i>.</p>
</div>
<p><br />
It's suggested that your navigation function use <a href="../reference/Configuration_Variables#config.game_menu" title="renpy/doc/reference/Configuration Variables">config.game_menu</a> to determine the game menu buttons to show to the user. (But note that the game menu is less often extended then the main menu, so this is correspondingly less important.)</p>
<p><br /></p>
<p><a id="load_save_layouts_2" name="load_save_layouts_2"></a></p>
<h2><span class="mw-headline">load_save layouts</span></h2>
<p>Load/save layouts need to call:</p>
<pre>
    layout<span class="sym">.</span><span class="kwd">provides</span><span class="sym">(</span><span class="str">'load_save'</span><span class="sym">)</span>
</pre>
<p>Load/save layouts are expected to provide two labels: <tt>load_screen</tt> and <tt>save_screen</tt>, which are used to load and save, respectively. These screens should call <a href="../reference/functions/layout.navigation.html" title="renpy/doc/reference/functions/layout.navigation">layout.navigation</a> with "load" or "save" as an argument, and are otherwise unconstrained in how they provide loading and saving functionality.</p>
<p>Please see the section on <a href="../reference/Saving%2C_Loading%2C_and_Rollback#Load.2FSave_Functions" title="renpy/doc/reference/Saving, Loading, and Rollback">load/save functions</a> for the functions that would be used to actually implement these screens.</p>
<p><a id="yesno_prompt_layouts_2" name="yesno_prompt_layouts_2"></a></p>
<h2><span class="mw-headline">yesno_prompt layouts</span></h2>
<p>Yes/no prompt layouts need to call:</p>
<pre>
    layout<span class="sym">.</span><span class="kwd">provides</span><span class="sym">(</span><span class="str">'yesno_prompt'</span><span class="sym">)</span>
</pre>
<p>Navigation layouts are expected to redefine the layout.yesno_prompt function. The way to do this is to first define a function in an <tt>init python</tt> block, and then assign that function to layout.yesno_prompt.</p>
<p><br />
<span id="layout.yesno_prompt" /></p>
<table>
<tr>
<td valign="top">Function:</td>
<td valign="top"><b><a href="../reference/functions/layout.yesno_prompt.html" title="renpy/doc/reference/functions/layout.yesno prompt">layout.yesno_prompt</a></b></td>
<td valign="top">(screen, message):</td>
</tr>
</table>
<div class="renpy-doc">
<p>This function is intended to be customized by yesno_prompt layouts. It can be replaced by another function, provided the signature remains the same.</p>
<p><i>screen</i> - The screen button that should be highlighted when this prompt is shown. If None, then no game menu navigation is shown.</p>
<p><i>message</i> - The message that is shown to the user to prompt them to answer yes or no.</p>
<p>This function returns True if the user clicks Yes, or False if the user clicks No.</p>
</div>
<p><br /></p>
<p><a id="preferences_layouts_2" name="preferences_layouts_2"></a></p>
<h2><span class="mw-headline">preferences layouts</span></h2>
<p>Preferences layouts need to call:</p>
<pre>
    layout<span class="sym">.</span><span class="kwd">provides</span><span class="sym">(</span><span class="str">'preferences'</span><span class="sym">)</span>
</pre>
<p>The preferences layout should define a <tt>preferences_screen</tt> label, which contains code to set the preferences. This screen should call <a href="../reference/functions/layout.navigation.html" title="renpy/doc/reference/functions/layout.navigation">layout.navigation</a>("preferences"). It then needs to allow the user to alter the preferences, using the variables and functions defined in the <a href="../reference/Preferences.html" title="renpy/doc/reference/Preferences">preferences</a> section. Finally, it should:</p>
<ul>
<li>Allow the user to begin skipping, by jumping to the <tt>_begin_skipping</tt> label.</li>
<li>Allow the user to go to the joystick preferences, by jumping to the <tt>joystick_preferences_screen</tt> label.</li>
</ul>
<p><a id="joystick_preferences_layouts_2" name="joystick_preferences_layouts_2"></a></p>
<h2><span class="mw-headline">joystick_preferences layouts</span></h2>
<p>Joystick preferences layouts need to call:</p>
<pre>
    layout<span class="sym">.</span><span class="kwd">provides</span><span class="sym">(</span><span class="str">'joystick_preferences'</span><span class="sym">)</span>
</pre>
<p>The preferences layout should define a <tt>joystick_preferences_screen</tt> label, which contains code to set the joystick preferences. This screen should call <a href="../reference/functions/layout.navigation.html" title="renpy/doc/reference/functions/layout.navigation">layout.navigation</a>("joystick_preferences"). Unfortunately, the joystick preferences are undocumented at this time.</p>
<p><a id="Themes" name="Themes"></a></p>
<h1><span class="mw-headline">Themes</span></h1>
<p>Themes provide a simple way of changing the look of the main and game menus. A single function call applies styles to many of the elements of the main and game menus, giving a consistent look to the interface.</p>
<p>Theme functions should be called after the config.screen_width, config.screen_height, and library.script_version variables have been set, and after any layout functions have been called. They should be called before any style is changed by hand.</p>
<p><a id="Theme_Functions" name="Theme_Functions"></a></p>
<h2><span class="mw-headline">Theme Functions</span></h2>
<p>These theme functions are</p>
<p><br /></p>
<div class="thumb tright">
<div class="thumbinner" style="width:182px;"><a class="image" href="http://www.renpy.org/wiki/Image:roundrect.png" title="roundrect.png"><img alt="" border="0" class="thumbimage" height="135" src="../images/180px-roundrect.png" width="180" /></a>
<div class="thumbcaption">
</div>
</div>
</div>
<p><span id="theme.roundrect" /></p>
<table>
<tr>
<td valign="top">Function:</td>
<td valign="top"><b><a href="../reference/functions/theme.roundrect.html" title="renpy/doc/reference/functions/theme.roundrect">theme.roundrect</a></b></td>
<td valign="top">(widget="#003c78", widget_hover="#0050a0", widget_text="#c8e1ff", widget_selected="#ffffc8", disabled="#404040", disabled_text="#c8c8c8", label=,"#ffffff" frame="#6496c8", window="#000000c0", text_size=None, small_text_size=None, mm_root=..., gm_root=..., less_rounded=False):</td>
</tr>
</table>
<div class="renpy-doc">
<p>This enables the use of the roundrect theme. By default, this theme styles the game in a blue color scheme. However, by supplying one or more of the parameters given below, the color scheme can be changed.</p>
<p><i>widget</i> - The background color of non-focued buttons and sliders.</p>
<p><i>widget_hover</i> - The background color of focused buttons and sliders.</p>
<p><i>widget_text</i> - The text color of non-selected buttons.</p>
<p><i>widget_selected</i> - The text color of selected buttons.</p>
<p><i>disabled</i> - The background color of disabled buttons.</p>
<p><i>disabled_text</i> - The text color of disabled buttons.</p>
<p><i>label</i> - The text color of non-selected labels.</p>
<p><i>frame</i> - The background color of frames.</p>
<p><i>mm_root</i> - A displayable (such as an Image or Solid) that will be used as the background for the main menu.</p>
<p><i>gm_root</i> - A displayable (such as an Image or Solid) that will be used as the background for the game menu.</p>
<p><i>less_rounded</i> - If True, causes the buttons to appear less rounded in 800x600 mode (has no effect in 640x480 mode).</p>
<p><i>text_size</i> - The size of text, such as button captions, labels, and prompts. Defaults to 18 if the screen is 640 pixels wide or less, and 22 otherwise.</p>
<p><i>small_text_size</i> - The size of the text on large buttons. Defaults to 12 if the screen is 640 pixels wide or less, and 16 otherwise.</p>
<p><i>widget</i>, <i>widget_hover</i>, <i>disabled</i>, and <i>frame</i> may either be single colors, or tuples containing two colors. In the latter case, a vertical gradient is used.</p>
<a id="Component_functions" name="Component_functions"></a>
<h3><span class="mw-headline">Component functions</span></h3>
<p>The following functions exist to allow you to add elements of the roundrect theme to another theme. The other theme must have been set up before these functions can be used. Arguments are as for roundrect, except that all must be specified (no defaulting occurs).</p>
<ul>
<li><b>theme.roundrect_labels</b>(text_size, label)</li>
<li><b>theme.roundrect_frames</b>(less_rounded, frame)</li>
<li><b>theme.roundrect_buttons</b>(text_size, less_rounded, widget, widget_hover, widget_text, widget_selected, disabled, disabled_text)</li>
<li><b>theme.roundrect_large_buttons</b>(text_size, less_rounded, widget, widget_hover, widget_text, widget_selected, disabled, disabled_text)</li>
<li><b>theme.roundrect_prompts</b>(text_size, label)</li>
<li><b>theme.roundrect_bars</b>(widget, widget_hover)</li>
</ul>
</div>
<p><br clear="both" /></p>
<p><br /></p>
<div class="thumb tright">
<div class="thumbinner" style="width:182px;"><a class="image" href="http://www.renpy.org/wiki/Image:outline.png" title="outline.png"><img alt="" border="0" class="thumbimage" height="135" src="../images/180px-outline.png" width="180" /></a>
<div class="thumbcaption">
</div>
</div>
</div>
<p><span id="theme.outline" /></p>
<table>
<tr>
<td valign="top">Function:</td>
<td valign="top"><b><a href="../reference/functions/theme.outline.html" title="renpy/doc/reference/functions/theme.outline">theme.outline</a></b></td>
<td valign="top">(inside="#fff", idle="#e66", hover="#48f", selected="#84f", insensitive="#ccc", label="#484", prompt="#484", background="#fee", large_button="#fff8f8", text_size=22, small_text_size=16):</td>
</tr>
</table>
<div class="renpy-doc">
<p>This function selects a theme that is based on outlining text in different colors.</p>
<p><i>inside</i> - The color of text inside the various outlines.</p>
<p><i>idle</i> - The outline color of the text of an idle button or bar.</p>
<p><i>hover</i> - The outline color of a hovered button or bar.</p>
<p><i>selected</i> - The outline color of a selected button.</p>
<p><i>insensitive</i> - The outline color of an insensitive button.</p>
<p><i>label</i> - The outline color of a label.</p>
<p><i>prompt</i> - The outline color of a prompt.</p>
<p><i>background</i> - A displayable used for the game and main menu backgrounds.</p>
<p><i>large_button</i> - The background color of large backgrounds.</p>
<p><i>text_size</i> - The size of large text. (Used for buttons, labels, and prompts.)</p>
<p><i>small_text_size</i> - The size of small text. (Used in large buttons.)</p>
<a id="Component_functions_2" name="Component_functions_2"></a>
<h3><span class="mw-headline">Component functions</span></h3>
<p>The following functions exist to allow you to add elements of the outline theme to another theme. The other theme must have been set up before these functions can be used. Arguments are as for theme.outline, except that all must be specified (no defaulting occurs).</p>
<ul>
<li>theme.outline_frames()</li>
<li>theme.outline_buttons(inside, idle, hover, selected, insensitive, text_size)</li>
<li>theme.outline_large_buttons(inside, idle, hover, selected, insensitive, text_size, large_button)</li>
<li>theme.outline_prompts(inside, prompt, text_size)</li>
<li>theme.outline_labels(inside, label, text_size)</li>
<li>theme.outline_bars(inside, idle, hover)</li>
</ul>
<p><br /></p>
</div>
<p><br clear="both" /></p>
<p><br /></p>
<div class="thumb tright">
<div class="thumbinner" style="width:182px;"><a class="image" href="http://www.renpy.org/wiki/Image:ancient.png" title="ancient.png"><img alt="" border="0" class="thumbimage" height="135" src="../images/180px-ancient.png" width="180" /></a>
<div class="thumbcaption">
</div>
</div>
</div>
<p><span id="theme.ancient" /></p>
<table>
<tr>
<td valign="top">Function:</td>
<td valign="top"><b><a href="../reference/functions/theme.ancient.html" title="renpy/doc/reference/functions/theme.ancient">theme.ancient</a></b></td>
<td valign="top">():</td>
</tr>
</table>
<div class="renpy-doc">
<p>This is a theme that attempts to emulate the theme used by Ren'Py 6.5.0 when no theme was explicitly specified.</p>
</div>
<p><br clear="both" /></p>
<p><br /></p>
<p><a id="Theme_Modifiers" name="Theme_Modifiers"></a></p>
<h2><span class="mw-headline">Theme Modifiers</span></h2>
<p>These are functions that can be called after a theme function, allowing you to change a portion of a theme.</p>
<p><br />
<span id="theme.image_buttons" /></p>
<table>
<tr>
<td valign="top">Function:</td>
<td valign="top"><b><a href="../reference/functions/theme.image_buttons.html" title="renpy/doc/reference/functions/theme.image buttons">theme.image_buttons</a></b></td>
<td valign="top">(d):</td>
</tr>
</table>
<div class="renpy-doc">
<p>Used to define buttons in terms of 5-tuples of image filenames. This expects its single parameter, <i>d</i>, to be a dictionary mapping untranslated button names to 5-tuples. Each 5-tuple should contain 5 filenames, giving the image used for the button when:</p>
<ul>
<li>The button is idle.</li>
<li>The button is hovered.</li>
<li>The button is selected and idle.</li>
<li>The button is selected and hovered.</li>
<li>The button is insensitive.</li>
</ul>
<p>in that order.</p>
</div>
<p><br />
<span id="theme.image_labels" /></p>
<table>
<tr>
<td valign="top">Function:</td>
<td valign="top"><b><a href="../reference/functions/theme.image_labels.html" title="renpy/doc/reference/functions/theme.image labels">theme.image_labels</a></b></td>
<td valign="top">(d):</td>
</tr>
</table>
<div class="renpy-doc">
<p>Replaces labels with images. This takes a single parameter, <i>d</i>, which is expected to be a map from the text of a label to an image file.</p>
</div>
<p><br /></p>
<p><a id="Custom_Theme" name="Custom_Theme"></a></p>
<h2><span class="mw-headline">Custom Theme</span></h2>
<p>It's also possible to define your own Ren'Py theme. A custom theme consists of Ren'Py code that does the following.</p>
<ul>
<li>Calls <a href="../reference/functions/layout.defaults.html" title="renpy/doc/reference/functions/layout.defaults">layout.defaults</a>() to initialize the layouts. Calling this function is the responsibility of the theme, and custom themes must also do it.</li>
<li>Set up the base styles to reflect the requirements of the theme.</li>
</ul>
<p>Often, the base styles come in <i>name</i>/<i>name</i>_text pairs. In these cases, <i>name</i> represents a <a href="../reference/functions/Button.html" title="renpy/doc/reference/functions/Button">Button</a> or <a href="../reference/functions/Window.html" title="renpy/doc/reference/functions/Window">Window</a> with style <i>name</i>, in which a <a href="../reference/functions/Text.html" title="renpy/doc/reference/functions/Text">Text</a> with style <i>name</i>_text lives.</p>
<p>The base styles are:</p>
<dl>
<dt><span id="frame"><b>style.frame</b> (inherits from <a href="#default" title="">style.default</a>)</span></dt>
<dd>Used for frames on top of which the rest of the interface can comfortably sit.</dd>
</dl>
<dl>
<dt><span id="button"><b>style.button</b> (inherits from <a href="#default" title="">style.default</a>)</span></dt>
<dt><span id="button_text"><b>style.button_text</b> (inherits from <a href="#default" title="">style.default</a>)</span></dt>
<dd>Used for buttons, especially buttons whose primary purpose is navigating through the interface. (Like the main menu and the game menu navigation buttons.)</dd>
</dl>
<dl>
<dt><span id="small_button"><b>style.small_button</b> (inherits from <a href="#button" title="">style.button</a>)</span></dt>
<dt><span id="small_button_text"><b>style.small_button_text</b> (inherits from <a href="#button_text" title="">style.button_text</a>)</span></dt>
<dd>Used for smaller navigation buttons. It might make sense to set a minimum width on buttons, but small_buttons should be allowed to shrink as small as possible.</dd>
</dl>
<dl>
<dt><span id="radio_button"><b>style.radio_button</b> (inherits from <a href="#button" title="">style.button</a>)</span></dt>
<dt><span id="radio_button_text"><b>style.radio_button_text</b> (inherits from <a href="#button_text" title="">style.button_text</a>)</span></dt>
<dd>Used for buttons that are arranged in a group, such that only one of the buttons in the group can be selected at a time.</dd>
</dl>
<dl>
<dt><span id="check_button"><b>style.check_button</b> (inherits from <a href="#button" title="">style.button</a>)</span></dt>
<dt><span id="check_button_text"><b>style.check_button_text</b> (inherits from <a href="#button_text" title="">style.button_text</a>)</span></dt>
<dd>Used for buttons that toggle their selected state to indicate if an option is set or not. (These aren't used in any of the pre-defined layouts.)</dd>
</dl>
<dl>
<dt><span id="large_button"><b>style.large_button</b> (inherits from <a href="#default" title="">style.default</a>)</span></dt>
<dt><span id="large_button_text"><b>style.large_button_text</b> (inherits from <a href="#default" title="">style.default</a>)</span></dt>
<dd>Used for large buttons, such as file picker entries, that can contain a large amount of text and other information.</dd>
</dl>
<dl>
<dt><span id="label"><b>style.label</b> (inherits from <a href="#default" title="">style.default</a>)</span></dt>
<dt><span id="label_text"><b>style.label_text</b> (inherits from <a href="#default" title="">style.default</a>)</span></dt>
<dd>Used for labels, which are small text messages that never change.</dd>
</dl>
<dl>
<dt><span id="prompt"><b>style.prompt</b> (inherits from <a href="#default" title="">style.default</a>)</span></dt>
<dt><span id="prompt_text"><b>style.prompt_text</b> (inherits from <a href="#default" title="">style.default</a>)</span></dt>
<dd>Used for prompts, longer text messages which may change at runtime.</dd>
</dl>
<dl>
<dt><span id="bar"><b>style.bar</b> (inherits from <a href="#default" title="">style.default</a>)</span></dt>
<dt><span id="vbar"><b>style.vbar</b> (inherits from <a href="#default" title="">style.default</a>)</span></dt>
<dd>Used for horizontal and vertical bars, respectively. Bars are generally intended to indicate a quantity or an amount of progress, but aren't expected to be adjusted by the user.</dd>
</dl>
<dl>
<dt><span id="slider"><b>style.slider</b> (inherits from <a href="#default" title="">style.default</a>)</span></dt>
<dt><span id="vslider"><b>style.vslider</b> (inherits from <a href="#default" title="">style.default</a>)</span></dt>
<dd>Used for horizontal and vertical sliders, respectively. Sliders are bars that are used to adjust a value.</dd>
</dl>
<dl>
<dt><span id="scrollbar"><b>style.scrollbar</b> (inherits from <a href="#default" title="">style.default</a>)</span></dt>
<dt><span id="vscrollbar"><b>style.vscrollbar</b> (inherits from <a href="#default" title="">style.default</a>)</span></dt>
<dd>Used for horizontal and vertical scrollbars, respectively.</dd>
</dl>
<dl>
<dt><span id="mm_root"><b>style.mm_root</b> (inherits from <a href="#default" title="">style.default</a>)</span></dt>
<dt><span id="gm_root"><b>style.gm_root</b> (inherits from <a href="#default" title="">style.default</a>)</span></dt>
<dd>Used for the backgrounds of the main and game menus, respectively.</dd>
</dl>
<p>Generally, themes should not adjust the margins, positioning properties, or maximum sizes of these styles. An exception is that the bars are expected to set a maximum size in a direction perpendicular to the orientation of the bar (ymaximum for bar and scrollbar; xmaximum for vbar and vscrollbar). No limitations apply to the _text styles.</p>
<p><a id="Main_and_Game_Menus" name="Main_and_Game_Menus"></a></p>
<h1><span class="mw-headline">Main and Game Menus</span></h1>
<p>This section describes how the content of the various menus can be customized. If you just want to change the look of the menus (to the extent made possible by the style system), use <a href="../reference/Themes.html" title="renpy/doc/reference/Themes">themes</a> or <a href="../reference/Properties_and_Styles.html" title="renpy/doc/reference/Properties and Styles">styles</a>. To change just the text of menu items, consider using <a href="../reference/Configuration_Variables#config.translations" title="renpy/doc/reference/Configuration Variables">config.translations</a>. To change the screens on the menus, you'll need to change the contents of the <a href="../reference/Configuration_Variables#config.main_menu" title="renpy/doc/reference/Configuration Variables">config.main_menu</a> and <a href="../reference/Configuration_Variables#config.game_menu" title="renpy/doc/reference/Configuration Variables">config.game_menu</a> variables. Otherwise, you'll want to use a <a href="../reference/Layouts.html" title="renpy/doc/reference/Layouts">layout</a> that changes the look of the menus, or write your own layout.</p>
<p><a id="Main_Menu" name="Main_Menu"></a></p>
<h2><span class="mw-headline">Main Menu</span></h2>
<p>The main menu can be customized by setting the <a href="../reference/Configuration_Variables#config.main_menu" title="renpy/doc/reference/Configuration Variables">config.main_menu</a> variable. This variable should be a list of tuples. The first component of each tuple is the name of the button on the main menu. The second component can be one of three things:</p>
<ul>
<li>a string, in which case it is a label at which the game execution starts (after a jump out of the menu context).</li>
<li>a function, in which case the function is called when the button is clicked.</li>
<li>Finally, it can be None, which causes the button to be insensitive.</li>
</ul>
<p>The third component must be a string containing a python expression, which determines when the button is enabled. The optional fourth component is a string containing a python expression, that determines if the button is shown at all. <i>(changed in 6.6.2)</i></p>
<p>To jump from the main menu to one of the screens in the game menu, one should use the _intra_jumps function to specify the appropriate transition.</p>
<p><span id="_intra_jumps" /></p>
<table>
<tr>
<td valign="top">Function:</td>
<td valign="top"><b>_intra_jumps</b></td>
<td valign="top">(label, transition):</td>
</tr>
</table>
<div class="renpy-doc">
<p>Jumps to <i>label</i> while remaining in the same context.</p>
<p><i>transition</i> should be a string giving a field on the <tt>config</tt> object. When this function is run, that field is accessed, and is used to specify the transition that is used.</p>
</div>
<p>The default value of <a href="../reference/Configuration_Variables#config.main_menu" title="renpy/doc/reference/Configuration Variables">config.main_menu</a> is:</p>
<pre>
    config<span class="sym">.</span>main_menu <span class="sym">= [</span>
        <span class="sym">(</span>u<span class="str">"Start Game"</span><span class="sym">,</span> <span class="str">"start"</span><span class="sym">,</span> <span class="str">"True"</span><span class="sym">),</span>
        <span class="sym">(</span>u<span class="str">"Continue Game"</span><span class="sym">,</span> <span class="kwd">_intra_jumps</span><span class="sym">(</span><span class="str">"load_screen"</span><span class="sym">,</span> <span class="str">"main_game_transition"</span><span class="sym">),</span> <span class="str">"True"</span><span class="sym">),</span>
        <span class="sym">(</span>u<span class="str">"Preferences"</span><span class="sym">,</span> <span class="kwd">_intra_jumps</span><span class="sym">(</span><span class="str">"preferences_screen"</span><span class="sym">,</span> <span class="str">"main_game_transition"</span><span class="sym">),</span> <span class="str">"True"</span><span class="sym">),</span>
        <span class="sym">(</span>u<span class="str">"Quit"</span><span class="sym">,</span> ui<span class="sym">.</span><span class="kwd">jumps</span><span class="sym">(</span><span class="str">"_quit"</span><span class="sym">),</span> <span class="str">"True"</span><span class="sym">)</span>
        <span class="sym">]</span>
</pre>
<p><a id="Game_Menu" name="Game_Menu"></a></p>
<h2><span class="mw-headline">Game Menu</span></h2>
<p>The first thing one may wish to do when modifying the game menu is to add a screen to it. This is done in two steps. The first is to create the screen, and the second is to add it to the <a href="../reference/Configuration_Variables#config.game_menu" title="renpy/doc/reference/Configuration Variables">config.game_menu</a> list so that it can be reached from the game menu.</p>
<p>Each screen is represented in the code as a label that is jumped to to display the screen. There are five steps that this label should do in order to display the screen. First, it should call <a href="../reference/functions/layout.navigation.html" title="renpy/doc/reference/functions/layout.navigation">layout.navigation</a>(screen), where screen is the name of the screen (the first component of the tuples in config.game_menu, described below). Second, it should call the ui functions to add components to the the screen. Third, it should call <a href="../reference/functions/ui.interact.html" title="renpy/doc/reference/functions/ui.interact">ui.interact</a> to interact with the user. Fourth, it should examine the results of _game_interact, and react appropriately. Finally, it should jump back up to the screen label, showing the screen again after each interaction.</p>
<p>So that the user can see it, the screen should be added to config.game_menu. This is a list of four- or five-component tuples. The first is the name of the screen. It's used to determine if the button used to reach that screen should be indicated as selected. The second component is the text used for that button. The third component is a function that executes when the button is clicked. Normally, an appropriate function is <tt>_intra_jumps</tt>(<i>label</i>, <i>transition</i>), where label is the name of the label of your screen. The fourth component is a string containing a python expression. If the expression is not true, the button is insensitive. The optional fifth component is also a string containing a python expression. If the expression is not true, the button is not shown. <i>(changed in 6.6.2)</i></p>
<p>The default value of <a href="../reference/Configuration_Variables#config.game_menu" title="renpy/doc/reference/Configuration Variables">config.game_menu</a> is:</p>
<pre>
    config<span class="sym">.</span>game_menu <span class="sym">= [</span>
        <span class="sym">(</span> <span class="kwa">None</span><span class="sym">,</span> u<span class="str">"Return"</span><span class="sym">,</span> ui<span class="sym">.</span><span class="kwd">jumps</span><span class="sym">(</span><span class="str">"_return"</span><span class="sym">),</span> <span class="str">'True'</span><span class="sym">),</span>
        <span class="sym">(</span> <span class="str">"preferences"</span><span class="sym">,</span> u<span class="str">"Preferences"</span><span class="sym">,</span> <span class="kwd">_intra_jumps</span><span class="sym">(</span><span class="str">"preferences_screen"</span><span class="sym">,</span> <span class="str">"intra_transition"</span><span class="sym">),</span> <span class="str">'True'</span> <span class="sym">),</span>
        <span class="sym">(</span> <span class="str">"save"</span><span class="sym">,</span> u<span class="str">"Save Game"</span><span class="sym">,</span> <span class="kwd">_intra_jumps</span><span class="sym">(</span><span class="str">"save_screen"</span><span class="sym">,</span> <span class="str">"intra_transition"</span><span class="sym">),</span> <span class="str">'not main_menu'</span> <span class="sym">),</span>
        <span class="sym">(</span> <span class="str">"load"</span><span class="sym">,</span> u<span class="str">"Load Game"</span><span class="sym">,</span> <span class="kwd">_intra_jumps</span><span class="sym">(</span><span class="str">"load_screen"</span><span class="sym">,</span> <span class="str">"intra_transition"</span><span class="sym">),</span> <span class="str">'True'</span><span class="sym">),</span>
        <span class="sym">(</span> <span class="kwa">None</span><span class="sym">,</span> u<span class="str">"Main Menu"</span><span class="sym">,</span> ui<span class="sym">.</span><span class="kwd">callsinnewcontext</span><span class="sym">(</span><span class="str">"_main_menu_prompt"</span><span class="sym">),</span> <span class="str">'not main_menu'</span> <span class="sym">),</span>
        <span class="sym">(</span> <span class="kwa">None</span><span class="sym">,</span> u<span class="str">"Quit"</span><span class="sym">,</span> ui<span class="sym">.</span><span class="kwd">callsinnewcontext</span><span class="sym">(</span><span class="str">"_quit_prompt"</span><span class="sym">),</span> <span class="str">'True'</span> <span class="sym">),</span>
        <span class="sym">]</span>
</pre>
<p><br />
<span id="_game_menu_screen" /></p>
<table>
<tr>
<td valign="top">Variable:</td>
<td valign="top"><b>_game_menu_screen</b></td>
<td valign="top">= "_load_screen"</td>
</tr>
</table>
<div class="renpy-doc">
<p>One can customize the screen the game menu jumps to by default by changing the value of _game_menu_screen. For example, one could set this to "load_screen" for the first few interactions, and then set it to "save_screen" for the rest of the game. This is especially useful for a game with no main menu.</p>
<p>If set to None, the user cannot enter the game menu. This is set to None at the start of the splashscreen, and reset to its old value when the splashscreen completes.</p>
</div>
<p>Use the <a href="../reference/functions/layout.yesno_prompt.html" title="renpy/doc/reference/functions/layout.yesno prompt">layout.yesno_prompt</a> function to ask yes/no questions of the user.</p>
<p><span id="layout.yesno_prompt" /></p>
<table>
<tr>
<td valign="top">Function:</td>
<td valign="top"><b>layout.yesno_prompt</b></td>
<td valign="top">(screen, message):</td>
</tr>
</table>
<div class="renpy-doc">
<p><i>screen</i> - The screen button that should be highlighted when this prompt is shown. If None, then no game menu navigation is shown.</p>
<p><i>message</i> - The message that is shown to the user to prompt them to answer yes or no.</p>
<p>This function returns True if the user clicks Yes, or False if the user clicks No.</p>
</div>
<p><b>Pre-defined Screens.</b> Layouts define the load screen, save screen, and preferences screen are define at the <tt>load_screen</tt>, <tt>save_screen</tt>, and <tt>preferences_screen</tt>, respectively.</p>
<p>Please see the page on <a href="../reference/Saving%2C_Loading%2C_and_Rollback.html" title="renpy/doc/reference/Saving, Loading, and Rollback">Saving, Loading, and Rollback</a> for a list of functions that can be used in the load and save screens, and the page on the <a href="../reference/Preferences.html" title="renpy/doc/reference/Preferences">Preferences</a> for a list of preferences that can be customized.</p>
<p>Jump to <tt>_return</tt> to return to the game or the main menu, as appropriate. Jump to <tt>_noisy_return</tt> to play <a href="../reference/Configuration_Variables#config.exit_sound" title="renpy/doc/reference/Configuration Variables">config.exit_sound</a> before returning.</p>
<p><a id="Entering_the_Game_Menu" name="Entering_the_Game_Menu"></a></p>
<h2><span class="mw-headline">Entering the Game Menu</span></h2>
<p>To enter the game menu from game code, use <a href="../reference/functions/renpy.call_in_new_context.html" title="renpy/doc/reference/functions/renpy.call in new context">renpy.call_in_new_context</a> or <a href="../reference/functions/ui.callsinnewcontext.html" title="renpy/doc/reference/functions/ui.callsinnewcontext">ui.callsinnewcontext</a> to call the <tt>_game_menu</tt> label with a parameter, the name of the screen you wish to enter. This parameter can be omitted to enter the default screen.</p>
<p>This can be omitted to use the default screen.</p>
<pre>
<span class="kwa">init python</span><span class="sym">:</span>
    <span class="kwa">def</span> <span class="kwd">overlay</span><span class="sym">():</span>
         <span class="slc"># We can assume that "save_screen" is the default.</span>
         ui<span class="sym">.</span><span class="kwd">textbutton</span><span class="sym">(</span><span class="str">"Save"</span><span class="sym">,</span> clicked<span class="sym">=</span>ui<span class="sym">.</span><span class="kwd">callsinnewcontext</span><span class="sym">(</span><span class="str">"_game_menu"</span><span class="sym">),</span> xalign<span class="sym">=</span><span class="num">0.0</span><span class="sym">,</span> yalign<span class="sym">=</span><span class="num">0.0</span><span class="sym">)</span>
         ui<span class="sym">.</span><span class="kwd">textbutton</span><span class="sym">(</span><span class="str">"Prefs"</span><span class="sym">,</span> clicked<span class="sym">=</span>ui<span class="sym">.</span><span class="kwd">callsinnewcontext</span><span class="sym">(</span><span class="str">"_game_menu"</span><span class="sym">,</span> <span class="str">"preferences_screen"</span><span class="sym">),</span> xalign<span class="sym">=</span><span class="num">1.0</span><span class="sym">,</span> yalign<span class="sym">=</span><span class="num">0.0</span><span class="sym">)</span>

    config<span class="sym">.</span>overlay_functions<span class="sym">.</span><span class="kwd">append</span><span class="sym">(</span>overlay<span class="sym">)</span>
</pre>
<p><a id="Compatibility_Mode" name="Compatibility_Mode"></a></p>
<h1><span class="mw-headline">Compatibility Mode</span></h1>
<p>Ren'Py also supports a compatibility mode that makes layouts and themes more compatible with how they were used in Ren'Py 6.5.0. This compatibility mode is automatically enabled when <a href="../reference/Configuration_Variables#config.script_version" title="renpy/doc/reference/Configuration Variables">config.script_version</a> is set to (6, 5, 0) or less. It can also be enabled explicitly by calling layout.compat().</p>
<p><br />
<span id="layout.compat" /></p>
<table>
<tr>
<td valign="top">Function:</td>
<td valign="top"><b><a href="../reference/functions/layout.compat.html" title="renpy/doc/reference/functions/layout.compat">layout.compat</a></b></td>
<td valign="top">():</td>
</tr>
</table>
<div class="renpy-doc">
<p>This enables a compatibility mode that sets up themes and styles as they were used in Ren'Py 6.5.0 and prior versions.</p>
</div>




<div class="visualClear" />
		<hr /><p class="docnav"><a href="../index.html">documentation index</a> &#9702; <a href="Reference_Manual.html">reference manual</a> &#9702; <a href="Function_Index.html">function index</a></p></div>
	</body></html>