This commit is contained in:
dabreegster 2021-04-22 00:14:29 +00:00
parent a1a67f1b64
commit 9c0e978f83
21 changed files with 190 additions and 44 deletions

View File

@ -301,8 +301,8 @@ call this to handle all other events. <a href="#method.other_event">Read more</a
</div><h4 id="method.draw-54" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, _: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/sandbox/mod.rs.html#285" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
</div><h4 id="method.draw_baselayer-53" class="method hidden"><code>pub fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
</div><h4 id="method.on_destroy-53" class="method hidden"><code>pub fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
</div></div><h3 id="impl-State%3CApp%3E-54" class="impl"><code class="in-band">impl State&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../game/sandbox/struct.SandboxLoader.html" title="struct game::sandbox::SandboxLoader">SandboxLoader</a></code><a href="#impl-State%3CApp%3E-54" class="anchor"></a><a class="srclink" href="../../src/game/sandbox/mod.rs.html#438-621" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event-54" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../src/game/sandbox/mod.rs.html#439-618" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
</div><h4 id="method.draw-55" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, _: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/sandbox/mod.rs.html#620" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
</div></div><h3 id="impl-State%3CApp%3E-54" class="impl"><code class="in-band">impl State&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../game/sandbox/struct.SandboxLoader.html" title="struct game::sandbox::SandboxLoader">SandboxLoader</a></code><a href="#impl-State%3CApp%3E-54" class="anchor"></a><a class="srclink" href="../../src/game/sandbox/mod.rs.html#438-625" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event-54" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../src/game/sandbox/mod.rs.html#439-622" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
</div><h4 id="method.draw-55" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, _: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/sandbox/mod.rs.html#624" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
</div><h4 id="method.draw_baselayer-54" class="method hidden"><code>pub fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
</div><h4 id="method.on_destroy-54" class="method hidden"><code>pub fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
</div></div><h3 id="impl-State%3CApp%3E-6" class="impl"><code class="in-band">impl State&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../game/debug/floodfill/struct.Floodfiller.html" title="struct game::debug::floodfill::Floodfiller">Floodfiller</a></code><a href="#impl-State%3CApp%3E-6" class="anchor"></a><a class="srclink" href="../../src/game/debug/floodfill.rs.html#81-117" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event-6" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../src/game/debug/floodfill.rs.html#82-107" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>

View File

