/usr/share/doc/renpy/html/menus.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 | <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>In-Game Menus — 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="Voice" href="voice.html" />
<link rel="prev" title="Displaying Images" href="displaying_images.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="voice.html" title="Voice"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="displaying_images.html" title="Displaying Images"
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">
<h4>Previous topic</h4>
<p class="topless"><a href="displaying_images.html"
title="previous chapter">Displaying Images</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="voice.html"
title="next chapter">Voice</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="in-game-menus">
<span id="menu-statement"></span><span id="menus"></span><h1>In-Game Menus<a class="headerlink" href="#in-game-menus" title="Permalink to this headline">ΒΆ</a></h1>
<p>In many visual novels, the player is asked to make choices that
control the outcome of the story. The Ren'Py language contains a menus
statement that makes it easy to present choices to the user.</p>
<p>Here's an example of a menu statement:</p>
<div class="highlight-renpy"><div class="highlight"><pre><span class="k">menu</span><span class="p">:</span>
<span class="s">"What should I do?"</span>
<span class="s">"Drink coffee."</span><span class="p">:</span>
<span class="s">"I drink the coffee, and it's good to the last drop."</span>
<span class="s">"Drink tea."</span><span class="p">:</span>
<span class="k">$</span> <span class="n">drank_tea</span> <span class="o">=</span> <span class="bp">True</span>
<span class="s">"I drink the tea, trying not to make a political statement as I do."</span>
<span class="s">"Genuflect."</span><span class="p">:</span>
<span class="k">jump</span> <span class="n">genuflect_ending</span>
<span class="k">label</span> <span class="n">after_menu</span><span class="p">:</span>
<span class="s">"After having my drink, I got on with my morning."</span>
</pre></div>
</div>
<p>The menu statement begins with the keyword menu. This may be followed
by a label name, in which case it's equivalent to preceding the menu
with that label. For example:</p>
<div class="highlight-renpy"><div class="highlight"><pre><span class="k">menu</span> <span class="n">drink_menu</span><span class="p">:</span>
<span class="o">...</span>
</pre></div>
</div>
<p>The menu statement is followed by an indented block. This block may
contain a <a class="reference internal" href="dialogue.html#say-statement"><em>say statement</em></a>, and must contain at
least one menu choice. If the say statement is present, it is
displayed on the screen at the same time as the menu.</p>
<p><strong>Menu Choices.</strong>
A menu choice is an option the user can select from the in-game
menu. A menu choice begins with a string. The string may be followed
by an if-clause, which makes the choice conditional. The menu choice
ends with a colon, and must be followed by a block of Ren'Py
statements.</p>
<p>When the choice is selected, the block of code is run. If execution
reaches the end of this block of code, it continues with the statement
after the end of the menu statement.</p>
<p>An if-clause consists of the keyword <tt class="docutils literal"><span class="pre">if</span></tt>, followed by a python
expression. The menu choice is only displayed if the expression is
true. In the following menu:</p>
<div class="highlight-renpy"><div class="highlight"><pre><span class="k">menu</span><span class="p">:</span>
<span class="s">"Go left."</span><span class="p">:</span>
<span class="o">...</span>
<span class="s">"Go right."</span><span class="p">:</span>
<span class="o">...</span>
<span class="s">"Fly above."</span> <span class="k">if</span> <span class="n">drank_tea</span><span class="p">:</span>
<span class="o">...</span>
</pre></div>
</div>
<p>The third choice will only be presented if the drank_tea variable is
true.</p>
</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="voice.html" title="Voice"
>next</a> |</li>
<li class="right" >
<a href="displaying_images.html" title="Displaying Images"
>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>
|