This commit is contained in:
dabreegster 2021-08-24 20:32:14 +00:00
parent 431119e126
commit 107b8efc68
82 changed files with 1148 additions and 986 deletions

File diff suppressed because one or more lines are too long

View File

@ -330,20 +330,20 @@ 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-58" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.draw" class="fnname">draw</a>(&amp;self, _: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>)</h4><a href="#method.draw-58" class="anchor"></a><a class="srclink" href="../../src/game/sandbox/mod.rs.html#638" 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-57" 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-57" 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-57" 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-57" 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-58" 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/quick_sketch/struct.QuickSketch.html" title="struct game::ungap::quick_sketch::QuickSketch">QuickSketch</a></h3><a href="#impl-State%3CApp%3E-58" class="anchor"></a><a class="srclink" href="../../src/game/ungap/quick_sketch.rs.html#95-133" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event-58" 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-58" class="anchor"></a><a class="srclink" href="../../src/game/ungap/quick_sketch.rs.html#96-122" 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-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#124-132" 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-58" 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/quick_sketch/struct.QuickSketch.html" title="struct game::ungap::quick_sketch::QuickSketch">QuickSketch</a></h3><a href="#impl-State%3CApp%3E-58" class="anchor"></a><a class="srclink" href="../../src/game/ungap/quick_sketch.rs.html#96-136" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event-58" 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-58" class="anchor"></a><a class="srclink" href="../../src/game/ungap/quick_sketch.rs.html#97-127" 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-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#129-135" 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/route/struct.RoutePlanner.html" title="struct game::ungap::route::RoutePlanner">RoutePlanner</a></h3><a href="#impl-State%3CApp%3E-59" class="anchor"></a><a class="srclink" href="../../src/game/ungap/route.rs.html#306-375" 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/route.rs.html#307-365" 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;, _: &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/route.rs.html#367-374" 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/route/struct.RoutePlanner.html" title="struct game::ungap::route::RoutePlanner">RoutePlanner</a></h3><a href="#impl-State%3CApp%3E-59" class="anchor"></a><a class="srclink" href="../../src/game/ungap/route.rs.html#311-385" 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/route.rs.html#312-374" 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/route.rs.html#376-384" 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>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw-7" 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-7" class="anchor"></a><a class="srclink" href="../../src/game/debug/floodfill.rs.html#109-116" 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-6" 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-6" 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-6" 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-6" 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-60" 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-60" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#124-408" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event-60" 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-60" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#125-377" 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-61" 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-61" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#379-407" 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-60" 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-60" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#64-184" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event-60" 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-60" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#65-176" 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-61" 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-61" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#178-183" 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-60" 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-60" 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-60" 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-60" 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-7" 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/path_counter/struct.PathCounter.html" title="struct game::debug::path_counter::PathCounter">PathCounter</a></h3><a href="#impl-State%3CApp%3E-7" class="anchor"></a><a class="srclink" href="../../src/game/debug/path_counter.rs.html#85-131" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event-7" 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-7" class="anchor"></a><a class="srclink" href="../../src/game/debug/path_counter.rs.html#86-115" 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;Tue, 24 Aug 2021 19:02:02 +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;Tue, 24 Aug 2021 20:31:05 +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

@ -0,0 +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 `is_greenway` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, is_greenway"><title>is_greenway in game::ungap::bike_network - 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">bike_network</a></h2><div id="sidebar-vars" data-name="is_greenway" 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">bike_network</a>::<wbr><a class="fn" href="#">is_greenway</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/bike_network.rs.html#106-115" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn is_greenway(road: &amp;<a class="struct" href="../../../map_model/objects/road/struct.Road.html" title="struct map_model::objects::road::Road">Road</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></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

@ -0,0 +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 `render_edits` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, render_edits"><title>render_edits in game::ungap::bike_network - 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">bike_network</a></h2><div id="sidebar-vars" data-name="render_edits" 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">bike_network</a>::<wbr><a class="fn" href="#">render_edits</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/bike_network.rs.html#117-127" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn render_edits(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Drawable</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

@ -0,0 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `bike_network` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, bike_network"><title>game::ungap::bike_network - 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 bike_network</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="bike_network" 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="#">bike_network</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/bike_network.rs.html#1-127" 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.DEDICATED_TRAIL.html" title="game::ungap::bike_network::DEDICATED_TRAIL struct">DEDICATED_TRAIL</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.DrawNetworkLayer.html" title="game::ungap::bike_network::DrawNetworkLayer struct">DrawNetworkLayer</a></td><td class="docblock-short"><p>Shows the bike network while unzoomed. Handles thickening the roads at low zoom levels.</p>
</td></tr><tr class="module-item"><td><a class="struct" href="struct.EDITED_COLOR.html" title="game::ungap::bike_network::EDITED_COLOR struct">EDITED_COLOR</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.GREENWAY.html" title="game::ungap::bike_network::GREENWAY struct">GREENWAY</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.PAINTED_BIKE_LANE.html" title="game::ungap::bike_network::PAINTED_BIKE_LANE struct">PAINTED_BIKE_LANE</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.PROTECTED_BIKE_LANE.html" title="game::ungap::bike_network::PROTECTED_BIKE_LANE struct">PROTECTED_BIKE_LANE</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.is_greenway.html" title="game::ungap::bike_network::is_greenway fn">is_greenway</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.render_edits.html" title="game::ungap::bike_network::render_edits fn">render_edits</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

@ -0,0 +1 @@
initSidebarItems({"fn":[["is_greenway",""],["render_edits",""]],"struct":[["DEDICATED_TRAIL",""],["DrawNetworkLayer","Shows the bike network while unzoomed. Handles thickening the roads at low zoom levels."],["EDITED_COLOR",""],["GREENWAY",""],["PAINTED_BIKE_LANE",""],["PROTECTED_BIKE_LANE",""]]});

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 `legend_batch` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, legend_batch"><title>legend_batch 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_batch" 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_batch</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#617-633" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn legend_batch(ctx: &amp;mut EventCtx&lt;'_&gt;, color: Color, txt: Text) -&gt; GeomBatch</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 +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 `legend_item` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, legend_item"><title>legend_item 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_item" 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_item</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#635-644" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn legend_item(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 +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 `make_bottom_right_panel` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, make_bottom_right_panel"><title>make_bottom_right_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_bottom_right_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_bottom_right_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#599-615" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_bottom_right_panel(<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;labels: <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>&nbsp;&nbsp;&nbsp;&nbsp;steep_streets: <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 +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 `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#552-597" 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;labels: <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>&nbsp;&nbsp;&nbsp;&nbsp;steep_streets: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a><br>) -&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_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#410-514" 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#186-290" 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,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 `make_zoom_controls` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, make_zoom_controls"><title>make_zoom_controls 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_zoom_controls" 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_zoom_controls</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#516-550" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_zoom_controls(ctx: &amp;mut EventCtx&lt;'_&gt;) -&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 +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 `zoom_enabled_cache_key` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, zoom_enabled_cache_key"><title>zoom_enabled_cache_key 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="zoom_enabled_cache_key" 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="#">zoom_enabled_cache_key</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#646-648" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn zoom_enabled_cache_key(ctx: &amp;EventCtx&lt;'_&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a>, <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html">)</a></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-648" 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-290" 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="labels/index.html" title="game::ungap::labels mod">labels</a></td><td class="docblock-short"></td></tr><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="route/index.html" title="game::ungap::route mod">route</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="bike_network/index.html" title="game::ungap::bike_network mod">bike_network</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="labels/index.html" title="game::ungap::labels mod">labels</a></td><td class="docblock-short"></td></tr><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="route/index.html" title="game::ungap::route mod">route</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_batch.html" title="game::ungap::legend_batch fn">legend_batch</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.legend_item.html" title="game::ungap::legend_item fn">legend_item</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.make_bottom_right_panel.html" title="game::ungap::make_bottom_right_panel fn">make_bottom_right_panel</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><tr class="module-item"><td><a class="fn" href="fn.make_zoom_controls.html" title="game::ungap::make_zoom_controls fn">make_zoom_controls</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.zoom_enabled_cache_key.html" title="game::ungap::zoom_enabled_cache_key fn">zoom_enabled_cache_key</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>
<table><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 +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 `render_edits` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, render_edits"><title>render_edits in game::ungap::layers - 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">
<!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_batch` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, legend_batch"><title>legend_batch in game::ungap::layers - 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">layers</a></h2><div id="sidebar-vars" data-name="render_edits" 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">layers</a>::<wbr><a class="fn" href="#">render_edits</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/layers.rs.html#122-132" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn render_edits(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Drawable</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>::<wbr><a href="index.html">layers</a></h2><div id="sidebar-vars" data-name="legend_batch" 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">layers</a>::<wbr><a class="fn" href="#">legend_batch</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/layers.rs.html#375-391" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn legend_batch(ctx: &amp;mut EventCtx&lt;'_&gt;, color: Color, txt: Text) -&gt; GeomBatch</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 `is_greenway` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, is_greenway"><title>is_greenway in game::ungap::layers - 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">
<!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_item` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, legend_item"><title>legend_item in game::ungap::layers - 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">layers</a></h2><div id="sidebar-vars" data-name="is_greenway" 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">layers</a>::<wbr><a class="fn" href="#">is_greenway</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/layers.rs.html#111-120" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn is_greenway(road: &amp;<a class="struct" href="../../../map_model/objects/road/struct.Road.html" title="struct map_model::objects::road::Road">Road</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></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>::<wbr><a href="index.html">layers</a></h2><div id="sidebar-vars" data-name="legend_item" 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">layers</a>::<wbr><a class="fn" href="#">legend_item</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/layers.rs.html#393-402" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn legend_item(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

@ -0,0 +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_bottom_right_panel` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, make_bottom_right_panel"><title>make_bottom_right_panel in game::ungap::layers - 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">layers</a></h2><div id="sidebar-vars" data-name="make_bottom_right_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 href="index.html">layers</a>::<wbr><a class="fn" href="#">make_bottom_right_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/layers.rs.html#357-373" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_bottom_right_panel(<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;labels: <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>&nbsp;&nbsp;&nbsp;&nbsp;steep_streets: <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

@ -0,0 +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::layers - 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">layers</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 href="index.html">layers</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/layers.rs.html#306-355" 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;labels: <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>&nbsp;&nbsp;&nbsp;&nbsp;steep_streets: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a><br>) -&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

@ -0,0 +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_zoom_controls` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, make_zoom_controls"><title>make_zoom_controls in game::ungap::layers - 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">layers</a></h2><div id="sidebar-vars" data-name="make_zoom_controls" 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">layers</a>::<wbr><a class="fn" href="#">make_zoom_controls</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/layers.rs.html#270-304" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_zoom_controls(ctx: &amp;mut EventCtx&lt;'_&gt;) -&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

@ -0,0 +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 `zoom_enabled_cache_key` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, zoom_enabled_cache_key"><title>zoom_enabled_cache_key in game::ungap::layers - 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">layers</a></h2><div id="sidebar-vars" data-name="zoom_enabled_cache_key" 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">layers</a>::<wbr><a class="fn" href="#">zoom_enabled_cache_key</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/layers.rs.html#404-406" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn zoom_enabled_cache_key(ctx: &amp;EventCtx&lt;'_&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a>, <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html">)</a></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,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `layers` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, layers"><title>game::ungap::layers - 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 layers</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="layers" 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="#">layers</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/layers.rs.html#1-132" 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.DEDICATED_TRAIL.html" title="game::ungap::layers::DEDICATED_TRAIL struct">DEDICATED_TRAIL</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.DrawNetworkLayer.html" title="game::ungap::layers::DrawNetworkLayer struct">DrawNetworkLayer</a></td><td class="docblock-short"><p>Shows the bike network while unzoomed. Handles thickening the roads at low zoom levels.</p>
</td></tr><tr class="module-item"><td><a class="struct" href="struct.EDITED_COLOR.html" title="game::ungap::layers::EDITED_COLOR struct">EDITED_COLOR</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.GREENWAY.html" title="game::ungap::layers::GREENWAY struct">GREENWAY</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.PAINTED_BIKE_LANE.html" title="game::ungap::layers::PAINTED_BIKE_LANE struct">PAINTED_BIKE_LANE</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.PROTECTED_BIKE_LANE.html" title="game::ungap::layers::PROTECTED_BIKE_LANE struct">PROTECTED_BIKE_LANE</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.is_greenway.html" title="game::ungap::layers::is_greenway fn">is_greenway</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.render_edits.html" title="game::ungap::layers::render_edits fn">render_edits</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>
<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 layers</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="layers" 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="#">layers</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/layers.rs.html#1-406" 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.Layers.html" title="game::ungap::layers::Layers struct">Layers</a></td><td class="docblock-short"><p>A bottom-right panel for managing a bunch of toggleable layers in the “ungap the map” tool.</p>
</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_batch.html" title="game::ungap::layers::legend_batch fn">legend_batch</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.legend_item.html" title="game::ungap::layers::legend_item fn">legend_item</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.make_bottom_right_panel.html" title="game::ungap::layers::make_bottom_right_panel fn">make_bottom_right_panel</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.make_legend.html" title="game::ungap::layers::make_legend fn">make_legend</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.make_zoom_controls.html" title="game::ungap::layers::make_zoom_controls fn">make_zoom_controls</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.zoom_enabled_cache_key.html" title="game::ungap::layers::zoom_enabled_cache_key fn">zoom_enabled_cache_key</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 +1 @@
initSidebarItems({"fn":[["is_greenway",""],["render_edits",""]],"struct":[["DEDICATED_TRAIL",""],["DrawNetworkLayer","Shows the bike network while unzoomed. Handles thickening the roads at low zoom levels."],["EDITED_COLOR",""],["GREENWAY",""],["PAINTED_BIKE_LANE",""],["PROTECTED_BIKE_LANE",""]]});
initSidebarItems({"fn":[["legend_batch",""],["legend_item",""],["make_bottom_right_panel",""],["make_legend",""],["make_zoom_controls",""],["zoom_enabled_cache_key",""]],"struct":[["Layers","A bottom-right panel for managing a bunch of toggleable layers in the “ungap the map” tool."]]});

File diff suppressed because one or more lines are too long

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="API documentation for the Rust `magnifying` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, magnifying"><title>game::ungap::magnifying - 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 magnifying</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="magnifying" 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="#">magnifying</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/magnifying.rs.html#1-95" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</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 magnifying</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="magnifying" 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="#">magnifying</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/magnifying.rs.html#1-99" 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.MagnifyingGlass.html" title="game::ungap::magnifying::MagnifyingGlass struct">MagnifyingGlass</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>