@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `BUILT_TIME_UTC` constant in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>game::pregame::built_info::BUILT_TIME_UTC - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a></p><div id="sidebar-vars" data-name="BUILT_TIME_UTC" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="">BUILT_TIME_UTC</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-e51c0a1cdd4549fe/out/built.rs.html#53" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;Wed, 21 Apr 2021 00:30:53 +0000&quot;;</pre><div class="docblock"><p>The built-time in RFC2822, UTC</p>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="">BUILT_TIME_UTC</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-e51c0a1cdd4549fe/out/built.rs.html#53" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;Thu, 22 Apr 2021 00:11:33 +0000&quot;;</pre><div class="docblock"><p>The built-time in RFC2822, UTC</p>
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game"></div>
<script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `is_daytime` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, is_daytime"><title>game::sandbox::is_daytime - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">game</a>::<wbr><a href="index.html">sandbox</a></p><div id="sidebar-vars" data-name="is_daytime" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">sandbox</a>::<wbr><a class="fn" href="">is_daytime</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/sandbox/mod.rs.html#653-656" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn is_daytime(app: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game"></div>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">sandbox</a>::<wbr><a class="fn" href="">is_daytime</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/sandbox/mod.rs.html#657-660" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn is_daytime(app: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game"></div>
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `mouseover_unzoomed_agent_circle` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, mouseover_unzoomed_agent_circle"><title>game::sandbox::mouseover_unzoomed_agent_circle - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">game</a>::<wbr><a href="index.html">sandbox</a></p><div id="sidebar-vars" data-name="mouseover_unzoomed_agent_circle" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">sandbox</a>::<wbr><a class="fn" href="">mouseover_unzoomed_agent_circle</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/sandbox/mod.rs.html#623-651" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn mouseover_unzoomed_agent_circle(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game"></div>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">sandbox</a>::<wbr><a class="fn" href="">mouseover_unzoomed_agent_circle</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/sandbox/mod.rs.html#627-655" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn mouseover_unzoomed_agent_circle(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game"></div>
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `import` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, import"><title>game::sandbox::gameplay::freeform::grid2demand::import - Rust</title><link rel="stylesheet" type="text/css" href="../../../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../../../index.html">game</a>::<wbr><a href="../../../index.html">sandbox</a>::<wbr><a href="../../index.html">gameplay</a>::<wbr><a href="../index.html">freeform</a>::<wbr><a href="index.html">grid2demand</a></p><div id="sidebar-vars" data-name="import" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../../../settings.html"><img src="../../../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../../../index.html">game</a>::<wbr><a href="../../../index.html">sandbox</a>::<wbr><a href="../../index.html">gameplay</a>::<wbr><a href="../index.html">freeform</a>::<wbr><a href="index.html">grid2demand</a>::<wbr><a class="fn" href="">import</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../../../src/game/sandbox/gameplay/freeform/grid2demand.rs.html#11-59" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn import(ctx: &amp;mut EventCtx&lt;'_&gt;) -&gt; Transition&lt;<a class="struct" href="../../../../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../../" data-current-crate="game"></div>
<a id="settings-menu" href="../../../../../settings.html"><img src="../../../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../../../index.html">game</a>::<wbr><a href="../../../index.html">sandbox</a>::<wbr><a href="../../index.html">gameplay</a>::<wbr><a href="../index.html">freeform</a>::<wbr><a href="index.html">grid2demand</a>::<wbr><a class="fn" href="">import</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../../../src/game/sandbox/gameplay/freeform/grid2demand.rs.html#11-63" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn import(ctx: &amp;mut EventCtx&lt;'_&gt;) -&gt; Transition&lt;<a class="struct" href="../../../../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../../" data-current-crate="game"></div>
<script src="../../../../../main.js"></script><script defer src="../../../../../search-index.js"></script></body></html>

View File

@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `grid2demand` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, grid2demand"><title>game::sandbox::gameplay::freeform::grid2demand - Rust</title><link rel="stylesheet" type="text/css" href="../../../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../../../rust-logo.png' alt='logo'></div></a><p class="location">Module grid2demand</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../../../../index.html">game</a>::<wbr><a href="../../../index.html">sandbox</a>::<wbr><a href="../../index.html">gameplay</a>::<wbr><a href="../index.html">freeform</a></p><div id="sidebar-vars" data-name="grid2demand" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../../../settings.html"><img src="../../../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../../../index.html">game</a>::<wbr><a href="../../../index.html">sandbox</a>::<wbr><a href="../../index.html">gameplay</a>::<wbr><a href="../index.html">freeform</a>::<wbr><a class="mod" href="">grid2demand</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../../../src/game/sandbox/gameplay/freeform/grid2demand.rs.html#3-59" title="goto source code">[src]</a></span></h1><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
<a id="settings-menu" href="../../../../../settings.html"><img src="../../../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../../../index.html">game</a>::<wbr><a href="../../../index.html">sandbox</a>::<wbr><a href="../../index.html">gameplay</a>::<wbr><a href="../index.html">freeform</a>::<wbr><a class="mod" href="">grid2demand</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../../../src/game/sandbox/gameplay/freeform/grid2demand.rs.html#3-63" title="goto source code">[src]</a></span></h1><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
<table><tr class="module-item"><td><a class="fn" href="fn.import.html" title="game::sandbox::gameplay::freeform::grid2demand::import fn">import</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../../" data-current-crate="game"></div>
<script src="../../../../../main.js"></script><script defer src="../../../../../search-index.js"></script></body></html>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `sandbox` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, sandbox"><title>game::sandbox - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module sandbox</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../index.html">game</a></p><div id="sidebar-vars" data-name="sandbox" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">game</a>::<wbr><a class="mod" href="">sandbox</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/sandbox/mod.rs.html#1-704" title="goto source code">[src]</a></span></h1><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">game</a>::<wbr><a class="mod" href="">sandbox</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/sandbox/mod.rs.html#1-708" title="goto source code">[src]</a></span></h1><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2>
<table><tr><td><code>pub use self::gameplay::<a class="fn" href="../../game/sandbox/gameplay/freeform/fn.spawn_agents_around.html" title="fn game::sandbox::gameplay::freeform::spawn_agents_around">spawn_agents_around</a>;</code></td></tr><tr><td><code>pub use self::gameplay::<a class="enum" href="../../game/sandbox/gameplay/enum.GameplayMode.html" title="enum game::sandbox::gameplay::GameplayMode">GameplayMode</a>;</code></td></tr><tr><td><code>pub use self::gameplay::<a class="struct" href="../../game/sandbox/gameplay/tutorial/struct.TutorialPointer.html" title="struct game::sandbox::gameplay::tutorial::TutorialPointer">TutorialPointer</a>;</code></td></tr><tr><td><code>pub use self::gameplay::<a class="struct" href="../../game/sandbox/gameplay/tutorial/struct.TutorialState.html" title="struct game::sandbox::gameplay::tutorial::TutorialState">TutorialState</a>;</code></td></tr><tr><td><code>pub use self::minimap::<a class="struct" href="../../game/sandbox/minimap/struct.MinimapController.html" title="struct game::sandbox::minimap::MinimapController">MinimapController</a>;</code></td></tr><tr><td><code>pub use self::speed::<a class="enum" href="../../game/sandbox/speed/enum.SpeedSetting.html" title="enum game::sandbox::speed::SpeedSetting">SpeedSetting</a>;</code></td></tr><tr><td><code>pub use self::speed::<a class="struct" href="../../game/sandbox/speed/struct.TimePanel.html" title="struct game::sandbox::speed::TimePanel">TimePanel</a>;</code></td></tr><tr><td><code>pub use self::time_warp::<a class="struct" href="../../game/sandbox/time_warp/struct.TimeWarpScreen.html" title="struct game::sandbox::time_warp::TimeWarpScreen">TimeWarpScreen</a>;</code></td></tr></table><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
<table><tr class="module-item"><td><a class="mod" href="dashboards/index.html" title="game::sandbox::dashboards mod">dashboards</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="gameplay/index.html" title="game::sandbox::gameplay mod">gameplay</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="minimap/index.html" title="game::sandbox::minimap mod">minimap</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="misc_tools/index.html" title="game::sandbox::misc_tools mod">misc_tools</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="speed/index.html" title="game::sandbox::speed mod">speed</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="time_warp/index.html" title="game::sandbox::time_warp mod">time_warp</a></td><td class="docblock-short"></td></tr></table><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.Actions.html" title="game::sandbox::Actions struct">Actions</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.BackToMainMenu.html" title="game::sandbox::BackToMainMenu struct">BackToMainMenu</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.SandboxControls.html" title="game::sandbox::SandboxControls struct">SandboxControls</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.SandboxLoader.html" title="game::sandbox::SandboxLoader struct">SandboxLoader</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.SandboxMode.html" title="game::sandbox::SandboxMode struct">SandboxMode</a></td><td class="docblock-short"></td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>

File diff suppressed because one or more lines are too long

View File

@ -6,8 +6,8 @@
mode: <a class="enum" href="../../game/sandbox/gameplay/enum.GameplayMode.html" title="enum game::sandbox::gameplay::GameplayMode">GameplayMode</a>,
finalize: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;mut EventCtx&lt;'_&gt;, &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;&gt;&gt;&gt;,
}</pre></div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.stage" class="structfield small-section-header"><a href="#structfield.stage" class="anchor field"></a><code>stage: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="../../game/sandbox/enum.LoadStage.html" title="enum game::sandbox::LoadStage">LoadStage</a>&gt;</code></span><span id="structfield.mode" class="structfield small-section-header"><a href="#structfield.mode" class="anchor field"></a><code>mode: <a class="enum" href="../../game/sandbox/gameplay/enum.GameplayMode.html" title="enum game::sandbox::gameplay::GameplayMode">GameplayMode</a></code></span><span id="structfield.finalize" class="structfield small-section-header"><a href="#structfield.finalize" class="anchor field"></a><code>finalize: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;mut EventCtx&lt;'_&gt;, &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;&gt;&gt;&gt;</code></span><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-State%3CApp%3E" class="impl"><code class="in-band">impl State&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../game/sandbox/struct.SandboxLoader.html" title="struct game::sandbox::SandboxLoader">SandboxLoader</a></code><a href="#impl-State%3CApp%3E" class="anchor"></a><a class="srclink" href="../../src/game/sandbox/mod.rs.html#438-621" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../src/game/sandbox/mod.rs.html#439-618" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
</div><h4 id="method.draw" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, _: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/sandbox/mod.rs.html#620" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.stage" class="structfield small-section-header"><a href="#structfield.stage" class="anchor field"></a><code>stage: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="../../game/sandbox/enum.LoadStage.html" title="enum game::sandbox::LoadStage">LoadStage</a>&gt;</code></span><span id="structfield.mode" class="structfield small-section-header"><a href="#structfield.mode" class="anchor field"></a><code>mode: <a class="enum" href="../../game/sandbox/gameplay/enum.GameplayMode.html" title="enum game::sandbox::gameplay::GameplayMode">GameplayMode</a></code></span><span id="structfield.finalize" class="structfield small-section-header"><a href="#structfield.finalize" class="anchor field"></a><code>finalize: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;mut EventCtx&lt;'_&gt;, &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;&gt;&gt;&gt;</code></span><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-State%3CApp%3E" class="impl"><code class="in-band">impl State&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../game/sandbox/struct.SandboxLoader.html" title="struct game::sandbox::SandboxLoader">SandboxLoader</a></code><a href="#impl-State%3CApp%3E" class="anchor"></a><a class="srclink" href="../../src/game/sandbox/mod.rs.html#438-625" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../src/game/sandbox/mod.rs.html#439-622" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
</div><h4 id="method.draw" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, _: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/sandbox/mod.rs.html#624" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
</div><h4 id="method.draw_baselayer" class="method hidden"><code>pub fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
</div><h4 id="method.on_destroy" class="method hidden"><code>pub fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../game/sandbox/struct.SandboxLoader.html" title="struct game::sandbox::SandboxLoader">SandboxLoader</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../../src/game/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../game/sandbox/struct.SandboxLoader.html" title="struct game::sandbox::SandboxLoader">SandboxLoader</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../src/game/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../game/sandbox/struct.SandboxLoader.html" title="struct game::sandbox::SandboxLoader">SandboxLoader</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../../src/game/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../game/sandbox/struct.SandboxLoader.html" title="struct game::sandbox::SandboxLoader">SandboxLoader</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../src/game/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../game/sandbox/struct.SandboxLoader.html" title="struct game::sandbox::SandboxLoader">SandboxLoader</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../../src/game/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `load` mod in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, load"><title>map_gui::load - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module load</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li></ul></div><p class="location"><a href="../index.html">map_gui</a></p><div id="sidebar-vars" data-name="load" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">map_gui</a>::<wbr><a class="mod" href="">load</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/map_gui/load.rs.html#1-539" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Loading large resources (like maps, scenarios, and prebaked data) requires different strategies
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">map_gui</a>::<wbr><a class="mod" href="">load</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/map_gui/load.rs.html#1-589" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Loading large resources (like maps, scenarios, and prebaked data) requires different strategies
on native and web. Both cases are wrapped up as a State that runs a callback when done.</p>
</div><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
<table><tr class="module-item"><td><a class="mod" href="native_loader/index.html" title="map_gui::load::native_loader mod">native_loader</a></td><td class="docblock-short"></td></tr></table><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `prompt_to_download_missing_data` fn in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, prompt_to_download_missing_data"><title>map_gui::tools::prompt_to_download_missing_data - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">map_gui</a>::<wbr><a href="index.html">tools</a></p><div id="sidebar-vars" data-name="prompt_to_download_missing_data" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">map_gui</a>::<wbr><a href="index.html">tools</a>::<wbr><a class="fn" href="">prompt_to_download_missing_data</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/map_gui/tools/updater.rs.html#52-98" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn prompt_to_download_missing_data&lt;A:&nbsp;<a class="trait" href="../../map_gui/trait.AppLike.html" title="trait map_gui::AppLike">AppLike</a> + 'static&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;map_name: <a class="struct" href="../../abstio/abst_paths/struct.MapName.html" title="struct abstio::abst_paths::MapName">MapName</a><br>) -&gt; Transition&lt;A&gt;</pre><div class="docblock"><p>Prompt to download a missing city. On either success or failure (maybe the player choosing to
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">map_gui</a>::<wbr><a href="index.html">tools</a>::<wbr><a class="fn" href="">prompt_to_download_missing_data</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/map_gui/tools/updater.rs.html#52-101" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn prompt_to_download_missing_data&lt;A:&nbsp;<a class="trait" href="../../map_gui/trait.AppLike.html" title="trait map_gui::AppLike">AppLike</a> + 'static&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;map_name: <a class="struct" href="../../abstio/abst_paths/struct.MapName.html" title="struct abstio::abst_paths::MapName">MapName</a><br>) -&gt; Transition&lt;A&gt;</pre><div class="docblock"><p>Prompt to download a missing city. On either success or failure (maybe the player choosing to
not download, maybe a network error), the new map isn't automatically loaded or anything; up to
the caller to handle that.</p>
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="map_gui"></div>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `download_cities` fn in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, download_cities"><title>map_gui::tools::updater::download_cities - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">updater</a></p><div id="sidebar-vars" data-name="download_cities" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">updater</a>::<wbr><a class="fn" href="">download_cities</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#100-155" title="goto source code">[src]</a></span></h1><pre class="rust fn">async fn download_cities(<br>&nbsp;&nbsp;&nbsp;&nbsp;cities: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;progress: Sender&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_gui"></div>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">updater</a>::<wbr><a class="fn" href="">download_cities</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#103-168" title="goto source code">[src]</a></span></h1><pre class="rust fn">async fn download_cities(<br>&nbsp;&nbsp;&nbsp;&nbsp;cities: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;outer_progress: Sender&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;inner_progress: Sender&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_gui"></div>
<script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `prompt_to_download_missing_data` fn in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, prompt_to_download_missing_data"><title>map_gui::tools::updater::prompt_to_download_missing_data - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">updater</a></p><div id="sidebar-vars" data-name="prompt_to_download_missing_data" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">updater</a>::<wbr><a class="fn" href="">prompt_to_download_missing_data</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#52-98" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn prompt_to_download_missing_data&lt;A:&nbsp;<a class="trait" href="../../../map_gui/trait.AppLike.html" title="trait map_gui::AppLike">AppLike</a> + 'static&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;map_name: <a class="struct" href="../../../abstio/abst_paths/struct.MapName.html" title="struct abstio::abst_paths::MapName">MapName</a><br>) -&gt; Transition&lt;A&gt;</pre><div class="docblock"><p>Prompt to download a missing city. On either success or failure (maybe the player choosing to
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">updater</a>::<wbr><a class="fn" href="">prompt_to_download_missing_data</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#52-101" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn prompt_to_download_missing_data&lt;A:&nbsp;<a class="trait" href="../../../map_gui/trait.AppLike.html" title="trait map_gui::AppLike">AppLike</a> + 'static&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;map_name: <a class="struct" href="../../../abstio/abst_paths/struct.MapName.html" title="struct abstio::abst_paths::MapName">MapName</a><br>) -&gt; Transition&lt;A&gt;</pre><div class="docblock"><p>Prompt to download a missing city. On either success or failure (maybe the player choosing to
not download, maybe a network error), the new map isn't automatically loaded or anything; up to
the caller to handle that.</p>
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_gui"></div>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `updater` mod in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, updater"><title>map_gui::tools::updater - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module updater</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#constants">Constants</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a></p><div id="sidebar-vars" data-name="updater" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a class="mod" href="">updater</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#1-155" title="goto source code">[src]</a></span></h1><h2 id="constants" class="section-header"><a href="#constants">Constants</a></h2>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a class="mod" href="">updater</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#1-168" title="goto source code">[src]</a></span></h1><h2 id="constants" class="section-header"><a href="#constants">Constants</a></h2>
<table><tr class="module-item"><td><a class="constant" href="constant.NEXT_RELEASE.html" title="map_gui::tools::updater::NEXT_RELEASE constant">NEXT_RELEASE</a></td><td class="docblock-short"></td></tr></table><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
<table><tr class="module-item"><td><a class="fn" href="fn.download_cities.html" title="map_gui::tools::updater::download_cities fn">download_cities</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.prettyprint_bytes.html" title="map_gui::tools::updater::prettyprint_bytes fn">prettyprint_bytes</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.prompt_to_download_missing_data.html" title="map_gui::tools::updater::prompt_to_download_missing_data fn">prompt_to_download_missing_data</a></td><td class="docblock-short"><p>Prompt to download a missing city. On either success or failure (maybe the player choosing to
not download, maybe a network error), the new map isn't automatically loaded or anything; up to

