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
|
<html><head><title>renpy.cache pin - Ren'Py Visual Novel Engine</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> ◦ <a href="../Reference_Manual.html">reference manual</a> ◦ <a href="../Function_Index.html">function index</a></p><p><a id="renpy.cache_pin" name="renpy.cache_pin"></a></p>
<h1><span class="mw-headline">renpy.cache_pin</span></h1>
<p><span id="renpy.cache_pin" /></p>
<table>
<tr>
<td valign="top">Function:</td>
<td valign="top"><b><strong class="selflink">renpy.cache_pin</strong></b></td>
<td valign="top">(*image_manipulators):</td>
</tr>
</table>
<div class="renpy-doc">
<p>When this is called with one or more image manipulators, it causes those image manipulators to be "pinned" into the image cache. This means that they will be loaded soon after the game begins, and will never be removed from the cache.</p>
<p>The usual use of this function is to preload images used in the game menu. Be careful with it, as it can increase Ren'Py's memory usage.</p>
</div>
<pre>
<span class="kwa">init python</span><span class="sym">:</span>
renpy<span class="sym">.</span><span class="kwd">cache_pin</span><span class="sym">(</span><span class="str">"game_menu_root.jpg"</span><span class="sym">)</span>
</pre>
<div class="visualClear" />
<hr /><p class="docnav"><a href="../../index.html">documentation index</a> ◦ <a href="../Reference_Manual.html">reference manual</a> ◦ <a href="../Function_Index.html">function index</a></p></div>
</body></html>
|