This commit is contained in:
dabreegster 2021-08-20 16:40:19 +00:00
parent 326239a5a0
commit 961387c078
24 changed files with 45 additions and 290 deletions

File diff suppressed because one or more lines are too long

View File

@ -334,8 +334,8 @@ call this to handle all other events. <a href="#method.other_event">Read more</a
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw-59" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>)</h4><a href="#method.draw-59" class="anchor"></a><a class="srclink" href="../../src/game/ungap/quick_sketch.rs.html#113-121" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw_baselayer-58" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</h4><a href="#method.draw_baselayer-58" class="anchor"></a></div></summary><div class='docblock'><p>Specifies what to draw before draw()</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_destroy-58" class="method trait-impl has-srclink"><h4 class="code-header">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/1.54.0/std/primitive.reference.html">&amp;mut </a>A)</h4><a href="#method.on_destroy-58" class="anchor"></a></div></summary><div class='docblock'><p>Before this state is popped or replaced, call this.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-State%3CApp%3E-59" class="impl has-srclink"><h3 class="code-header in-band">impl State&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../ungap/struct.ExploreMap.html" title="struct game::ungap::ExploreMap">ExploreMap</a></h3><a href="#impl-State%3CApp%3E-59" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#116-331" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event-59" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt;</h4><a href="#method.event-59" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#117-304" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw-60" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>)</h4><a href="#method.draw-60" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#306-330" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-State%3CApp%3E-59" class="impl has-srclink"><h3 class="code-header in-band">impl State&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../ungap/struct.ExploreMap.html" title="struct game::ungap::ExploreMap">ExploreMap</a></h3><a href="#impl-State%3CApp%3E-59" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#110-315" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event-59" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt;</h4><a href="#method.event-59" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#111-290" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw-60" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>)</h4><a href="#method.draw-60" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#292-314" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw_baselayer-59" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</h4><a href="#method.draw_baselayer-59" class="anchor"></a></div></summary><div class='docblock'><p>Specifies what to draw before draw()</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_destroy-59" class="method trait-impl has-srclink"><h4 class="code-header">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/1.54.0/std/primitive.reference.html">&amp;mut </a>A)</h4><a href="#method.on_destroy-59" class="anchor"></a></div></summary><div class='docblock'><p>Before this state is popped or replaced, call this.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-State%3CApp%3E-6" class="impl has-srclink"><h3 class="code-header in-band">impl State&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../debug/floodfill/struct.Floodfiller.html" title="struct game::debug::floodfill::Floodfiller">Floodfiller</a></h3><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></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event-6" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt;</h4><a href="#method.event-6" class="anchor"></a><a class="srclink" href="../../src/game/debug/floodfill.rs.html#82-107" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>

View File

@ -1,4 +1,4 @@
<!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="The build time in RFC2822, UTC."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>BUILT_TIME_UTC in game::pregame::built_info - 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><script src="../../../crates.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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#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"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a></h2><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" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><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" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="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><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></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-7b2f388b02b372bc/out/built.rs.html#78" 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/1.54.0/std/primitive.str.html">str</a> = r&quot;Thu, 19 Aug 2021 22:16:23 +0000&quot;;</pre><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
<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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#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"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a></h2><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" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><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" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="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><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></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-7b2f388b02b372bc/out/built.rs.html#78" 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/1.54.0/std/primitive.str.html">str</a> = r&quot;Fri, 20 Aug 2021 16:39:21 +0000&quot;;</pre><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
</div></details></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1,3 +1,3 @@
<!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 `legend` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, legend"><title>legend in game::ungap - 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><script src="../../crates.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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#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"><h2 class="location">Other items in<br><a href="../index.html">game</a>::<wbr><a href="index.html">ungap</a></h2><div id="sidebar-vars" data-name="legend" 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" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><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" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="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">ungap</a>::<wbr><a class="fn" href="#">legend</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></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/ungap/mod.rs.html#483-506" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn legend(ctx: &amp;mut EventCtx&lt;'_&gt;, color: Color, label: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a>) -&gt; Widget</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
<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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#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"><h2 class="location">Other items in<br><a href="../index.html">game</a>::<wbr><a href="index.html">ungap</a></h2><div id="sidebar-vars" data-name="legend" 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" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><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" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="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">ungap</a>::<wbr><a class="fn" href="#">legend</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></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/ungap/mod.rs.html#457-480" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn legend(ctx: &amp;mut EventCtx&lt;'_&gt;, color: Color, label: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a>) -&gt; Widget</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>

View File

@ -1,3 +1,3 @@
<!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 `make_legend` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, make_legend"><title>make_legend in game::ungap - 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><script src="../../crates.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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#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"><h2 class="location">Other items in<br><a href="../index.html">game</a>::<wbr><a href="index.html">ungap</a></h2><div id="sidebar-vars" data-name="make_legend" 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" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><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" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="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">ungap</a>::<wbr><a class="fn" href="#">make_legend</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></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/ungap/mod.rs.html#434-481" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_legend(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;elevation: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;nearby: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a><br>) -&gt; Panel</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
<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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#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"><h2 class="location">Other items in<br><a href="../index.html">game</a>::<wbr><a href="index.html">ungap</a></h2><div id="sidebar-vars" data-name="make_legend" 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" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><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" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="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">ungap</a>::<wbr><a class="fn" href="#">make_legend</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></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/ungap/mod.rs.html#418-455" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_legend(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;bike_network: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;elevation: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a><br>) -&gt; Panel</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>