File diff suppressed because one or more lines are too long

View File

@ -122,7 +122,7 @@
<span class="doccomment">/// The output of `rustdoc -V`</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;rustdoc 1.51.0 (2fd73fabe 2021-03-23)&quot;</span>;
<span class="doccomment">/// The built-time in RFC2822, UTC</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Wed, 21 Apr 2021 00:30:53 +0000&quot;</span>;
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Thu, 22 Apr 2021 00:11:33 +0000&quot;</span>;
<span class="doccomment">/// The target architecture, given by `cfg!(target_arch)`.</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;x86_64&quot;</span>;
<span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>

View File

@ -60,6 +60,10 @@
<span id="57">57</span>
<span id="58">58</span>
<span id="59">59</span>
<span id="60">60</span>
<span id="61">61</span>
<span id="62">62</span>
<span id="63">63</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="comment">// TODO This doesn&#39;t really belong in gameplay/freeform</span>
@ -72,6 +76,8 @@
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">sandbox</span>::<span class="ident">SandboxMode</span>;
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">import</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Transition</span> {
<span class="kw">let</span> (<span class="kw">_</span>, <span class="ident">outer_progress_rx</span>) <span class="op">=</span> <span class="ident">futures_channel</span>::<span class="ident">mpsc</span>::<span class="ident">channel</span>(<span class="number">1</span>);
<span class="kw">let</span> (<span class="kw">_</span>, <span class="ident">inner_progress_rx</span>) <span class="op">=</span> <span class="ident">futures_channel</span>::<span class="ident">mpsc</span>::<span class="ident">channel</span>(<span class="number">1</span>);
<span class="ident">Transition</span>::<span class="ident">Push</span>(<span class="ident">FutureLoader</span>::<span class="op">&lt;</span><span class="ident">App</span>, <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">String</span><span class="op">&gt;</span><span class="op">&gt;</span>::<span class="ident">new</span>(
<span class="ident">ctx</span>,
<span class="ident">Box</span>::<span class="ident">pin</span>(<span class="kw">async</span> {
@ -83,6 +89,8 @@
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="kw">move</span> <span class="op">|</span><span class="kw">_</span>: <span class="kw-2">&amp;</span><span class="ident">App</span><span class="op">|</span> <span class="ident">result</span>);
<span class="prelude-val">Ok</span>(<span class="ident">wrap</span>)
}),
<span class="ident">outer_progress_rx</span>,
<span class="ident">inner_progress_rx</span>,
<span class="string">&quot;Waiting for a file to be chosen&quot;</span>,
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="op">|</span><span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">maybe_path</span><span class="op">|</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Ok</span>(<span class="prelude-val">Some</span>(<span class="ident">path</span>)) <span class="op">=</span> <span class="ident">maybe_path</span> {

