/usr/share/doc/renpy/html/style.html is in renpy-doc 6.15.7-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 | <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Styles and Style Properties — Ren'Py Documentation</title>
<link rel="stylesheet" href="_static/screen.css" type="text/css" media="screen, projection"/>
<link rel="stylesheet" href="_static/renpydoc.css" type="text/css" media="print" />
<!--[if lt IE 8]>
<link rel="stylesheet" href="_static/renpydoc.css" type="text/css" media="screen, projection"/>
<![endif]-->
<link rel="stylesheet" href="_static/renpydoc.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '6.15.6',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="Ren'Py Documentation" href="index.html" />
<link rel="next" title="Screens and Screen Language" href="screens.html" />
<link rel="prev" title="Text Input" href="input.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="screens.html" title="Screens and Screen Language"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="input.html" title="Text Input"
accesskey="P">previous</a> |</li>
<li> <img src="_static/logo.png" width=19 height=21 align=center>
<li> <a href="http://www.renpy.org/">Ren'Py Home</a> |
<li><a href="index.html">Ren'Py Documentation</a></li>
</ul>
</div>
<div class="container">
<div class="span4">
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Styles and Style Properties</a><ul>
<li><a class="reference internal" href="#style-property-prefixes">Style Property Prefixes</a></li>
<li><a class="reference internal" href="#style-property-values">Style Property Values</a></li>
<li><a class="reference internal" href="#list-of-all-style-properties">List of All Style Properties</a><ul>
<li><a class="reference internal" href="#position-style-properties">Position Style Properties</a></li>
<li><a class="reference internal" href="#text-style-properties">Text Style Properties</a></li>
<li><a class="reference internal" href="#window-style-properties">Window Style Properties</a></li>
<li><a class="reference internal" href="#button-style-properties">Button Style Properties</a></li>
<li><a class="reference internal" href="#bar-style-properties">Bar Style Properties</a></li>
<li><a class="reference internal" href="#box-style-properties">Box Style Properties</a></li>
<li><a class="reference internal" href="#fixed-style-properties">Fixed Style Properties</a></li>
</ul>
</li>
<li><a class="reference internal" href="#creating-new-named-styles">Creating New Named Styles</a><ul>
<li><a class="reference internal" href="#indexed-styles">Indexed Styles</a></li>
<li><a class="reference internal" href="#style-inheritance">Style Inheritance</a></li>
<li><a class="reference internal" href="#style-preferences">Style Preferences</a></li>
<li><a class="reference internal" href="#other-style-functions">Other Style Functions</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="input.html"
title="previous chapter">Text Input</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="screens.html"
title="next chapter">Screens and Screen Language</a></p>
<h4>Search</h4>
<div id="cse-search-form" style="width: 100%;"></div>
<div class="copydata">
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a>.
<br>
</div>
</div>
</div>
</div>
<div class="document span20 last">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="styles-and-style-properties">
<span id="styles"></span><span id="style-properties"></span><h1>Styles and Style Properties<a class="headerlink" href="#styles-and-style-properties" title="Permalink to this headline">¶</a></h1>
<p>Styles allow the look of displayables to be customized. This is done by
changing the value of style properties for displayables. For example,
changing the <a class="reference internal" href="#style-property-background"><tt class="xref std std-propref docutils literal"><span class="pre">background</span></tt></a> property allows the background of a window
or button to be customized.</p>
<p>Each displayable has a style built-into it. When the displayable is created,
either directly or using the screen system, style properties can be supplied
to it, and these styles are used to update the look of the displayable. In
the following example:</p>
<div class="highlight-renpy"><div class="highlight"><pre><span class="k">image</span> <span class="n">big_hello_word</span> <span class="o">=</span> <span class="n">Text</span><span class="p">(</span><span class="s">"Hello, World"</span><span class="p">,</span> <span class="na">size</span><span class="o">=</span><span class="mi">40</span><span class="p">)</span>
</pre></div>
</div>
<p>the <a class="reference internal" href="#style-property-size"><tt class="xref std std-propref docutils literal"><span class="pre">size</span></tt></a> property is supplied to a Text displayable, allowing us to
change its text size. This will customize the look of the text displayable by
displaying the text 40 pixels high.</p>
<p>Ren'Py also supports style inheritance. Each displayable takes a <cite>style</cite>
property, that gives the name of the style to use. If a property is not
defined for a style, Ren'Py will look it up in the named style, that style's
parent, and so on. This allows us to customize a named style in a central
place.</p>
<p>A named style exists as a field on the global <tt class="docutils literal"><span class="pre">style</span></tt> object. Style
properties exist as fields on styles. So to set the size property of the
default style, one can use a python block:</p>
<div class="highlight-renpy"><div class="highlight"><pre><span class="k">init</span> <span class="k">python</span><span class="p">:</span>
<span class="na">style</span><span class="o">.</span><span class="na">default</span><span class="o">.</span><span class="na">font</span> <span class="o">=</span> <span class="s">"mikachan.ttf"</span>
<span class="na">style</span><span class="o">.</span><span class="na">default</span><span class="o">.</span><span class="na">size</span> <span class="o">=</span> <span class="mi">23</span>
</pre></div>
</div>
<p>As Ren'Py caches styles, named styles should not be changed outside of init
blocks.</p>
<div class="section" id="style-property-prefixes">
<h2>Style Property Prefixes<a class="headerlink" href="#style-property-prefixes" title="Permalink to this headline">¶</a></h2>
<p>Applying a prefix to a style property indicates allows a displayable to change
it's look in response to its focus or selection status. For example, a button
can change its color when the mouse hovers above it, or to indicate when the
choice represented by the button is the currently selected one.</p>
<p>There are five states a displayable can be it.</p>
<dl class="docutils">
<dt><em class="dfn">insensitive</em></dt>
<dd>Used when the user cannot interact with the displayable.</dd>
<dt><em class="dfn">idle</em></dt>
<dd>Used when the displayable is neither focused nor selected.</dd>
<dt><em class="dfn">hover</em></dt>
<dd>Used when the displayable is focused, but not selected.</dd>
<dt><em class="dfn">selected_idle</em></dt>
<dd>Used when the displayable is not focused, and is selected.</dd>
<dt><em class="dfn">selected_hover</em></dt>
<dd>Used when the displayable is focused and selected.</dd>
</dl>
<p>Button and Bar displayables (and their variants) update their state, and the
state of their children, in response to events. For example, when the user
puts his mouse over an unselected button, it and all its children will be put
into the hover state.</p>
<p>Style property prefixes allow one to set style properties for the different
states. There is a system of implications set up, so that a prefix can imply
setting the property for more than one state.</p>
<p>The implications are:</p>
<table border="1" class="docutils">
<colgroup>
<col width="50%" />
<col width="50%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">prefix</th>
<th class="head">states implied by prefix</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>(no prefix)</td>
<td>insensitive, idle, hover, selected_idle, selected_hover</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">insensitive_</span></tt></td>
<td>insensitive</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">idle_</span></tt></td>
<td>idle, selected_idle</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">selected_</span></tt></td>
<td>selected_idle, selected_hover</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">selected_idle_</span></tt></td>
<td>selected_idle</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">selected_hover_</span></tt></td>
<td>selected_hover</td>
</tr>
</tbody>
</table>
<p>Using a text button, we can show this in action. Text buttons use two styles
by default: <tt class="docutils literal"><span class="pre">button</span></tt> for the button itself, and <tt class="docutils literal"><span class="pre">button_text</span></tt> for the
text inside the button. The <a class="reference internal" href="#style-property-background"><tt class="xref std std-propref docutils literal"><span class="pre">background</span></tt></a> style property sets the
background of a button, while the <a class="reference internal" href="#style-property-color"><tt class="xref std std-propref docutils literal"><span class="pre">color</span></tt></a> property sets the color of
text.:</p>
<div class="highlight-renpy"><div class="highlight"><pre><span class="k">init</span> <span class="k">python</span><span class="p">:</span>
<span class="c"># The button background is gray when insensitive, light</span>
<span class="c"># blue when hovered, and dark blue otherwise.</span>
<span class="na">style</span><span class="o">.</span><span class="k">button</span><span class="o">.</span><span class="na">background</span> <span class="o">=</span> <span class="s">"#006"</span>
<span class="na">style</span><span class="o">.</span><span class="k">button</span><span class="o">.</span><span class="na">insensitive_background</span> <span class="o">=</span> <span class="s">"#444"</span>
<span class="na">style</span><span class="o">.</span><span class="k">button</span><span class="o">.</span><span class="na">hover_background</span> <span class="o">=</span> <span class="s">"#00a"</span>
<span class="c"># The button text is yellow when selected, and white</span>
<span class="c"># otherwise.</span>
<span class="na">style</span><span class="o">.</span><span class="n">button_text</span><span class="o">.</span><span class="na">color</span> <span class="o">=</span> <span class="s">"#fff"</span>
<span class="na">style</span><span class="o">.</span><span class="n">button_text</span><span class="o">.</span><span class="na">selected_color</span> <span class="o">=</span> <span class="s">"#ff0"</span>
</pre></div>
</div>
</div>
<div class="section" id="style-property-values">
<h2>Style Property Values<a class="headerlink" href="#style-property-values" title="Permalink to this headline">¶</a></h2>
<p>Each style property expects a specific kind of data. Many of these are
standard python types, but a few are novel. Here are descriptions of the
novel kinds of value a style property can expect.</p>
<dl class="docutils">
<dt><cite>position</cite></dt>
<dd><p class="first">Positions are used to specify locations relative to the upper-left
corner of the containing area. (For positions, the containing area is
given by the layout the displayable is in, if one is given, or the screen
otherwise. For anchors, the containing area is the size of the
displayable itself.)</p>
<p>The way a position value is interpreted depends on the type of the
value:</p>
<dl class="last docutils">
<dt>int (like 0, 1, 37, or 42)</dt>
<dd>An integer is intepreted as the number of pixels from the left
or top side of the containing area.</dd>
<dt>float (like 0.0, 0.5, or 1.0)</dt>
<dd>A floating-point number is intepreted as a fraction of the
containing area. For example, 0.5 is a point halfway between the
sides of the containing area, while 1.0 is on the right or bottom
side.</dd>
<dt>renpy.absolute (like renpy.absolute(100.25))</dt>
<dd>A renpy.absolute number is intepreted as the number of pixels
from the left or top side of the screen, when using subpixel-precise
rendering.</dd>
</dl>
</dd>
<dt><cite>displayable</cite></dt>
<dd>Any displayable.</dd>
<dt><cite>color</cite></dt>
<dd><p class="first">Colors in Ren'Py can be expressed as strings beginning with the hash
mark (#), followed by a hex triple or hex quadruple, with each of the
three or four elements consisting of a one or two hexidecimal character
color code.</p>
<p>In a triple, the components represent red, green, and blue. In a
quadruple, the components represent red, green, blue, and alpha. For
example:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">"#f00"</span></tt> and <tt class="docutils literal"><span class="pre">"#ff0000"</span></tt> represent an opaque red color.</li>
<li><tt class="docutils literal"><span class="pre">"#0f08"</span></tt> and <tt class="docutils literal"><span class="pre">#00ff0080"</span></tt> represent a semi-transparent green
color.</li>
</ul>
<p>The color triples are the same as used in HTML.</p>
<p>Colors can also be represented as a 4-component tuple, with the 4
components being integers between 0 and 255. The components correspond to
red, green, blue, and alpha, in that order.</p>
<ul class="last simple">
<li><tt class="docutils literal"><span class="pre">(0,</span> <span class="pre">0,</span> <span class="pre">255,</span> <span class="pre">255)</span></tt> represents an opaque blue color.</li>
</ul>
</dd>
</dl>
</div>
<div class="section" id="list-of-all-style-properties">
<h2>List of All Style Properties<a class="headerlink" href="#list-of-all-style-properties" title="Permalink to this headline">¶</a></h2>
<p>The style properties control the look of the various displayables. Not all
style properties apply to all displayables, so we've divided them up into
groups.</p>
<div class="section" id="position-style-properties">
<span id="id1"></span><h3>Position Style Properties<a class="headerlink" href="#position-style-properties" title="Permalink to this headline">¶</a></h3>
<p>These are used to control the position of a displayable inside the area
allocated to it by a layout, or on the screen when not inside a layout.</p>
<dl class="style-property">
<dt id="style-property-xpos">
<tt class="descname">xpos</tt> - position<a class="headerlink" href="#style-property-xpos" title="Permalink to this definition">¶</a></dt>
<dd><p>The position of the displayable relative to the left side of the
containing area.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-ypos">
<tt class="descname">ypos</tt> - position<a class="headerlink" href="#style-property-ypos" title="Permalink to this definition">¶</a></dt>
<dd><p>The position of the displayable relative to the right side of the
containing area.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-pos">
<tt class="descname">pos</tt> - tuple of (position, position)<a class="headerlink" href="#style-property-pos" title="Permalink to this definition">¶</a></dt>
<dd><p>Equivalent to setting xpos to the first component of the tuple,
and ypos to the second component of the tuple.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-xanchor">
<tt class="descname">xanchor</tt> - position<a class="headerlink" href="#style-property-xanchor" title="Permalink to this definition">¶</a></dt>
<dd><p>The position of the anchor relative to the left side of the
displayable.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-yanchor">
<tt class="descname">yanchor</tt> - position<a class="headerlink" href="#style-property-yanchor" title="Permalink to this definition">¶</a></dt>
<dd><p>The position of the anchor relative to the top side of the
displayable.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-anchor">
<tt class="descname">anchor</tt> - tuple of (position, position)<a class="headerlink" href="#style-property-anchor" title="Permalink to this definition">¶</a></dt>
<dd><p>Equivalent to setting xanchor to the first component of the tuple,
and yanchor to the second component of the tuple.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-xalign">
<tt class="descname">xalign</tt> - float<a class="headerlink" href="#style-property-xalign" title="Permalink to this definition">¶</a></dt>
<dd><p>Equivalent to setting xpos and xanchor to the same value. This has
the effect of placing the displayable at a relative location on
the screen, with 0.0 being the left side, 0.5 the center, and 1.0
being the right side.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-yalign">
<tt class="descname">yalign</tt> - float<a class="headerlink" href="#style-property-yalign" title="Permalink to this definition">¶</a></dt>
<dd><p>Equivalent to setting ypos and yanchor to the same value. This has
the effect of placing the displayable at a relative location on
the screen, with 0.0 being the top, 0.5 the center, and 1.0
the bottom.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-align">
<tt class="descname">align</tt> - tuple of (float, float)<a class="headerlink" href="#style-property-align" title="Permalink to this definition">¶</a></dt>
<dd><p>Equivalent to setting xalign to the first component of the tuple,
and yalign to the second.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-xcenter">
<tt class="descname">xcenter</tt> - position<a class="headerlink" href="#style-property-xcenter" title="Permalink to this definition">¶</a></dt>
<dd><p>Equivalent to setting xpos to the value of this property, and
xanchor to 0.5.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-ycenter">
<tt class="descname">ycenter</tt> - position<a class="headerlink" href="#style-property-ycenter" title="Permalink to this definition">¶</a></dt>
<dd><p>Equivalent to setting ypos to the value of tihis property, and
yanchor to 0.5.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-xoffset">
<tt class="descname">xoffset</tt> - int<a class="headerlink" href="#style-property-xoffset" title="Permalink to this definition">¶</a></dt>
<dd><p>Gives a number of pixels that are added to the horizontal position
computed using xpos and xalign.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-yoffset">
<tt class="descname">yoffset</tt> - int<a class="headerlink" href="#style-property-yoffset" title="Permalink to this definition">¶</a></dt>
<dd><p>Gives a number of pixels that are added to the vertical position
computed using ypos and yalign.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-xmaximum">
<tt class="descname">xmaximum</tt> - int<a class="headerlink" href="#style-property-xmaximum" title="Permalink to this definition">¶</a></dt>
<dd><p>Specifies the maximum horizontal size of the displayable, in pixels.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-ymaximum">
<tt class="descname">ymaximum</tt> - int<a class="headerlink" href="#style-property-ymaximum" title="Permalink to this definition">¶</a></dt>
<dd><p>Specifies the maximum vertical size of the displayable in pixels.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-maximum">
<tt class="descname">maximum</tt> - tuple of (int, int)<a class="headerlink" href="#style-property-maximum" title="Permalink to this definition">¶</a></dt>
<dd><p>Equivalent to setting xmaximum to the first component of the
tuple, and ymaximum to the second.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-xminimum">
<tt class="descname">xminimum</tt> - int<a class="headerlink" href="#style-property-xminimum" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the minimum width of the displayable, in pixels. Only works
with displayables that can vary their size.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-yminimum">
<tt class="descname">yminimum</tt> - int<a class="headerlink" href="#style-property-yminimum" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the minimum height of the displayables, in pixels. Only works
with displayables that can vary their size.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-minimum">
<tt class="descname">minimum</tt> - tuple of (int, int)<a class="headerlink" href="#style-property-minimum" title="Permalink to this definition">¶</a></dt>
<dd><p>Equivalent to setting xminimum to the first component of the
tuple, and yminimum to the second.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-xfill">
<tt class="descname">xfill</tt> - boolean<a class="headerlink" href="#style-property-xfill" title="Permalink to this definition">¶</a></dt>
<dd><p>If true, the displayable will expand to fill all available
horizontal space. If not true, it will only be large enough to
contain its children.</p>
<p>This only works for displayables that can change size.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-yfill">
<tt class="descname">yfill</tt> - boolean<a class="headerlink" href="#style-property-yfill" title="Permalink to this definition">¶</a></dt>
<dd><p>If true, the displayable will expand to fill all available
vertical space. If not true, it will only be large enough to
contain its children.</p>
<p>This only works for displayables that can change size.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-area">
<tt class="descname">area</tt> - tuple of (int, int, int, int)<a class="headerlink" href="#style-property-area" title="Permalink to this definition">¶</a></dt>
<dd><p>The tuple is interpreted as (<cite>xpos</cite>, <cite>ypos</cite>, <cite>width</cite>,
<cite>height</cite>). Attempts to position the displayable such that it's
upper-left corner is at <cite>xpos</cite> and <cite>ypos</cite>, and its size is <cite>width</cite>
and <cite>height</cite>.</p>
<p>It does this by setting the xpos, ypos, xanchor, yanchor,
xmaximum, ymaximum, xminimum, yminimum, xfill, and yfill
properties to appropriate values.</p>
<p>This will not work with all displayables and all layouts.</p>
</dd></dl>
</div>
<div class="section" id="text-style-properties">
<span id="id2"></span><h3>Text Style Properties<a class="headerlink" href="#text-style-properties" title="Permalink to this headline">¶</a></h3>
<dl class="style-property">
<dt id="style-property-antialias">
<tt class="descname">antialias</tt> - boolean<a class="headerlink" href="#style-property-antialias" title="Permalink to this definition">¶</a></dt>
<dd><p>If True, the default, truetype font text will be rendered
anti-aliased.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-black_color">
<tt class="descname">black_color</tt> - color<a class="headerlink" href="#style-property-black_color" title="Permalink to this definition">¶</a></dt>
<dd><p>When rendering an image-based font, black will be mapped to this
color. This has no effect for truetype fonts.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-bold">
<tt class="descname">bold</tt> - boolean<a class="headerlink" href="#style-property-bold" title="Permalink to this definition">¶</a></dt>
<dd><p>If True, render the font in a bold style. For a truetype font,
this usually involves synthetically increasing the font weight. It
can also cause the font to be remapped, using
<a class="reference internal" href="config.html#var-config.font_replacement_map"><tt class="xref std std-var docutils literal"><span class="pre">config.font_replacement_map</span></tt></a>.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-caret">
<tt class="descname">caret</tt> - displayable or None<a class="headerlink" href="#style-property-caret" title="Permalink to this definition">¶</a></dt>
<dd><p>If not None, this should be a displayable. The input widget will
use this as the caret at the end of the text. If None, a 1 pixel
wide line is used as the caret.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-color">
<tt class="descname">color</tt> - color<a class="headerlink" href="#style-property-color" title="Permalink to this definition">¶</a></dt>
<dd><p>The color the text is rendered in. When using a truetype font,
the font is rendered in this color. When using an image-based
font, white is mapped to this color.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-first_indent">
<tt class="descname">first_indent</tt> - int<a class="headerlink" href="#style-property-first_indent" title="Permalink to this definition">¶</a></dt>
<dd><p>The amount that the first line of text in a paragraph is indented
by, in pixels.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-font">
<tt class="descname">font</tt> - string<a class="headerlink" href="#style-property-font" title="Permalink to this definition">¶</a></dt>
<dd><p>A string giving the name of the font used to render text.</p>
<p>For a truetype font file, this is usually the name of the file
containing the font (like <tt class="docutils literal"><span class="pre">"DejaVuSans.ttf"</span></tt>). To select a second
font in a collection, this can be prefixed with a number and
at sign (like <tt class="docutils literal"><span class="pre">"0@font.ttc"</span></tt> or <tt class="docutils literal"><span class="pre">"1@font.ttc"</span></tt>). For an
image-based font, this should be the name used to register the
font.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-size">
<tt class="descname">size</tt> - int<a class="headerlink" href="#style-property-size" title="Permalink to this definition">¶</a></dt>
<dd><p>The size of the font on the screen. While this is nominally in
pixels, font files may have creative interpretations of this
value.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-italic">
<tt class="descname">italic</tt> - boolean<a class="headerlink" href="#style-property-italic" title="Permalink to this definition">¶</a></dt>
<dd><p>If true, the text will be rendered in italics. For a truetype font,
this usually involves synthetically increasing the font slant. It
can also cause the font to be remapped, using
<a class="reference internal" href="config.html#var-config.font_replacement_map"><tt class="xref std std-var docutils literal"><span class="pre">config.font_replacement_map</span></tt></a>.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-justify">
<tt class="descname">justify</tt> - boolean<a class="headerlink" href="#style-property-justify" title="Permalink to this definition">¶</a></dt>
<dd><p>If true, additional whitespace is inserted between words so that
the left and right margins of each line are even. This is not
performed on the last line of a paragraph.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-kerning">
<tt class="descname">kerning</tt> - float<a class="headerlink" href="#style-property-kerning" title="Permalink to this definition">¶</a></dt>
<dd><p>A kerning adjustment, the number of pixels of space that's added
between each pair of characters. (This can be negative to remove
space between characters.)</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-language">
<tt class="descname">language</tt> - string<a class="headerlink" href="#style-property-language" title="Permalink to this definition">¶</a></dt>
<dd><p>Controls the language family used to break text into lines. Legal
values are:</p>
<dl class="docutils">
<dt><tt class="docutils literal"><span class="pre">"unicode"</span></tt> (default)</dt>
<dd>Uses the unicode linebreaking algorithm, which is suitable for
most languages.</dd>
<dt><tt class="docutils literal"><span class="pre">"japanese-strict"</span></tt></dt>
<dd>Formats Japanese text in a "strict" manner. It
forbids breaks before small kana and prolonged sound marks.</dd>
<dt><tt class="docutils literal"><span class="pre">"japanese-normal"</span></tt></dt>
<dd>Formats Japanese text in a "normal" manner. It
allows breaks before small kana, prolonged sound marks, and
certain hyphens.</dd>
<dt><tt class="docutils literal"><span class="pre">"japanese-loose"</span></tt></dt>
<dd>Formats Japanese text in a "loose" manner. It allows breaks
before small kana , prolonged sound marks, iteration marks,
inseparable characters, centered punctuation marks, and postfixes;
and allows breaks before prefixes.</dd>
<dt><tt class="docutils literal"><span class="pre">"korean-with-spaces"</span></tt></dt>
<dd>Used for Korean text delimited by whitespace. This prevents linebreaking
between adjacent Korean characters.</dd>
<dt><tt class="docutils literal"><span class="pre">"western"</span></tt></dt>
<dd>Allows breaking only at whitespace. Suitable for most
languages.</dd>
</dl>
<p>The three Japanese breaking modes are taken from the <a class="reference external" href="http://www.w3.org/TR/css3-text/#line-break">CSS3 text module</a>.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-layout">
<tt class="descname">layout</tt> - string<a class="headerlink" href="#style-property-layout" title="Permalink to this definition">¶</a></dt>
<dd><p>Controls how words are allocated to lines. Legal values are:</p>
<dl class="docutils">
<dt><tt class="docutils literal"><span class="pre">"tex"</span></tt> (default)</dt>
<dd>Uses the Knuth-Plass linebreaking algorithm, which attempts to minimize
the difference in line lengths of all but the last line.</dd>
<dt><tt class="docutils literal"><span class="pre">"subtitle"</span></tt></dt>
<dd>Uses the Knuth-Plass linebreaking algorithm, but attempts to even out
the lengths of all lines.</dd>
<dt><tt class="docutils literal"><span class="pre">"greedy"</span></tt></dt>
<dd>A word is placed on the first line that has room for it.</dd>
<dt><tt class="docutils literal"><span class="pre">"nowrap"</span></tt></dt>
<dd>Do not line-break.</dd>
</dl>
</dd></dl>
<dl class="style-property">
<dt id="style-property-line_leading">
<tt class="descname">line_leading</tt> - int<a class="headerlink" href="#style-property-line_leading" title="Permalink to this definition">¶</a></dt>
<dd><p>The number of pixels of spacing to include above each line.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-line_overlap_split">
<tt class="descname">line_overlap_split</tt> - int<a class="headerlink" href="#style-property-line_overlap_split" title="Permalink to this definition">¶</a></dt>
<dd><p>When in slow text mode, and two lines overlap, this many pixels of
the overlap are allocated to the top line. Increase this if the
bottoms of characters on the top line are clipped.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-line_spacing">
<tt class="descname">line_spacing</tt> - int<a class="headerlink" href="#style-property-line_spacing" title="Permalink to this definition">¶</a></dt>
<dd><p>The number of pixels of spacing to include below each line.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-min_width">
<tt class="descname">min_width</tt> - int<a class="headerlink" href="#style-property-min_width" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the minimum width of each line of that. If a line is shorter
than this, it is padded to this length, with text_align used to
specify where such padding is placed.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-newline_indent">
<tt class="descname">newline_indent</tt> - boolean<a class="headerlink" href="#style-property-newline_indent" title="Permalink to this definition">¶</a></dt>
<dd><p>If true, the <a class="reference internal" href="#style-property-first_indent"><tt class="xref std std-propref docutils literal"><span class="pre">first_indent</span></tt></a> indentation is used after
each newline in a string. Otherwise, the <a class="reference internal" href="#style-property-rest_indent"><tt class="xref std std-propref docutils literal"><span class="pre">rest_indent</span></tt></a>
indentation is used.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-outlines">
<tt class="descname">outlines</tt> - list of tuple of (int, color, int, int)<a class="headerlink" href="#style-property-outlines" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a list of outlines that are drawn behind the text. Each
tuple specifies an outline, and outlines are drawn from back to
front.</p>
<p>The list contains (<cite>size</cite>, <cite>color</cite>, <cite>xoffset</cite>, <cite>yoffset</cite>)
tuples. <cite>Size</cite> is the amount the font is expanded by, in
pixels. <cite>Color</cite> is the color of the outline. <cite>xoffset</cite> and
<cite>yoffset</cite> are the amount the outline is shifted by, in pixels.</p>
<p>The outline functionality can also be used to give drop-shadows to
fonts, by specifiying a size of 0 and non-zero offsets.</p>
<p>Outlines only work with truetype fonts.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-rest_indent">
<tt class="descname">rest_indent</tt> - int<a class="headerlink" href="#style-property-rest_indent" title="Permalink to this definition">¶</a></dt>
<dd><p>Specifies the number of pixels the second and later lines in a
paragraph are indented by.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-ruby_style">
<tt class="descname">ruby_style</tt> - style or None<a class="headerlink" href="#style-property-ruby_style" title="Permalink to this definition">¶</a></dt>
<dd><p>If not None, this should be a style object. The style that's used for
ruby text.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-slow_cps">
<tt class="descname">slow_cps</tt> - int or True<a class="headerlink" href="#style-property-slow_cps" title="Permalink to this definition">¶</a></dt>
<dd><p>If a number, shows text at the rate of that many characters per
second. If True, shows text at the speed taken from the "Text
Speed" preference.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-slow_cps_multiplier">
<tt class="descname">slow_cps_multiplier</tt> - float<a class="headerlink" href="#style-property-slow_cps_multiplier" title="Permalink to this definition">¶</a></dt>
<dd><p>The speed of the text is multiplied by this number. This can be
used to have a character that speeks at a faster-than-normal rate
of speed.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-strikethrough">
<tt class="descname">strikethrough</tt> - boolean<a class="headerlink" href="#style-property-strikethrough" title="Permalink to this definition">¶</a></dt>
<dd><p>If True, a line is drawn through the text.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-text_align">
<tt class="descname">text_align</tt> - float<a class="headerlink" href="#style-property-text_align" title="Permalink to this definition">¶</a></dt>
<dd><p>This is used when a line is shorter than the width of the text
displayable. It determines how much of the extra space is placed
on the left side of the text. (And hence, the text alignment.)</p>
<p>0.0 will yield left-aligned text, 0.5 centered text, and 1.0
right-aligned text.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-underline">
<tt class="descname">underline</tt> - boolean<a class="headerlink" href="#style-property-underline" title="Permalink to this definition">¶</a></dt>
<dd><p>If true, an underline will be added to the text.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-hyperlink_functions">
<tt class="descname">hyperlink_functions</tt> - tuple of (function, function, function)<a class="headerlink" href="#style-property-hyperlink_functions" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a tuple of three functions relating to hyperlinks in text.</p>
<p>The first item is the hyperlink style function. When called with a single
argument, the argument of the hyperlink, it must return a style object to
use for the hyperlink, such as <tt class="docutils literal"><span class="pre">style.hyperlink_text</span></tt>. Note that a
style object is not a string.</p>
<p>The second item is the hyperlink clicked function. This function is called
when a hyperlink is chosen by the user. If it returns a value other than
None, the interaction returns that value.</p>
<p>The third item is the hyperlink focus function. This function is called
with the argument of the hyperlink when the hyperlink gains focus, and
with None when it loses focus. If it returns a value other than None,
the interaction returns that value</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-vertical">
<tt class="descname">vertical</tt> - boolean<a class="headerlink" href="#style-property-vertical" title="Permalink to this definition">¶</a></dt>
<dd><p>If true, the text will be rendered vertically.</p>
</dd></dl>
</div>
<div class="section" id="window-style-properties">
<span id="id3"></span><h3>Window Style Properties<a class="headerlink" href="#window-style-properties" title="Permalink to this headline">¶</a></h3>
<p>Window properties are used to specify the look of windows, frames, and buttons.</p>
<dl class="style-property">
<dt id="style-property-background">
<tt class="descname">background</tt> - displayable or None<a class="headerlink" href="#style-property-background" title="Permalink to this definition">¶</a></dt>
<dd><p>A displayable that is used as the background of the window. This
is often a <a class="reference internal" href="displayables.html#Frame" title="Frame"><tt class="xref py py-func docutils literal"><span class="pre">Frame()</span></tt></a>, allowing the size of the background to
scale with the size of the window.</p>
<p>If None, no background is drawn, but other properties function as
if the background was present.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-foreground">
<tt class="descname">foreground</tt> - displayable or None<a class="headerlink" href="#style-property-foreground" title="Permalink to this definition">¶</a></dt>
<dd><p>If not None, this displayable is drawn above the contents of the
window.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-left_margin">
<tt class="descname">left_margin</tt> - int<a class="headerlink" href="#style-property-left_margin" title="Permalink to this definition">¶</a></dt>
<dd><p>The amount of transparent space to the left of the background, in
pixels.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-right_margin">
<tt class="descname">right_margin</tt> - int<a class="headerlink" href="#style-property-right_margin" title="Permalink to this definition">¶</a></dt>
<dd><p>The amount of transparent space to the right of the background, in
pixels.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-xmargin">
<tt class="descname">xmargin</tt> - int<a class="headerlink" href="#style-property-xmargin" title="Permalink to this definition">¶</a></dt>
<dd><p>Equivalent to setting left_margin and right_margin to the same
value.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-top_margin">
<tt class="descname">top_margin</tt> - int<a class="headerlink" href="#style-property-top_margin" title="Permalink to this definition">¶</a></dt>
<dd><p>The amount of transparent space above the background, in pixels.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-bottom_margin">
<tt class="descname">bottom_margin</tt> - int<a class="headerlink" href="#style-property-bottom_margin" title="Permalink to this definition">¶</a></dt>
<dd><p>The amount of transparent space below the background, in pixels.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-ymargin">
<tt class="descname">ymargin</tt> - int<a class="headerlink" href="#style-property-ymargin" title="Permalink to this definition">¶</a></dt>
<dd><p>Equivalent to setting top_margin and bottom_margin to the same
value.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-left_padding">
<tt class="descname">left_padding</tt> - int<a class="headerlink" href="#style-property-left_padding" title="Permalink to this definition">¶</a></dt>
<dd><p>The amount of space between the background and the left side of
the window content, in pixels.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-right_padding">
<tt class="descname">right_padding</tt> - int<a class="headerlink" href="#style-property-right_padding" title="Permalink to this definition">¶</a></dt>
<dd><p>The amount of space between the background and the right side of
the window content, in pixels.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-xpadding">
<tt class="descname">xpadding</tt> - int<a class="headerlink" href="#style-property-xpadding" title="Permalink to this definition">¶</a></dt>
<dd><p>Equivalent to setting left_padding and right_padding to the same
value.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-top_padding">
<tt class="descname">top_padding</tt> - int<a class="headerlink" href="#style-property-top_padding" title="Permalink to this definition">¶</a></dt>
<dd><p>The amount of space between the background and the top side of
the window content, in pixels.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-bottom_padding">
<tt class="descname">bottom_padding</tt> - int<a class="headerlink" href="#style-property-bottom_padding" title="Permalink to this definition">¶</a></dt>
<dd><p>The amount of space between the background and the bottom side of
the window content, in pixels.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-ypadding">
<tt class="descname">ypadding</tt> - int<a class="headerlink" href="#style-property-ypadding" title="Permalink to this definition">¶</a></dt>
<dd><p>Equivalent to setting top_padding and bottom_padding to the same
value.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-size_group">
<tt class="descname">size_group</tt> - string or None<a class="headerlink" href="#style-property-size_group" title="Permalink to this definition">¶</a></dt>
<dd><p>If not None, this should be a string. Ren'Py will render all
windows with the same size_group value at the same size.</p>
</dd></dl>
</div>
<div class="section" id="button-style-properties">
<span id="id4"></span><h3>Button Style Properties<a class="headerlink" href="#button-style-properties" title="Permalink to this headline">¶</a></h3>
<dl class="style-property">
<dt id="style-property-child">
<tt class="descname">child</tt> - displayable or None<a class="headerlink" href="#style-property-child" title="Permalink to this definition">¶</a></dt>
<dd><p>If not None, this gives a displayable that replaces the child of the
button. For example, this (as insensitive_child) can be used to replace the
contents of an insensitive button with an image that indicates the button
is locked.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-hover_sound">
<tt class="descname">hover_sound</tt> - string<a class="headerlink" href="#style-property-hover_sound" title="Permalink to this definition">¶</a></dt>
<dd><p>A sound that is played when the button gains focus.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-activate_sound">
<tt class="descname">activate_sound</tt> - string<a class="headerlink" href="#style-property-activate_sound" title="Permalink to this definition">¶</a></dt>
<dd><p>A sound that is played when the button is clicked.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-mouse">
<tt class="descname">mouse</tt> - string<a class="headerlink" href="#style-property-mouse" title="Permalink to this definition">¶</a></dt>
<dd><p>The mouse style that is used when the button is focused. This
should be one of the styles in <a class="reference internal" href="config.html#var-config.mouse"><tt class="xref std std-var docutils literal"><span class="pre">config.mouse</span></tt></a>.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-focus_mask">
<tt class="descname">focus_mask</tt> - displayable or True or None<a class="headerlink" href="#style-property-focus_mask" title="Permalink to this definition">¶</a></dt>
<dd><p>A mask that's used to control what portions of the button can be
focused, and hence clicked on. If it's a displayable, then areas
of the displayable that are not transparent can be focused. If
it's True, then the button itself is used as the displayable (so
non-transparent areas of the button can be focused.) Otherwise,
the entire button can be focused.</p>
</dd></dl>
</div>
<div class="section" id="bar-style-properties">
<span id="id5"></span><h3>Bar Style Properties<a class="headerlink" href="#bar-style-properties" title="Permalink to this headline">¶</a></h3>
<p>Bars are drawn with gutters on the left and right, that when clicked can cause
the bar to move by a small amount. The remaining space is the portion of the
bar that can change, with the amount on each side proportional to the bar's
value as a fraction of the range.</p>
<p>The thumb is an area in the center of the bar that can be dragged by the user.</p>
<p>When a bar is drawn, the thumb's shadow is drawn first. Then the left/bottom
and right/top sides of the bar, followed by the thumb itself.</p>
<p>Note that the valid sides of a bar depend on the value of the bar_vertical
property. If it's True, the top and bottom sides are relevant. Otherwise, the
left and right sides are used.</p>
<dl class="style-property">
<dt id="style-property-bar_vertical">
<tt class="descname">bar_vertical</tt> - boolean<a class="headerlink" href="#style-property-bar_vertical" title="Permalink to this definition">¶</a></dt>
<dd><p>If true, the bar has a vertical orientation. If false, it has a
horizontal orientation.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-bar_invert">
<tt class="descname">bar_invert</tt> - boolean<a class="headerlink" href="#style-property-bar_invert" title="Permalink to this definition">¶</a></dt>
<dd><p>If true, the value of the bar is represented on the right/top
side of the bar, rather than the left/bottom side.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-bar_resizing">
<tt class="descname">bar_resizing</tt> - boolean<a class="headerlink" href="#style-property-bar_resizing" title="Permalink to this definition">¶</a></dt>
<dd><p>If true, we resize the sides of the bar. If false, we render the
sides of the bar at full size, and then crop them.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-left_gutter">
<tt class="descname">left_gutter</tt> - int<a class="headerlink" href="#style-property-left_gutter" title="Permalink to this definition">¶</a></dt>
<dd><p>The size of the gutter on the left side of the bar, in pixels.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-right_gutter">
<tt class="descname">right_gutter</tt> - int<a class="headerlink" href="#style-property-right_gutter" title="Permalink to this definition">¶</a></dt>
<dd><p>The size of the gutter on the right side of the bar, in pixels.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-top_gutter">
<tt class="descname">top_gutter</tt> - int<a class="headerlink" href="#style-property-top_gutter" title="Permalink to this definition">¶</a></dt>
<dd><p>The size of the gutter on the top side of the bar, in pixels.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-bottom_gutter">
<tt class="descname">bottom_gutter</tt> - int<a class="headerlink" href="#style-property-bottom_gutter" title="Permalink to this definition">¶</a></dt>
<dd><p>The size of the gutter on the bottom side of the bar, in pixels.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-left_bar">
<tt class="descname">left_bar</tt> - displayable<a class="headerlink" href="#style-property-left_bar" title="Permalink to this definition">¶</a></dt>
<dd><p>The displayable used for the left side of the bar.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-right_bar">
<tt class="descname">right_bar</tt> - displayable<a class="headerlink" href="#style-property-right_bar" title="Permalink to this definition">¶</a></dt>
<dd><p>The displayable used for the right side of the bar.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-top_bar">
<tt class="descname">top_bar</tt> - displayable<a class="headerlink" href="#style-property-top_bar" title="Permalink to this definition">¶</a></dt>
<dd><p>The displayable used for the top side of the bar.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-bottom_bar">
<tt class="descname">bottom_bar</tt> - displayable<a class="headerlink" href="#style-property-bottom_bar" title="Permalink to this definition">¶</a></dt>
<dd><p>The displayable uses for the bottom side of the bar.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-thumb">
<tt class="descname">thumb</tt> - displayable or None<a class="headerlink" href="#style-property-thumb" title="Permalink to this definition">¶</a></dt>
<dd><p>If not None, this is a displayable that is drawn over the break
between the sides of the bar.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-thumb_shadow">
<tt class="descname">thumb_shadow</tt> - displayable or None<a class="headerlink" href="#style-property-thumb_shadow" title="Permalink to this definition">¶</a></dt>
<dd><p>If not None, this is a displayable that is drawn over the break
between the sides of the bar.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-thumb_offset">
<tt class="descname">thumb_offset</tt> - int<a class="headerlink" href="#style-property-thumb_offset" title="Permalink to this definition">¶</a></dt>
<dd><p>The amount that by which the thumb overlaps the bars, in
pixels. To have the left and right bars continue unbroken, set
this to half the width of the thumb in pixels.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-mouse_alt">
<tt class="descname">mouse</tt> - string<a class="headerlink" href="#style-property-mouse_alt" title="Permalink to this definition">¶</a></dt>
<dd><p>The mouse style that is used when the button is focused. This
should be one of the styles in <a class="reference internal" href="config.html#var-config.mouse"><tt class="xref std std-var docutils literal"><span class="pre">config.mouse</span></tt></a>.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-unscrollable">
<tt class="descname">unscrollable</tt> - string or None<a class="headerlink" href="#style-property-unscrollable" title="Permalink to this definition">¶</a></dt>
<dd><p>Controls what happens if the bar is unscrollable (if the range is
set to 0, as is the case with a viewport containing a displayable
smaller than itself). There are three possible values:</p>
<dl class="docutils">
<dt><tt class="docutils literal"><span class="pre">None</span></tt></dt>
<dd>Renders the bar normally.</dd>
<dt><tt class="docutils literal"><span class="pre">"insensitive"</span></tt></dt>
<dd>Renders the bar in the insensitive state. This allows the
bar to change its style to reflect its lack of usefulness.</dd>
<dt><tt class="docutils literal"><span class="pre">"hide"</span></tt></dt>
<dd>Prevents the bar from rendering at all. Space will be allocated
for the bar, but nothing will be drawn in that space.</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="box-style-properties">
<span id="id6"></span><h3>Box Style Properties<a class="headerlink" href="#box-style-properties" title="Permalink to this headline">¶</a></h3>
<p>These are used for the horizontal and vertical box layouts.</p>
<dl class="style-property">
<dt id="style-property-spacing">
<tt class="descname">spacing</tt> - int<a class="headerlink" href="#style-property-spacing" title="Permalink to this definition">¶</a></dt>
<dd><p>The spacing between members of this box, in pixels.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-first_spacing">
<tt class="descname">first_spacing</tt> - int<a class="headerlink" href="#style-property-first_spacing" title="Permalink to this definition">¶</a></dt>
<dd><p>If not None, the spacing between the first and second members of
this box, in pixels. This overrides the spacing property.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-box_reverse">
<tt class="descname">box_reverse</tt> - boolean<a class="headerlink" href="#style-property-box_reverse" title="Permalink to this definition">¶</a></dt>
<dd><p>If true, the placement of the items in the box will be reversed. When
this is true, a hbox will be filled right-to-left, and a vbox will
be filled bottom-to-top. This defaults to false.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-box_wrap">
<tt class="descname">box_wrap</tt> - boolean<a class="headerlink" href="#style-property-box_wrap" title="Permalink to this definition">¶</a></dt>
<dd><p>If true, then boxes will wrap when they reach the end of a line or column.
If false (the default), they will extend past the end of the line.</p>
</dd></dl>
<dl class="style-property">
<dt id="style-property-order_reverse">
<tt class="descname">order_reverse</tt> - boolean<a class="headerlink" href="#style-property-order_reverse" title="Permalink to this definition">¶</a></dt>
<dd><p>If false, the default, the items in the box will be draw first-to-last,
with the first item in the box being below the second, and so on. If true,
this order will be reversed, and the first item in the box will be above
all other items in the box.</p>
</dd></dl>
</div>
<div class="section" id="fixed-style-properties">
<span id="id7"></span><h3>Fixed Style Properties<a class="headerlink" href="#fixed-style-properties" title="Permalink to this headline">¶</a></h3>
<p>These are used with the fixed layout.</p>
<dl class="style-property">
<dt id="style-property-fit_first">
<tt class="descname">fit_first</tt> - bool<a class="headerlink" href="#style-property-fit_first" title="Permalink to this definition">¶</a></dt>
<dd><p>If true, then the size of the fixed layout is shrunk to be equal with
the size of the first item in the layout.</p>
</dd></dl>
</div>
</div>
<div class="section" id="creating-new-named-styles">
<h2>Creating New Named Styles<a class="headerlink" href="#creating-new-named-styles" title="Permalink to this headline">¶</a></h2>
<p>Named styles exists as fields on the global <tt class="docutils literal"><span class="pre">style</span></tt> object. To create a new
style, create an instance of the Style class, and assign it to a field on the
<tt class="docutils literal"><span class="pre">style</span></tt> object.:</p>
<div class="highlight-renpy"><div class="highlight"><pre><span class="k">init</span> <span class="k">python</span><span class="p">:</span>
<span class="na">style</span><span class="o">.</span><span class="n">big_text</span> <span class="o">=</span> <span class="n">Style</span><span class="p">(</span><span class="na">style</span><span class="o">.</span><span class="na">default</span><span class="p">)</span>
<span class="na">style</span><span class="o">.</span><span class="n">big_text</span><span class="o">.</span><span class="na">size</span> <span class="o">=</span> <span class="mi">42</span>
</pre></div>
</div>
<p>Once created, a named style can be applied to displayables by supplying it's
name, or the style object.:</p>
<div class="highlight-renpy"><div class="highlight"><pre><span class="k">screen</span> <span class="n">two_big_lines</span><span class="p">:</span>
<span class="k">vbox</span><span class="p">:</span>
<span class="k">text</span> <span class="s">"This is Big Text!"</span> <span class="na">style</span> <span class="s">"big_text"</span>
<span class="k">text</span> <span class="s">"So is this."</span> <span class="na">style</span> <span class="na">style</span><span class="o">.</span><span class="n">big_text</span>
</pre></div>
</div>
<dl class="class">
<dt id="Style">
<em class="property">class </em><tt class="descname">Style</tt><big>(</big><em>parent</em><big>)</big><a class="headerlink" href="#Style" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a new style object. Style properties can be assigned to
the fields of this object.</p>
<dl class="docutils">
<dt><cite>parent</cite></dt>
<dd>The styles parent. This can be another style object, or a
string.</dd>
</dl>
<dl class="method">
<dt id="Style.clear">
<tt class="descname">clear</tt><big>(</big><big>)</big><a class="headerlink" href="#Style.clear" title="Permalink to this definition">¶</a></dt>
<dd><p>This removes all style properties from this object. Values will be
inherited from this object's parent.</p>
</dd></dl>
<dl class="method">
<dt id="Style.set_parent">
<tt class="descname">set_parent</tt><big>(</big><em>parent</em><big>)</big><a class="headerlink" href="#Style.set_parent" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the parent of this style object to <cite>parent</cite>.</p>
</dd></dl>
<dl class="method">
<dt id="Style.take">
<tt class="descname">take</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#Style.take" title="Permalink to this definition">¶</a></dt>
<dd><p>This takes all style properties from <cite>other</cite>. <cite>other</cite> must be a
style object.</p>
</dd></dl>
</dd></dl>
<div class="section" id="indexed-styles">
<h3>Indexed Styles<a class="headerlink" href="#indexed-styles" title="Permalink to this headline">¶</a></h3>
<p>Indexed styles are lightweight styles that can be used to customize the look
of a displayable based on the data supplied to that displayable. An index
style is created by indexing a style object with a string or integer. If an
indexed style does not exist, indexing creates it.:</p>
<div class="highlight-renpy"><div class="highlight"><pre><span class="k">init</span> <span class="k">python</span><span class="p">:</span>
<span class="na">style</span><span class="o">.</span><span class="k">button</span><span class="p">[</span><span class="s">'Foo'</span><span class="p">]</span><span class="o">.</span><span class="na">background</span> <span class="o">=</span> <span class="s">"#f00"</span>
<span class="na">style</span><span class="o">.</span><span class="k">button</span><span class="p">[</span><span class="s">'Bar'</span><span class="p">]</span><span class="o">.</span><span class="na">background</span> <span class="o">=</span> <span class="s">"#00f"</span>
</pre></div>
</div>
<p>An index style is used by supplying the indexed style to a displayable.:</p>
<div class="highlight-renpy"><div class="highlight"><pre><span class="k">screen</span> <span class="n">indexed_style_test</span><span class="p">:</span>
<span class="k">vbox</span><span class="p">:</span>
<span class="k">textbutton</span> <span class="s">"Foo"</span> <span class="na">style</span> <span class="na">style</span><span class="o">.</span><span class="k">button</span><span class="p">[</span><span class="s">"Foo"</span><span class="p">]</span>
<span class="k">textbutton</span> <span class="s">"Bar"</span> <span class="na">style</span> <span class="na">style</span><span class="o">.</span><span class="k">button</span><span class="p">[</span><span class="s">"Bar"</span><span class="p">]</span>
</pre></div>
</div>
</div>
<div class="section" id="style-inheritance">
<h3>Style Inheritance<a class="headerlink" href="#style-inheritance" title="Permalink to this headline">¶</a></h3>
<p>When a property is not defined by a style, it is inherited from the style's
parent. When indexing is involved, properties are inherited first from the
unindexed form of the style, then from the indexed form of the parent, then
the unindexed form of the parent, and so on.</p>
<p>For example, when <tt class="docutils literal"><span class="pre">style.mm_button</span></tt> inherits from <tt class="docutils literal"><span class="pre">style.button</span></tt>, which in
turn inherits from <tt class="docutils literal"><span class="pre">style.default</span></tt>, then the properties of
<tt class="docutils literal"><span class="pre">style.mm_button["Start</span> <span class="pre">Game"]</span></tt> are taken from:</p>
<ol class="arabic simple">
<li><tt class="docutils literal"><span class="pre">style.mm_button["Start</span> <span class="pre">Game"]</span></tt></li>
<li><tt class="docutils literal"><span class="pre">style.mm_button</span></tt></li>
<li><tt class="docutils literal"><span class="pre">style.button["Start</span> <span class="pre">Game"]</span></tt></li>
<li><tt class="docutils literal"><span class="pre">style.button</span></tt></li>
<li><tt class="docutils literal"><span class="pre">style.default["Start</span> <span class="pre">Game"]</span></tt></li>
<li><tt class="docutils literal"><span class="pre">style.default</span></tt></li>
</ol>
<p>With the property value taken from the lowest numbered style with the property
defined.</p>
</div>
<div class="section" id="style-preferences">
<span id="id8"></span><h3>Style Preferences<a class="headerlink" href="#style-preferences" title="Permalink to this headline">¶</a></h3>
<p>It's often desireable to allow the user to customize aspects of the user
interface that are best expressed as styles. For example, a creator may want
to give players of his game the ability to adjust the look, color, and size
of the text. Style preferences allow for this customization.</p>
<p>A style preference is a preference that controls one or more style properties.
A style preference has a name and one or more alternatives. At any given
time, one of the alternatives is the selected alternative for the style
preference. The selected alternative is saved in the persistent data, and
defaults to the first alternative registered for a style property.</p>
<p>An alternative has one or more associations of style, property, and value
associated with it, and represents a promise that when the alternative
becomes the selected alternative for the style preference, the property on
the style will be assigned the given value. This occurs when Ren'Py first
initializes, and then whenever a new alternative is selected.</p>
<p>One should ensure that every alternative for a given style preference updates
the same set of styles and properties. Otherwise, some styles may not be
assigned values, and the result will not be deterministic.</p>
<p>The style preference functions are:</p>
<dl class="function">
<dt id="StylePreference">
<tt class="descname">StylePreference</tt><big>(</big><em>preference</em>, <em>alternative</em><big>)</big><a class="headerlink" href="#StylePreference" title="Permalink to this definition">¶</a></dt>
<dd><p>An action that causes <cite>alternative</cite> to become the selected alternative for the given style preference.</p>
<dl class="docutils">
<dt><cite>preference</cite></dt>
<dd>A string giving the name of the style preference.</dd>
<dt><cite>alternative</cite></dt>
<dd>A string giving the name of the alternative.</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="renpy.get_style_preference">
<tt class="descclassname">renpy.</tt><tt class="descname">get_style_preference</tt><big>(</big><em>preference</em><big>)</big><a class="headerlink" href="#renpy.get_style_preference" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a string giving the name of the selected alternative for the named style preference.</p>
<dl class="docutils">
<dt><cite>preference</cite></dt>
<dd>A string giving the name of the style preference.</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="renpy.register_style_preference">
<tt class="descclassname">renpy.</tt><tt class="descname">register_style_preference</tt><big>(</big><em>preference</em>, <em>alternative</em>, <em>style</em>, <em>property</em>, <em>value</em><big>)</big><a class="headerlink" href="#renpy.register_style_preference" title="Permalink to this definition">¶</a></dt>
<dd><p>Registers information about an alternative for a style preference.</p>
<dl class="docutils">
<dt><cite>preference</cite></dt>
<dd>A string, the name of the style property.</dd>
<dt><cite>alternative</cite></dt>
<dd>A string, the name of the alternative.</dd>
<dt><cite>style</cite></dt>
<dd>The style that will be updated. This may be a style object or a string giving the style name.</dd>
<dt><cite>property</cite></dt>
<dd>A string giving the name of the style property that will be update.</dd>
<dt><cite>value</cite></dt>
<dd>The value that will be assigned to the style property.</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="renpy.set_style_preference">
<tt class="descclassname">renpy.</tt><tt class="descname">set_style_preference</tt><big>(</big><em>preference</em>, <em>alternative</em><big>)</big><a class="headerlink" href="#renpy.set_style_preference" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the selected alternative for the style preference.</p>
<dl class="docutils">
<dt><cite>preference</cite></dt>
<dd>A string giving the name of the style preference.</dd>
<dt><cite>alternative</cite></dt>
<dd>A string giving the name of the alternative.</dd>
</dl>
</dd></dl>
<p>Here's an example of registering a style property that allows the user to
choose between large, simple text and smaller outlined text.</p>
<div class="highlight-renpy"><div class="highlight"><pre><span class="k">init</span> <span class="k">python</span><span class="p">:</span>
<span class="n">renpy</span><span class="o">.</span><span class="n">register_style_property</span><span class="p">(</span><span class="s">"text"</span><span class="p">,</span> <span class="s">"decorated"</span><span class="p">,</span> <span class="na">style</span><span class="o">.</span><span class="n">say_dialogue</span><span class="p">,</span> <span class="s">"outlines"</span><span class="p">,</span> <span class="p">[</span> <span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="s">"#000"</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span> <span class="p">])</span>
<span class="n">renpy</span><span class="o">.</span><span class="n">register_style_property</span><span class="p">(</span><span class="s">"text"</span><span class="p">,</span> <span class="s">"decorated"</span><span class="p">,</span> <span class="na">style</span><span class="o">.</span><span class="n">say_dialogue</span><span class="p">,</span> <span class="s">"size"</span><span class="p">,</span> <span class="mi">22</span><span class="p">)</span>
<span class="n">renpy</span><span class="o">.</span><span class="n">register_style_property</span><span class="p">(</span><span class="s">"text"</span><span class="p">,</span> <span class="s">"large"</span><span class="p">,</span> <span class="na">style</span><span class="o">.</span><span class="n">say_dialogue</span><span class="p">,</span> <span class="s">"outlines"</span><span class="p">,</span> <span class="p">[</span> <span class="p">])</span>
<span class="n">renpy</span><span class="o">.</span><span class="n">register_style_property</span><span class="p">(</span><span class="s">"text"</span><span class="p">,</span> <span class="s">"large"</span><span class="p">,</span> <span class="na">style</span><span class="o">.</span><span class="n">say_dialogue</span><span class="p">,</span> <span class="s">"size"</span><span class="p">,</span> <span class="mi">24</span><span class="p">)</span>
</pre></div>
</div>
<p>The following code will allow the user to select these alternatives using
buttons:</p>
<div class="highlight-renpy"><div class="highlight"><pre><span class="k">textbutton</span> <span class="s">"Decorated"</span> <span class="na">action</span> <span class="n">StylePreference</span><span class="p">(</span><span class="s">"text"</span><span class="p">,</span> <span class="s">"decorated"</span><span class="p">)</span>
<span class="k">textbutton</span> <span class="s">"Large"</span> <span class="na">action</span> <span class="n">StylePreference</span><span class="p">(</span><span class="s">"text"</span><span class="p">,</span> <span class="s">"large"</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="section" id="other-style-functions">
<h3>Other Style Functions<a class="headerlink" href="#other-style-functions" title="Permalink to this headline">¶</a></h3>
<dl class="function">
<dt id="style.rebuild">
<tt class="descclassname">style.</tt><tt class="descname">rebuild</tt><big>(</big><big>)</big><a class="headerlink" href="#style.rebuild" title="Permalink to this definition">¶</a></dt>
<dd><p>This causes named styles to be rebuilt, allowing styles to be
changed outside of init code.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Named styles are not saved as part of the per-game data. This
means that changes to them will not be persisted through a save
and load cycle.</p>
</div>
</dd></dl>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="screens.html" title="Screens and Screen Language"
>next</a> |</li>
<li class="right" >
<a href="input.html" title="Text Input"
>previous</a> |</li>
<li> <img src="_static/logo.png" width=19 height=21 align=center>
<li> <a href="http://www.renpy.org/">Ren'Py Home</a> |
<li><a href="index.html">Ren'Py Documentation</a></li>
</ul>
</div>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load('search', '1', {language : 'en' });
google.setOnLoadCallback(function() {
var customSearchControl = new google.search.CustomSearchControl('012476843541036121001:gx3sqkoaxkm');
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
var options = new google.search.DrawOptions();
options.enableSearchboxOnly("http://www.google.com/cse?cx=012476843541036121001:gx3sqkoaxkm");
customSearchControl.draw('cse-search-form', options);
}, true);
</script>
</body>
</html>
|