View File

@ -1,3 +1,3 @@
<!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 `make_top_panel` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, make_top_panel"><title>make_top_panel in game::ungap - 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><script src="../../crates.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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#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"><h2 class="location">Other items in<br><a href="../index.html">game</a>::<wbr><a href="index.html">ungap</a></h2><div id="sidebar-vars" data-name="make_top_panel" 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" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><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" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="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">ungap</a>::<wbr><a class="fn" href="#">make_top_panel</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></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/ungap/mod.rs.html#333-432" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_top_panel(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Panel</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
<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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#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"><h2 class="location">Other items in<br><a href="../index.html">game</a>::<wbr><a href="index.html">ungap</a></h2><div id="sidebar-vars" data-name="make_top_panel" 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" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><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" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="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">ungap</a>::<wbr><a class="fn" href="#">make_top_panel</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></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/ungap/mod.rs.html#317-416" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_top_panel(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Panel</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.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 `ungap` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, ungap"><title>game::ungap - 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><script src="../../crates.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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module ungap</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="ungap" 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" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><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" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="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="#">ungap</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></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/ungap/mod.rs.html#1-506" title="goto source code">[src]</a></span></h1><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2>
<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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module ungap</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="ungap" 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" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><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" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="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="#">ungap</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></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/ungap/mod.rs.html#1-480" title="goto source code">[src]</a></span></h1><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2>
<table><tr class="import-item"><td><code>pub use share::<a class="constant" href="share/constant.PROPOSAL_HOST_URL.html" title="constant game::ungap::share::PROPOSAL_HOST_URL">PROPOSAL_HOST_URL</a>;</code></td><td class="docblock-short"></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="layers/index.html" title="game::ungap::layers mod">layers</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="magnifying/index.html" title="game::ungap::magnifying mod">magnifying</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="nearby/index.html" title="game::ungap::nearby mod">nearby</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="quick_sketch/index.html" title="game::ungap::quick_sketch mod">quick_sketch</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="share/index.html" title="game::ungap::share mod">share</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="mod" href="layers/index.html" title="game::ungap::layers mod">layers</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="magnifying/index.html" title="game::ungap::magnifying mod">magnifying</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="quick_sketch/index.html" title="game::ungap::quick_sketch mod">quick_sketch</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="share/index.html" title="game::ungap::share mod">share</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.ExploreMap.html" title="game::ungap::ExploreMap struct">ExploreMap</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.legend.html" title="game::ungap::legend fn">legend</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.make_legend.html" title="game::ungap::make_legend fn">make_legend</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.make_top_panel.html" title="game::ungap::make_top_panel fn">make_top_panel</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>

View File