View File

@ -705,6 +705,10 @@
<span id="702">702</span>
<span id="703">703</span>
<span id="704">704</span>
<span id="705">705</span>
<span id="706">706</span>
<span id="707">707</span>
<span id="708">708</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">anyhow</span>::<span class="prelude-ty">Result</span>;
<span class="kw">use</span> <span class="ident">maplit</span>::<span class="ident">btreeset</span>;
@ -1184,9 +1188,13 @@
<span class="kw">continue</span>;
}
<span class="ident">gameplay</span>::<span class="ident">LoadScenario</span>::<span class="ident">Future</span>(<span class="ident">future</span>) <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">let</span> (<span class="kw">_</span>, <span class="ident">outer_progress_rx</span>) <span class="op">=</span> <span class="ident">futures_channel</span>::<span class="ident">mpsc</span>::<span class="ident">channel</span>(<span class="number">1</span>);
<span class="kw">let</span> (<span class="kw">_</span>, <span class="ident">inner_progress_rx</span>) <span class="op">=</span> <span class="ident">futures_channel</span>::<span class="ident">mpsc</span>::<span class="ident">channel</span>(<span class="number">1</span>);
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Push</span>(<span class="ident">FutureLoader</span>::<span class="op">&lt;</span><span class="ident">App</span>, <span class="ident">Scenario</span><span class="op">&gt;</span>::<span class="ident">new</span>(
<span class="ident">ctx</span>,
<span class="ident">Box</span>::<span class="ident">pin</span>(<span class="ident">future</span>),
<span class="ident">outer_progress_rx</span>,
<span class="ident">inner_progress_rx</span>,
<span class="string">&quot;Loading Scenario&quot;</span>,
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="op">|</span><span class="kw">_</span>, <span class="kw">_</span>, <span class="ident">scenario</span><span class="op">|</span> {
<span class="comment">// TODO show error/retry alert?</span>

View File

@ -540,6 +540,56 @@
<span id="537">537</span>
<span id="538">538</span>
<span id="539">539</span>
<span id="540">540</span>
<span id="541">541</span>
<span id="542">542</span>
<span id="543">543</span>
<span id="544">544</span>
<span id="545">545</span>
<span id="546">546</span>
<span id="547">547</span>
<span id="548">548</span>
<span id="549">549</span>
<span id="550">550</span>
<span id="551">551</span>
<span id="552">552</span>
<span id="553">553</span>
<span id="554">554</span>
<span id="555">555</span>
<span id="556">556</span>
<span id="557">557</span>
<span id="558">558</span>
<span id="559">559</span>
<span id="560">560</span>
<span id="561">561</span>
<span id="562">562</span>
<span id="563">563</span>
<span id="564">564</span>
<span id="565">565</span>
<span id="566">566</span>
<span id="567">567</span>
<span id="568">568</span>
<span id="569">569</span>
<span id="570">570</span>
<span id="571">571</span>
<span id="572">572</span>
<span id="573">573</span>
<span id="574">574</span>
<span id="575">575</span>
<span id="576">576</span>
<span id="577">577</span>
<span id="578">578</span>
<span id="579">579</span>
<span id="580">580</span>
<span id="581">581</span>
<span id="582">582</span>
<span id="583">583</span>
<span id="584">584</span>
<span id="585">585</span>
<span id="586">586</span>
<span id="587">587</span>
<span id="588">588</span>
<span id="589">589</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="doccomment">//! Loading large resources (like maps, scenarios, and prebaked data) requires different strategies</span>
<span class="doccomment">//! on native and web. Both cases are wrapped up as a State that runs a callback when done.</span>
@ -548,7 +598,7 @@
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">pin</span>::<span class="ident">Pin</span>;
<span class="kw">use</span> <span class="ident">anyhow</span>::<span class="prelude-ty">Result</span>;
<span class="kw">use</span> <span class="ident">futures_channel</span>::<span class="ident">oneshot</span>;
<span class="kw">use</span> <span class="ident">futures_channel</span>::{<span class="ident">mpsc</span>, <span class="ident">oneshot</span>};
<span class="kw">use</span> <span class="ident">instant</span>::<span class="ident">Instant</span>;
<span class="kw">use</span> <span class="ident">serde</span>::<span class="ident">de</span>::<span class="ident">DeserializeOwned</span>;
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">not</span>(<span class="ident">target_arch</span> <span class="op">=</span> <span class="string">&quot;wasm32&quot;</span>))]</span>
@ -726,15 +776,10 @@
<span class="kw">mod</span> <span class="ident">wasm_loader</span> {
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Read</span>;
<span class="kw">use</span> <span class="ident">futures_channel</span>::<span class="ident">oneshot</span>;
<span class="kw">use</span> <span class="ident">instant</span>::<span class="ident">Instant</span>;
<span class="kw">use</span> <span class="ident">wasm_bindgen</span>::<span class="ident">JsCast</span>;
<span class="kw">use</span> <span class="ident">wasm_bindgen_futures</span>::<span class="ident">JsFuture</span>;
<span class="kw">use</span> <span class="ident">web_sys</span>::{<span class="ident">Request</span>, <span class="ident">RequestInit</span>, <span class="ident">RequestMode</span>, <span class="ident">Response</span>};
<span class="kw">use</span> <span class="ident">geom</span>::<span class="ident">Duration</span>;
<span class="kw">use</span> <span class="ident">widgetry</span>::{<span class="ident">Line</span>, <span class="ident">Panel</span>, <span class="ident">State</span>, <span class="ident">Text</span>, <span class="ident">UpdateType</span>};
<span class="kw">use</span> <span class="kw">super</span>::<span class="kw-2">*</span>;
<span class="doccomment">/// Loads a JSON or bincoded file, then deserializes it</span>
@ -977,6 +1022,11 @@
<span class="ident">panel</span>: <span class="ident">Panel</span>,
<span class="ident">receiver</span>: <span class="ident">oneshot</span>::<span class="ident">Receiver</span><span class="op">&lt;</span><span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Box</span><span class="op">&lt;</span><span class="kw">dyn</span> <span class="ident">Send</span> <span class="op">+</span> <span class="ident">FnOnce</span>(<span class="kw-2">&amp;</span><span class="ident">A</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">T</span><span class="op">&gt;</span><span class="op">&gt;</span><span class="op">&gt;</span>,
<span class="ident">on_load</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Box</span><span class="op">&lt;</span><span class="kw">dyn</span> <span class="ident">FnOnce</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">A</span>, <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">T</span><span class="op">&gt;</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Transition</span><span class="op">&lt;</span><span class="ident">A</span><span class="op">&gt;</span><span class="op">&gt;</span><span class="op">&gt;</span>,
<span class="comment">// These&#39;re just two different types of progress updates that callers can provide</span>
<span class="ident">outer_progress_receiver</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">mpsc</span>::<span class="ident">Receiver</span><span class="op">&lt;</span><span class="ident">String</span><span class="op">&gt;</span><span class="op">&gt;</span>,
<span class="ident">inner_progress_receiver</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">mpsc</span>::<span class="ident">Receiver</span><span class="op">&lt;</span><span class="ident">String</span><span class="op">&gt;</span><span class="op">&gt;</span>,
<span class="ident">last_outer_progress</span>: <span class="ident">String</span>,
<span class="ident">last_inner_progress</span>: <span class="ident">String</span>,
<span class="comment">// If Runtime is dropped, any active tasks will be canceled, so we retain it here even</span>
<span class="comment">// though we never access it. It might make more sense for Runtime to live on App if we&#39;re</span>
@ -995,6 +1045,8 @@
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(
<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>,
<span class="ident">future</span>: <span class="ident">Pin</span><span class="op">&lt;</span><span class="ident">Box</span><span class="op">&lt;</span><span class="kw">dyn</span> <span class="ident">Future</span><span class="op">&lt;</span><span class="ident">Output</span> <span class="op">=</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Box</span><span class="op">&lt;</span><span class="kw">dyn</span> <span class="ident">Send</span> <span class="op">+</span> <span class="ident">FnOnce</span>(<span class="kw-2">&amp;</span><span class="ident">A</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">T</span><span class="op">&gt;</span><span class="op">&gt;</span><span class="op">&gt;</span><span class="op">&gt;</span><span class="op">&gt;</span>,
<span class="ident">outer_progress_receiver</span>: <span class="ident">mpsc</span>::<span class="ident">Receiver</span><span class="op">&lt;</span><span class="ident">String</span><span class="op">&gt;</span>,
<span class="ident">inner_progress_receiver</span>: <span class="ident">mpsc</span>::<span class="ident">Receiver</span><span class="op">&lt;</span><span class="ident">String</span><span class="op">&gt;</span>,
<span class="ident">loading_title</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>,
<span class="ident">on_load</span>: <span class="ident">Box</span><span class="op">&lt;</span><span class="kw">dyn</span> <span class="ident">FnOnce</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">A</span>, <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">T</span><span class="op">&gt;</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Transition</span><span class="op">&lt;</span><span class="ident">A</span><span class="op">&gt;</span><span class="op">&gt;</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Box</span><span class="op">&lt;</span><span class="kw">dyn</span> <span class="ident">State</span><span class="op">&lt;</span><span class="ident">A</span><span class="op">&gt;</span><span class="op">&gt;</span> {
@ -1008,6 +1060,10 @@
<span class="ident">panel</span>: <span class="ident">ctx</span>.<span class="ident">make_loading_screen</span>(<span class="ident">Text</span>::<span class="ident">from</span>(<span class="ident">loading_title</span>)),
<span class="ident">receiver</span>,
<span class="ident">on_load</span>: <span class="prelude-val">Some</span>(<span class="ident">on_load</span>),
<span class="ident">outer_progress_receiver</span>: <span class="prelude-val">Some</span>(<span class="ident">outer_progress_receiver</span>),
<span class="ident">inner_progress_receiver</span>: <span class="prelude-val">Some</span>(<span class="ident">inner_progress_receiver</span>),
<span class="ident">last_outer_progress</span>: <span class="ident">String</span>::<span class="ident">new</span>(),
<span class="ident">last_inner_progress</span>: <span class="ident">String</span>::<span class="ident">new</span>(),
})
}
@ -1015,6 +1071,8 @@
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(
<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>,
<span class="ident">future</span>: <span class="ident">Pin</span><span class="op">&lt;</span><span class="ident">Box</span><span class="op">&lt;</span><span class="kw">dyn</span> <span class="ident">Send</span> <span class="op">+</span> <span class="ident">Future</span><span class="op">&lt;</span><span class="ident">Output</span> <span class="op">=</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Box</span><span class="op">&lt;</span><span class="kw">dyn</span> <span class="ident">Send</span> <span class="op">+</span> <span class="ident">FnOnce</span>(<span class="kw-2">&amp;</span><span class="ident">A</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">T</span><span class="op">&gt;</span><span class="op">&gt;</span><span class="op">&gt;</span><span class="op">&gt;</span><span class="op">&gt;</span>,
<span class="ident">outer_progress_receiver</span>: <span class="ident">mpsc</span>::<span class="ident">Receiver</span><span class="op">&lt;</span><span class="ident">String</span><span class="op">&gt;</span>,
<span class="ident">inner_progress_receiver</span>: <span class="ident">mpsc</span>::<span class="ident">Receiver</span><span class="op">&lt;</span><span class="ident">String</span><span class="op">&gt;</span>,
<span class="ident">loading_title</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>,
<span class="ident">on_load</span>: <span class="ident">Box</span><span class="op">&lt;</span><span class="kw">dyn</span> <span class="ident">FnOnce</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">A</span>, <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">T</span><span class="op">&gt;</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Transition</span><span class="op">&lt;</span><span class="ident">A</span><span class="op">&gt;</span><span class="op">&gt;</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Box</span><span class="op">&lt;</span><span class="kw">dyn</span> <span class="ident">State</span><span class="op">&lt;</span><span class="ident">A</span><span class="op">&gt;</span><span class="op">&gt;</span> {
@ -1031,6 +1089,10 @@
<span class="ident">receiver</span>,
<span class="ident">on_load</span>: <span class="prelude-val">Some</span>(<span class="ident">on_load</span>),
<span class="ident">runtime</span>,
<span class="ident">outer_progress_receiver</span>: <span class="prelude-val">Some</span>(<span class="ident">outer_progress_receiver</span>),
<span class="ident">inner_progress_receiver</span>: <span class="prelude-val">Some</span>(<span class="ident">inner_progress_receiver</span>),
<span class="ident">last_outer_progress</span>: <span class="ident">String</span>::<span class="ident">new</span>(),
<span class="ident">last_inner_progress</span>: <span class="ident">String</span>::<span class="ident">new</span>(),
})
}
}
@ -1048,12 +1110,50 @@
<span class="kw">return</span> <span class="ident">on_load</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="prelude-val">Err</span>(<span class="macro">anyhow</span><span class="macro">!</span>(<span class="string">&quot;channel canceled&quot;</span>)));
}
<span class="prelude-val">Ok</span>(<span class="prelude-val">None</span>) <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="kw-2">ref</span> <span class="kw-2">mut</span> <span class="ident">rx</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">outer_progress_receiver</span> {
<span class="comment">// Read all of the progress that&#39;s happened</span>
<span class="kw">loop</span> {
<span class="kw">match</span> <span class="ident">rx</span>.<span class="ident">try_next</span>() {
<span class="prelude-val">Ok</span>(<span class="prelude-val">Some</span>(<span class="ident">msg</span>)) <span class="op">=</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">last_outer_progress</span> <span class="op">=</span> <span class="ident">msg</span>;
}
<span class="prelude-val">Ok</span>(<span class="prelude-val">None</span>) <span class="op">=</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">outer_progress_receiver</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="kw">break</span>;
}
<span class="prelude-val">Err</span>(<span class="kw">_</span>) <span class="op">=</span><span class="op">&gt;</span> {
<span class="comment">// No messages</span>
<span class="kw">break</span>;
}
}
}
}
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="kw-2">ref</span> <span class="kw-2">mut</span> <span class="ident">rx</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">inner_progress_receiver</span> {
<span class="kw">loop</span> {
<span class="kw">match</span> <span class="ident">rx</span>.<span class="ident">try_next</span>() {
<span class="prelude-val">Ok</span>(<span class="prelude-val">Some</span>(<span class="ident">msg</span>)) <span class="op">=</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">last_inner_progress</span> <span class="op">=</span> <span class="ident">msg</span>;
}
<span class="prelude-val">Ok</span>(<span class="prelude-val">None</span>) <span class="op">=</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">inner_progress_receiver</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="kw">break</span>;
}
<span class="prelude-val">Err</span>(<span class="kw">_</span>) <span class="op">=</span><span class="op">&gt;</span> {
<span class="comment">// No messages</span>
<span class="kw">break</span>;
}
}
}
}
<span class="self">self</span>.<span class="ident">panel</span> <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">make_loading_screen</span>(<span class="ident">Text</span>::<span class="ident">from_multiline</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Line</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">loading_title</span>),
<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(
<span class="string">&quot;Time spent: {}&quot;</span>,
<span class="ident">Duration</span>::<span class="ident">realtime_elapsed</span>(<span class="self">self</span>.<span class="ident">started</span>)
)),
<span class="ident">Line</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">last_outer_progress</span>),
<span class="ident">Line</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">last_inner_progress</span>),
]));
<span class="comment">// Until the response is received, just ask winit to regularly call event(), so we</span>