File diff suppressed because one or more lines are too long

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_quick_changes` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, make_quick_changes"><title>make_quick_changes in game::ungap::quick_sketch - 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">quick_sketch</a></h2><div id="sidebar-vars" data-name="make_quick_changes" 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">quick_sketch</a>::<wbr><a class="fn" href="#">make_quick_changes</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/quick_sketch.rs.html#135-161" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_quick_changes(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;roads: <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.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;buffer_type: <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="../../../map_model/objects/lane/enum.BufferType.html" title="enum map_model::objects::lane::BufferType">BufferType</a>&gt;<br>) -&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="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</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>
<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">quick_sketch</a></h2><div id="sidebar-vars" data-name="make_quick_changes" 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">quick_sketch</a>::<wbr><a class="fn" href="#">make_quick_changes</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/quick_sketch.rs.html#138-164" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_quick_changes(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;roads: <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.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;buffer_type: <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="../../../map_model/objects/lane/enum.BufferType.html" title="enum map_model::objects::lane::BufferType">BufferType</a>&gt;<br>) -&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="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</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,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 `maybe_add_bike_lanes` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, maybe_add_bike_lanes"><title>maybe_add_bike_lanes in game::ungap::quick_sketch - 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">quick_sketch</a></h2><div id="sidebar-vars" data-name="maybe_add_bike_lanes" 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">quick_sketch</a>::<wbr><a class="fn" href="#">maybe_add_bike_lanes</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/quick_sketch.rs.html#163-236" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn maybe_add_bike_lanes(r: &amp;mut <a class="struct" href="../../../map_model/edits/struct.EditRoad.html" title="struct map_model::edits::EditRoad">EditRoad</a>, buffer_type: <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="../../../map_model/objects/lane/enum.BufferType.html" title="enum map_model::objects::lane::BufferType">BufferType</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>
<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">quick_sketch</a></h2><div id="sidebar-vars" data-name="maybe_add_bike_lanes" 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">quick_sketch</a>::<wbr><a class="fn" href="#">maybe_add_bike_lanes</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/quick_sketch.rs.html#166-239" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn maybe_add_bike_lanes(r: &amp;mut <a class="struct" href="../../../map_model/edits/struct.EditRoad.html" title="struct map_model::edits::EditRoad">EditRoad</a>, buffer_type: <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="../../../map_model/objects/lane/enum.BufferType.html" title="enum map_model::objects::lane::BufferType">BufferType</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 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `quick_sketch` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, quick_sketch"><title>game::ungap::quick_sketch - 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 quick_sketch</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="quick_sketch" 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="#">quick_sketch</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/quick_sketch.rs.html#1-307" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</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 quick_sketch</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="quick_sketch" 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="#">quick_sketch</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/quick_sketch.rs.html#1-310" 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.QuickSketch.html" title="game::ungap::quick_sketch::QuickSketch struct">QuickSketch</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.make_quick_changes.html" title="game::ungap::quick_sketch::make_quick_changes fn">make_quick_changes</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.maybe_add_bike_lanes.html" title="game::ungap::quick_sketch::maybe_add_bike_lanes fn">maybe_add_bike_lanes</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,14 +1,14 @@
<!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 `QuickSketch` struct in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, QuickSketch"><title>QuickSketch in game::ungap::quick_sketch - 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 struct"><!--[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">Struct QuickSketch</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.edits_layer">edits_layer</a><a href="#structfield.magnifying_glass">magnifying_glass</a><a href="#structfield.network_layer">network_layer</a><a href="#structfield.route_sketcher">route_sketcher</a><a href="#structfield.top_panel">top_panel</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.new_state">new_state</a><a href="#method.update_top_panel">update_top_panel</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-State%3CApp%3E">State&lt;App&gt;</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><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">quick_sketch</a></h2><div id="sidebar-vars" data-name="QuickSketch" data-ty="struct" 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">Struct <a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">quick_sketch</a>::<wbr><a class="struct" href="#">QuickSketch</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/quick_sketch.rs.html#15-21" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct QuickSketch {
<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 struct"><!--[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">Struct QuickSketch</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.edits_layer">edits_layer</a><a href="#structfield.layers">layers</a><a href="#structfield.magnifying_glass">magnifying_glass</a><a href="#structfield.route_sketcher">route_sketcher</a><a href="#structfield.top_panel">top_panel</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.new_state">new_state</a><a href="#method.update_top_panel">update_top_panel</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-State%3CApp%3E">State&lt;App&gt;</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><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">quick_sketch</a></h2><div id="sidebar-vars" data-name="QuickSketch" data-ty="struct" 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">Struct <a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">quick_sketch</a>::<wbr><a class="struct" href="#">QuickSketch</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/quick_sketch.rs.html#16-22" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct QuickSketch {
top_panel: Panel,
network_layer: <a class="struct" href="../layers/struct.DrawNetworkLayer.html" title="struct game::ungap::layers::DrawNetworkLayer">DrawNetworkLayer</a>,
layers: <a class="struct" href="../layers/struct.Layers.html" title="struct game::ungap::layers::Layers">Layers</a>,
edits_layer: Drawable,
magnifying_glass: <a class="struct" href="../magnifying/struct.MagnifyingGlass.html" title="struct game::ungap::magnifying::MagnifyingGlass">MagnifyingGlass</a>,
route_sketcher: <a class="struct" href="../../common/route_sketcher/struct.RouteSketcher.html" title="struct game::common::route_sketcher::RouteSketcher">RouteSketcher</a>,
}</pre></div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.top_panel" class="structfield small-section-header"><a href="#structfield.top_panel" class="anchor field"></a><code>top_panel: Panel</code></span><span id="structfield.network_layer" class="structfield small-section-header"><a href="#structfield.network_layer" class="anchor field"></a><code>network_layer: <a class="struct" href="../layers/struct.DrawNetworkLayer.html" title="struct game::ungap::layers::DrawNetworkLayer">DrawNetworkLayer</a></code></span><span id="structfield.edits_layer" class="structfield small-section-header"><a href="#structfield.edits_layer" class="anchor field"></a><code>edits_layer: Drawable</code></span><span id="structfield.magnifying_glass" class="structfield small-section-header"><a href="#structfield.magnifying_glass" class="anchor field"></a><code>magnifying_glass: <a class="struct" href="../magnifying/struct.MagnifyingGlass.html" title="struct game::ungap::magnifying::MagnifyingGlass">MagnifyingGlass</a></code></span><span id="structfield.route_sketcher" class="structfield small-section-header"><a href="#structfield.route_sketcher" class="anchor field"></a><code>route_sketcher: <a class="struct" href="../../common/route_sketcher/struct.RouteSketcher.html" title="struct game::common::route_sketcher::RouteSketcher">RouteSketcher</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="struct" href="struct.QuickSketch.html" title="struct game::ungap::quick_sketch::QuickSketch">QuickSketch</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/game/ungap/quick_sketch.rs.html#23-93" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.new_state" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.new_state" class="fnname">new_state</a>(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>&gt;&gt;</h4><a href="#method.new_state" class="anchor"></a><a class="srclink" href="../../../src/game/ungap/quick_sketch.rs.html#24-34" title="goto source code">[src]</a></div><div id="method.update_top_panel" class="method has-srclink"><h4 class="code-header">fn <a href="#method.update_top_panel" class="fnname">update_top_panel</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;)</h4><a href="#method.update_top_panel" class="anchor"></a><a class="srclink" href="../../../src/game/ungap/quick_sketch.rs.html#36-92" title="goto source code">[src]</a></div></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-State%3CApp%3E" class="impl has-srclink"><h3 class="code-header in-band">impl State&lt;<a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="struct.QuickSketch.html" title="struct game::ungap::quick_sketch::QuickSketch">QuickSketch</a></h3><a href="#impl-State%3CApp%3E" class="anchor"></a><a class="srclink" href="../../../src/game/ungap/quick_sketch.rs.html#95-133" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" 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="../../app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>&gt;</h4><a href="#method.event" class="anchor"></a><a class="srclink" href="../../../src/game/ungap/quick_sketch.rs.html#96-122" 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" 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="../../app/struct.App.html" title="struct game::app::App">App</a>)</h4><a href="#method.draw" class="anchor"></a><a class="srclink" href="../../../src/game/ungap/quick_sketch.rs.html#124-132" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw</p>
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.top_panel" class="structfield small-section-header"><a href="#structfield.top_panel" class="anchor field"></a><code>top_panel: Panel</code></span><span id="structfield.layers" class="structfield small-section-header"><a href="#structfield.layers" class="anchor field"></a><code>layers: <a class="struct" href="../layers/struct.Layers.html" title="struct game::ungap::layers::Layers">Layers</a></code></span><span id="structfield.edits_layer" class="structfield small-section-header"><a href="#structfield.edits_layer" class="anchor field"></a><code>edits_layer: Drawable</code></span><span id="structfield.magnifying_glass" class="structfield small-section-header"><a href="#structfield.magnifying_glass" class="anchor field"></a><code>magnifying_glass: <a class="struct" href="../magnifying/struct.MagnifyingGlass.html" title="struct game::ungap::magnifying::MagnifyingGlass">MagnifyingGlass</a></code></span><span id="structfield.route_sketcher" class="structfield small-section-header"><a href="#structfield.route_sketcher" class="anchor field"></a><code>route_sketcher: <a class="struct" href="../../common/route_sketcher/struct.RouteSketcher.html" title="struct game::common::route_sketcher::RouteSketcher">RouteSketcher</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="struct" href="struct.QuickSketch.html" title="struct game::ungap::quick_sketch::QuickSketch">QuickSketch</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/game/ungap/quick_sketch.rs.html#24-94" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.new_state" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.new_state" class="fnname">new_state</a>(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>&gt;&gt;</h4><a href="#method.new_state" class="anchor"></a><a class="srclink" href="../../../src/game/ungap/quick_sketch.rs.html#25-35" title="goto source code">[src]</a></div><div id="method.update_top_panel" class="method has-srclink"><h4 class="code-header">fn <a href="#method.update_top_panel" class="fnname">update_top_panel</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;)</h4><a href="#method.update_top_panel" class="anchor"></a><a class="srclink" href="../../../src/game/ungap/quick_sketch.rs.html#37-93" title="goto source code">[src]</a></div></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-State%3CApp%3E" class="impl has-srclink"><h3 class="code-header in-band">impl State&lt;<a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="struct.QuickSketch.html" title="struct game::ungap::quick_sketch::QuickSketch">QuickSketch</a></h3><a href="#impl-State%3CApp%3E" class="anchor"></a><a class="srclink" href="../../../src/game/ungap/quick_sketch.rs.html#96-136" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" 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="../../app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>&gt;</h4><a href="#method.event" class="anchor"></a><a class="srclink" href="../../../src/game/ungap/quick_sketch.rs.html#97-127" 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" 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="../../app/struct.App.html" title="struct game::app::App">App</a>)</h4><a href="#method.draw" class="anchor"></a><a class="srclink" href="../../../src/game/ungap/quick_sketch.rs.html#129-135" 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" 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" 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" 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" class="anchor"></a></div></summary><div class='docblock'><p>Before this state is popped or replaced, call this.</p>
</div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.QuickSketch.html" title="struct game::ungap::quick_sketch::QuickSketch">QuickSketch</a></h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.QuickSketch.html" title="struct game::ungap::quick_sketch::QuickSketch">QuickSketch</a></h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.QuickSketch.html" title="struct game::ungap::quick_sketch::QuickSketch">QuickSketch</a></h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.QuickSketch.html" title="struct game::ungap::quick_sketch::QuickSketch">QuickSketch</a></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.QuickSketch.html" title="struct game::ungap::quick_sketch::QuickSketch">QuickSketch</a></h3><a href="#impl-UnwindSafe" class="anchor"></a></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Any" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h3><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#131-135" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#132" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></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="API documentation for the Rust `route` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, route"><title>game::ungap::route - 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 route</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="route" 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="#">route</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/route.rs.html#1-410" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</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 route</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="route" 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="#">route</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/route.rs.html#1-420" 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.RoutePlanner.html" title="game::ungap::route::RoutePlanner struct">RoutePlanner</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Waypoint.html" title="game::ungap::route::Waypoint struct">Waypoint</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>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
initSidebarItems({"fn":[["legend_batch",""],["legend_item",""],["make_bottom_right_panel",""],["make_legend",""],["make_top_panel",""],["make_zoom_controls",""],["zoom_enabled_cache_key",""]],"mod":[["labels",""],["layers",""],["magnifying",""],["quick_sketch",""],["route",""],["share",""]],"struct":[["ExploreMap",""]]});
initSidebarItems({"fn":[["make_top_panel",""]],"mod":[["bike_network",""],["labels",""],["layers",""],["magnifying",""],["quick_sketch",""],["route",""],["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

View File

@ -1,5 +1,5 @@
(function() {var implementors = {};
implementors["abstio"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"abstio/abst_paths/struct.ROOT_DIR.html\" title=\"struct abstio::abst_paths::ROOT_DIR\">ROOT_DIR</a>","synthetic":false,"types":["abstio::abst_paths::ROOT_DIR"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"abstio/abst_paths/struct.ROOT_PLAYER_DIR.html\" title=\"struct abstio::abst_paths::ROOT_PLAYER_DIR\">ROOT_PLAYER_DIR</a>","synthetic":false,"types":["abstio::abst_paths::ROOT_PLAYER_DIR"]}];
implementors["game"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"game/sandbox/dashboards/trip_problems/struct.CLEAR_COLOR_SCALE.html\" title=\"struct game::sandbox::dashboards::trip_problems::CLEAR_COLOR_SCALE\">CLEAR_COLOR_SCALE</a>","synthetic":false,"types":["game::sandbox::dashboards::trip_problems::CLEAR_COLOR_SCALE"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"game/ungap/layers/struct.DEDICATED_TRAIL.html\" title=\"struct game::ungap::layers::DEDICATED_TRAIL\">DEDICATED_TRAIL</a>","synthetic":false,"types":["game::ungap::layers::DEDICATED_TRAIL"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"game/ungap/layers/struct.PROTECTED_BIKE_LANE.html\" title=\"struct game::ungap::layers::PROTECTED_BIKE_LANE\">PROTECTED_BIKE_LANE</a>","synthetic":false,"types":["game::ungap::layers::PROTECTED_BIKE_LANE"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"game/ungap/layers/struct.PAINTED_BIKE_LANE.html\" title=\"struct game::ungap::layers::PAINTED_BIKE_LANE\">PAINTED_BIKE_LANE</a>","synthetic":false,"types":["game::ungap::layers::PAINTED_BIKE_LANE"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"game/ungap/layers/struct.GREENWAY.html\" title=\"struct game::ungap::layers::GREENWAY\">GREENWAY</a>","synthetic":false,"types":["game::ungap::layers::GREENWAY"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"game/ungap/layers/struct.EDITED_COLOR.html\" title=\"struct game::ungap::layers::EDITED_COLOR\">EDITED_COLOR</a>","synthetic":false,"types":["game::ungap::layers::EDITED_COLOR"]}];
implementors["game"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"game/sandbox/dashboards/trip_problems/struct.CLEAR_COLOR_SCALE.html\" title=\"struct game::sandbox::dashboards::trip_problems::CLEAR_COLOR_SCALE\">CLEAR_COLOR_SCALE</a>","synthetic":false,"types":["game::sandbox::dashboards::trip_problems::CLEAR_COLOR_SCALE"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"game/ungap/bike_network/struct.DEDICATED_TRAIL.html\" title=\"struct game::ungap::bike_network::DEDICATED_TRAIL\">DEDICATED_TRAIL</a>","synthetic":false,"types":["game::ungap::bike_network::DEDICATED_TRAIL"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"game/ungap/bike_network/struct.PROTECTED_BIKE_LANE.html\" title=\"struct game::ungap::bike_network::PROTECTED_BIKE_LANE\">PROTECTED_BIKE_LANE</a>","synthetic":false,"types":["game::ungap::bike_network::PROTECTED_BIKE_LANE"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"game/ungap/bike_network/struct.PAINTED_BIKE_LANE.html\" title=\"struct game::ungap::bike_network::PAINTED_BIKE_LANE\">PAINTED_BIKE_LANE</a>","synthetic":false,"types":["game::ungap::bike_network::PAINTED_BIKE_LANE"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"game/ungap/bike_network/struct.GREENWAY.html\" title=\"struct game::ungap::bike_network::GREENWAY\">GREENWAY</a>","synthetic":false,"types":["game::ungap::bike_network::GREENWAY"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"game/ungap/bike_network/struct.EDITED_COLOR.html\" title=\"struct game::ungap::bike_network::EDITED_COLOR\">EDITED_COLOR</a>","synthetic":false,"types":["game::ungap::bike_network::EDITED_COLOR"]}];
implementors["headless"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"headless/struct.MAP.html\" title=\"struct headless::MAP\">MAP</a>","synthetic":false,"types":["headless::MAP"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"headless/struct.SIM.html\" title=\"struct headless::SIM\">SIM</a>","synthetic":false,"types":["headless::SIM"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"headless/struct.LOAD.html\" title=\"struct headless::LOAD\">LOAD</a>","synthetic":false,"types":["headless::LOAD"]}];
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()

View File

@ -1,5 +1,5 @@
(function() {var implementors = {};
implementors["abstio"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/lazy_static/1.4.0/lazy_static/trait.LazyStatic.html\" title=\"trait lazy_static::LazyStatic\">LazyStatic</a> for <a class=\"struct\" href=\"abstio/abst_paths/struct.ROOT_DIR.html\" title=\"struct abstio::abst_paths::ROOT_DIR\">ROOT_DIR</a>","synthetic":false,"types":["abstio::abst_paths::ROOT_DIR"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/lazy_static/1.4.0/lazy_static/trait.LazyStatic.html\" title=\"trait lazy_static::LazyStatic\">LazyStatic</a> for <a class=\"struct\" href=\"abstio/abst_paths/struct.ROOT_PLAYER_DIR.html\" title=\"struct abstio::abst_paths::ROOT_PLAYER_DIR\">ROOT_PLAYER_DIR</a>","synthetic":false,"types":["abstio::abst_paths::ROOT_PLAYER_DIR"]}];
implementors["game"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/lazy_static/1.4.0/lazy_static/trait.LazyStatic.html\" title=\"trait lazy_static::LazyStatic\">LazyStatic</a> for <a class=\"struct\" href=\"game/sandbox/dashboards/trip_problems/struct.CLEAR_COLOR_SCALE.html\" title=\"struct game::sandbox::dashboards::trip_problems::CLEAR_COLOR_SCALE\">CLEAR_COLOR_SCALE</a>","synthetic":false,"types":["game::sandbox::dashboards::trip_problems::CLEAR_COLOR_SCALE"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/lazy_static/1.4.0/lazy_static/trait.LazyStatic.html\" title=\"trait lazy_static::LazyStatic\">LazyStatic</a> for <a class=\"struct\" href=\"game/ungap/layers/struct.DEDICATED_TRAIL.html\" title=\"struct game::ungap::layers::DEDICATED_TRAIL\">DEDICATED_TRAIL</a>","synthetic":false,"types":["game::ungap::layers::DEDICATED_TRAIL"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/lazy_static/1.4.0/lazy_static/trait.LazyStatic.html\" title=\"trait lazy_static::LazyStatic\">LazyStatic</a> for <a class=\"struct\" href=\"game/ungap/layers/struct.PROTECTED_BIKE_LANE.html\" title=\"struct game::ungap::layers::PROTECTED_BIKE_LANE\">PROTECTED_BIKE_LANE</a>","synthetic":false,"types":["game::ungap::layers::PROTECTED_BIKE_LANE"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/lazy_static/1.4.0/lazy_static/trait.LazyStatic.html\" title=\"trait lazy_static::LazyStatic\">LazyStatic</a> for <a class=\"struct\" href=\"game/ungap/layers/struct.PAINTED_BIKE_LANE.html\" title=\"struct game::ungap::layers::PAINTED_BIKE_LANE\">PAINTED_BIKE_LANE</a>","synthetic":false,"types":["game::ungap::layers::PAINTED_BIKE_LANE"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/lazy_static/1.4.0/lazy_static/trait.LazyStatic.html\" title=\"trait lazy_static::LazyStatic\">LazyStatic</a> for <a class=\"struct\" href=\"game/ungap/layers/struct.GREENWAY.html\" title=\"struct game::ungap::layers::GREENWAY\">GREENWAY</a>","synthetic":false,"types":["game::ungap::layers::GREENWAY"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/lazy_static/1.4.0/lazy_static/trait.LazyStatic.html\" title=\"trait lazy_static::LazyStatic\">LazyStatic</a> for <a class=\"struct\" href=\"game/ungap/layers/struct.EDITED_COLOR.html\" title=\"struct game::ungap::layers::EDITED_COLOR\">EDITED_COLOR</a>","synthetic":false,"types":["game::ungap::layers::EDITED_COLOR"]}];
implementors["game"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/lazy_static/1.4.0/lazy_static/trait.LazyStatic.html\" title=\"trait lazy_static::LazyStatic\">LazyStatic</a> for <a class=\"struct\" href=\"game/sandbox/dashboards/trip_problems/struct.CLEAR_COLOR_SCALE.html\" title=\"struct game::sandbox::dashboards::trip_problems::CLEAR_COLOR_SCALE\">CLEAR_COLOR_SCALE</a>","synthetic":false,"types":["game::sandbox::dashboards::trip_problems::CLEAR_COLOR_SCALE"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/lazy_static/1.4.0/lazy_static/trait.LazyStatic.html\" title=\"trait lazy_static::LazyStatic\">LazyStatic</a> for <a class=\"struct\" href=\"game/ungap/bike_network/struct.DEDICATED_TRAIL.html\" title=\"struct game::ungap::bike_network::DEDICATED_TRAIL\">DEDICATED_TRAIL</a>","synthetic":false,"types":["game::ungap::bike_network::DEDICATED_TRAIL"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/lazy_static/1.4.0/lazy_static/trait.LazyStatic.html\" title=\"trait lazy_static::LazyStatic\">LazyStatic</a> for <a class=\"struct\" href=\"game/ungap/bike_network/struct.PROTECTED_BIKE_LANE.html\" title=\"struct game::ungap::bike_network::PROTECTED_BIKE_LANE\">PROTECTED_BIKE_LANE</a>","synthetic":false,"types":["game::ungap::bike_network::PROTECTED_BIKE_LANE"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/lazy_static/1.4.0/lazy_static/trait.LazyStatic.html\" title=\"trait lazy_static::LazyStatic\">LazyStatic</a> for <a class=\"struct\" href=\"game/ungap/bike_network/struct.PAINTED_BIKE_LANE.html\" title=\"struct game::ungap::bike_network::PAINTED_BIKE_LANE\">PAINTED_BIKE_LANE</a>","synthetic":false,"types":["game::ungap::bike_network::PAINTED_BIKE_LANE"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/lazy_static/1.4.0/lazy_static/trait.LazyStatic.html\" title=\"trait lazy_static::LazyStatic\">LazyStatic</a> for <a class=\"struct\" href=\"game/ungap/bike_network/struct.GREENWAY.html\" title=\"struct game::ungap::bike_network::GREENWAY\">GREENWAY</a>","synthetic":false,"types":["game::ungap::bike_network::GREENWAY"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/lazy_static/1.4.0/lazy_static/trait.LazyStatic.html\" title=\"trait lazy_static::LazyStatic\">LazyStatic</a> for <a class=\"struct\" href=\"game/ungap/bike_network/struct.EDITED_COLOR.html\" title=\"struct game::ungap::bike_network::EDITED_COLOR\">EDITED_COLOR</a>","synthetic":false,"types":["game::ungap::bike_network::EDITED_COLOR"]}];
implementors["headless"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/lazy_static/1.4.0/lazy_static/trait.LazyStatic.html\" title=\"trait lazy_static::LazyStatic\">LazyStatic</a> for <a class=\"struct\" href=\"headless/struct.MAP.html\" title=\"struct headless::MAP\">MAP</a>","synthetic":false,"types":["headless::MAP"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/lazy_static/1.4.0/lazy_static/trait.LazyStatic.html\" title=\"trait lazy_static::LazyStatic\">LazyStatic</a> for <a class=\"struct\" href=\"headless/struct.SIM.html\" title=\"struct headless::SIM\">SIM</a>","synthetic":false,"types":["headless::SIM"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/lazy_static/1.4.0/lazy_static/trait.LazyStatic.html\" title=\"trait lazy_static::LazyStatic\">LazyStatic</a> for <a class=\"struct\" href=\"headless/struct.LOAD.html\" title=\"struct headless::LOAD\">LOAD</a>","synthetic":false,"types":["headless::LOAD"]}];
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()

View File

@ -1,5 +1,5 @@
(function() {var implementors = {};
implementors["game"] = [{"text":"impl <a class=\"trait\" href=\"map_gui/tools/minimap/trait.MinimapControls.html\" title=\"trait map_gui::tools::minimap::MinimapControls\">MinimapControls</a>&lt;<a class=\"struct\" href=\"game/app/struct.App.html\" title=\"struct game::app::App\">App</a>&gt; for <a class=\"struct\" href=\"game/sandbox/minimap/struct.MinimapController.html\" title=\"struct game::sandbox::minimap::MinimapController\">MinimapController</a>","synthetic":false,"types":["game::sandbox::minimap::MinimapController"]}];
implementors["osm_viewer"] = [{"text":"impl <a class=\"trait\" href=\"map_gui/tools/minimap/trait.MinimapControls.html\" title=\"trait map_gui::tools::minimap::MinimapControls\">MinimapControls</a>&lt;<a class=\"struct\" href=\"map_gui/simple_app/struct.SimpleApp.html\" title=\"struct map_gui::simple_app::SimpleApp\">SimpleApp</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.unit.html\">()</a>&gt;&gt; for <a class=\"struct\" href=\"osm_viewer/viewer/struct.MinimapController.html\" title=\"struct osm_viewer::viewer::MinimapController\">MinimapController</a>","synthetic":false,"types":["osm_viewer::viewer::MinimapController"]}];
implementors["santa"] = [{"text":"impl MinimapControls&lt;SimpleApp&lt;<a class=\"struct\" href=\"santa/session/struct.Session.html\" title=\"struct santa::session::Session\">Session</a>&gt;&gt; for <a class=\"struct\" href=\"santa/game/struct.MinimapController.html\" title=\"struct santa::game::MinimapController\">MinimapController</a>","synthetic":false,"types":["santa::game::MinimapController"]}];
implementors["santa"] = [{"text":"impl <a class=\"trait\" href=\"map_gui/tools/minimap/trait.MinimapControls.html\" title=\"trait map_gui::tools::minimap::MinimapControls\">MinimapControls</a>&lt;<a class=\"struct\" href=\"map_gui/simple_app/struct.SimpleApp.html\" title=\"struct map_gui::simple_app::SimpleApp\">SimpleApp</a>&lt;<a class=\"struct\" href=\"santa/session/struct.Session.html\" title=\"struct santa::session::Session\">Session</a>&gt;&gt; for <a class=\"struct\" href=\"santa/game/struct.MinimapController.html\" title=\"struct santa::game::MinimapController\">MinimapController</a>","synthetic":false,"types":["santa::game::MinimapController"]}];
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2,5 +2,5 @@
implementors["fifteen_min"] = [{"text":"impl SimpleState&lt;<a class=\"struct\" href=\"map_gui/simple_app/struct.SimpleApp.html\" title=\"struct map_gui::simple_app::SimpleApp\">SimpleApp</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.unit.html\">()</a>&gt;&gt; for <a class=\"struct\" href=\"fifteen_min/find_amenities/struct.Results.html\" title=\"struct fifteen_min::find_amenities::Results\">Results</a>","synthetic":false,"types":["fifteen_min::find_amenities::Results"]},{"text":"impl SimpleState&lt;<a class=\"struct\" href=\"map_gui/simple_app/struct.SimpleApp.html\" title=\"struct map_gui::simple_app::SimpleApp\">SimpleApp</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.unit.html\">()</a>&gt;&gt; for <a class=\"struct\" href=\"fifteen_min/find_home/struct.FindHome.html\" title=\"struct fifteen_min::find_home::FindHome\">FindHome</a>","synthetic":false,"types":["fifteen_min::find_home::FindHome"]},{"text":"impl SimpleState&lt;<a class=\"struct\" href=\"map_gui/simple_app/struct.SimpleApp.html\" title=\"struct map_gui::simple_app::SimpleApp\">SimpleApp</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.unit.html\">()</a>&gt;&gt; for <a class=\"struct\" href=\"fifteen_min/find_home/struct.Results.html\" title=\"struct fifteen_min::find_home::Results\">Results</a>","synthetic":false,"types":["fifteen_min::find_home::Results"]}];
implementors["game"] = [{"text":"impl SimpleState&lt;<a class=\"struct\" href=\"game/app/struct.App.html\" title=\"struct game::app::App\">App</a>&gt; for <a class=\"struct\" href=\"game/debug/uber_turns/struct.UberTurnPicker.html\" title=\"struct game::debug::uber_turns::UberTurnPicker\">UberTurnPicker</a>","synthetic":false,"types":["game::debug::uber_turns::UberTurnPicker"]},{"text":"impl SimpleState&lt;<a class=\"struct\" href=\"game/app/struct.App.html\" title=\"struct game::app::App\">App</a>&gt; for <a class=\"struct\" href=\"game/debug/uber_turns/struct.UberTurnViewer.html\" title=\"struct game::debug::uber_turns::UberTurnViewer\">UberTurnViewer</a>","synthetic":false,"types":["game::debug::uber_turns::UberTurnViewer"]},{"text":"impl SimpleState&lt;<a class=\"struct\" href=\"game/app/struct.App.html\" title=\"struct game::app::App\">App</a>&gt; for <a class=\"struct\" href=\"game/edit/stop_signs/struct.StopSignEditor.html\" title=\"struct game::edit::stop_signs::StopSignEditor\">StopSignEditor</a>","synthetic":false,"types":["game::edit::stop_signs::StopSignEditor"]},{"text":"impl SimpleState&lt;<a class=\"struct\" href=\"game/app/struct.App.html\" title=\"struct game::app::App\">App</a>&gt; for <a class=\"struct\" href=\"game/edit/traffic_signals/edits/struct.ChangeDuration.html\" title=\"struct game::edit::traffic_signals::edits::ChangeDuration\">ChangeDuration</a>","synthetic":false,"types":["game::edit::traffic_signals::edits::ChangeDuration"]},{"text":"impl SimpleState&lt;<a class=\"struct\" href=\"game/app/struct.App.html\" title=\"struct game::app::App\">App</a>&gt; for <a class=\"struct\" href=\"game/edit/traffic_signals/offsets/struct.ShowAbsolute.html\" title=\"struct game::edit::traffic_signals::offsets::ShowAbsolute\">ShowAbsolute</a>","synthetic":false,"types":["game::edit::traffic_signals::offsets::ShowAbsolute"]},{"text":"impl SimpleState&lt;<a class=\"struct\" href=\"game/app/struct.App.html\" title=\"struct game::app::App\">App</a>&gt; for <a class=\"struct\" href=\"game/edit/traffic_signals/offsets/struct.ShowRelative.html\" title=\"struct game::edit::traffic_signals::offsets::ShowRelative\">ShowRelative</a>","synthetic":false,"types":["game::edit::traffic_signals::offsets::ShowRelative"]},{"text":"impl SimpleState&lt;<a class=\"struct\" href=\"game/app/struct.App.html\" title=\"struct game::app::App\">App</a>&gt; for <a class=\"struct\" href=\"game/edit/traffic_signals/offsets/struct.TuneRelative.html\" title=\"struct game::edit::traffic_signals::offsets::TuneRelative\">TuneRelative</a>","synthetic":false,"types":["game::edit::traffic_signals::offsets::TuneRelative"]},{"text":"impl SimpleState&lt;<a class=\"struct\" href=\"game/app/struct.App.html\" title=\"struct game::app::App\">App</a>&gt; for <a class=\"struct\" href=\"game/sandbox/gameplay/actdev/struct.About.html\" title=\"struct game::sandbox::gameplay::actdev::About\">About</a>","synthetic":false,"types":["game::sandbox::gameplay::actdev::About"]},{"text":"impl SimpleState&lt;<a class=\"struct\" href=\"game/app/struct.App.html\" title=\"struct game::app::App\">App</a>&gt; for <a class=\"struct\" href=\"game/sandbox/gameplay/freeform/struct.ChangeScenario.html\" title=\"struct game::sandbox::gameplay::freeform::ChangeScenario\">ChangeScenario</a>","synthetic":false,"types":["game::sandbox::gameplay::freeform::ChangeScenario"]},{"text":"impl SimpleState&lt;<a class=\"struct\" href=\"game/app/struct.App.html\" title=\"struct game::app::App\">App</a>&gt; for <a class=\"struct\" href=\"game/sandbox/gameplay/play_scenario/struct.DepartureSummary.html\" title=\"struct game::sandbox::gameplay::play_scenario::DepartureSummary\">DepartureSummary</a>","synthetic":false,"types":["game::sandbox::gameplay::play_scenario::DepartureSummary"]}];
implementors["map_editor"] = [{"text":"impl SimpleState&lt;<a class=\"struct\" href=\"map_editor/struct.App.html\" title=\"struct map_editor::App\">App</a>&gt; for <a class=\"struct\" href=\"map_editor/edit/struct.EditRoad.html\" title=\"struct map_editor::edit::EditRoad\">EditRoad</a>","synthetic":false,"types":["map_editor::edit::EditRoad"]}];
implementors["santa"] = [{"text":"impl SimpleState&lt;SimpleApp&lt;<a class=\"struct\" href=\"santa/session/struct.Session.html\" title=\"struct santa::session::Session\">Session</a>&gt;&gt; for <a class=\"struct\" href=\"santa/after_level/struct.Strategize.html\" title=\"struct santa::after_level::Strategize\">Strategize</a>","synthetic":false,"types":["santa::after_level::Strategize"]},{"text":"impl SimpleState&lt;SimpleApp&lt;<a class=\"struct\" href=\"santa/session/struct.Session.html\" title=\"struct santa::session::Session\">Session</a>&gt;&gt; for <a class=\"struct\" href=\"santa/after_level/struct.Results.html\" title=\"struct santa::after_level::Results\">Results</a>","synthetic":false,"types":["santa::after_level::Results"]},{"text":"impl SimpleState&lt;SimpleApp&lt;<a class=\"struct\" href=\"santa/session/struct.Session.html\" title=\"struct santa::session::Session\">Session</a>&gt;&gt; for <a class=\"struct\" href=\"santa/title/struct.TitleScreen.html\" title=\"struct santa::title::TitleScreen\">TitleScreen</a>","synthetic":false,"types":["santa::title::TitleScreen"]},{"text":"impl SimpleState&lt;SimpleApp&lt;<a class=\"struct\" href=\"santa/session/struct.Session.html\" title=\"struct santa::session::Session\">Session</a>&gt;&gt; for <a class=\"struct\" href=\"santa/title/struct.Credits.html\" title=\"struct santa::title::Credits\">Credits</a>","synthetic":false,"types":["santa::title::Credits"]}];
implementors["santa"] = [{"text":"impl SimpleState&lt;<a class=\"struct\" href=\"map_gui/simple_app/struct.SimpleApp.html\" title=\"struct map_gui::simple_app::SimpleApp\">SimpleApp</a>&lt;<a class=\"struct\" href=\"santa/session/struct.Session.html\" title=\"struct santa::session::Session\">Session</a>&gt;&gt; for <a class=\"struct\" href=\"santa/after_level/struct.Strategize.html\" title=\"struct santa::after_level::Strategize\">Strategize</a>","synthetic":false,"types":["santa::after_level::Strategize"]},{"text":"impl SimpleState&lt;<a class=\"struct\" href=\"map_gui/simple_app/struct.SimpleApp.html\" title=\"struct map_gui::simple_app::SimpleApp\">SimpleApp</a>&lt;<a class=\"struct\" href=\"santa/session/struct.Session.html\" title=\"struct santa::session::Session\">Session</a>&gt;&gt; for <a class=\"struct\" href=\"santa/after_level/struct.Results.html\" title=\"struct santa::after_level::Results\">Results</a>","synthetic":false,"types":["santa::after_level::Results"]},{"text":"impl SimpleState&lt;<a class=\"struct\" href=\"map_gui/simple_app/struct.SimpleApp.html\" title=\"struct map_gui::simple_app::SimpleApp\">SimpleApp</a>&lt;<a class=\"struct\" href=\"santa/session/struct.Session.html\" title=\"struct santa::session::Session\">Session</a>&gt;&gt; for <a class=\"struct\" href=\"santa/title/struct.TitleScreen.html\" title=\"struct santa::title::TitleScreen\">TitleScreen</a>","synthetic":false,"types":["santa::title::TitleScreen"]},{"text":"impl SimpleState&lt;<a class=\"struct\" href=\"map_gui/simple_app/struct.SimpleApp.html\" title=\"struct map_gui::simple_app::SimpleApp\">SimpleApp</a>&lt;<a class=\"struct\" href=\"santa/session/struct.Session.html\" title=\"struct santa::session::Session\">Session</a>&gt;&gt; for <a class=\"struct\" href=\"santa/title/struct.Credits.html\" title=\"struct santa::title::Credits\">Credits</a>","synthetic":false,"types":["santa::title::Credits"]}];
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()

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

@ -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 `explain_upzoning` fn in crate `santa`."><meta name="keywords" content="rust, rustlang, rust-lang, explain_upzoning"><title>explain_upzoning in santa::before_level - 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='../../santa/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">santa</a>::<wbr><a href="index.html">before_level</a></h2><div id="sidebar-vars" data-name="explain_upzoning" 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">santa</a>::<wbr><a href="index.html">before_level</a>::<wbr><a class="fn" href="#">explain_upzoning</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/santa/before_level.rs.html#370-383" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn explain_upzoning(ctx: &amp;mut EventCtx&lt;'_&gt;) -&gt; Transition&lt;SimpleApp&lt;<a class="struct" href="../session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;&gt;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="santa" 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='../../santa/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">santa</a>::<wbr><a href="index.html">before_level</a></h2><div id="sidebar-vars" data-name="explain_upzoning" 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">santa</a>::<wbr><a href="index.html">before_level</a>::<wbr><a class="fn" href="#">explain_upzoning</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/santa/before_level.rs.html#370-383" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn explain_upzoning(ctx: &amp;mut EventCtx&lt;'_&gt;) -&gt; Transition&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;&gt;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="santa" 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_upzone_panel` fn in crate `santa`."><meta name="keywords" content="rust, rustlang, rust-lang, make_upzone_panel"><title>make_upzone_panel in santa::before_level - 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='../../santa/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">santa</a>::<wbr><a href="index.html">before_level</a></h2><div id="sidebar-vars" data-name="make_upzone_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">santa</a>::<wbr><a href="index.html">before_level</a>::<wbr><a class="fn" href="#">make_upzone_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/santa/before_level.rs.html#299-368" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_upzone_panel(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;SimpleApp&lt;<a class="struct" href="../session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;num_picked: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a><br>) -&gt; Panel</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="santa" 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='../../santa/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">santa</a>::<wbr><a href="index.html">before_level</a></h2><div id="sidebar-vars" data-name="make_upzone_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">santa</a>::<wbr><a href="index.html">before_level</a>::<wbr><a class="fn" href="#">make_upzone_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/santa/before_level.rs.html#299-368" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_upzone_panel(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;num_picked: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a><br>) -&gt; Panel</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="santa" 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_vehicle_panel` fn in crate `santa`."><meta name="keywords" content="rust, rustlang, rust-lang, make_vehicle_panel"><title>make_vehicle_panel in santa::before_level - 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='../../santa/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">santa</a>::<wbr><a href="index.html">before_level</a></h2><div id="sidebar-vars" data-name="make_vehicle_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">santa</a>::<wbr><a href="index.html">before_level</a>::<wbr><a class="fn" href="#">make_vehicle_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/santa/before_level.rs.html#236-297" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_vehicle_panel(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;SimpleApp&lt;<a class="struct" href="../session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;) -&gt; Panel</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="santa" 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='../../santa/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">santa</a>::<wbr><a href="index.html">before_level</a></h2><div id="sidebar-vars" data-name="make_vehicle_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">santa</a>::<wbr><a href="index.html">before_level</a>::<wbr><a class="fn" href="#">make_vehicle_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/santa/before_level.rs.html#236-297" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_vehicle_panel(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;) -&gt; Panel</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="santa" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>

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