@ -1,3 +0,0 @@
<!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 `bike_network_roads` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, bike_network_roads"><title>bike_network_roads in game::ungap::nearby - 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><script src="../../../crates.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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#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"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">nearby</a></h2><div id="sidebar-vars" data-name="bike_network_roads" 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" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><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" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="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">ungap</a>::<wbr><a href="index.html">nearby</a>::<wbr><a class="fn" href="#">bike_network_roads</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></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/ungap/nearby.rs.html#61-73" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn bike_network_roads(map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../../map_model/objects/road/struct.DirectedRoadID.html" title="struct map_model::objects::road::DirectedRoadID">DirectedRoadID</a>&gt;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1,5 +0,0 @@
<!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 `nearby` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, nearby"><title>game::ungap::nearby - 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><script src="../../../crates.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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module nearby</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="nearby" 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" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><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" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="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">ungap</a>::<wbr><a class="mod" href="#">nearby</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></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/ungap/nearby.rs.html#1-73" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.Nearby.html" title="game::ungap::nearby::Nearby struct">Nearby</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.bike_network_roads.html" title="game::ungap::nearby::bike_network_roads fn">bike_network_roads</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1 +0,0 @@
initSidebarItems({"fn":[["bike_network_roads",""]],"struct":[["Nearby",""]]});

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
initSidebarItems({"fn":[["legend",""],["make_legend",""],["make_top_panel",""]],"mod":[["layers",""],["magnifying",""],["nearby",""],["quick_sketch",""],["share",""]],"struct":[["ExploreMap",""]]});
initSidebarItems({"fn":[["legend",""],["make_legend",""],["make_top_panel",""]],"mod":[["layers",""],["magnifying",""],["quick_sketch",""],["share",""]],"struct":[["ExploreMap",""]]});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -9,7 +9,7 @@ sourcesIndex["dump_map"] = {"name":"","files":["dump_map.rs"]};
sourcesIndex["dump_scenario"] = {"name":"","files":["dump_scenario.rs"]};
sourcesIndex["extract_cities"] = {"name":"","files":["extract_cities.rs"]};
sourcesIndex["fifteen_min"] = {"name":"","files":["find_amenities.rs","find_home.rs","isochrone.rs","lib.rs","viewer.rs"]};
sourcesIndex["game"] = {"name":"","dirs":[{"name":"challenges","files":["cutscene.rs","mod.rs","prebake.rs"]},{"name":"common","files":["mod.rs","route_sketcher.rs","select.rs","warp.rs"]},{"name":"debug","files":["blocked_by.rs","floodfill.rs","mod.rs","objects.rs","path_counter.rs","polygons.rs","routes.rs","select_roads.rs","shared_row.rs","streetmix.rs","uber_turns.rs"]},{"name":"devtools","files":["collisions.rs","destinations.rs","kml.rs","mod.rs","polygon.rs","scenario.rs","story.rs"]},{"name":"edit","dirs":[{"name":"traffic_signals","files":["edits.rs","gmns.rs","mod.rs","offsets.rs","picker.rs","preview.rs"]}],"files":["mod.rs","multiple_roads.rs","roads.rs","routes.rs","stop_signs.rs","validate.rs","zones.rs"]},{"name":"info","files":["building.rs","bus.rs","debug.rs","intersection.rs","lane.rs","mod.rs","parking_lot.rs","person.rs","trip.rs"]},{"name":"layer","files":["elevation.rs","favorites.rs","map.rs","mod.rs","pandemic.rs","parking.rs","population.rs","problems.rs","traffic.rs","transit.rs"]},{"name":"pregame","files":["mod.rs","proposals.rs"]},{"name":"sandbox","dirs":[{"name":"dashboards","files":["commuter.rs","generic_trip_table.rs","misc.rs","mod.rs","mode_shift.rs","parking_overhead.rs","risks.rs","selector.rs","traffic_signals.rs","travel_times.rs","trip_problems.rs","trip_table.rs"]},{"name":"gameplay","dirs":[{"name":"freeform","files":["importers.rs","mod.rs","spawner.rs"]}],"files":["actdev.rs","commute.rs","fix_traffic_signals.rs","mod.rs","play_scenario.rs","tutorial.rs"]}],"files":["minimap.rs","misc_tools.rs","mod.rs","speed.rs","time_warp.rs"]},{"name":"ungap","files":["layers.rs","magnifying.rs","mod.rs","nearby.rs","quick_sketch.rs","share.rs"]}],"files":["app.rs","lib.rs"]};
sourcesIndex["game"] = {"name":"","dirs":[{"name":"challenges","files":["cutscene.rs","mod.rs","prebake.rs"]},{"name":"common","files":["mod.rs","route_sketcher.rs","select.rs","warp.rs"]},{"name":"debug","files":["blocked_by.rs","floodfill.rs","mod.rs","objects.rs","path_counter.rs","polygons.rs","routes.rs","select_roads.rs","shared_row.rs","streetmix.rs","uber_turns.rs"]},{"name":"devtools","files":["collisions.rs","destinations.rs","kml.rs","mod.rs","polygon.rs","scenario.rs","story.rs"]},{"name":"edit","dirs":[{"name":"traffic_signals","files":["edits.rs","gmns.rs","mod.rs","offsets.rs","picker.rs","preview.rs"]}],"files":["mod.rs","multiple_roads.rs","roads.rs","routes.rs","stop_signs.rs","validate.rs","zones.rs"]},{"name":"info","files":["building.rs","bus.rs","debug.rs","intersection.rs","lane.rs","mod.rs","parking_lot.rs","person.rs","trip.rs"]},{"name":"layer","files":["elevation.rs","favorites.rs","map.rs","mod.rs","pandemic.rs","parking.rs","population.rs","problems.rs","traffic.rs","transit.rs"]},{"name":"pregame","files":["mod.rs","proposals.rs"]},{"name":"sandbox","dirs":[{"name":"dashboards","files":["commuter.rs","generic_trip_table.rs","misc.rs","mod.rs","mode_shift.rs","parking_overhead.rs","risks.rs","selector.rs","traffic_signals.rs","travel_times.rs","trip_problems.rs","trip_table.rs"]},{"name":"gameplay","dirs":[{"name":"freeform","files":["importers.rs","mod.rs","spawner.rs"]}],"files":["actdev.rs","commute.rs","fix_traffic_signals.rs","mod.rs","play_scenario.rs","tutorial.rs"]}],"files":["minimap.rs","misc_tools.rs","mod.rs","speed.rs","time_warp.rs"]},{"name":"ungap","files":["layers.rs","magnifying.rs","mod.rs","quick_sketch.rs","share.rs"]}],"files":["app.rs","lib.rs"]};
sourcesIndex["generate_houses"] = {"name":"","files":["generate_houses.rs"]};
sourcesIndex["geojson_to_osmosis"] = {"name":"","files":["geojson_to_osmosis.rs"]};
sourcesIndex["geom"] = {"name":"","files":["angle.rs","bounds.rs","circle.rs","distance.rs","duration.rs","find_closest.rs","gps.rs","lib.rs","line.rs","percent.rs","polygon.rs","polyline.rs","pt.rs","ring.rs","speed.rs","stats.rs","time.rs"]};