View File

@ -156,6 +156,19 @@
<span id="153">153</span>
<span id="154">154</span>
<span id="155">155</span>
<span id="156">156</span>
<span id="157">157</span>
<span id="158">158</span>
<span id="159">159</span>
<span id="160">160</span>
<span id="161">161</span>
<span id="162">162</span>
<span id="163">163</span>
<span id="164">164</span>
<span id="165">165</span>
<span id="166">166</span>
<span id="167">167</span>
<span id="168">168</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">BTreeSet</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">fs</span>::<span class="ident">File</span>;
@ -199,10 +212,10 @@
}
<span class="kw">let</span> <span class="ident">kb</span> <span class="op">=</span> (<span class="ident">bytes</span> <span class="kw">as</span> <span class="ident">f64</span>) <span class="op">/</span> <span class="number">1024.0</span>;
<span class="kw">if</span> <span class="ident">kb</span> <span class="op">&lt;</span> <span class="number">1024.0</span> {
<span class="kw">return</span> <span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;{} kb&quot;</span>, <span class="ident">kb</span> <span class="kw">as</span> <span class="ident">usize</span>);
<span class="kw">return</span> <span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;{} KB&quot;</span>, <span class="ident">kb</span> <span class="kw">as</span> <span class="ident">usize</span>);
}
<span class="kw">let</span> <span class="ident">mb</span> <span class="op">=</span> <span class="ident">kb</span> <span class="op">/</span> <span class="number">1024.0</span>;
<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;{} mb&quot;</span>, <span class="ident">mb</span> <span class="kw">as</span> <span class="ident">usize</span>)
<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;{} MB&quot;</span>, <span class="ident">mb</span> <span class="kw">as</span> <span class="ident">usize</span>)
}
<span class="doccomment">/// Prompt to download a missing city. On either success or failure (maybe the player choosing to</span>
@ -229,16 +242,19 @@
}
<span class="kw">let</span> <span class="ident">cities</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[<span class="ident">map_name</span>.<span class="ident">to_data_pack_name</span>()];
<span class="kw">let</span> (<span class="ident">outer_progress_tx</span>, <span class="ident">outer_progress_rx</span>) <span class="op">=</span> <span class="ident">futures_channel</span>::<span class="ident">mpsc</span>::<span class="ident">channel</span>(<span class="number">1000</span>);
<span class="kw">let</span> (<span class="ident">inner_progress_tx</span>, <span class="ident">inner_progress_rx</span>) <span class="op">=</span> <span class="ident">futures_channel</span>::<span class="ident">mpsc</span>::<span class="ident">channel</span>(<span class="number">1000</span>);
<span class="ident">Transition</span>::<span class="ident">Replace</span>(<span class="ident">FutureLoader</span>::<span class="op">&lt;</span><span class="ident">A</span>, <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">String</span><span class="op">&gt;</span><span class="op">&gt;</span>::<span class="ident">new</span>(
<span class="ident">ctx</span>,
<span class="ident">Box</span>::<span class="ident">pin</span>(<span class="kw">async</span> {
<span class="kw">let</span> (<span class="ident">tx</span>, <span class="ident">rx</span>) <span class="op">=</span> <span class="ident">futures_channel</span>::<span class="ident">mpsc</span>::<span class="ident">channel</span>(<span class="number">1000</span>);
<span class="ident">abstio</span>::<span class="ident">print_download_progress</span>(<span class="ident">rx</span>);
<span class="kw">let</span> <span class="ident">result</span> <span class="op">=</span> <span class="ident">download_cities</span>(<span class="ident">cities</span>, <span class="ident">tx</span>).<span class="kw">await</span>;
<span class="kw">let</span> <span class="ident">result</span> <span class="op">=</span>
<span class="ident">download_cities</span>(<span class="ident">cities</span>, <span class="ident">outer_progress_tx</span>, <span class="ident">inner_progress_tx</span>).<span class="kw">await</span>;
<span class="kw">let</span> <span class="ident">wrap</span>: <span class="ident">Box</span><span class="op">&lt;</span><span class="kw">dyn</span> <span class="ident">Send</span> <span class="op">+</span> <span class="ident">FnOnce</span>(<span class="kw-2">&amp;</span><span class="ident">A</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">String</span><span class="op">&gt;</span><span class="op">&gt;</span> <span class="op">=</span>
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="kw">move</span> <span class="op">|</span><span class="kw">_</span>: <span class="kw-2">&amp;</span><span class="ident">A</span><span class="op">|</span> <span class="ident">result</span>);
<span class="prelude-val">Ok</span>(<span class="ident">wrap</span>)
}),
<span class="ident">outer_progress_rx</span>,
<span class="ident">inner_progress_rx</span>,
<span class="string">&quot;Downloading missing files&quot;</span>,
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="op">|</span><span class="ident">ctx</span>, <span class="kw">_</span>, <span class="ident">maybe_messages</span><span class="op">|</span> {
<span class="kw">let</span> <span class="ident">messages</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">maybe_messages</span> {
@ -256,7 +272,11 @@
))
}
<span class="kw">async</span> <span class="kw">fn</span> <span class="ident">download_cities</span>(<span class="ident">cities</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">String</span><span class="op">&gt;</span>, <span class="kw-2">mut</span> <span class="ident">progress</span>: <span class="ident">mpsc</span>::<span class="ident">Sender</span><span class="op">&lt;</span><span class="ident">String</span><span class="op">&gt;</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">String</span><span class="op">&gt;</span> {
<span class="kw">async</span> <span class="kw">fn</span> <span class="ident">download_cities</span>(
<span class="ident">cities</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">String</span><span class="op">&gt;</span>,
<span class="kw-2">mut</span> <span class="ident">outer_progress</span>: <span class="ident">mpsc</span>::<span class="ident">Sender</span><span class="op">&lt;</span><span class="ident">String</span><span class="op">&gt;</span>,
<span class="kw-2">mut</span> <span class="ident">inner_progress</span>: <span class="ident">mpsc</span>::<span class="ident">Sender</span><span class="op">&lt;</span><span class="ident">String</span><span class="op">&gt;</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">String</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">data_packs</span> <span class="op">=</span> <span class="ident">DataPacks</span> {
<span class="ident">runtime</span>: <span class="ident">BTreeSet</span>::<span class="ident">new</span>(),
<span class="ident">input</span>: <span class="ident">BTreeSet</span>::<span class="ident">new</span>(),
@ -276,24 +296,30 @@
<span class="kw">let</span> <span class="ident">num_files</span> <span class="op">=</span> <span class="ident">manifest</span>.<span class="ident">entries</span>.<span class="ident">len</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">messages</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">files_so_far</span> <span class="op">=</span> <span class="number">0</span>;
<span class="kw">for</span> (<span class="ident">path</span>, <span class="ident">entry</span>) <span class="kw">in</span> <span class="ident">manifest</span>.<span class="ident">entries</span> {
<span class="ident">files_so_far</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
<span class="kw">let</span> <span class="ident">local_path</span> <span class="op">=</span> <span class="ident">abstio</span>::<span class="ident">path</span>(<span class="ident">path</span>.<span class="ident">strip_prefix</span>(<span class="string">&quot;data/&quot;</span>).<span class="ident">unwrap</span>());
<span class="kw">let</span> <span class="ident">url</span> <span class="op">=</span> <span class="macro">format</span><span class="macro">!</span>(
<span class="string">&quot;http://abstreet.s3-website.us-east-2.amazonaws.com/{}/{}.gz&quot;</span>,
<span class="ident">version</span>, <span class="ident">path</span>
);
<span class="comment">// TODO How can we have two streams, and have this logging be the &quot;outer&quot; one? And show x /</span>
<span class="comment">// y files or something.</span>
<span class="macro">info</span><span class="macro">!</span>(
<span class="string">&quot;Downloading {} ({})&quot;</span>,
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Err</span>(<span class="ident">err</span>) <span class="op">=</span> <span class="ident">outer_progress</span>.<span class="ident">try_send</span>(<span class="macro">format</span><span class="macro">!</span>(
<span class="string">&quot;Downloading file {}/{}: {} ({})&quot;</span>,
<span class="ident">files_so_far</span>,
<span class="ident">num_files</span>,
<span class="ident">url</span>,
<span class="ident">prettyprint_bytes</span>(<span class="ident">entry</span>.<span class="ident">compressed_size_bytes</span>)
);
)) {
<span class="macro">warn</span><span class="macro">!</span>(<span class="string">&quot;Couldn&#39;t send progress: {}&quot;</span>, <span class="ident">err</span>);
}
<span class="kw">match</span> <span class="ident">abstio</span>::<span class="ident">download_bytes</span>(<span class="kw-2">&amp;</span><span class="ident">url</span>, <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">progress</span>)
<span class="kw">match</span> <span class="ident">abstio</span>::<span class="ident">download_bytes</span>(<span class="kw-2">&amp;</span><span class="ident">url</span>, <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">inner_progress</span>)
.<span class="kw">await</span>
.<span class="ident">and_then</span>(<span class="op">|</span><span class="ident">bytes</span><span class="op">|</span> {
<span class="comment">// TODO Instead of holding everything in memory like this, we could also try to</span>
<span class="comment">// stream the gunzipping and output writing</span>
<span class="macro">info</span><span class="macro">!</span>(<span class="string">&quot;Decompressing {}&quot;</span>, <span class="ident">path</span>);
<span class="ident">std</span>::<span class="ident">fs</span>::<span class="ident">create_dir_all</span>(<span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>::<span class="ident">new</span>(<span class="kw-2">&amp;</span><span class="ident">local_path</span>).<span class="ident">parent</span>().<span class="ident">unwrap</span>())
.<span class="ident">unwrap</span>();