@ -5,7 +5,7 @@
Road(<a class="struct" href="../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>,&nbsp;<a class="struct" href="../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>,&nbsp;<a class="enum" href="../../map_model/objects/road/enum.Direction.html" title="enum map_model::objects::road::Direction">Direction</a>),
}</pre></div><h2 id="variants" class="variants small-section-header">
Variants<a href="#variants" class="anchor"></a></h2>
<div id="variant.Intersection" class="variant small-section-header"><a href="#variant.Intersection" class="anchor field"></a><code>Intersection(<a class="struct" href="../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>)</code></div><div id="variant.Road" class="variant small-section-header"><a href="#variant.Road" class="anchor field"></a><code>Road(<a class="struct" href="../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>,&nbsp;<a class="struct" href="../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>,&nbsp;<a class="enum" href="../../map_model/objects/road/enum.Direction.html" title="enum map_model::objects::road::Direction">Direction</a>)</code></div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="enum" href="enum.On.html" title="enum santa::player::On">On</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#230-256" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.get_connections" class="method has-srclink"><h4 class="code-header">fn <a href="#method.get_connections" class="fnname">get_connections</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;SimpleApp&lt;<a class="struct" href="../session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;<br>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html">(</a><a class="struct" href="https://doc.rust-lang.org/1.54.0/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a>&lt;<a class="struct" href="../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>&gt;, <a class="struct" href="https://doc.rust-lang.org/1.54.0/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a>&lt;<a class="struct" href="../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>&gt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html">)</a></h4><a href="#method.get_connections" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#231-255" title="goto source code">[src]</a></div></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Clone" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="enum.On.html" title="enum santa::player::On">On</a></h3><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#223" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="enum" href="enum.On.html" title="enum santa::player::On">On</a></h4><a href="#method.clone" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#223" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
<div id="variant.Intersection" class="variant small-section-header"><a href="#variant.Intersection" class="anchor field"></a><code>Intersection(<a class="struct" href="../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>)</code></div><div id="variant.Road" class="variant small-section-header"><a href="#variant.Road" class="anchor field"></a><code>Road(<a class="struct" href="../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>,&nbsp;<a class="struct" href="../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>,&nbsp;<a class="enum" href="../../map_model/objects/road/enum.Direction.html" title="enum map_model::objects::road::Direction">Direction</a>)</code></div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="enum" href="enum.On.html" title="enum santa::player::On">On</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#230-256" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.get_connections" class="method has-srclink"><h4 class="code-header">fn <a href="#method.get_connections" class="fnname">get_connections</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;<br>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html">(</a><a class="struct" href="https://doc.rust-lang.org/1.54.0/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a>&lt;<a class="struct" href="../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>&gt;, <a class="struct" href="https://doc.rust-lang.org/1.54.0/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a>&lt;<a class="struct" href="../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>&gt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html">)</a></h4><a href="#method.get_connections" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#231-255" title="goto source code">[src]</a></div></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Clone" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="enum.On.html" title="enum santa::player::On">On</a></h3><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#223" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="enum" href="enum.On.html" title="enum santa::player::On">On</a></h4><a href="#method.clone" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#223" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_from" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</a>Self)</h4><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.clone_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/clone.rs.html#130" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-PartialEq%3COn%3E" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="enum" href="enum.On.html" title="enum santa::player::On">On</a>&gt; for <a class="enum" href="enum.On.html" title="enum santa::player::On">On</a></h3><a href="#impl-PartialEq%3COn%3E" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#223" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.eq" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="enum" href="enum.On.html" title="enum santa::player::On">On</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.eq" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#223" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>. <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>

File diff suppressed because one or more lines are too long

View File

@ -7,8 +7,8 @@
bldgs_along_road: <a class="struct" href="struct.BuildingsAlongRoad.html" title="struct santa::player::BuildingsAlongRoad">BuildingsAlongRoad</a>,
controls: <a class="struct" href="../controls/struct.InstantController.html" title="struct santa::controls::InstantController">InstantController</a>,
}</pre></div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.pos" class="structfield small-section-header"><a href="#structfield.pos" class="anchor field"></a><code>pos: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a></code></span><span id="structfield.facing" class="structfield small-section-header"><a href="#structfield.facing" class="anchor field"></a><code>facing: <a class="struct" href="../../geom/angle/struct.Angle.html" title="struct geom::angle::Angle">Angle</a></code></span><span id="structfield.on" class="structfield small-section-header"><a href="#structfield.on" class="anchor field"></a><code>on: <a class="enum" href="enum.On.html" title="enum santa::player::On">On</a></code></span><span id="structfield.bldgs_along_road" class="structfield small-section-header"><a href="#structfield.bldgs_along_road" class="anchor field"></a><code>bldgs_along_road: <a class="struct" href="struct.BuildingsAlongRoad.html" title="struct santa::player::BuildingsAlongRoad">BuildingsAlongRoad</a></code></span><span id="structfield.controls" class="structfield small-section-header"><a href="#structfield.controls" class="anchor field"></a><code>controls: <a class="struct" href="../controls/struct.InstantController.html" title="struct santa::controls::InstantController">InstantController</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="struct" href="struct.Player.html" title="struct santa::player::Player">Player</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#23-221" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.new" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;SimpleApp&lt;<a class="struct" href="../session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;start: <a class="struct" href="../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a><br>) -&gt; <a class="struct" href="struct.Player.html" title="struct santa::player::Player">Player</a></h4><a href="#method.new" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#24-37" title="goto source code">[src]</a></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.update_with_speed" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.update_with_speed" class="fnname">update_with_speed</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;SimpleApp&lt;<a class="struct" href="../session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;speed: <a class="struct" href="../../geom/speed/struct.Speed.html" title="struct geom::speed::Speed">Speed</a><br>) -&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/building/struct.BuildingID.html" title="struct map_model::objects::building::BuildingID">BuildingID</a>&gt;</h4><a href="#method.update_with_speed" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#40-52" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Returns any buildings we passed</p>
</div></details><div id="method.pos_to_on" class="method has-srclink"><h4 class="code-header">fn <a href="#method.pos_to_on" class="fnname">pos_to_on</a>(&amp;self, app: &amp;SimpleApp&lt;<a class="struct" href="../session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;, pos: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="enum.On.html" title="enum santa::player::On">On</a>&gt;</h4><a href="#method.pos_to_on" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#54-98" title="goto source code">[src]</a></div><div id="method.apply_displacement" class="method has-srclink"><h4 class="code-header">fn <a href="#method.apply_displacement" class="fnname">apply_displacement</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;SimpleApp&lt;<a class="struct" href="../session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;dx: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;dy: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;recurse: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a><br>) -&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/building/struct.BuildingID.html" title="struct map_model::objects::building::BuildingID">BuildingID</a>&gt;</h4><a href="#method.apply_displacement" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#100-191" title="goto source code">[src]</a></div><div id="method.get_pos" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.get_pos" class="fnname">get_pos</a>(&amp;self) -&gt; <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a></h4><a href="#method.get_pos" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#193-195" title="goto source code">[src]</a></div><div id="method.get_angle" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.get_angle" class="fnname">get_angle</a>(&amp;self) -&gt; <a class="struct" href="../../geom/angle/struct.Angle.html" title="struct geom::angle::Angle">Angle</a></h4><a href="#method.get_angle" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#197-199" title="goto source code">[src]</a></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_good_road" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.on_good_road" class="fnname">on_good_road</a>(&amp;self, app: &amp;SimpleApp&lt;<a class="struct" href="../session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.on_good_road" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#202-215" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Is the player currently on a road with a bus or bike lane?</p>
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.pos" class="structfield small-section-header"><a href="#structfield.pos" class="anchor field"></a><code>pos: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a></code></span><span id="structfield.facing" class="structfield small-section-header"><a href="#structfield.facing" class="anchor field"></a><code>facing: <a class="struct" href="../../geom/angle/struct.Angle.html" title="struct geom::angle::Angle">Angle</a></code></span><span id="structfield.on" class="structfield small-section-header"><a href="#structfield.on" class="anchor field"></a><code>on: <a class="enum" href="enum.On.html" title="enum santa::player::On">On</a></code></span><span id="structfield.bldgs_along_road" class="structfield small-section-header"><a href="#structfield.bldgs_along_road" class="anchor field"></a><code>bldgs_along_road: <a class="struct" href="struct.BuildingsAlongRoad.html" title="struct santa::player::BuildingsAlongRoad">BuildingsAlongRoad</a></code></span><span id="structfield.controls" class="structfield small-section-header"><a href="#structfield.controls" class="anchor field"></a><code>controls: <a class="struct" href="../controls/struct.InstantController.html" title="struct santa::controls::InstantController">InstantController</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="struct" href="struct.Player.html" title="struct santa::player::Player">Player</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#23-221" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.new" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;start: <a class="struct" href="../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a><br>) -&gt; <a class="struct" href="struct.Player.html" title="struct santa::player::Player">Player</a></h4><a href="#method.new" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#24-37" title="goto source code">[src]</a></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.update_with_speed" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.update_with_speed" class="fnname">update_with_speed</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;speed: <a class="struct" href="../../geom/speed/struct.Speed.html" title="struct geom::speed::Speed">Speed</a><br>) -&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/building/struct.BuildingID.html" title="struct map_model::objects::building::BuildingID">BuildingID</a>&gt;</h4><a href="#method.update_with_speed" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#40-52" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Returns any buildings we passed</p>
</div></details><div id="method.pos_to_on" class="method has-srclink"><h4 class="code-header">fn <a href="#method.pos_to_on" class="fnname">pos_to_on</a>(&amp;self, app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;, pos: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="enum.On.html" title="enum santa::player::On">On</a>&gt;</h4><a href="#method.pos_to_on" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#54-98" title="goto source code">[src]</a></div><div id="method.apply_displacement" class="method has-srclink"><h4 class="code-header">fn <a href="#method.apply_displacement" class="fnname">apply_displacement</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;dx: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;dy: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;recurse: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a><br>) -&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/building/struct.BuildingID.html" title="struct map_model::objects::building::BuildingID">BuildingID</a>&gt;</h4><a href="#method.apply_displacement" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#100-191" title="goto source code">[src]</a></div><div id="method.get_pos" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.get_pos" class="fnname">get_pos</a>(&amp;self) -&gt; <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a></h4><a href="#method.get_pos" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#193-195" title="goto source code">[src]</a></div><div id="method.get_angle" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.get_angle" class="fnname">get_angle</a>(&amp;self) -&gt; <a class="struct" href="../../geom/angle/struct.Angle.html" title="struct geom::angle::Angle">Angle</a></h4><a href="#method.get_angle" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#197-199" title="goto source code">[src]</a></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_good_road" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.on_good_road" class="fnname">on_good_road</a>(&amp;self, app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.on_good_road" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#202-215" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Is the player currently on a road with a bus or bike lane?</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.override_pos" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.override_pos" class="fnname">override_pos</a>(&amp;mut self, pos: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>)</h4><a href="#method.override_pos" class="anchor"></a><a class="srclink" href="../../src/santa/player.rs.html#218-220" title="goto source code">[src]</a></div></summary><div class="docblock"><p>For the game over animation</p>
</div></details></div></details><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Player.html" title="struct santa::player::Player">Player</a></h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Player.html" title="struct santa::player::Player">Player</a></h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Player.html" title="struct santa::player::Player">Player</a></h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Player.html" title="struct santa::player::Player">Player</a></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Player.html" title="struct santa::player::Player">Player</a></h3><a href="#impl-UnwindSafe" class="anchor"></a></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Any" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h3><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#131-135" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#132" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h3><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</a>T</h4><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>

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 `level_btn` fn in crate `santa`."><meta name="keywords" content="rust, rustlang, rust-lang, level_btn"><title>level_btn in santa::title - 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='../../santa/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">santa</a>::<wbr><a href="index.html">title</a></h2><div id="sidebar-vars" data-name="level_btn" 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">santa</a>::<wbr><a href="index.html">title</a>::<wbr><a class="fn" href="#">level_btn</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/santa/title.rs.html#109-129" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn level_btn(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;SimpleApp&lt;<a class="struct" href="../session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;level: &amp;<a class="struct" href="../levels/struct.Level.html" title="struct santa::levels::Level">Level</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;idx: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a><br>) -&gt; GeomBatch</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="santa" 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='../../santa/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">santa</a>::<wbr><a href="index.html">title</a></h2><div id="sidebar-vars" data-name="level_btn" 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">santa</a>::<wbr><a href="index.html">title</a>::<wbr><a class="fn" href="#">level_btn</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/santa/title.rs.html#109-129" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn level_btn(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;level: &amp;<a class="struct" href="../levels/struct.Level.html" title="struct santa::levels::Level">Level</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;idx: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a><br>) -&gt; GeomBatch</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="santa" 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 `locked_level` fn in crate `santa`."><meta name="keywords" content="rust, rustlang, rust-lang, locked_level"><title>locked_level in santa::title - 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='../../santa/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">santa</a>::<wbr><a href="index.html">title</a></h2><div id="sidebar-vars" data-name="locked_level" 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">santa</a>::<wbr><a href="index.html">title</a>::<wbr><a class="fn" href="#">locked_level</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/santa/title.rs.html#132-139" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn locked_level(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;SimpleApp&lt;<a class="struct" href="../session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;level: &amp;<a class="struct" href="../levels/struct.Level.html" title="struct santa::levels::Level">Level</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;idx: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a><br>) -&gt; Widget</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="santa" 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='../../santa/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">santa</a>::<wbr><a href="index.html">title</a></h2><div id="sidebar-vars" data-name="locked_level" 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">santa</a>::<wbr><a href="index.html">title</a>::<wbr><a class="fn" href="#">locked_level</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/santa/title.rs.html#132-139" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn locked_level(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;level: &amp;<a class="struct" href="../levels/struct.Level.html" title="struct santa::levels::Level">Level</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;idx: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a><br>) -&gt; Widget</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="santa" 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 `unlocked_level` fn in crate `santa`."><meta name="keywords" content="rust, rustlang, rust-lang, unlocked_level"><title>unlocked_level in santa::title - 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='../../santa/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">santa</a>::<wbr><a href="index.html">title</a></h2><div id="sidebar-vars" data-name="unlocked_level" 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">santa</a>::<wbr><a href="index.html">title</a>::<wbr><a class="fn" href="#">unlocked_level</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/santa/title.rs.html#141-151" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn unlocked_level(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;SimpleApp&lt;<a class="struct" href="../session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;level: &amp;<a class="struct" href="../levels/struct.Level.html" title="struct santa::levels::Level">Level</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;idx: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a><br>) -&gt; Widget</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="santa" 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='../../santa/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">santa</a>::<wbr><a href="index.html">title</a></h2><div id="sidebar-vars" data-name="unlocked_level" 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">santa</a>::<wbr><a href="index.html">title</a>::<wbr><a class="fn" href="#">unlocked_level</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/santa/title.rs.html#141-151" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn unlocked_level(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;level: &amp;<a class="struct" href="../levels/struct.Level.html" title="struct santa::levels::Level">Level</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;idx: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a><br>) -&gt; Widget</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="santa" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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 `App` type in crate `santa`."><meta name="keywords" content="rust, rustlang, rust-lang, App"><title>App in santa - 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 type"><!--[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='../santa/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Type Definition App</h2><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="index.html">santa</a></h2><div id="sidebar-vars" data-name="App" data-ty="type" 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">Type Definition <a href="index.html">santa</a>::<wbr><a class="type" href="#">App</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/santa/lib.rs.html#22" title="goto source code">[src]</a></span></h1><pre class="rust typedef">type App = SimpleApp&lt;<a class="struct" href="session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="santa" 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 type"><!--[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='../santa/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Type Definition App</h2><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="index.html">santa</a></h2><div id="sidebar-vars" data-name="App" data-ty="type" 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">Type Definition <a href="index.html">santa</a>::<wbr><a class="type" href="#">App</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/santa/lib.rs.html#22" title="goto source code">[src]</a></span></h1><pre class="rust typedef">type App = <a class="struct" href="../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="santa" 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 `Transition` type in crate `santa`."><meta name="keywords" content="rust, rustlang, rust-lang, Transition"><title>Transition in santa - 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 type"><!--[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='../santa/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Type Definition Transition</h2><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="index.html">santa</a></h2><div id="sidebar-vars" data-name="Transition" data-ty="type" 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">Type Definition <a href="index.html">santa</a>::<wbr><a class="type" href="#">Transition</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/santa/lib.rs.html#23" title="goto source code">[src]</a></span></h1><pre class="rust typedef">type Transition = Transition&lt;SimpleApp&lt;<a class="struct" href="session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;&gt;;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="santa" 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 type"><!--[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='../santa/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Type Definition Transition</h2><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="index.html">santa</a></h2><div id="sidebar-vars" data-name="Transition" data-ty="type" 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">Type Definition <a href="index.html">santa</a>::<wbr><a class="type" href="#">Transition</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/santa/lib.rs.html#23" title="goto source code">[src]</a></span></h1><pre class="rust typedef">type Transition = Transition&lt;<a class="struct" href="../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="session/struct.Session.html" title="struct santa::session::Session">Session</a>&gt;&gt;;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="santa" data-search-index-js="../search-index.js" data-search-js="../search.js"></div><script src="../main.js"></script></body></html>

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":["heuristics.rs","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":["labels.rs","layers.rs","magnifying.rs","mod.rs","quick_sketch.rs","route.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":["heuristics.rs","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":["bike_network.rs","labels.rs","layers.rs","magnifying.rs","mod.rs","quick_sketch.rs","route.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;Tue, 24 Aug 2021 19:02:02 +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;Tue, 24 Aug 2021 20:31:05 +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

@ -0,0 +1,259 @@
<!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/bike_network.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>bike_network.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>
<span id="74"> 74</span>
<span id="75"> 75</span>
<span id="76"> 76</span>
<span id="77"> 77</span>
<span id="78"> 78</span>
<span id="79"> 79</span>
<span id="80"> 80</span>
<span id="81"> 81</span>
<span id="82"> 82</span>
<span id="83"> 83</span>
<span id="84"> 84</span>
<span id="85"> 85</span>
<span id="86"> 86</span>
<span id="87"> 87</span>
<span id="88"> 88</span>
<span id="89"> 89</span>
<span id="90"> 90</span>
<span id="91"> 91</span>
<span id="92"> 92</span>
<span id="93"> 93</span>
<span id="94"> 94</span>
<span id="95"> 95</span>
<span id="96"> 96</span>
<span id="97"> 97</span>
<span id="98"> 98</span>
<span id="99"> 99</span>
<span id="100">100</span>
<span id="101">101</span>
<span id="102">102</span>
<span id="103">103</span>
<span id="104">104</span>
<span id="105">105</span>
<span id="106">106</span>
<span id="107">107</span>
<span id="108">108</span>
<span id="109">109</span>
<span id="110">110</span>
<span id="111">111</span>
<span id="112">112</span>
<span id="113">113</span>
<span id="114">114</span>
<span id="115">115</span>
<span id="116">116</span>
<span id="117">117</span>
<span id="118">118</span>
<span id="119">119</span>
<span id="120">120</span>
<span id="121">121</span>
<span id="122">122</span>
<span id="123">123</span>
<span id="124">124</span>
<span id="125">125</span>
<span id="126">126</span>
<span id="127">127</span>
</pre><pre class="rust">
<span class="kw">use</span> <span class="ident">std::cell::RefCell</span>;
<span class="kw">use</span> <span class="ident">std::collections::HashMap</span>;
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">LaneType</span>, <span class="ident">PathConstraints</span>, <span class="ident">Road</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="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>};
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::app::App</span>;
<span class="macro">lazy_static::lazy_static!</span> {
<span class="kw">pub</span> <span class="kw">static</span> <span class="kw-2">ref</span> <span class="ident">DEDICATED_TRAIL</span>: <span class="ident">Color</span> <span class="op">=</span> <span class="ident">Color::GREEN</span>;
<span class="kw">pub</span> <span class="kw">static</span> <span class="kw-2">ref</span> <span class="ident">PROTECTED_BIKE_LANE</span>: <span class="ident">Color</span> <span class="op">=</span> <span class="ident">Color::hex</span>(<span class="string">&quot;#A4DE02&quot;</span>);
<span class="kw">pub</span> <span class="kw">static</span> <span class="kw-2">ref</span> <span class="ident">PAINTED_BIKE_LANE</span>: <span class="ident">Color</span> <span class="op">=</span> <span class="ident">Color::hex</span>(<span class="string">&quot;#76BA1B&quot;</span>);
<span class="kw">pub</span> <span class="kw">static</span> <span class="kw-2">ref</span> <span class="ident">GREENWAY</span>: <span class="ident">Color</span> <span class="op">=</span> <span class="ident">Color::hex</span>(<span class="string">&quot;#4C9A2A&quot;</span>);
<span class="kw">pub</span> <span class="kw">static</span> <span class="kw-2">ref</span> <span class="ident">EDITED_COLOR</span>: <span class="ident">Color</span> <span class="op">=</span> <span class="ident">Color::CYAN</span>;
}
<span class="doccomment">/// Shows the bike network while unzoomed. Handles thickening the roads at low zoom levels.</span>
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">DrawNetworkLayer</span> {
<span class="ident">per_zoom</span>: <span class="ident">RefCell</span><span class="op">&lt;</span>[<span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Drawable</span><span class="op">&gt;</span>; <span class="number">11</span>]<span class="op">&gt;</span>,
}
<span class="kw">impl</span> <span class="ident">DrawNetworkLayer</span> {
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>() <span class="op">-</span><span class="op">&gt;</span> <span class="ident">DrawNetworkLayer</span> {
<span class="ident">DrawNetworkLayer</span> {
<span class="ident">per_zoom</span>: <span class="ident">Default::default</span>(),
}
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>) {
<span class="kw">let</span> (<span class="ident">zoom</span>, <span class="ident">idx</span>) <span class="op">=</span> <span class="ident">DrawNetworkLayer::discretize_zoom</span>(<span class="ident">g</span>.<span class="ident">canvas</span>.<span class="ident">cam_zoom</span>);
<span class="kw">let</span> <span class="ident">value</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>.<span class="ident">per_zoom</span>.<span class="ident">borrow_mut</span>()[<span class="ident">idx</span>];
<span class="kw">if</span> <span class="ident">value</span>.<span class="ident">is_none</span>() {
<span class="kw-2">*</span><span class="ident">value</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">DrawNetworkLayer::render_network_layer</span>(<span class="ident">g</span>, <span class="ident">app</span>, <span class="ident">zoom</span>));
}
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="ident">value</span>.<span class="ident">as_ref</span>().<span class="ident">unwrap</span>());
}
<span class="comment">// Continuously changing road width as we zoom looks great, but it&#39;s terribly slow. We&#39;d have</span>
<span class="comment">// to move line thickening into the shader to do it better. So recalculate with less</span>
<span class="comment">// granularity.</span>
<span class="kw">fn</span> <span class="ident">discretize_zoom</span>(<span class="ident">zoom</span>: <span class="ident">f64</span>) <span class="op">-</span><span class="op">&gt;</span> (<span class="ident">f64</span>, <span class="ident">usize</span>) {
<span class="kw">if</span> <span class="ident">zoom</span> <span class="op">&gt;</span><span class="op">=</span> <span class="number">1.0</span> {
<span class="kw">return</span> (<span class="number">1.0</span>, <span class="number">10</span>);
}
<span class="kw">let</span> <span class="ident">rounded</span> <span class="op">=</span> (<span class="ident">zoom</span> <span class="op">*</span> <span class="number">10.0</span>).<span class="ident">round</span>();
<span class="kw">let</span> <span class="ident">idx</span> <span class="op">=</span> <span class="ident">rounded</span> <span class="kw">as</span> <span class="ident">usize</span>;
(<span class="ident">rounded</span> <span class="op">/</span> <span class="number">10.0</span>, <span class="ident">idx</span>)
}
<span class="kw">fn</span> <span class="ident">render_network_layer</span>(<span class="ident">g</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>, <span class="ident">zoom</span>: <span class="ident">f64</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Drawable</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">GeomBatch::new</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="comment">// The basemap colors are beautiful, but we want to emphasize the bike network, so all&#39;s foggy</span>
<span class="comment">// in love and war...</span>
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">Color::BLACK</span>.<span class="ident">alpha</span>(<span class="number">0.4</span>), <span class="ident">map</span>.<span class="ident">get_boundary_polygon</span>().<span class="ident">clone</span>());
<span class="comment">// Thicker lines as we zoom out. Scale up to 5x. Never shrink past the road&#39;s actual width</span>
<span class="kw">let</span> <span class="ident">thickness</span> <span class="op">=</span> (<span class="number">0.5</span> <span class="op">/</span> <span class="ident">zoom</span>).<span class="ident">max</span>(<span class="number">1.0</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">intersections</span> <span class="op">=</span> <span class="ident">HashMap::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">let</span> <span class="kw-2">mut</span> <span class="ident">bike_lane</span> <span class="op">=</span> <span class="bool-val">false</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buffer</span> <span class="op">=</span> <span class="bool-val">false</span>;
<span class="kw">for</span> (<span class="kw">_</span>, <span class="kw">_</span>, <span class="ident">lt</span>) <span class="kw">in</span> <span class="ident">r</span>.<span class="ident">lanes_ltr</span>() {
<span class="kw">if</span> <span class="ident">lt</span> <span class="op">=</span><span class="op">=</span> <span class="ident">LaneType::Biking</span> {
<span class="ident">bike_lane</span> <span class="op">=</span> <span class="bool-val">true</span>;
} <span class="kw">else</span> <span class="kw">if</span> <span class="macro">matches!</span>(<span class="ident">lt</span>, <span class="ident">LaneType::Buffer</span>(<span class="kw">_</span>)) {
<span class="ident">buffer</span> <span class="op">=</span> <span class="bool-val">true</span>;
}
}
<span class="kw">let</span> <span class="ident">color</span> <span class="op">=</span> <span class="kw">if</span> <span class="ident">r</span>.<span class="ident">is_cycleway</span>() {
<span class="kw-2">*</span><span class="ident">DEDICATED_TRAIL</span>
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">bike_lane</span> <span class="op">&amp;&amp;</span> <span class="ident">buffer</span> {
<span class="kw-2">*</span><span class="ident">PROTECTED_BIKE_LANE</span>
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">bike_lane</span> {
<span class="kw-2">*</span><span class="ident">PAINTED_BIKE_LANE</span>
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">is_greenway</span>(<span class="ident">r</span>) {
<span class="kw-2">*</span><span class="ident">GREENWAY</span>
} <span class="kw">else</span> {
<span class="kw">continue</span>;
};
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">color</span>,
<span class="ident">r</span>.<span class="ident">center_pts</span>.<span class="ident">make_polygons</span>(<span class="ident">thickness</span> <span class="op">*</span> <span class="ident">r</span>.<span class="ident">get_width</span>(<span class="ident">map</span>)),
);
<span class="comment">// Arbitrarily pick a color when two different types of roads meet</span>
<span class="ident">intersections</span>.<span class="ident">insert</span>(<span class="ident">r</span>.<span class="ident">src_i</span>, <span class="ident">color</span>);
<span class="ident">intersections</span>.<span class="ident">insert</span>(<span class="ident">r</span>.<span class="ident">dst_i</span>, <span class="ident">color</span>);
}
<span class="kw">for</span> (<span class="ident">i</span>, <span class="ident">color</span>) <span class="kw">in</span> <span class="ident">intersections</span> {
<span class="comment">// No clear way to thicken the intersection at different zoom levels</span>
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">color</span>, <span class="ident">map</span>.<span class="ident">get_i</span>(<span class="ident">i</span>).<span class="ident">polygon</span>.<span class="ident">clone</span>());
}
<span class="ident">g</span>.<span class="ident">upload</span>(<span class="ident">batch</span>)
}
}
<span class="comment">// TODO Check how other greenways are tagged.</span>
<span class="comment">// https://www.openstreetmap.org/way/262778812 has bicycle=designated, cycleway=shared_lane...</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">is_greenway</span>(<span class="ident">road</span>: <span class="kw-2">&amp;</span><span class="ident">Road</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">bool</span> {
<span class="op">!</span><span class="ident">road</span>
.<span class="ident">access_restrictions</span>
.<span class="ident">allow_through_traffic</span>
.<span class="ident">contains</span>(<span class="ident">PathConstraints::Car</span>)
<span class="op">&amp;&amp;</span> <span class="ident">road</span>
.<span class="ident">access_restrictions</span>
.<span class="ident">allow_through_traffic</span>
.<span class="ident">contains</span>(<span class="ident">PathConstraints::Bike</span>)
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">render_edits</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">Drawable</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">GeomBatch::new</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">for</span> <span class="ident">r</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">map</span>.<span class="ident">get_edits</span>().<span class="ident">changed_roads</span> {
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">EDITED_COLOR</span>.<span class="ident">alpha</span>(<span class="number">0.5</span>),
<span class="ident">map</span>.<span class="ident">get_r</span>(<span class="kw-2">*</span><span class="ident">r</span>).<span class="ident">get_thick_polygon</span>(<span class="ident">map</span>),
);
}
<span class="ident">batch</span>.<span class="ident">upload</span>(<span class="ident">ctx</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>

View File

@ -132,75 +132,343 @@
<span id="130">130</span>
<span id="131">131</span>
<span id="132">132</span>
<span id="133">133</span>
<span id="134">134</span>
<span id="135">135</span>
<span id="136">136</span>
<span id="137">137</span>
<span id="138">138</span>
<span id="139">139</span>
<span id="140">140</span>
<span id="141">141</span>
<span id="142">142</span>
<span id="143">143</span>
<span id="144">144</span>
<span id="145">145</span>
<span id="146">146</span>
<span id="147">147</span>
<span id="148">148</span>
<span id="149">149</span>
<span id="150">150</span>
<span id="151">151</span>
<span id="152">152</span>
<span id="153">153</span>
<span id="154">154</span>
<span id="155">155</span>
<span id="156">156</span>
<span id="157">157</span>
<span id="158">158</span>
<span id="159">159</span>
<span id="160">160</span>
<span id="161">161</span>
<span id="162">162</span>
<span id="163">163</span>
<span id="164">164</span>
<span id="165">165</span>
<span id="166">166</span>
<span id="167">167</span>
<span id="168">168</span>
<span id="169">169</span>
<span id="170">170</span>
<span id="171">171</span>
<span id="172">172</span>
<span id="173">173</span>
<span id="174">174</span>
<span id="175">175</span>
<span id="176">176</span>
<span id="177">177</span>
<span id="178">178</span>
<span id="179">179</span>
<span id="180">180</span>
<span id="181">181</span>
<span id="182">182</span>
<span id="183">183</span>
<span id="184">184</span>
<span id="185">185</span>
<span id="186">186</span>
<span id="187">187</span>
<span id="188">188</span>
<span id="189">189</span>
<span id="190">190</span>
<span id="191">191</span>
<span id="192">192</span>
<span id="193">193</span>
<span id="194">194</span>
<span id="195">195</span>
<span id="196">196</span>
<span id="197">197</span>
<span id="198">198</span>
<span id="199">199</span>
<span id="200">200</span>
<span id="201">201</span>
<span id="202">202</span>
<span id="203">203</span>
<span id="204">204</span>
<span id="205">205</span>
<span id="206">206</span>
<span id="207">207</span>
<span id="208">208</span>
<span id="209">209</span>
<span id="210">210</span>
<span id="211">211</span>
<span id="212">212</span>
<span id="213">213</span>
<span id="214">214</span>
<span id="215">215</span>
<span id="216">216</span>
<span id="217">217</span>
<span id="218">218</span>
<span id="219">219</span>
<span id="220">220</span>
<span id="221">221</span>
<span id="222">222</span>
<span id="223">223</span>
<span id="224">224</span>
<span id="225">225</span>
<span id="226">226</span>
<span id="227">227</span>
<span id="228">228</span>
<span id="229">229</span>
<span id="230">230</span>
<span id="231">231</span>
<span id="232">232</span>
<span id="233">233</span>
<span id="234">234</span>
<span id="235">235</span>
<span id="236">236</span>
<span id="237">237</span>
<span id="238">238</span>
<span id="239">239</span>
<span id="240">240</span>
<span id="241">241</span>
<span id="242">242</span>
<span id="243">243</span>
<span id="244">244</span>
<span id="245">245</span>
<span id="246">246</span>
<span id="247">247</span>
<span id="248">248</span>
<span id="249">249</span>
<span id="250">250</span>
<span id="251">251</span>
<span id="252">252</span>
<span id="253">253</span>
<span id="254">254</span>
<span id="255">255</span>
<span id="256">256</span>
<span id="257">257</span>
<span id="258">258</span>
<span id="259">259</span>
<span id="260">260</span>
<span id="261">261</span>
<span id="262">262</span>
<span id="263">263</span>
<span id="264">264</span>
<span id="265">265</span>
<span id="266">266</span>
<span id="267">267</span>
<span id="268">268</span>
<span id="269">269</span>
<span id="270">270</span>
<span id="271">271</span>
<span id="272">272</span>
<span id="273">273</span>
<span id="274">274</span>
<span id="275">275</span>
<span id="276">276</span>
<span id="277">277</span>
<span id="278">278</span>
<span id="279">279</span>
<span id="280">280</span>
<span id="281">281</span>
<span id="282">282</span>
<span id="283">283</span>
<span id="284">284</span>
<span id="285">285</span>
<span id="286">286</span>
<span id="287">287</span>
<span id="288">288</span>
<span id="289">289</span>
<span id="290">290</span>
<span id="291">291</span>
<span id="292">292</span>
<span id="293">293</span>
<span id="294">294</span>
<span id="295">295</span>
<span id="296">296</span>
<span id="297">297</span>
<span id="298">298</span>
<span id="299">299</span>
<span id="300">300</span>
<span id="301">301</span>
<span id="302">302</span>
<span id="303">303</span>
<span id="304">304</span>
<span id="305">305</span>
<span id="306">306</span>
<span id="307">307</span>
<span id="308">308</span>
<span id="309">309</span>
<span id="310">310</span>
<span id="311">311</span>
<span id="312">312</span>
<span id="313">313</span>
<span id="314">314</span>
<span id="315">315</span>
<span id="316">316</span>
<span id="317">317</span>
<span id="318">318</span>
<span id="319">319</span>
<span id="320">320</span>
<span id="321">321</span>
<span id="322">322</span>
<span id="323">323</span>
<span id="324">324</span>
<span id="325">325</span>
<span id="326">326</span>
<span id="327">327</span>
<span id="328">328</span>
<span id="329">329</span>
<span id="330">330</span>
<span id="331">331</span>
<span id="332">332</span>
<span id="333">333</span>
<span id="334">334</span>
<span id="335">335</span>
<span id="336">336</span>
<span id="337">337</span>
<span id="338">338</span>
<span id="339">339</span>
<span id="340">340</span>
<span id="341">341</span>
<span id="342">342</span>
<span id="343">343</span>
<span id="344">344</span>
<span id="345">345</span>
<span id="346">346</span>
<span id="347">347</span>
<span id="348">348</span>
<span id="349">349</span>
<span id="350">350</span>
<span id="351">351</span>
<span id="352">352</span>
<span id="353">353</span>
<span id="354">354</span>
<span id="355">355</span>
<span id="356">356</span>
<span id="357">357</span>
<span id="358">358</span>
<span id="359">359</span>
<span id="360">360</span>
<span id="361">361</span>
<span id="362">362</span>
<span id="363">363</span>
<span id="364">364</span>
<span id="365">365</span>
<span id="366">366</span>
<span id="367">367</span>
<span id="368">368</span>
<span id="369">369</span>
<span id="370">370</span>
<span id="371">371</span>
<span id="372">372</span>
<span id="373">373</span>
<span id="374">374</span>
<span id="375">375</span>
<span id="376">376</span>
<span id="377">377</span>
<span id="378">378</span>
<span id="379">379</span>
<span id="380">380</span>
<span id="381">381</span>
<span id="382">382</span>
<span id="383">383</span>
<span id="384">384</span>
<span id="385">385</span>
<span id="386">386</span>
<span id="387">387</span>
<span id="388">388</span>
<span id="389">389</span>
<span id="390">390</span>
<span id="391">391</span>
<span id="392">392</span>
<span id="393">393</span>
<span id="394">394</span>
<span id="395">395</span>
<span id="396">396</span>
<span id="397">397</span>
<span id="398">398</span>
<span id="399">399</span>
<span id="400">400</span>
<span id="401">401</span>
<span id="402">402</span>
<span id="403">403</span>
<span id="404">404</span>
<span id="405">405</span>
<span id="406">406</span>
</pre><pre class="rust">
<span class="kw">use</span> <span class="ident">std::cell::RefCell</span>;
<span class="kw">use</span> <span class="ident">std::collections::HashMap</span>;
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">LaneType</span>, <span class="ident">PathConstraints</span>, <span class="ident">Road</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="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>};
<span class="kw">use</span> <span class="ident">geom::Distance</span>;
<span class="kw">use</span> <span class="ident">map_gui::tools::PopupMsg</span>;
<span class="kw">use</span> <span class="ident">map_model::osm::RoadRank</span>;
<span class="kw">use</span> <span class="ident">map_model::LaneType</span>;
<span class="kw">use</span> <span class="ident">widgetry</span>::{
<span class="ident">ButtonBuilder</span>, <span class="ident">Color</span>, <span class="ident">ControlState</span>, <span class="ident">Drawable</span>, <span class="ident">EdgeInsets</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>,
<span class="ident">HorizontalAlignment</span>, <span class="ident">Key</span>, <span class="ident">Line</span>, <span class="ident">Outcome</span>, <span class="ident">Panel</span>, <span class="ident">RewriteColor</span>, <span class="ident">Text</span>, <span class="ident">Toggle</span>, <span class="ident">VerticalAlignment</span>,
<span class="ident">Widget</span>,
};
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::app::App</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">::ungap::bike_network</span>;
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::ungap::bike_network::DrawNetworkLayer</span>;
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::ungap::labels::DrawRoadLabels</span>;
<span class="macro">lazy_static::lazy_static!</span> {
<span class="kw">pub</span> <span class="kw">static</span> <span class="kw-2">ref</span> <span class="ident">DEDICATED_TRAIL</span>: <span class="ident">Color</span> <span class="op">=</span> <span class="ident">Color::GREEN</span>;
<span class="kw">pub</span> <span class="kw">static</span> <span class="kw-2">ref</span> <span class="ident">PROTECTED_BIKE_LANE</span>: <span class="ident">Color</span> <span class="op">=</span> <span class="ident">Color::hex</span>(<span class="string">&quot;#A4DE02&quot;</span>);
<span class="kw">pub</span> <span class="kw">static</span> <span class="kw-2">ref</span> <span class="ident">PAINTED_BIKE_LANE</span>: <span class="ident">Color</span> <span class="op">=</span> <span class="ident">Color::hex</span>(<span class="string">&quot;#76BA1B&quot;</span>);
<span class="kw">pub</span> <span class="kw">static</span> <span class="kw-2">ref</span> <span class="ident">GREENWAY</span>: <span class="ident">Color</span> <span class="op">=</span> <span class="ident">Color::hex</span>(<span class="string">&quot;#4C9A2A&quot;</span>);
<span class="doccomment">/// A bottom-right panel for managing a bunch of toggleable layers in the &quot;ungap the map&quot; tool.</span>
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Layers</span> {
<span class="ident">panel</span>: <span class="ident">Panel</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">labels</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">DrawRoadLabels</span><span class="op">&gt;</span>,
<span class="ident">elevation</span>: <span class="ident">bool</span>,
<span class="ident">steep_streets</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Drawable</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>,
<span class="kw">pub</span> <span class="kw">static</span> <span class="kw-2">ref</span> <span class="ident">EDITED_COLOR</span>: <span class="ident">Color</span> <span class="op">=</span> <span class="ident">Color::CYAN</span>;
<span class="ident">zoom_enabled_cache_key</span>: (<span class="ident">bool</span>, <span class="ident">bool</span>),
<span class="ident">map_edit_key</span>: <span class="ident">usize</span>,
}
<span class="doccomment">/// Shows the bike network while unzoomed. Handles thickening the roads at low zoom levels.</span>
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">DrawNetworkLayer</span> {
<span class="ident">per_zoom</span>: <span class="ident">RefCell</span><span class="op">&lt;</span>[<span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Drawable</span><span class="op">&gt;</span>; <span class="number">11</span>]<span class="op">&gt;</span>,
}
<span class="kw">impl</span> <span class="ident">DrawNetworkLayer</span> {
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>() <span class="op">-</span><span class="op">&gt;</span> <span class="ident">DrawNetworkLayer</span> {
<span class="ident">DrawNetworkLayer</span> {
<span class="ident">per_zoom</span>: <span class="ident">Default::default</span>(),
<span class="kw">impl</span> <span class="ident">Layers</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">Layers</span> {
<span class="ident">Layers</span> {
<span class="ident">panel</span>: <span class="ident">make_bottom_right_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="bool-val">true</span>, <span class="bool-val">true</span>, <span class="bool-val">false</span>, <span class="bool-val">false</span>),
<span class="ident">bike_network_layer</span>: <span class="prelude-val">Some</span>(<span class="ident">DrawNetworkLayer::new</span>()),
<span class="ident">labels</span>: <span class="prelude-val">Some</span>(<span class="ident">DrawRoadLabels::new</span>()),
<span class="ident">elevation</span>: <span class="bool-val">false</span>,
<span class="ident">steep_streets</span>: <span class="prelude-val">None</span>,
<span class="ident">road_types</span>: <span class="ident">HashMap::new</span>(),
<span class="ident">zoom_enabled_cache_key</span>: <span class="ident">zoom_enabled_cache_key</span>(<span class="ident">ctx</span>),
<span class="ident">map_edit_key</span>: <span class="ident">usize::MAX</span>,
}
}
<span class="doccomment">/// Call when the network changes.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">clear</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>) {
<span class="self">self</span>.<span class="ident">per_zoom</span> <span class="op">=</span> <span class="ident">Default::default</span>();
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>) {
<span class="kw">let</span> (<span class="ident">zoom</span>, <span class="ident">idx</span>) <span class="op">=</span> <span class="ident">DrawNetworkLayer::discretize_zoom</span>(<span class="ident">g</span>.<span class="ident">canvas</span>.<span class="ident">cam_zoom</span>);
<span class="kw">let</span> <span class="ident">value</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>.<span class="ident">per_zoom</span>.<span class="ident">borrow_mut</span>()[<span class="ident">idx</span>];
<span class="kw">if</span> <span class="ident">value</span>.<span class="ident">is_none</span>() {
<span class="kw-2">*</span><span class="ident">value</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">DrawNetworkLayer::render_network_layer</span>(<span class="ident">g</span>, <span class="ident">app</span>, <span class="ident">zoom</span>));
<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;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;road labels&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="op">=</span><span class="op">=</span> <span class="string">&quot;steep streets&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="ident">g</span>.<span class="ident">redraw</span>(<span class="ident">value</span>.<span class="ident">as_ref</span>().<span class="ident">unwrap</span>());
}
<span class="comment">// Continuously changing road width as we zoom looks great, but it&#39;s terribly slow. We&#39;d have</span>
<span class="comment">// to move line thickening into the shader to do it better. So recalculate with less</span>
<span class="comment">// granularity.</span>
<span class="kw">fn</span> <span class="ident">discretize_zoom</span>(<span class="ident">zoom</span>: <span class="ident">f64</span>) <span class="op">-</span><span class="op">&gt;</span> (<span class="ident">f64</span>, <span class="ident">usize</span>) {
<span class="kw">if</span> <span class="ident">zoom</span> <span class="op">&gt;</span><span class="op">=</span> <span class="number">1.0</span> {
<span class="kw">return</span> (<span class="number">1.0</span>, <span class="number">10</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>) {
<span class="kw">return</span>;
}
<span class="kw">let</span> <span class="ident">rounded</span> <span class="op">=</span> (<span class="ident">zoom</span> <span class="op">*</span> <span class="number">10.0</span>).<span class="ident">round</span>();
<span class="kw">let</span> <span class="ident">idx</span> <span class="op">=</span> <span class="ident">rounded</span> <span class="kw">as</span> <span class="ident">usize</span>;
(<span class="ident">rounded</span> <span class="op">/</span> <span class="number">10.0</span>, <span class="ident">idx</span>)
}
<span class="kw">fn</span> <span class="ident">render_network_layer</span>(<span class="ident">g</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>, <span class="ident">zoom</span>: <span class="ident">f64</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Drawable</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">GeomBatch::new</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="comment">// The basemap colors are beautiful, but we want to emphasize the bike network, so all&#39;s foggy</span>
<span class="comment">// in love and war...</span>
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">Color::BLACK</span>.<span class="ident">alpha</span>(<span class="number">0.4</span>), <span class="ident">map</span>.<span class="ident">get_boundary_polygon</span>().<span class="ident">clone</span>());
<span class="comment">// Thicker lines as we zoom out. Scale up to 5x. Never shrink past the road&#39;s actual width</span>
<span class="kw">let</span> <span class="ident">thickness</span> <span class="op">=</span> (<span class="number">0.5</span> <span class="op">/</span> <span class="ident">zoom</span>).<span class="ident">max</span>(<span class="number">1.0</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">intersections</span> <span class="op">=</span> <span class="ident">HashMap::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">for</span> <span class="ident">r</span> <span class="kw">in</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">all_roads</span>() {
<span class="kw">let</span> <span class="ident">rank</span> <span class="op">=</span> <span class="ident">r</span>.<span class="ident">get_rank</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">bike_lane</span> <span class="op">=</span> <span class="bool-val">false</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buffer</span> <span class="op">=</span> <span class="bool-val">false</span>;
<span class="kw">for</span> (<span class="kw">_</span>, <span class="kw">_</span>, <span class="ident">lt</span>) <span class="kw">in</span> <span class="ident">r</span>.<span class="ident">lanes_ltr</span>() {
@ -211,59 +479,339 @@
}
}
<span class="kw">let</span> <span class="ident">color</span> <span class="op">=</span> <span class="kw">if</span> <span class="ident">r</span>.<span class="ident">is_cycleway</span>() {
<span class="kw-2">*</span><span class="ident">DEDICATED_TRAIL</span>
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">bike_lane</span> <span class="op">&amp;&amp;</span> <span class="ident">buffer</span> {
<span class="kw-2">*</span><span class="ident">PROTECTED_BIKE_LANE</span>
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">bike_lane</span> {
<span class="kw-2">*</span><span class="ident">PAINTED_BIKE_LANE</span>
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">is_greenway</span>(<span class="ident">r</span>) {
<span class="kw-2">*</span><span class="ident">GREENWAY</span>
} <span class="kw">else</span> {
<span class="kw">continue</span>;
};
<span class="kw">let</span> <span class="ident">show</span> <span class="op">=</span> (<span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;highway&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">rank</span> <span class="op">=</span><span class="op">=</span> <span class="ident">RoadRank::Highway</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;major street&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">rank</span> <span class="op">=</span><span class="op">=</span> <span class="ident">RoadRank::Arterial</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;minor street&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">rank</span> <span class="op">=</span><span class="op">=</span> <span class="ident">RoadRank::Local</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;trail&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">r</span>.<span class="ident">is_cycleway</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;protected bike lane&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">bike_lane</span> <span class="op">&amp;&amp;</span> <span class="ident">buffer</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;painted bike lane&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">bike_lane</span> <span class="op">&amp;&amp;</span> <span class="op">!</span><span class="ident">buffer</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;greenway&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">bike_network::is_greenway</span>(<span class="ident">r</span>));
<span class="kw">if</span> <span class="ident">show</span> {
<span class="comment">// TODO If it&#39;s a bike element, should probably thicken for the unzoomed scale...</span>
<span class="comment">// the maximum amount?</span>
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">Color::CYAN</span>, <span class="ident">r</span>.<span class="ident">get_thick_polygon</span>(<span class="kw-2">&amp;</span><span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>));
}
}
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">color</span>,
<span class="ident">r</span>.<span class="ident">center_pts</span>.<span class="ident">make_polygons</span>(<span class="ident">thickness</span> <span class="op">*</span> <span class="ident">r</span>.<span class="ident">get_width</span>(<span class="ident">map</span>)),
<span class="self">self</span>.<span class="ident">road_types</span>.<span class="ident">insert</span>(<span class="ident">name</span>.<span class="ident">to_string</span>(), <span class="ident">ctx</span>.<span class="ident">upload</span>(<span class="ident">batch</span>));
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">event</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="kw-2">mut</span> <span class="ident">App</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Transition</span><span class="op">&gt;</span> {
<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="kw">if</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">bike_network_layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">DrawNetworkLayer::new</span>());
}
<span class="self">self</span>.<span class="ident">road_types</span>.<span class="ident">clear</span>();
}
<span class="kw">if</span> <span class="ident">ctx</span>.<span class="ident">redo_mouseover</span>() <span class="op">&amp;&amp;</span> <span class="self">self</span>.<span class="ident">elevation</span> {
<span class="kw">let</span> <span class="kw-2">mut</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="kw">if</span> <span class="ident">ctx</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="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">pt</span>) <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">get_cursor_in_map_space</span>() {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>((<span class="ident">elevation</span>, <span class="kw">_</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">unwrap</span>()
.<span class="number">0</span>
.<span class="ident">closest_pt</span>(<span class="ident">pt</span>, <span class="ident">Distance::meters</span>(<span class="number">300.0</span>))
{
<span class="ident">label</span> <span class="op">=</span>
<span class="ident">Line</span>(<span class="macro">format!</span>(<span class="string">&quot;{} ft&quot;</span>, <span class="ident">elevation</span>.<span class="ident">to_feet</span>().<span class="ident">round</span>())).<span class="ident">into_widget</span>(<span class="ident">ctx</span>);
}
}
}
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">replace</span>(<span class="ident">ctx</span>, <span class="string">&quot;current elevation&quot;</span>, <span class="ident">label</span>);
}
<span class="kw">match</span> <span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">event</span>(<span class="ident">ctx</span>) {
<span class="ident">Outcome::Clicked</span>(<span class="ident">x</span>) <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">return</span> <span class="prelude-val">Some</span>(<span class="ident">Transition::Push</span>(<span class="kw">match</span> <span class="ident">x</span>.<span class="ident">as_ref</span>() {
<span class="comment">// TODO Add physical picture examples</span>
<span class="string">&quot;highway&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;Highways&quot;</span>, <span class="macro">vec!</span>[<span class="string">&quot;Unless there&#39;s a separate trail (like on the 520 or I90 bridge), highways aren&#39;t accessible to biking&quot;</span>]),
<span class="string">&quot;major street&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;Major streets&quot;</span>, <span class="macro">vec!</span>[<span class="string">&quot;Arterials have more traffic, but are often where businesses are located&quot;</span>]),
<span class="string">&quot;minor street&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;Minor streets&quot;</span>, <span class="macro">vec!</span>[<span class="string">&quot;Local streets have a low volume of traffic and are usually comfortable for biking, even without dedicated infrastructure&quot;</span>]),
<span class="string">&quot;trail&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;Trails&quot;</span>, <span class="macro">vec!</span>[<span class="string">&quot;Trails like the Burke Gilman are usually well-separated from vehicle traffic. The space is usually shared between people walking, cycling, and rolling.&quot;</span>]),
<span class="string">&quot;protected bike lane&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;Protected bike lanes&quot;</span>, <span class="macro">vec!</span>[<span class="string">&quot;Bike lanes separated from vehicle traffic by physical barriers or a few feet of striping&quot;</span>]),
<span class="string">&quot;painted bike lane&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;Painted bike lanes&quot;</span>, <span class="macro">vec!</span>[<span class="string">&quot;Bike lanes without any separation from vehicle traffic. Often uncomfortably close to the \&quot;door zone\&quot; of parked cars.&quot;</span>]),
<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;zoom map out&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">center_zoom</span>(<span class="op">-</span><span class="number">8.0</span>);
<span class="macro">debug!</span>(<span class="string">&quot;clicked zoomed out to: {}&quot;</span>, <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">cam_zoom</span>);
<span class="self">self</span>.<span class="ident">panel</span> <span class="op">=</span> <span class="ident">make_bottom_right_panel</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">labels</span>.<span class="ident">is_some</span>(), <span class="self">self</span>.<span class="ident">elevation</span>, <span class="self">self</span>.<span class="ident">steep_streets</span>.<span class="ident">is_some</span>());
<span class="kw">return</span> <span class="prelude-val">Some</span>(<span class="ident">Transition::Keep</span>);
},
<span class="string">&quot;zoom map in&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">center_zoom</span>(<span class="number">8.0</span>);
<span class="macro">debug!</span>(<span class="string">&quot;clicked zoomed in to: {}&quot;</span>, <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">cam_zoom</span>);
<span class="self">self</span>.<span class="ident">panel</span> <span class="op">=</span> <span class="ident">make_bottom_right_panel</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">labels</span>.<span class="ident">is_some</span>(), <span class="self">self</span>.<span class="ident">elevation</span>, <span class="self">self</span>.<span class="ident">steep_streets</span>.<span class="ident">is_some</span>());
<span class="kw">return</span> <span class="prelude-val">Some</span>(<span class="ident">Transition::Keep</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">panel</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;road labels&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">is_checked</span>(<span class="string">&quot;road labels&quot;</span>) {
<span class="self">self</span>.<span class="ident">labels</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">DrawRoadLabels::new</span>());
} <span class="kw">else</span> {
<span class="self">self</span>.<span class="ident">labels</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">panel</span>.<span class="ident">is_checked</span>(<span class="string">&quot;elevation&quot;</span>);
<span class="self">self</span>.<span class="ident">panel</span> <span class="op">=</span> <span class="ident">make_bottom_right_panel</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">labels</span>.<span class="ident">is_some</span>(),
<span class="self">self</span>.<span class="ident">elevation</span>,
<span class="self">self</span>.<span class="ident">steep_streets</span>.<span class="ident">is_some</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>()) {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">low</span> <span class="op">=</span> <span class="ident">Distance::ZERO</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">high</span> <span class="op">=</span> <span class="ident">Distance::ZERO</span>;
<span class="kw">for</span> <span class="ident">i</span> <span class="kw">in</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">all_intersections</span>() {
<span class="ident">low</span> <span class="op">=</span> <span class="ident">low</span>.<span class="ident">min</span>(<span class="ident">i</span>.<span class="ident">elevation</span>);
<span class="ident">high</span> <span class="op">=</span> <span class="ident">high</span>.<span class="ident">max</span>(<span class="ident">i</span>.<span class="ident">elevation</span>);
}
<span class="comment">// TODO Maybe also draw the uphill arrows on the steepest streets?</span>
<span class="kw">let</span> <span class="ident">value</span> <span class="op">=</span> <span class="kw">crate</span><span class="ident">::layer::elevation::ElevationContours::make_contours</span>(
<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">low</span>, <span class="ident">high</span>,
);
<span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">elevation_contours</span>.<span class="ident">set</span>(<span class="ident">name</span>, <span class="ident">value</span>);
}
}
}
<span class="string">&quot;steep streets&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">is_checked</span>(<span class="string">&quot;steep streets&quot;</span>) {
<span class="kw">let</span> (<span class="ident">colorer</span>, <span class="kw">_</span>, <span class="ident">uphill_legend</span>) <span class="op">=</span>
<span class="kw">crate</span><span class="ident">::layer::elevation::SteepStreets::make_colorer</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="comment">// Make a horizontal legend for the incline</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">legend</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">Widget</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">colorer</span>
.<span class="ident">categories</span>
.<span class="ident">iter</span>()
.<span class="ident">map</span>(<span class="op">|</span>(<span class="ident">label</span>, <span class="ident">color</span>)<span class="op">|</span> {
<span class="ident">legend_batch</span>(<span class="ident">ctx</span>, <span class="kw-2">*</span><span class="ident">color</span>, <span class="ident">Text::from</span>(<span class="ident">Line</span>(<span class="ident">label</span>).<span class="ident">fg</span>(<span class="ident">Color::WHITE</span>)))
.<span class="ident">into_widget</span>(<span class="ident">ctx</span>)
})
.<span class="ident">collect</span>();
<span class="ident">legend</span>.<span class="ident">push</span>(<span class="ident">uphill_legend</span>);
<span class="kw">let</span> <span class="ident">legend</span> <span class="op">=</span> <span class="ident">Widget::custom_row</span>(<span class="ident">legend</span>);
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">replace</span>(<span class="ident">ctx</span>, <span class="string">&quot;steep streets legend&quot;</span>, <span class="ident">legend</span>);
<span class="self">self</span>.<span class="ident">steep_streets</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">colorer</span>.<span class="ident">unzoomed</span>.<span class="ident">upload</span>(<span class="ident">ctx</span>));
} <span class="kw">else</span> {
<span class="self">self</span>.<span class="ident">steep_streets</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">replace</span>(
<span class="ident">ctx</span>,
<span class="string">&quot;steep streets legend&quot;</span>,
<span class="ident">Text::new</span>().<span class="ident">into_widget</span>(<span class="ident">ctx</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> {}
}
<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">panel</span>.<span class="ident">currently_hovering</span>().<span class="ident">cloned</span>() {
<span class="self">self</span>.<span class="ident">highlight_road_type</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="kw-2">&amp;</span><span class="ident">name</span>);
}
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">zoom_enabled_cache_key</span> <span class="op">!</span><span class="op">=</span> <span class="ident">zoom_enabled_cache_key</span>(<span class="ident">ctx</span>) {
<span class="comment">// approriately disable/enable zoom buttons in case user scroll-zoomed</span>
<span class="self">self</span>.<span class="ident">panel</span> <span class="op">=</span> <span class="ident">make_bottom_right_panel</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">labels</span>.<span class="ident">is_some</span>(),
<span class="self">self</span>.<span class="ident">elevation</span>,
<span class="self">self</span>.<span class="ident">steep_streets</span>.<span class="ident">is_some</span>(),
);
<span class="comment">// Arbitrarily pick a color when two different types of roads meet</span>
<span class="ident">intersections</span>.<span class="ident">insert</span>(<span class="ident">r</span>.<span class="ident">src_i</span>, <span class="ident">color</span>);
<span class="ident">intersections</span>.<span class="ident">insert</span>(<span class="ident">r</span>.<span class="ident">dst_i</span>, <span class="ident">color</span>);
<span class="self">self</span>.<span class="ident">zoom_enabled_cache_key</span> <span class="op">=</span> <span class="ident">zoom_enabled_cache_key</span>(<span class="ident">ctx</span>);
}
<span class="kw">for</span> (<span class="ident">i</span>, <span class="ident">color</span>) <span class="kw">in</span> <span class="ident">intersections</span> {
<span class="comment">// No clear way to thicken the intersection at different zoom levels</span>
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">color</span>, <span class="ident">map</span>.<span class="ident">get_i</span>(<span class="ident">i</span>).<span class="ident">polygon</span>.<span class="ident">clone</span>());
}
<span class="prelude-val">None</span>
}
<span class="ident">g</span>.<span class="ident">upload</span>(<span class="ident">batch</span>)
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>) {
<span class="self">self</span>.<span class="ident">panel</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="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="kw">let</span> <span class="prelude-val">Some</span>(<span class="kw-2">ref</span> <span class="ident">l</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">labels</span> {
<span class="ident">l</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">draw</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">steep_streets</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="ident">name</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">currently_hovering</span>() {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">draw</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">road_types</span>.<span class="ident">get</span>(<span class="ident">name</span>) {
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="ident">draw</span>);
}
}
}
}
}
<span class="comment">// TODO Check how other greenways are tagged.</span>
<span class="comment">// https://www.openstreetmap.org/way/262778812 has bicycle=designated, cycleway=shared_lane...</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">is_greenway</span>(<span class="ident">road</span>: <span class="kw-2">&amp;</span><span class="ident">Road</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">bool</span> {
<span class="op">!</span><span class="ident">road</span>
.<span class="ident">access_restrictions</span>
.<span class="ident">allow_through_traffic</span>
.<span class="ident">contains</span>(<span class="ident">PathConstraints::Car</span>)
<span class="op">&amp;&amp;</span> <span class="ident">road</span>
.<span class="ident">access_restrictions</span>
.<span class="ident">allow_through_traffic</span>
.<span class="ident">contains</span>(<span class="ident">PathConstraints::Bike</span>)
<span class="kw">fn</span> <span class="ident">make_zoom_controls</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Widget</span> {
<span class="kw">let</span> <span class="ident">builder</span> <span class="op">=</span> <span class="ident">ctx</span>
.<span class="ident">style</span>()
.<span class="ident">btn_floating</span>
.<span class="ident">btn</span>()
.<span class="ident">image_dims</span>(<span class="number">30.0</span>)
.<span class="ident">outline</span>((<span class="number">1.0</span>, <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_plain</span>.<span class="ident">fg</span>), <span class="ident">ControlState::Default</span>)
.<span class="ident">padding</span>(<span class="number">12.0</span>);
<span class="ident">Widget::custom_col</span>(<span class="macro">vec!</span>[
<span class="ident">builder</span>
.<span class="ident">clone</span>()
.<span class="ident">image_path</span>(<span class="string">&quot;system/assets/speed/plus.svg&quot;</span>)
.<span class="ident">corner_rounding</span>(<span class="ident">geom::CornerRadii</span> {
<span class="ident">top_left</span>: <span class="number">16.0</span>,
<span class="ident">top_right</span>: <span class="number">16.0</span>,
<span class="ident">bottom_right</span>: <span class="number">0.0</span>,
<span class="ident">bottom_left</span>: <span class="number">0.0</span>,
})
.<span class="ident">disabled</span>(<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">is_max_zoom</span>())
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;zoom map in&quot;</span>),
<span class="ident">builder</span>
.<span class="ident">image_path</span>(<span class="string">&quot;system/assets/speed/minus.svg&quot;</span>)
.<span class="ident">image_dims</span>(<span class="number">30.0</span>)
.<span class="ident">padding</span>(<span class="number">12.0</span>)
.<span class="ident">corner_rounding</span>(<span class="ident">geom::CornerRadii</span> {
<span class="ident">top_left</span>: <span class="number">0.0</span>,
<span class="ident">top_right</span>: <span class="number">0.0</span>,
<span class="ident">bottom_right</span>: <span class="number">16.0</span>,
<span class="ident">bottom_left</span>: <span class="number">16.0</span>,
})
.<span class="ident">disabled</span>(<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">is_min_zoom</span>())
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;zoom map out&quot;</span>),
])
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">render_edits</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">Drawable</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">GeomBatch::new</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">for</span> <span class="ident">r</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">map</span>.<span class="ident">get_edits</span>().<span class="ident">changed_roads</span> {
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">EDITED_COLOR</span>.<span class="ident">alpha</span>(<span class="number">0.5</span>),
<span class="ident">map</span>.<span class="ident">get_r</span>(<span class="kw-2">*</span><span class="ident">r</span>).<span class="ident">get_thick_polygon</span>(<span class="ident">map</span>),
);
}
<span class="ident">batch</span>.<span class="ident">upload</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">bike_network</span>: <span class="ident">bool</span>,
<span class="ident">labels</span>: <span class="ident">bool</span>,
<span class="ident">elevation</span>: <span class="ident">bool</span>,
<span class="ident">steep_streets</span>: <span class="ident">bool</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Widget</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>
<span class="ident">legend_item</span>(<span class="ident">ctx</span>, <span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">unzoomed_highway</span>, <span class="string">&quot;highway&quot;</span>),
<span class="ident">legend_item</span>(<span class="ident">ctx</span>, <span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">unzoomed_arterial</span>, <span class="string">&quot;major street&quot;</span>),
<span class="ident">legend_item</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_item</span>(<span class="ident">ctx</span>, <span class="kw-2">*</span><span class="ident">bike_network::DEDICATED_TRAIL</span>, <span class="string">&quot;trail&quot;</span>),
<span class="ident">legend_item</span>(
<span class="ident">ctx</span>,
<span class="kw-2">*</span><span class="ident">bike_network::PROTECTED_BIKE_LANE</span>,
<span class="string">&quot;protected bike lane&quot;</span>,
),
<span class="ident">legend_item</span>(<span class="ident">ctx</span>, <span class="kw-2">*</span><span class="ident">bike_network::PAINTED_BIKE_LANE</span>, <span class="string">&quot;painted bike lane&quot;</span>),
<span class="ident">legend_item</span>(<span class="ident">ctx</span>, <span class="kw-2">*</span><span class="ident">bike_network::GREENWAY</span>, <span class="string">&quot;greenway&quot;</span>),
]),
<span class="comment">// TODO Distinguish door-zone bike lanes?</span>
<span class="comment">// TODO Call out bike turning boxes?</span>
<span class="comment">// TODO Call out bike signals?</span>
<span class="ident">Toggle::checkbox</span>(<span class="ident">ctx</span>, <span class="string">&quot;road labels&quot;</span>, <span class="ident">Key::L</span>, <span class="ident">labels</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;elevation&quot;</span>, <span class="ident">Key::E</span>, <span class="ident">elevation</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 elevation data&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;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;steep streets&quot;</span>, <span class="ident">Key::S</span>, <span class="ident">steep_streets</span>),
<span class="comment">// A placeholder</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;steep streets legend&quot;</span>),
]),
<span class="comment">// TODO Probably a collisions layer</span>
])
}
<span class="kw">fn</span> <span class="ident">make_bottom_right_panel</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">labels</span>: <span class="ident">bool</span>,
<span class="ident">elevation</span>: <span class="ident">bool</span>,
<span class="ident">steep_streets</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">make_zoom_controls</span>(<span class="ident">ctx</span>).<span class="ident">align_right</span>().<span class="ident">padding_right</span>(<span class="number">16</span>),
<span class="ident">make_legend</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">bike_network</span>, <span class="ident">labels</span>, <span class="ident">elevation</span>, <span class="ident">steep_streets</span>)
.<span class="ident">padding</span>(<span class="number">16</span>)
.<span class="ident">bg</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">panel_bg</span>),
]))
.<span class="ident">aligned</span>(<span class="ident">HorizontalAlignment::Right</span>, <span class="ident">VerticalAlignment::Bottom</span>)
.<span class="ident">build_custom</span>(<span class="ident">ctx</span>)
}
<span class="kw">fn</span> <span class="ident">legend_batch</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">color</span>: <span class="ident">Color</span>, <span class="ident">txt</span>: <span class="ident">Text</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">GeomBatch</span> {
<span class="comment">// TODO Height of the &quot;trail&quot; button is slightly too low!</span>
<span class="comment">// Text with padding and a background color</span>
<span class="kw">let</span> (<span class="kw-2">mut</span> <span class="ident">batch</span>, <span class="ident">hitbox</span>) <span class="op">=</span> <span class="ident">txt</span>
.<span class="ident">render</span>(<span class="ident">ctx</span>)
.<span class="ident">batch</span>()
.<span class="ident">container</span>()
.<span class="ident">padding</span>(<span class="ident">EdgeInsets</span> {
<span class="ident">top</span>: <span class="number">10.0</span>,
<span class="ident">bottom</span>: <span class="number">10.0</span>,
<span class="ident">left</span>: <span class="number">20.0</span>,
<span class="ident">right</span>: <span class="number">20.0</span>,
})
.<span class="ident">into_geom</span>(<span class="ident">ctx</span>, <span class="prelude-val">None</span>);
<span class="ident">batch</span>.<span class="ident">unshift</span>(<span class="ident">color</span>, <span class="ident">hitbox</span>);
<span class="ident">batch</span>
}
<span class="kw">fn</span> <span class="ident">legend_item</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">color</span>: <span class="ident">Color</span>, <span class="ident">label</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Widget</span> {
<span class="kw">let</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">legend_batch</span>(<span class="ident">ctx</span>, <span class="ident">color</span>, <span class="ident">Text::from</span>(<span class="ident">Line</span>(<span class="ident">label</span>)));
<span class="kw">return</span> <span class="ident">ButtonBuilder::new</span>()
.<span class="ident">custom_batch</span>(<span class="ident">batch</span>.<span class="ident">clone</span>(), <span class="ident">ControlState::Default</span>)
.<span class="ident">custom_batch</span>(
<span class="ident">batch</span>.<span class="ident">color</span>(<span class="ident">RewriteColor::Change</span>(<span class="ident">color</span>, <span class="ident">color</span>.<span class="ident">alpha</span>(<span class="number">0.6</span>))),
<span class="ident">ControlState::Hovered</span>,
)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="ident">label</span>);
}
<span class="kw">fn</span> <span class="ident">zoom_enabled_cache_key</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">&gt;</span> (<span class="ident">bool</span>, <span class="ident">bool</span>) {
(<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">is_max_zoom</span>(), <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">is_min_zoom</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>

View File

@ -95,6 +95,10 @@
<span id="93">93</span>
<span id="94">94</span>
<span id="95">95</span>
<span id="96">96</span>
<span id="97">97</span>
<span id="98">98</span>
<span id="99">99</span>
</pre><pre class="rust">
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Bounds</span>, <span class="ident">Pt2D</span>};
<span class="kw">use</span> <span class="ident">map_gui::render::DrawOptions</span>;
@ -148,6 +152,10 @@
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</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">&gt;</span><span class="op">=</span> <span class="ident">app</span>.<span class="ident">opts</span>.<span class="ident">min_zoom_for_detail</span> {
<span class="kw">return</span>;
}
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">draw</span>(<span class="ident">g</span>);
<span class="kw">let</span> <span class="ident">rect</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">rect_of</span>(<span class="string">&quot;glass&quot;</span>);
<span class="kw">let</span> <span class="ident">zoom</span> <span class="op">=</span> <span class="number">8.0</span>;