View File

@ -177,7 +177,7 @@
<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">r&quot;rustdoc 1.54.0 (a178d0322 2021-07-26)&quot;</span>;
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#&quot;The build time in RFC2822, UTC.&quot;#</span>]</span>
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</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">r&quot;Thu, 19 Aug 2021 22:16:23 +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">r&quot;Fri, 20 Aug 2021 16:39:21 +0000&quot;</span>;
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#&quot;The target architecture, given by `CARGO_CFG_TARGET_ARCH`.&quot;#</span>]</span>
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</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">r&quot;x86_64&quot;</span>;

View File

@ -480,42 +480,14 @@
<span id="478">478</span>
<span id="479">479</span>
<span id="480">480</span>
<span id="481">481</span>
<span id="482">482</span>
<span id="483">483</span>
<span id="484">484</span>
<span id="485">485</span>
<span id="486">486</span>
<span id="487">487</span>
<span id="488">488</span>
<span id="489">489</span>
<span id="490">490</span>
<span id="491">491</span>
<span id="492">492</span>
<span id="493">493</span>
<span id="494">494</span>
<span id="495">495</span>
<span id="496">496</span>
<span id="497">497</span>
<span id="498">498</span>
<span id="499">499</span>
<span id="500">500</span>
<span id="501">501</span>
<span id="502">502</span>
<span id="503">503</span>
<span id="504">504</span>
<span id="505">505</span>
<span id="506">506</span>
</pre><pre class="rust">
<span class="kw">mod</span> <span class="ident">layers</span>;
<span class="kw">mod</span> <span class="ident">magnifying</span>;
<span class="kw">mod</span> <span class="ident">nearby</span>;
<span class="kw">mod</span> <span class="ident">quick_sketch</span>;
<span class="kw">mod</span> <span class="ident">share</span>;
<span class="kw">use</span> <span class="ident">std::collections::HashMap</span>;
<span class="kw">use</span> <span class="ident">abstutil::prettyprint_usize</span>;
<span class="kw">use</span> <span class="ident">geom::Distance</span>;
<span class="kw">use</span> <span class="ident">map_gui::tools</span>::{<span class="ident">nice_map_name</span>, <span class="ident">CityPicker</span>, <span class="ident">ColorLegend</span>, <span class="ident">PopupMsg</span>, <span class="ident">URLManager</span>};
<span class="kw">use</span> <span class="ident">map_gui::ID</span>;
@ -529,7 +501,6 @@
<span class="kw">use</span> <span class="self">self</span><span class="ident">::layers</span>::{<span class="ident">render_edits</span>, <span class="ident">DrawNetworkLayer</span>};
<span class="kw">use</span> <span class="self">self</span><span class="ident">::magnifying::MagnifyingGlass</span>;
<span class="kw">use</span> <span class="self">self</span><span class="ident">::nearby::Nearby</span>;
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::app</span>::{<span class="ident">App</span>, <span class="ident">Transition</span>};
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::edit</span>::{<span class="ident">LoadEdits</span>, <span class="ident">RoadEditor</span>, <span class="ident">SaveEdits</span>};
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::sandbox::gameplay::GameplayMode</span>;
@ -540,11 +511,9 @@
<span class="ident">top_panel</span>: <span class="ident">Panel</span>,
<span class="ident">legend</span>: <span class="ident">Panel</span>,
<span class="ident">magnifying_glass</span>: <span class="ident">MagnifyingGlass</span>,
<span class="ident">network_layer</span>: <span class="ident">DrawNetworkLayer</span>,
<span class="ident">bike_network_layer</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">DrawNetworkLayer</span><span class="op">&gt;</span>,
<span class="ident">edits_layer</span>: <span class="ident">Drawable</span>,
<span class="ident">elevation</span>: <span class="ident">bool</span>,
<span class="comment">// TODO Also cache Nearby, but recalculate it after edits</span>
<span class="ident">nearby</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Nearby</span><span class="op">&gt;</span>,
<span class="comment">// TODO Once widgetry buttons can take custom enums, that&#39;d be perfect here</span>
<span class="ident">road_types</span>: <span class="ident">HashMap</span><span class="op">&lt;</span><span class="ident">String</span>, <span class="ident">Drawable</span><span class="op">&gt;</span>,
@ -569,12 +538,11 @@
<span class="ident">Box::new</span>(<span class="ident">ExploreMap</span> {
<span class="ident">top_panel</span>: <span class="ident">Panel::empty</span>(<span class="ident">ctx</span>),
<span class="ident">legend</span>: <span class="ident">make_legend</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="bool-val">false</span>, <span class="bool-val">false</span>),
<span class="ident">legend</span>: <span class="ident">make_legend</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="bool-val">true</span>, <span class="bool-val">false</span>),
<span class="ident">magnifying_glass</span>: <span class="ident">MagnifyingGlass::new</span>(<span class="ident">ctx</span>),
<span class="ident">network_layer</span>: <span class="ident">DrawNetworkLayer::new</span>(),
<span class="ident">bike_network_layer</span>: <span class="prelude-val">Some</span>(<span class="ident">DrawNetworkLayer::new</span>()),
<span class="ident">edits_layer</span>: <span class="ident">Drawable::empty</span>(<span class="ident">ctx</span>),
<span class="ident">elevation</span>: <span class="bool-val">false</span>,
<span class="ident">nearby</span>: <span class="prelude-val">None</span>,
<span class="ident">road_types</span>: <span class="ident">HashMap::new</span>(),
<span class="comment">// Start with a bogus value, so we fix up the URL when changing maps</span>
@ -584,7 +552,7 @@
<span class="kw">fn</span> <span class="ident">highlight_road_type</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</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">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>, <span class="ident">name</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>) {
<span class="comment">// TODO Button enums would rock</span>
<span class="kw">if</span> <span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;elevation&quot;</span> <span class="op">|</span><span class="op">|</span> <span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;things nearby&quot;</span> <span class="op">|</span><span class="op">|</span> <span class="ident">name</span>.<span class="ident">starts_with</span>(<span class="string">&quot;about &quot;</span>) {
<span class="kw">if</span> <span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;bike network&quot;</span> <span class="op">|</span><span class="op">|</span> <span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;elevation&quot;</span> <span class="op">|</span><span class="op">|</span> <span class="ident">name</span>.<span class="ident">starts_with</span>(<span class="string">&quot;about &quot;</span>) {
<span class="kw">return</span>;
}
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">road_types</span>.<span class="ident">contains_key</span>(<span class="ident">name</span>) {
@ -629,7 +597,9 @@
<span class="kw">let</span> <span class="ident">key</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_edits_change_key</span>();
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">map_edit_key</span> <span class="op">!</span><span class="op">=</span> <span class="ident">key</span> {
<span class="self">self</span>.<span class="ident">map_edit_key</span> <span class="op">=</span> <span class="ident">key</span>;
<span class="self">self</span>.<span class="ident">network_layer</span>.<span class="ident">clear</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">n</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">bike_network_layer</span> {
<span class="ident">n</span>.<span class="ident">clear</span>();
}
<span class="self">self</span>.<span class="ident">edits_layer</span> <span class="op">=</span> <span class="ident">render_edits</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="self">self</span>.<span class="ident">top_panel</span> <span class="op">=</span> <span class="ident">make_top_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="self">self</span>.<span class="ident">road_types</span>.<span class="ident">clear</span>();
@ -759,14 +729,21 @@
<span class="string">&quot;greenway&quot;</span> <span class="op">=</span><span class="op">&gt;</span> <span class="ident">PopupMsg::new_state</span>(<span class="ident">ctx</span>, <span class="string">&quot;Stay Healthy Streets and neighborhood greenways&quot;</span>, <span class="macro">vec!</span>[<span class="string">&quot;Residential streets with additional signage and light barriers. These are intended to be low traffic, dedicated for people walking and biking.&quot;</span>]),
<span class="comment">// TODO Add URLs</span>
<span class="string">&quot;about the elevation data&quot;</span> <span class="op">=</span><span class="op">&gt;</span> <span class="ident">PopupMsg::new_state</span>(<span class="ident">ctx</span>, <span class="string">&quot;About the elevation data&quot;</span>, <span class="macro">vec!</span>[<span class="string">&quot;Biking uphill next to traffic without any dedicated space isn&#39;t fun.&quot;</span>, <span class="string">&quot;Biking downhill next to traffic, especially in the door-zone of parked cars, and especially on Seattle&#39;s bumpy roads... is downright terrifying.&quot;</span>, <span class="string">&quot;&quot;</span>, <span class="string">&quot;Note the elevation data is incorrect near bridges.&quot;</span>, <span class="string">&quot;Thanks to King County LIDAR for the data, and Eldan Goldenberg for processing it.&quot;</span>]),
<span class="string">&quot;about the things nearby&quot;</span> <span class="op">=</span><span class="op">&gt;</span> <span class="ident">PopupMsg::new_state</span>(<span class="ident">ctx</span>, <span class="string">&quot;About the things nearby&quot;</span>, <span class="macro">vec!</span>[<span class="string">&quot;Population data from ?&quot;</span>, <span class="string">&quot;Amenities from OpenStreetMap&quot;</span>, <span class="string">&quot;A 1-minute biking buffer around the bike network is shown.&quot;</span>, <span class="string">&quot;Note 1 minutes depends on direction, especially with steep hills -- this starts FROM the network.&quot;</span>]),
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">unreachable!</span>(),
});
}
<span class="ident">Outcome::Changed</span>(<span class="ident">x</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="kw">match</span> <span class="ident">x</span>.<span class="ident">as_ref</span>() {
<span class="string">&quot;bike network&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">legend</span>.<span class="ident">is_checked</span>(<span class="string">&quot;bike network&quot;</span>) {
<span class="self">self</span>.<span class="ident">bike_network_layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">DrawNetworkLayer::new</span>());
} <span class="kw">else</span> {
<span class="self">self</span>.<span class="ident">bike_network_layer</span> <span class="op">=</span> <span class="prelude-val">None</span>;
}
}
<span class="string">&quot;elevation&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">elevation</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">legend</span>.<span class="ident">is_checked</span>(<span class="string">&quot;elevation&quot;</span>);
<span class="self">self</span>.<span class="ident">legend</span> <span class="op">=</span> <span class="ident">make_legend</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="self">self</span>.<span class="ident">elevation</span>, <span class="self">self</span>.<span class="ident">nearby</span>.<span class="ident">is_some</span>());
<span class="self">self</span>.<span class="ident">legend</span> <span class="op">=</span>
<span class="ident">make_legend</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="self">self</span>.<span class="ident">bike_network_layer</span>.<span class="ident">is_some</span>(), <span class="self">self</span>.<span class="ident">elevation</span>);
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">elevation</span> {
<span class="kw">let</span> <span class="ident">name</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_name</span>().<span class="ident">clone</span>();
<span class="kw">if</span> <span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">elevation_contours</span>.<span class="ident">key</span>() <span class="op">!</span><span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">name</span>.<span class="ident">clone</span>()) {
@ -784,23 +761,6 @@
}
}
}
<span class="string">&quot;things nearby&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">legend</span>.<span class="ident">is_checked</span>(<span class="string">&quot;things nearby&quot;</span>) {
<span class="kw">let</span> <span class="ident">nearby</span> <span class="op">=</span> <span class="ident">Nearby::new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="kw">let</span> <span class="ident">label</span> <span class="op">=</span> <span class="ident">Text::from</span>(<span class="ident">Line</span>(<span class="macro">format!</span>(
<span class="string">&quot;{} residents, {} shops&quot;</span>,
<span class="ident">prettyprint_usize</span>(<span class="ident">nearby</span>.<span class="ident">population</span>),
<span class="ident">prettyprint_usize</span>(<span class="ident">nearby</span>.<span class="ident">total_amenities</span>)
)))
.<span class="ident">into_widget</span>(<span class="ident">ctx</span>);
<span class="self">self</span>.<span class="ident">legend</span>.<span class="ident">replace</span>(<span class="ident">ctx</span>, <span class="string">&quot;nearby info&quot;</span>, <span class="ident">label</span>);
<span class="self">self</span>.<span class="ident">nearby</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">nearby</span>);
} <span class="kw">else</span> {
<span class="kw">let</span> <span class="ident">label</span> <span class="op">=</span> <span class="ident">Text::new</span>().<span class="ident">into_widget</span>(<span class="ident">ctx</span>);
<span class="self">self</span>.<span class="ident">legend</span>.<span class="ident">replace</span>(<span class="ident">ctx</span>, <span class="string">&quot;nearby info&quot;</span>, <span class="ident">label</span>);
<span class="self">self</span>.<span class="ident">nearby</span> <span class="op">=</span> <span class="prelude-val">None</span>;
}
}
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">unreachable!</span>(),
},
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> {}
@ -816,17 +776,15 @@
<span class="self">self</span>.<span class="ident">top_panel</span>.<span class="ident">draw</span>(<span class="ident">g</span>);
<span class="self">self</span>.<span class="ident">legend</span>.<span class="ident">draw</span>(<span class="ident">g</span>);
<span class="kw">if</span> <span class="ident">g</span>.<span class="ident">canvas</span>.<span class="ident">cam_zoom</span> <span class="op">&lt;</span> <span class="ident">app</span>.<span class="ident">opts</span>.<span class="ident">min_zoom_for_detail</span> {
<span class="self">self</span>.<span class="ident">network_layer</span>.<span class="ident">draw</span>(<span class="ident">g</span>, <span class="ident">app</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="ident">n</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">bike_network_layer</span> {
<span class="ident">n</span>.<span class="ident">draw</span>(<span class="ident">g</span>, <span class="ident">app</span>);
}
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">elevation</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>((<span class="kw">_</span>, <span class="kw-2">ref</span> <span class="ident">draw</span>)) <span class="op">=</span> <span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">elevation_contours</span>.<span class="ident">value</span>() {
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="ident">draw</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="ident">nearby</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">nearby</span> {
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="kw-2">&amp;</span><span class="ident">nearby</span>.<span class="ident">draw_buffer</span>);
}
<span class="self">self</span>.<span class="ident">magnifying_glass</span>.<span class="ident">draw</span>(<span class="ident">g</span>, <span class="ident">app</span>);
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">name</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">legend</span>.<span class="ident">currently_hovering</span>() {
@ -940,7 +898,7 @@
.<span class="ident">build</span>(<span class="ident">ctx</span>)
}
<span class="kw">fn</span> <span class="ident">make_legend</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">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>, <span class="ident">elevation</span>: <span class="ident">bool</span>, <span class="ident">nearby</span>: <span class="ident">bool</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Panel</span> {
<span class="kw">fn</span> <span class="ident">make_legend</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">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>, <span class="ident">bike_network</span>: <span class="ident">bool</span>, <span class="ident">elevation</span>: <span class="ident">bool</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Panel</span> {
<span class="ident">Panel::new_builder</span>(<span class="ident">Widget::col</span>(<span class="macro">vec!</span>[
<span class="ident">Widget::custom_row</span>(<span class="macro">vec!</span>[
<span class="comment">// TODO Looks too close to access restrictions</span>
@ -949,6 +907,7 @@
<span class="ident">legend</span>(<span class="ident">ctx</span>, <span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">unzoomed_residential</span>, <span class="string">&quot;minor street&quot;</span>),
]),
<span class="ident">Widget::custom_row</span>(<span class="macro">vec!</span>[
<span class="ident">Toggle::checkbox</span>(<span class="ident">ctx</span>, <span class="string">&quot;bike network&quot;</span>, <span class="ident">Key::B</span>, <span class="ident">bike_network</span>),
<span class="ident">legend</span>(<span class="ident">ctx</span>, <span class="kw-2">*</span><span class="ident">layers::DEDICATED_TRAIL</span>, <span class="string">&quot;trail&quot;</span>),
<span class="ident">legend</span>(<span class="ident">ctx</span>, <span class="kw-2">*</span><span class="ident">layers::PROTECTED_BIKE_LANE</span>, <span class="string">&quot;protected bike lane&quot;</span>),
<span class="ident">legend</span>(<span class="ident">ctx</span>, <span class="kw-2">*</span><span class="ident">layers::PAINTED_BIKE_LANE</span>, <span class="string">&quot;painted bike lane&quot;</span>),
@ -970,18 +929,7 @@
.<span class="ident">named</span>(<span class="string">&quot;current elevation&quot;</span>)
.<span class="ident">centered_vert</span>(),
]),
<span class="ident">Widget::row</span>(<span class="macro">vec!</span>[
<span class="ident">Toggle::checkbox</span>(<span class="ident">ctx</span>, <span class="string">&quot;things nearby&quot;</span>, <span class="prelude-val">None</span>, <span class="ident">nearby</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_plain</span>
.<span class="ident">icon</span>(<span class="string">&quot;system/assets/tools/info.svg&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;about the things nearby&quot;</span>)
.<span class="ident">centered_vert</span>(),
<span class="ident">Text::new</span>()
.<span class="ident">into_widget</span>(<span class="ident">ctx</span>)
.<span class="ident">named</span>(<span class="string">&quot;nearby info&quot;</span>)
.<span class="ident">centered_vert</span>(),
]),
<span class="comment">// TODO Probably a collisions layer, or the alternate &quot;steep streets&quot;</span>
])
.<span class="ident">evenly_spaced</span>(),
]))