View File

@ -290,365 +290,8 @@
<span id="288">288</span>
<span id="289">289</span>
<span id="290">290</span>
<span id="291">291</span>
<span id="292">292</span>
<span id="293">293</span>
<span id="294">294</span>
<span id="295">295</span>
<span id="296">296</span>
<span id="297">297</span>
<span id="298">298</span>
<span id="299">299</span>
<span id="300">300</span>
<span id="301">301</span>
<span id="302">302</span>
<span id="303">303</span>
<span id="304">304</span>
<span id="305">305</span>
<span id="306">306</span>
<span id="307">307</span>
<span id="308">308</span>
<span id="309">309</span>
<span id="310">310</span>
<span id="311">311</span>
<span id="312">312</span>
<span id="313">313</span>
<span id="314">314</span>
<span id="315">315</span>
<span id="316">316</span>
<span id="317">317</span>
<span id="318">318</span>
<span id="319">319</span>
<span id="320">320</span>
<span id="321">321</span>
<span id="322">322</span>
<span id="323">323</span>
<span id="324">324</span>
<span id="325">325</span>
<span id="326">326</span>
<span id="327">327</span>
<span id="328">328</span>
<span id="329">329</span>
<span id="330">330</span>
<span id="331">331</span>
<span id="332">332</span>
<span id="333">333</span>
<span id="334">334</span>
<span id="335">335</span>
<span id="336">336</span>
<span id="337">337</span>
<span id="338">338</span>
<span id="339">339</span>
<span id="340">340</span>
<span id="341">341</span>
<span id="342">342</span>
<span id="343">343</span>
<span id="344">344</span>
<span id="345">345</span>
<span id="346">346</span>
<span id="347">347</span>
<span id="348">348</span>
<span id="349">349</span>
<span id="350">350</span>
<span id="351">351</span>
<span id="352">352</span>
<span id="353">353</span>
<span id="354">354</span>
<span id="355">355</span>
<span id="356">356</span>
<span id="357">357</span>
<span id="358">358</span>
<span id="359">359</span>
<span id="360">360</span>
<span id="361">361</span>
<span id="362">362</span>
<span id="363">363</span>
<span id="364">364</span>
<span id="365">365</span>
<span id="366">366</span>
<span id="367">367</span>
<span id="368">368</span>
<span id="369">369</span>
<span id="370">370</span>
<span id="371">371</span>
<span id="372">372</span>
<span id="373">373</span>
<span id="374">374</span>
<span id="375">375</span>
<span id="376">376</span>
<span id="377">377</span>
<span id="378">378</span>
<span id="379">379</span>
<span id="380">380</span>
<span id="381">381</span>
<span id="382">382</span>
<span id="383">383</span>
<span id="384">384</span>
<span id="385">385</span>
<span id="386">386</span>
<span id="387">387</span>
<span id="388">388</span>
<span id="389">389</span>
<span id="390">390</span>
<span id="391">391</span>
<span id="392">392</span>
<span id="393">393</span>
<span id="394">394</span>
<span id="395">395</span>
<span id="396">396</span>
<span id="397">397</span>
<span id="398">398</span>
<span id="399">399</span>
<span id="400">400</span>
<span id="401">401</span>
<span id="402">402</span>
<span id="403">403</span>
<span id="404">404</span>
<span id="405">405</span>
<span id="406">406</span>
<span id="407">407</span>
<span id="408">408</span>
<span id="409">409</span>
<span id="410">410</span>
<span id="411">411</span>
<span id="412">412</span>
<span id="413">413</span>
<span id="414">414</span>
<span id="415">415</span>
<span id="416">416</span>
<span id="417">417</span>
<span id="418">418</span>
<span id="419">419</span>
<span id="420">420</span>
<span id="421">421</span>
<span id="422">422</span>
<span id="423">423</span>
<span id="424">424</span>
<span id="425">425</span>
<span id="426">426</span>
<span id="427">427</span>
<span id="428">428</span>
<span id="429">429</span>
<span id="430">430</span>
<span id="431">431</span>
<span id="432">432</span>
<span id="433">433</span>
<span id="434">434</span>
<span id="435">435</span>
<span id="436">436</span>
<span id="437">437</span>
<span id="438">438</span>
<span id="439">439</span>
<span id="440">440</span>
<span id="441">441</span>
<span id="442">442</span>
<span id="443">443</span>
<span id="444">444</span>
<span id="445">445</span>
<span id="446">446</span>
<span id="447">447</span>
<span id="448">448</span>
<span id="449">449</span>
<span id="450">450</span>
<span id="451">451</span>
<span id="452">452</span>
<span id="453">453</span>
<span id="454">454</span>
<span id="455">455</span>
<span id="456">456</span>
<span id="457">457</span>
<span id="458">458</span>
<span id="459">459</span>
<span id="460">460</span>
<span id="461">461</span>
<span id="462">462</span>
<span id="463">463</span>
<span id="464">464</span>
<span id="465">465</span>
<span id="466">466</span>
<span id="467">467</span>
<span id="468">468</span>
<span id="469">469</span>
<span id="470">470</span>
<span id="471">471</span>
<span id="472">472</span>
<span id="473">473</span>
<span id="474">474</span>
<span id="475">475</span>
<span id="476">476</span>
<span id="477">477</span>
<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>
<span id="507">507</span>
<span id="508">508</span>
<span id="509">509</span>
<span id="510">510</span>
<span id="511">511</span>
<span id="512">512</span>
<span id="513">513</span>
<span id="514">514</span>
<span id="515">515</span>
<span id="516">516</span>
<span id="517">517</span>
<span id="518">518</span>
<span id="519">519</span>
<span id="520">520</span>
<span id="521">521</span>
<span id="522">522</span>
<span id="523">523</span>
<span id="524">524</span>
<span id="525">525</span>
<span id="526">526</span>
<span id="527">527</span>
<span id="528">528</span>
<span id="529">529</span>
<span id="530">530</span>
<span id="531">531</span>
<span id="532">532</span>
<span id="533">533</span>
<span id="534">534</span>
<span id="535">535</span>
<span id="536">536</span>
<span id="537">537</span>
<span id="538">538</span>
<span id="539">539</span>
<span id="540">540</span>
<span id="541">541</span>
<span id="542">542</span>
<span id="543">543</span>
<span id="544">544</span>
<span id="545">545</span>
<span id="546">546</span>
<span id="547">547</span>
<span id="548">548</span>
<span id="549">549</span>
<span id="550">550</span>
<span id="551">551</span>
<span id="552">552</span>
<span id="553">553</span>
<span id="554">554</span>
<span id="555">555</span>
<span id="556">556</span>
<span id="557">557</span>
<span id="558">558</span>
<span id="559">559</span>
<span id="560">560</span>
<span id="561">561</span>
<span id="562">562</span>
<span id="563">563</span>
<span id="564">564</span>
<span id="565">565</span>
<span id="566">566</span>
<span id="567">567</span>
<span id="568">568</span>
<span id="569">569</span>
<span id="570">570</span>
<span id="571">571</span>
<span id="572">572</span>
<span id="573">573</span>
<span id="574">574</span>
<span id="575">575</span>
<span id="576">576</span>
<span id="577">577</span>
<span id="578">578</span>
<span id="579">579</span>
<span id="580">580</span>
<span id="581">581</span>
<span id="582">582</span>
<span id="583">583</span>
<span id="584">584</span>
<span id="585">585</span>
<span id="586">586</span>
<span id="587">587</span>
<span id="588">588</span>
<span id="589">589</span>
<span id="590">590</span>
<span id="591">591</span>
<span id="592">592</span>
<span id="593">593</span>
<span id="594">594</span>
<span id="595">595</span>
<span id="596">596</span>
<span id="597">597</span>
<span id="598">598</span>
<span id="599">599</span>
<span id="600">600</span>
<span id="601">601</span>
<span id="602">602</span>
<span id="603">603</span>
<span id="604">604</span>
<span id="605">605</span>
<span id="606">606</span>
<span id="607">607</span>
<span id="608">608</span>
<span id="609">609</span>
<span id="610">610</span>
<span id="611">611</span>
<span id="612">612</span>
<span id="613">613</span>
<span id="614">614</span>
<span id="615">615</span>
<span id="616">616</span>
<span id="617">617</span>
<span id="618">618</span>
<span id="619">619</span>
<span id="620">620</span>
<span id="621">621</span>
<span id="622">622</span>
<span id="623">623</span>
<span id="624">624</span>
<span id="625">625</span>
<span id="626">626</span>
<span id="627">627</span>
<span id="628">628</span>
<span id="629">629</span>
<span id="630">630</span>
<span id="631">631</span>
<span id="632">632</span>
<span id="633">633</span>
<span id="634">634</span>
<span id="635">635</span>
<span id="636">636</span>
<span id="637">637</span>
<span id="638">638</span>
<span id="639">639</span>
<span id="640">640</span>
<span id="641">641</span>
<span id="642">642</span>
<span id="643">643</span>
<span id="644">644</span>
<span id="645">645</span>
<span id="646">646</span>
<span id="647">647</span>
<span id="648">648</span>
</pre><pre class="rust">
<span class="kw">mod</span> <span class="ident">bike_network</span>;
<span class="kw">mod</span> <span class="ident">labels</span>;
<span class="kw">mod</span> <span class="ident">layers</span>;
<span class="kw">mod</span> <span class="ident">magnifying</span>;
@ -656,21 +299,17 @@
<span class="kw">mod</span> <span class="ident">route</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">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>;
<span class="kw">use</span> <span class="ident">map_model::osm::RoadRank</span>;
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">EditCmd</span>, <span class="ident">LaneType</span>};
<span class="kw">use</span> <span class="ident">widgetry</span>::{
<span class="ident">lctrl</span>, <span class="ident">ButtonBuilder</span>, <span class="ident">Color</span>, <span class="ident">ControlState</span>, <span class="ident">Drawable</span>, <span class="ident">EdgeInsets</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>,
<span class="ident">HorizontalAlignment</span>, <span class="ident">Key</span>, <span class="ident">Line</span>, <span class="ident">Outcome</span>, <span class="ident">Panel</span>, <span class="ident">RewriteColor</span>, <span class="ident">State</span>, <span class="ident">Text</span>, <span class="ident">TextExt</span>, <span class="ident">Toggle</span>,
<span class="ident">VerticalAlignment</span>, <span class="ident">Widget</span>,
<span class="ident">lctrl</span>, <span class="ident">Drawable</span>, <span class="ident">EventCtx</span>, <span class="ident">GfxCtx</span>, <span class="ident">HorizontalAlignment</span>, <span class="ident">Key</span>, <span class="ident">Line</span>, <span class="ident">Outcome</span>, <span class="ident">Panel</span>, <span class="ident">State</span>,
<span class="ident">TextExt</span>, <span class="ident">VerticalAlignment</span>, <span class="ident">Widget</span>,
};
<span class="kw">use</span> <span class="self">self</span><span class="ident">::labels::DrawRoadLabels</span>;
<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">::bike_network::render_edits</span>;
<span class="kw">use</span> <span class="self">self</span><span class="ident">::layers::Layers</span>;
<span class="kw">use</span> <span class="self">self</span><span class="ident">::magnifying::MagnifyingGlass</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>};
@ -680,17 +319,10 @@
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">ExploreMap</span> {
<span class="ident">top_panel</span>: <span class="ident">Panel</span>,
<span class="ident">bottom_right_panel</span>: <span class="ident">Panel</span>,
<span class="ident">layers</span>: <span class="ident">Layers</span>,
<span class="ident">magnifying_glass</span>: <span class="ident">MagnifyingGlass</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">labels</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">DrawRoadLabels</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="ident">steep_streets</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Drawable</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>,
<span class="ident">zoom_enabled_cache_key</span>: (<span class="ident">bool</span>, <span class="ident">bool</span>),
<span class="ident">map_edit_key</span>: <span class="ident">usize</span>,
}
@ -712,64 +344,14 @@
<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">bottom_right_panel</span>: <span class="ident">make_bottom_right_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="bool-val">true</span>, <span class="bool-val">true</span>, <span class="bool-val">false</span>, <span class="bool-val">false</span>),
<span class="ident">layers</span>: <span class="ident">Layers::new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>),
<span class="ident">magnifying_glass</span>: <span class="ident">MagnifyingGlass::new</span>(<span class="ident">ctx</span>),
<span class="ident">bike_network_layer</span>: <span class="prelude-val">Some</span>(<span class="ident">DrawNetworkLayer::new</span>()),
<span class="ident">labels</span>: <span class="prelude-val">Some</span>(<span class="ident">DrawRoadLabels::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">steep_streets</span>: <span class="prelude-val">None</span>,
<span class="ident">road_types</span>: <span class="ident">HashMap::new</span>(),
<span class="ident">zoom_enabled_cache_key</span>: <span class="ident">zoom_enabled_cache_key</span>(<span class="ident">ctx</span>),
<span class="comment">// Start with a bogus value, so we fix up the URL when changing maps</span>
<span class="ident">map_edit_key</span>: <span class="ident">usize::MAX</span>,
})
}
<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;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;road labels&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="op">=</span><span class="op">=</span> <span class="string">&quot;steep streets&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>) {
<span class="kw">return</span>;
}
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">GeomBatch::new</span>();
<span class="kw">for</span> <span class="ident">r</span> <span class="kw">in</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">all_roads</span>() {
<span class="kw">let</span> <span class="ident">rank</span> <span class="op">=</span> <span class="ident">r</span>.<span class="ident">get_rank</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">bike_lane</span> <span class="op">=</span> <span class="bool-val">false</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buffer</span> <span class="op">=</span> <span class="bool-val">false</span>;
<span class="kw">for</span> (<span class="kw">_</span>, <span class="kw">_</span>, <span class="ident">lt</span>) <span class="kw">in</span> <span class="ident">r</span>.<span class="ident">lanes_ltr</span>() {
<span class="kw">if</span> <span class="ident">lt</span> <span class="op">=</span><span class="op">=</span> <span class="ident">LaneType::Biking</span> {
<span class="ident">bike_lane</span> <span class="op">=</span> <span class="bool-val">true</span>;
} <span class="kw">else</span> <span class="kw">if</span> <span class="macro">matches!</span>(<span class="ident">lt</span>, <span class="ident">LaneType::Buffer</span>(<span class="kw">_</span>)) {
<span class="ident">buffer</span> <span class="op">=</span> <span class="bool-val">true</span>;
}
}
<span class="kw">let</span> <span class="ident">show</span> <span class="op">=</span> (<span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;highway&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">rank</span> <span class="op">=</span><span class="op">=</span> <span class="ident">RoadRank::Highway</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;major street&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">rank</span> <span class="op">=</span><span class="op">=</span> <span class="ident">RoadRank::Arterial</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;minor street&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">rank</span> <span class="op">=</span><span class="op">=</span> <span class="ident">RoadRank::Local</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;trail&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">r</span>.<span class="ident">is_cycleway</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;protected bike lane&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">bike_lane</span> <span class="op">&amp;&amp;</span> <span class="ident">buffer</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;painted bike lane&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">bike_lane</span> <span class="op">&amp;&amp;</span> <span class="op">!</span><span class="ident">buffer</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;greenway&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">layers::is_greenway</span>(<span class="ident">r</span>));
<span class="kw">if</span> <span class="ident">show</span> {
<span class="comment">// TODO If it&#39;s a bike element, should probably thicken for the unzoomed scale...</span>
<span class="comment">// the maximum amount?</span>
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">Color::CYAN</span>, <span class="ident">r</span>.<span class="ident">get_thick_polygon</span>(<span class="kw-2">&amp;</span><span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>));
}
}
<span class="self">self</span>.<span class="ident">road_types</span>.<span class="ident">insert</span>(<span class="ident">name</span>.<span class="ident">to_string</span>(), <span class="ident">ctx</span>.<span class="ident">upload</span>(<span class="ident">batch</span>));
}
}
<span class="kw">impl</span> <span class="ident">State</span><span class="op">&lt;</span><span class="ident">App</span><span class="op">&gt;</span> <span class="kw">for</span> <span class="ident">ExploreMap</span> {
@ -779,12 +361,8 @@
<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="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>();
<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="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Err</span>(<span class="ident">err</span>) <span class="op">=</span> <span class="ident">URLManager::update_url_param</span>(
<span class="string">&quot;--edits&quot;</span>.<span class="ident">to_string</span>(),
@ -802,28 +380,6 @@
<span class="self">self</span>.<span class="ident">magnifying_glass</span>.<span class="ident">event</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="kw">if</span> <span class="ident">ctx</span>.<span class="ident">redo_mouseover</span>() <span class="op">&amp;&amp;</span> <span class="self">self</span>.<span class="ident">elevation</span> {
<span class="kw">let</span> <span class="kw-2">mut</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="kw">if</span> <span class="ident">ctx</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="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">pt</span>) <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">get_cursor_in_map_space</span>() {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>((<span class="ident">elevation</span>, <span class="kw">_</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">unwrap</span>()
.<span class="number">0</span>
.<span class="ident">closest_pt</span>(<span class="ident">pt</span>, <span class="ident">Distance::meters</span>(<span class="number">300.0</span>))
{
<span class="ident">label</span> <span class="op">=</span>
<span class="ident">Line</span>(<span class="macro">format!</span>(<span class="string">&quot;{} ft&quot;</span>, <span class="ident">elevation</span>.<span class="ident">to_feet</span>().<span class="ident">round</span>())).<span class="ident">into_widget</span>(<span class="ident">ctx</span>);
}
}
}
<span class="self">self</span>.<span class="ident">bottom_right_panel</span>
.<span class="ident">replace</span>(<span class="ident">ctx</span>, <span class="string">&quot;current elevation&quot;</span>, <span class="ident">label</span>);
}
<span class="comment">// Only when zoomed in, click to edit a road in detail</span>
<span class="kw">if</span> <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">cam_zoom</span> <span class="op">&gt;</span><span class="op">=</span> <span class="ident">app</span>.<span class="ident">opts</span>.<span class="ident">min_zoom_for_detail</span> {
<span class="kw">if</span> <span class="ident">ctx</span>.<span class="ident">redo_mouseover</span>() {
@ -905,123 +461,8 @@
}
}
<span class="kw">match</span> <span class="self">self</span>.<span class="ident">bottom_right_panel</span>.<span class="ident">event</span>(<span class="ident">ctx</span>) {
<span class="ident">Outcome::Clicked</span>(<span class="ident">x</span>) <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">return</span> <span class="ident">Transition::Push</span>(<span class="kw">match</span> <span class="ident">x</span>.<span class="ident">as_ref</span>() {
<span class="comment">// TODO Add physical picture examples</span>
<span class="string">&quot;highway&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;Highways&quot;</span>, <span class="macro">vec!</span>[<span class="string">&quot;Unless there&#39;s a separate trail (like on the 520 or I90 bridge), highways aren&#39;t accessible to biking&quot;</span>]),
<span class="string">&quot;major street&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;Major streets&quot;</span>, <span class="macro">vec!</span>[<span class="string">&quot;Arterials have more traffic, but are often where businesses are located&quot;</span>]),
<span class="string">&quot;minor street&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;Minor streets&quot;</span>, <span class="macro">vec!</span>[<span class="string">&quot;Local streets have a low volume of traffic and are usually comfortable for biking, even without dedicated infrastructure&quot;</span>]),
<span class="string">&quot;trail&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;Trails&quot;</span>, <span class="macro">vec!</span>[<span class="string">&quot;Trails like the Burke Gilman are usually well-separated from vehicle traffic. The space is usually shared between people walking, cycling, and rolling.&quot;</span>]),
<span class="string">&quot;protected bike lane&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;Protected bike lanes&quot;</span>, <span class="macro">vec!</span>[<span class="string">&quot;Bike lanes separated from vehicle traffic by physical barriers or a few feet of striping&quot;</span>]),
<span class="string">&quot;painted bike lane&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;Painted bike lanes&quot;</span>, <span class="macro">vec!</span>[<span class="string">&quot;Bike lanes without any separation from vehicle traffic. Often uncomfortably close to the \&quot;door zone\&quot; of parked cars.&quot;</span>]),
<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;zoom map out&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">center_zoom</span>(<span class="op">-</span><span class="number">8.0</span>);
<span class="macro">debug!</span>(<span class="string">&quot;clicked zoomed out to: {}&quot;</span>, <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">cam_zoom</span>);
<span class="self">self</span>.<span class="ident">bottom_right_panel</span> <span class="op">=</span> <span class="ident">make_bottom_right_panel</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">labels</span>.<span class="ident">is_some</span>(), <span class="self">self</span>.<span class="ident">elevation</span>, <span class="self">self</span>.<span class="ident">steep_streets</span>.<span class="ident">is_some</span>());
<span class="kw">return</span> <span class="ident">Transition::Keep</span>;
},
<span class="string">&quot;zoom map in&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">center_zoom</span>(<span class="number">8.0</span>);
<span class="macro">debug!</span>(<span class="string">&quot;clicked zoomed in to: {}&quot;</span>, <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">cam_zoom</span>);
<span class="self">self</span>.<span class="ident">bottom_right_panel</span> <span class="op">=</span> <span class="ident">make_bottom_right_panel</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">labels</span>.<span class="ident">is_some</span>(), <span class="self">self</span>.<span class="ident">elevation</span>, <span class="self">self</span>.<span class="ident">steep_streets</span>.<span class="ident">is_some</span>());
<span class="kw">return</span> <span class="ident">Transition::Keep</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">bottom_right_panel</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;road labels&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">bottom_right_panel</span>.<span class="ident">is_checked</span>(<span class="string">&quot;road labels&quot;</span>) {
<span class="self">self</span>.<span class="ident">labels</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">DrawRoadLabels::new</span>());
} <span class="kw">else</span> {
<span class="self">self</span>.<span class="ident">labels</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">bottom_right_panel</span>.<span class="ident">is_checked</span>(<span class="string">&quot;elevation&quot;</span>);
<span class="self">self</span>.<span class="ident">bottom_right_panel</span> <span class="op">=</span> <span class="ident">make_bottom_right_panel</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">labels</span>.<span class="ident">is_some</span>(),
<span class="self">self</span>.<span class="ident">elevation</span>,
<span class="self">self</span>.<span class="ident">steep_streets</span>.<span class="ident">is_some</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>()) {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">low</span> <span class="op">=</span> <span class="ident">Distance::ZERO</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">high</span> <span class="op">=</span> <span class="ident">Distance::ZERO</span>;
<span class="kw">for</span> <span class="ident">i</span> <span class="kw">in</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">all_intersections</span>() {
<span class="ident">low</span> <span class="op">=</span> <span class="ident">low</span>.<span class="ident">min</span>(<span class="ident">i</span>.<span class="ident">elevation</span>);
<span class="ident">high</span> <span class="op">=</span> <span class="ident">high</span>.<span class="ident">max</span>(<span class="ident">i</span>.<span class="ident">elevation</span>);
}
<span class="comment">// TODO Maybe also draw the uphill arrows on the steepest streets?</span>
<span class="kw">let</span> <span class="ident">value</span> <span class="op">=</span> <span class="kw">crate</span><span class="ident">::layer::elevation::ElevationContours::make_contours</span>(
<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">low</span>, <span class="ident">high</span>,
);
<span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">elevation_contours</span>.<span class="ident">set</span>(<span class="ident">name</span>, <span class="ident">value</span>);
}
}
}
<span class="string">&quot;steep streets&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">bottom_right_panel</span>.<span class="ident">is_checked</span>(<span class="string">&quot;steep streets&quot;</span>) {
<span class="kw">let</span> (<span class="ident">colorer</span>, <span class="kw">_</span>, <span class="ident">uphill_legend</span>) <span class="op">=</span>
<span class="kw">crate</span><span class="ident">::layer::elevation::SteepStreets::make_colorer</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="comment">// Make a horizontal legend for the incline</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">legend</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">Widget</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">colorer</span>
.<span class="ident">categories</span>
.<span class="ident">iter</span>()
.<span class="ident">map</span>(<span class="op">|</span>(<span class="ident">label</span>, <span class="ident">color</span>)<span class="op">|</span> {
<span class="ident">legend_batch</span>(<span class="ident">ctx</span>, <span class="kw-2">*</span><span class="ident">color</span>, <span class="ident">Text::from</span>(<span class="ident">Line</span>(<span class="ident">label</span>).<span class="ident">fg</span>(<span class="ident">Color::WHITE</span>)))
.<span class="ident">into_widget</span>(<span class="ident">ctx</span>)
})
.<span class="ident">collect</span>();
<span class="ident">legend</span>.<span class="ident">push</span>(<span class="ident">uphill_legend</span>);
<span class="kw">let</span> <span class="ident">legend</span> <span class="op">=</span> <span class="ident">Widget::custom_row</span>(<span class="ident">legend</span>);
<span class="self">self</span>.<span class="ident">bottom_right_panel</span>
.<span class="ident">replace</span>(<span class="ident">ctx</span>, <span class="string">&quot;steep streets legend&quot;</span>, <span class="ident">legend</span>);
<span class="self">self</span>.<span class="ident">steep_streets</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">colorer</span>.<span class="ident">unzoomed</span>.<span class="ident">upload</span>(<span class="ident">ctx</span>));
} <span class="kw">else</span> {
<span class="self">self</span>.<span class="ident">steep_streets</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="self">self</span>.<span class="ident">bottom_right_panel</span>.<span class="ident">replace</span>(
<span class="ident">ctx</span>,
<span class="string">&quot;steep streets legend&quot;</span>,
<span class="ident">Text::new</span>().<span class="ident">into_widget</span>(<span class="ident">ctx</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> {}
}
<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">bottom_right_panel</span>.<span class="ident">currently_hovering</span>().<span class="ident">cloned</span>() {
<span class="self">self</span>.<span class="ident">highlight_road_type</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="kw-2">&amp;</span><span class="ident">name</span>);
}
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">zoom_enabled_cache_key</span> <span class="op">!</span><span class="op">=</span> <span class="ident">zoom_enabled_cache_key</span>(<span class="ident">ctx</span>) {
<span class="comment">// approriately disable/enable zoom buttons in case user scroll-zoomed</span>
<span class="self">self</span>.<span class="ident">bottom_right_panel</span> <span class="op">=</span> <span class="ident">make_bottom_right_panel</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">labels</span>.<span class="ident">is_some</span>(),
<span class="self">self</span>.<span class="ident">elevation</span>,
<span class="self">self</span>.<span class="ident">steep_streets</span>.<span class="ident">is_some</span>(),
);
<span class="self">self</span>.<span class="ident">zoom_enabled_cache_key</span> <span class="op">=</span> <span class="ident">zoom_enabled_cache_key</span>(<span class="ident">ctx</span>);
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">t</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">layers</span>.<span class="ident">event</span>(<span class="ident">ctx</span>, <span class="ident">app</span>) {
<span class="kw">return</span> <span class="ident">t</span>;
}
<span class="ident">Transition::Keep</span>
@ -1029,31 +470,8 @@
<span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>) {
<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">bottom_right_panel</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="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="kw">let</span> <span class="prelude-val">Some</span>(<span class="kw-2">ref</span> <span class="ident">l</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">labels</span> {
<span class="ident">l</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">draw</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">steep_streets</span> {
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="ident">draw</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">bottom_right_panel</span>.<span class="ident">currently_hovering</span>() {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">draw</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">road_types</span>.<span class="ident">get</span>(<span class="ident">name</span>) {
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="ident">draw</span>);
}
}
}
<span class="self">self</span>.<span class="ident">layers</span>.<span class="ident">draw</span>(<span class="ident">g</span>, <span class="ident">app</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="ident">g</span>.<span class="ident">redraw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">edits_layer</span>);
}
}
@ -1101,7 +519,7 @@
);
<span class="ident">file_management</span>.<span class="ident">push</span>(<span class="ident">ColorLegend::row</span>(
<span class="ident">ctx</span>,
<span class="kw-2">*</span><span class="kw">crate</span><span class="ident">::ungap::layers::EDITED_COLOR</span>,
<span class="kw-2">*</span><span class="kw">crate</span><span class="ident">::ungap::bike_network::EDITED_COLOR</span>,
<span class="string">&quot;changed road&quot;</span>,
));
<span class="ident">file_management</span>.<span class="ident">push</span>(<span class="ident">Widget::row</span>(<span class="macro">vec!</span>[
@ -1163,139 +581,5 @@
.<span class="ident">aligned</span>(<span class="ident">HorizontalAlignment::Right</span>, <span class="ident">VerticalAlignment::Top</span>)
.<span class="ident">build</span>(<span class="ident">ctx</span>)
}
<span class="kw">fn</span> <span class="ident">make_zoom_controls</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Widget</span> {
<span class="kw">let</span> <span class="ident">builder</span> <span class="op">=</span> <span class="ident">ctx</span>
.<span class="ident">style</span>()
.<span class="ident">btn_floating</span>
.<span class="ident">btn</span>()
.<span class="ident">image_dims</span>(<span class="number">30.0</span>)
.<span class="ident">outline</span>((<span class="number">1.0</span>, <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_plain</span>.<span class="ident">fg</span>), <span class="ident">ControlState::Default</span>)
.<span class="ident">padding</span>(<span class="number">12.0</span>);
<span class="ident">Widget::custom_col</span>(<span class="macro">vec!</span>[
<span class="ident">builder</span>
.<span class="ident">clone</span>()
.<span class="ident">image_path</span>(<span class="string">&quot;system/assets/speed/plus.svg&quot;</span>)
.<span class="ident">corner_rounding</span>(<span class="ident">geom::CornerRadii</span> {
<span class="ident">top_left</span>: <span class="number">16.0</span>,
<span class="ident">top_right</span>: <span class="number">16.0</span>,
<span class="ident">bottom_right</span>: <span class="number">0.0</span>,
<span class="ident">bottom_left</span>: <span class="number">0.0</span>,
})
.<span class="ident">disabled</span>(<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">is_max_zoom</span>())
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;zoom map in&quot;</span>),
<span class="ident">builder</span>
.<span class="ident">image_path</span>(<span class="string">&quot;system/assets/speed/minus.svg&quot;</span>)
.<span class="ident">image_dims</span>(<span class="number">30.0</span>)
.<span class="ident">padding</span>(<span class="number">12.0</span>)
.<span class="ident">corner_rounding</span>(<span class="ident">geom::CornerRadii</span> {
<span class="ident">top_left</span>: <span class="number">0.0</span>,
<span class="ident">top_right</span>: <span class="number">0.0</span>,
<span class="ident">bottom_right</span>: <span class="number">16.0</span>,
<span class="ident">bottom_left</span>: <span class="number">16.0</span>,
})
.<span class="ident">disabled</span>(<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">is_min_zoom</span>())
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;zoom map out&quot;</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">labels</span>: <span class="ident">bool</span>,
<span class="ident">elevation</span>: <span class="ident">bool</span>,
<span class="ident">steep_streets</span>: <span class="ident">bool</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Widget</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>
<span class="ident">legend_item</span>(<span class="ident">ctx</span>, <span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">unzoomed_highway</span>, <span class="string">&quot;highway&quot;</span>),
<span class="ident">legend_item</span>(<span class="ident">ctx</span>, <span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">unzoomed_arterial</span>, <span class="string">&quot;major street&quot;</span>),
<span class="ident">legend_item</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_item</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_item</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_item</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>),
<span class="ident">legend_item</span>(<span class="ident">ctx</span>, <span class="kw-2">*</span><span class="ident">layers::GREENWAY</span>, <span class="string">&quot;greenway&quot;</span>),
]),
<span class="comment">// TODO Distinguish door-zone bike lanes?</span>
<span class="comment">// TODO Call out bike turning boxes?</span>
<span class="comment">// TODO Call out bike signals?</span>
<span class="ident">Toggle::checkbox</span>(<span class="ident">ctx</span>, <span class="string">&quot;road labels&quot;</span>, <span class="ident">Key::L</span>, <span class="ident">labels</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;elevation&quot;</span>, <span class="ident">Key::E</span>, <span class="ident">elevation</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 elevation data&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;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;steep streets&quot;</span>, <span class="ident">Key::S</span>, <span class="ident">steep_streets</span>),
<span class="comment">// A placeholder</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;steep streets legend&quot;</span>),
]),
<span class="comment">// TODO Probably a collisions layer</span>
])
}
<span class="kw">fn</span> <span class="ident">make_bottom_right_panel</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">labels</span>: <span class="ident">bool</span>,
<span class="ident">elevation</span>: <span class="ident">bool</span>,
<span class="ident">steep_streets</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">make_zoom_controls</span>(<span class="ident">ctx</span>).<span class="ident">align_right</span>().<span class="ident">padding_right</span>(<span class="number">16</span>),
<span class="ident">make_legend</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">bike_network</span>, <span class="ident">labels</span>, <span class="ident">elevation</span>, <span class="ident">steep_streets</span>)
.<span class="ident">padding</span>(<span class="number">16</span>)
.<span class="ident">bg</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">panel_bg</span>),
]))
.<span class="ident">aligned</span>(<span class="ident">HorizontalAlignment::Right</span>, <span class="ident">VerticalAlignment::Bottom</span>)
.<span class="ident">build_custom</span>(<span class="ident">ctx</span>)
}
<span class="kw">fn</span> <span class="ident">legend_batch</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">color</span>: <span class="ident">Color</span>, <span class="ident">txt</span>: <span class="ident">Text</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">GeomBatch</span> {
<span class="comment">// TODO Height of the &quot;trail&quot; button is slightly too low!</span>
<span class="comment">// Text with padding and a background color</span>
<span class="kw">let</span> (<span class="kw-2">mut</span> <span class="ident">batch</span>, <span class="ident">hitbox</span>) <span class="op">=</span> <span class="ident">txt</span>
.<span class="ident">render</span>(<span class="ident">ctx</span>)
.<span class="ident">batch</span>()
.<span class="ident">container</span>()
.<span class="ident">padding</span>(<span class="ident">EdgeInsets</span> {
<span class="ident">top</span>: <span class="number">10.0</span>,
<span class="ident">bottom</span>: <span class="number">10.0</span>,
<span class="ident">left</span>: <span class="number">20.0</span>,
<span class="ident">right</span>: <span class="number">20.0</span>,
})
.<span class="ident">into_geom</span>(<span class="ident">ctx</span>, <span class="prelude-val">None</span>);
<span class="ident">batch</span>.<span class="ident">unshift</span>(<span class="ident">color</span>, <span class="ident">hitbox</span>);
<span class="ident">batch</span>
}
<span class="kw">fn</span> <span class="ident">legend_item</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">color</span>: <span class="ident">Color</span>, <span class="ident">label</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Widget</span> {
<span class="kw">let</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">legend_batch</span>(<span class="ident">ctx</span>, <span class="ident">color</span>, <span class="ident">Text::from</span>(<span class="ident">Line</span>(<span class="ident">label</span>)));
<span class="kw">return</span> <span class="ident">ButtonBuilder::new</span>()
.<span class="ident">custom_batch</span>(<span class="ident">batch</span>.<span class="ident">clone</span>(), <span class="ident">ControlState::Default</span>)
.<span class="ident">custom_batch</span>(
<span class="ident">batch</span>.<span class="ident">color</span>(<span class="ident">RewriteColor::Change</span>(<span class="ident">color</span>, <span class="ident">color</span>.<span class="ident">alpha</span>(<span class="number">0.6</span>))),
<span class="ident">ControlState::Hovered</span>,
)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="ident">label</span>);
}
<span class="kw">fn</span> <span class="ident">zoom_enabled_cache_key</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">&gt;</span> (<span class="ident">bool</span>, <span class="ident">bool</span>) {
(<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">is_max_zoom</span>(), <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">is_min_zoom</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>

View File

@ -307,6 +307,9 @@
<span id="305">305</span>
<span id="306">306</span>
<span id="307">307</span>
<span id="308">308</span>
<span id="309">309</span>
<span id="310">310</span>
</pre><pre class="rust">
<span class="kw">use</span> <span class="ident">abstutil::Tags</span>;
<span class="kw">use</span> <span class="ident">map_gui::tools::PopupMsg</span>;
@ -319,12 +322,13 @@
<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">::common::RouteSketcher</span>;
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::edit::apply_map_edits</span>;
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::ungap::layers</span>::{<span class="ident">render_edits</span>, <span class="ident">DrawNetworkLayer</span>};
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::ungap::bike_network::render_edits</span>;
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::ungap::layers::Layers</span>;
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::ungap::magnifying::MagnifyingGlass</span>;
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">QuickSketch</span> {
<span class="ident">top_panel</span>: <span class="ident">Panel</span>,
<span class="ident">network_layer</span>: <span class="ident">DrawNetworkLayer</span>,
<span class="ident">layers</span>: <span class="ident">Layers</span>,
<span class="ident">edits_layer</span>: <span class="ident">Drawable</span>,
<span class="ident">magnifying_glass</span>: <span class="ident">MagnifyingGlass</span>,
<span class="ident">route_sketcher</span>: <span class="ident">RouteSketcher</span>,
@ -334,8 +338,8 @@
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new_state</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="kw-2">mut</span> <span class="ident">App</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Box</span><span class="op">&lt;</span><span class="kw">dyn</span> <span class="ident">State</span><span class="op">&lt;</span><span class="ident">App</span><span class="op">&gt;</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">qs</span> <span class="op">=</span> <span class="ident">QuickSketch</span> {
<span class="ident">top_panel</span>: <span class="ident">Panel::empty</span>(<span class="ident">ctx</span>),
<span class="ident">layers</span>: <span class="ident">Layers::new</span>(<span class="ident">ctx</span>, <span class="ident">app</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">edits_layer</span>: <span class="ident">render_edits</span>(<span class="ident">ctx</span>, <span class="ident">app</span>),
<span class="ident">route_sketcher</span>: <span class="ident">RouteSketcher::new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>),
};
@ -428,15 +432,17 @@
<span class="self">self</span>.<span class="ident">update_top_panel</span>(<span class="ident">ctx</span>);
}
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">t</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">layers</span>.<span class="ident">event</span>(<span class="ident">ctx</span>, <span class="ident">app</span>) {
<span class="kw">return</span> <span class="ident">t</span>;
}
<span class="ident">Transition::Keep</span>
}
<span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>) {
<span class="self">self</span>.<span class="ident">top_panel</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="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="self">self</span>.<span class="ident">layers</span>.<span class="ident">draw</span>(<span class="ident">g</span>, <span class="ident">app</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="ident">g</span>.<span class="ident">redraw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">edits_layer</span>);
<span class="self">self</span>.<span class="ident">route_sketcher</span>.<span class="ident">draw</span>(<span class="ident">g</span>);
}