View File

@ -1,151 +0,0 @@
<!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="Source of the Rust file `game/src/ungap/nearby.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>nearby.rs - source</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><script src="../../../crates.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 source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><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" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><div class="example-wrap"><pre class="line-numbers"><span id="1"> 1</span>
<span id="2"> 2</span>
<span id="3"> 3</span>
<span id="4"> 4</span>
<span id="5"> 5</span>
<span id="6"> 6</span>
<span id="7"> 7</span>
<span id="8"> 8</span>
<span id="9"> 9</span>
<span id="10">10</span>
<span id="11">11</span>
<span id="12">12</span>
<span id="13">13</span>
<span id="14">14</span>
<span id="15">15</span>
<span id="16">16</span>
<span id="17">17</span>
<span id="18">18</span>
<span id="19">19</span>
<span id="20">20</span>
<span id="21">21</span>
<span id="22">22</span>
<span id="23">23</span>
<span id="24">24</span>
<span id="25">25</span>
<span id="26">26</span>
<span id="27">27</span>
<span id="28">28</span>
<span id="29">29</span>
<span id="30">30</span>
<span id="31">31</span>
<span id="32">32</span>
<span id="33">33</span>
<span id="34">34</span>
<span id="35">35</span>
<span id="36">36</span>
<span id="37">37</span>
<span id="38">38</span>
<span id="39">39</span>
<span id="40">40</span>
<span id="41">41</span>
<span id="42">42</span>
<span id="43">43</span>
<span id="44">44</span>
<span id="45">45</span>
<span id="46">46</span>
<span id="47">47</span>
<span id="48">48</span>
<span id="49">49</span>
<span id="50">50</span>
<span id="51">51</span>
<span id="52">52</span>
<span id="53">53</span>
<span id="54">54</span>
<span id="55">55</span>
<span id="56">56</span>
<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>
<span id="64">64</span>
<span id="65">65</span>
<span id="66">66</span>
<span id="67">67</span>
<span id="68">68</span>
<span id="69">69</span>
<span id="70">70</span>
<span id="71">71</span>
<span id="72">72</span>
<span id="73">73</span>
</pre><pre class="rust">
<span class="kw">use</span> <span class="ident">geom::Duration</span>;
<span class="kw">use</span> <span class="ident">map_gui::tools::draw_isochrone</span>;
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">BuildingType</span>, <span class="ident">DirectedRoadID</span>, <span class="ident">LaneType</span>, <span class="ident">Map</span>, <span class="ident">PathConstraints</span>};
<span class="kw">use</span> <span class="ident">widgetry</span>::{<span class="ident">Color</span>, <span class="ident">Drawable</span>, <span class="ident">EventCtx</span>};
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::app::App</span>;
<span class="comment">// TODO This is a more limited version of 15m&#39;s Isochrone.</span>
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Nearby</span> {
<span class="kw">pub</span> <span class="ident">draw_buffer</span>: <span class="ident">Drawable</span>,
<span class="kw">pub</span> <span class="ident">population</span>: <span class="ident">usize</span>,
<span class="kw">pub</span> <span class="ident">total_amenities</span>: <span class="ident">usize</span>,
}
<span class="kw">impl</span> <span class="ident">Nearby</span> {
<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">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Nearby</span> {
<span class="comment">// Deliberately tiny</span>
<span class="kw">let</span> <span class="ident">threshold</span> <span class="op">=</span> <span class="ident">Duration::minutes</span>(<span class="number">1</span>);
<span class="kw">let</span> <span class="ident">map</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>;
<span class="kw">let</span> <span class="ident">time_to_reach_building</span> <span class="op">=</span> <span class="ident">map_model::connectivity::all_vehicle_costs_from</span>(
<span class="ident">map</span>,
<span class="ident">bike_network_roads</span>(<span class="ident">map</span>)
.<span class="ident">into_iter</span>()
.<span class="ident">map</span>(<span class="ident">map_model::connectivity::Spot::DirectedRoad</span>)
.<span class="ident">collect</span>(),
<span class="ident">threshold</span>,
<span class="ident">PathConstraints::Bike</span>,
);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">population</span> <span class="op">=</span> <span class="number">0</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">total_amenities</span> <span class="op">=</span> <span class="number">0</span>;
<span class="kw">for</span> <span class="ident">b</span> <span class="kw">in</span> <span class="ident">time_to_reach_building</span>.<span class="ident">keys</span>() {
<span class="kw">let</span> <span class="ident">bldg</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_b</span>(<span class="kw-2">*</span><span class="ident">b</span>);
<span class="ident">total_amenities</span> <span class="op">+</span><span class="op">=</span> <span class="ident">bldg</span>.<span class="ident">amenities</span>.<span class="ident">len</span>();
<span class="kw">match</span> <span class="ident">bldg</span>.<span class="ident">bldg_type</span> {
<span class="ident">BuildingType::Residential</span> { <span class="ident">num_residents</span>, .. }
<span class="op">|</span> <span class="ident">BuildingType::ResidentialCommercial</span>(<span class="ident">num_residents</span>, <span class="kw">_</span>) <span class="op">=</span><span class="op">&gt;</span> {
<span class="ident">population</span> <span class="op">+</span><span class="op">=</span> <span class="ident">num_residents</span>;
}
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> {}
}
}
<span class="kw">let</span> <span class="ident">draw_buffer</span> <span class="op">=</span> <span class="ident">draw_isochrone</span>(
<span class="ident">map</span>,
<span class="kw-2">&amp;</span><span class="ident">time_to_reach_building</span>,
<span class="kw-2">&amp;</span>[<span class="number">0.1</span>, <span class="ident">threshold</span>.<span class="ident">inner_seconds</span>()],
<span class="kw-2">&amp;</span>[<span class="ident">Color::BLUE</span>.<span class="ident">alpha</span>(<span class="number">0.5</span>)],
)
.<span class="ident">upload</span>(<span class="ident">ctx</span>);
<span class="ident">Nearby</span> {
<span class="ident">draw_buffer</span>,
<span class="ident">population</span>,
<span class="ident">total_amenities</span>,
}
}
}
<span class="kw">fn</span> <span class="ident">bike_network_roads</span>(<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">DirectedRoadID</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">results</span> <span class="op">=</span> <span class="ident">Vec::new</span>();
<span class="kw">for</span> <span class="ident">r</span> <span class="kw">in</span> <span class="ident">map</span>.<span class="ident">all_roads</span>() {
<span class="kw">if</span> <span class="ident">r</span>.<span class="ident">is_cycleway</span>()
<span class="op">|</span><span class="op">|</span> <span class="kw">crate</span><span class="ident">::ungap::layers::is_greenway</span>(<span class="ident">r</span>)
<span class="op">|</span><span class="op">|</span> <span class="ident">r</span>.<span class="ident">lanes_ltr</span>.<span class="ident">iter</span>().<span class="ident">any</span>(<span class="op">|</span>(<span class="kw">_</span>, <span class="kw">_</span>, <span class="ident">lt</span>)<span class="op">|</span> <span class="kw-2">*</span><span class="ident">lt</span> <span class="op">=</span><span class="op">=</span> <span class="ident">LaneType::Biking</span>)
{
<span class="comment">// Just start from both directions</span>
<span class="ident">results</span>.<span class="ident">extend</span>(<span class="ident">r</span>.<span class="ident">id</span>.<span class="ident">both_directions</span>());
}
}
<span class="ident">results</span>
}
</pre></div>
</section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script><script src="../../../source-script.js"></script><script src="../../../source-files.js"></script></body></html>