View File

@ -410,6 +410,16 @@
<span id="408">408</span>
<span id="409">409</span>
<span id="410">410</span>
<span id="411">411</span>
<span id="412">412</span>
<span id="413">413</span>
<span id="414">414</span>
<span id="415">415</span>
<span id="416">416</span>
<span id="417">417</span>
<span id="418">418</span>
<span id="419">419</span>
<span id="420">420</span>
</pre><pre class="rust">
<span class="kw">use</span> <span class="ident">std::collections::HashSet</span>;
@ -426,8 +436,11 @@
};
<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">::ungap::layers::Layers</span>;
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">RoutePlanner</span> {
<span class="ident">layers</span>: <span class="ident">Layers</span>,
<span class="comment">// All of this manages the waypoint input</span>
<span class="ident">input_panel</span>: <span class="ident">Panel</span>,
<span class="ident">waypoints</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">Waypoint</span><span class="op">&gt;</span>,
@ -469,6 +482,8 @@
}
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rp</span> <span class="op">=</span> <span class="ident">RoutePlanner</span> {
<span class="ident">layers</span>: <span class="ident">Layers::new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>),
<span class="ident">input_panel</span>: <span class="ident">Panel::empty</span>(<span class="ident">ctx</span>),
<span class="ident">waypoints</span>: <span class="ident">Vec::new</span>(),
<span class="ident">draw_waypoints</span>: <span class="ident">Drawable::empty</span>(<span class="ident">ctx</span>),
@ -774,10 +789,15 @@
}
}
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">t</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">layers</span>.<span class="ident">event</span>(<span class="ident">ctx</span>, <span class="ident">app</span>) {
<span class="kw">return</span> <span class="ident">t</span>;
}
<span class="ident">Transition::Keep</span>
}
<span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>, <span class="kw">_</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>) {
<span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>) {
<span class="self">self</span>.<span class="ident">layers</span>.<span class="ident">draw</span>(<span class="ident">g</span>, <span class="ident">app</span>);
<span class="self">self</span>.<span class="ident">input_panel</span>.<span class="ident">draw</span>(<span class="ident">g</span>);
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">draw_waypoints</span>);
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">draw_hover</span>);