This commit is contained in:
dabreegster 2021-09-17 19:43:55 +00:00
parent 12a6be61b0
commit d0c25846c9
11 changed files with 58 additions and 31 deletions

View File

@ -47,11 +47,11 @@ the event and immediately apply the transition. <a href="#method.panel_changed">
call this to handle all other events. <a href="#method.other_event">Read more</a></p>
</div></details><div id="method.draw_baselayer-62" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/debug/uber_turns.rs.html#236-238" title="goto source code">[src]</a></div><a href="#method.draw_baselayer-62" class="anchor"></a><h4 class="code-header">fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</h4></div><div id="method.draw-63" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/debug/uber_turns.rs.html#240-247" title="goto source code">[src]</a></div><a href="#method.draw-63" class="anchor"></a><h4 class="code-header">fn <a href="#method.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></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_click_custom-1" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.on_click_custom-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.on_click_custom" class="fnname">on_click_custom</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: <a class="primitive" href="https://doc.rust-lang.org/1.55.0/std/primitive.reference.html">&amp;mut </a>A, <br>&nbsp;&nbsp;&nbsp;&nbsp;_action: <a class="struct" href="https://doc.rust-lang.org/1.55.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="../../abstutil/clone/trait.CloneableAny.html" title="trait abstutil::clone::CloneableAny">CloneableAny</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/1.55.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;_panel: &amp;Panel<br>) -&gt; Transition&lt;A&gt;</h4></div></summary><div class='docblock'><p>Called when something on the panel has been clicked.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_mouseover-1" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.on_mouseover-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.on_mouseover" class="fnname">on_mouseover</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/1.55.0/std/primitive.reference.html">&amp;mut </a>A)</h4></div></summary><div class='docblock'><p>Called when the mouse has moved.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-SimpleState%3CApp%3E-10" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/route.rs.html#655-718" title="goto source code">[src]</a></div><a href="#impl-SimpleState%3CApp%3E-10" class="anchor"></a><h3 class="code-header in-band">impl SimpleState&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../ungap/route/struct.RenameEdits.html" title="struct game::ungap::route::RenameEdits">RenameEdits</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_click-10" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/route.rs.html#656-680" title="goto source code">[src]</a></div><a href="#method.on_click-10" class="anchor"></a><h4 class="code-header">fn <a class="fnname">on_click</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;x: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.55.0/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;panel: &amp;Panel<br>) -&gt; Transition&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt;</h4></div></summary><div class='docblock'><p>Called when something on the panel has been clicked. Since the action is just a string,
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-SimpleState%3CApp%3E-10" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/route.rs.html#668-731" title="goto source code">[src]</a></div><a href="#impl-SimpleState%3CApp%3E-10" class="anchor"></a><h3 class="code-header in-band">impl SimpleState&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../ungap/route/struct.RenameEdits.html" title="struct game::ungap::route::RenameEdits">RenameEdits</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_click-10" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/route.rs.html#669-693" title="goto source code">[src]</a></div><a href="#method.on_click-10" class="anchor"></a><h4 class="code-header">fn <a class="fnname">on_click</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;x: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.55.0/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;panel: &amp;Panel<br>) -&gt; Transition&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt;</h4></div></summary><div class='docblock'><p>Called when something on the panel has been clicked. Since the action is just a string,
the fallback case can just use <code>unreachable!()</code>. <a href="#tymethod.on_click">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.panel_changed-11" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/route.rs.html#682-713" title="goto source code">[src]</a></div><a href="#method.panel_changed-11" class="anchor"></a><h4 class="code-header">fn <a href="#method.panel_changed" class="fnname">panel_changed</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;_: &amp;mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;panel: &amp;mut Panel<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.55.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Transition&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt;&gt;</h4></div></summary><div class='docblock'><p>Called when something on the panel has changed. If a transition is returned, stop handling
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.panel_changed-11" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/route.rs.html#695-726" title="goto source code">[src]</a></div><a href="#method.panel_changed-11" class="anchor"></a><h4 class="code-header">fn <a href="#method.panel_changed" class="fnname">panel_changed</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;_: &amp;mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;panel: &amp;mut Panel<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.55.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Transition&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt;&gt;</h4></div></summary><div class='docblock'><p>Called when something on the panel has changed. If a transition is returned, stop handling
the event and immediately apply the transition. <a href="#method.panel_changed">Read more</a></p>
</div></details><div id="method.draw-72" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/route.rs.html#715-717" title="goto source code">[src]</a></div><a href="#method.draw-72" class="anchor"></a><h4 class="code-header">fn <a href="#method.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></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_click_custom-10" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.on_click_custom-10" class="anchor"></a><h4 class="code-header">fn <a href="#method.on_click_custom" class="fnname">on_click_custom</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: <a class="primitive" href="https://doc.rust-lang.org/1.55.0/std/primitive.reference.html">&amp;mut </a>A, <br>&nbsp;&nbsp;&nbsp;&nbsp;_action: <a class="struct" href="https://doc.rust-lang.org/1.55.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="../../abstutil/clone/trait.CloneableAny.html" title="trait abstutil::clone::CloneableAny">CloneableAny</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/1.55.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;_panel: &amp;Panel<br>) -&gt; Transition&lt;A&gt;</h4></div></summary><div class='docblock'><p>Called when something on the panel has been clicked.</p>
</div></details><div id="method.draw-72" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/route.rs.html#728-730" title="goto source code">[src]</a></div><a href="#method.draw-72" class="anchor"></a><h4 class="code-header">fn <a href="#method.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></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_click_custom-10" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.on_click_custom-10" class="anchor"></a><h4 class="code-header">fn <a href="#method.on_click_custom" class="fnname">on_click_custom</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: <a class="primitive" href="https://doc.rust-lang.org/1.55.0/std/primitive.reference.html">&amp;mut </a>A, <br>&nbsp;&nbsp;&nbsp;&nbsp;_action: <a class="struct" href="https://doc.rust-lang.org/1.55.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="../../abstutil/clone/trait.CloneableAny.html" title="trait abstutil::clone::CloneableAny">CloneableAny</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/1.55.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;_panel: &amp;Panel<br>) -&gt; Transition&lt;A&gt;</h4></div></summary><div class='docblock'><p>Called when something on the panel has been clicked.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_mouseover-10" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.on_mouseover-10" class="anchor"></a><h4 class="code-header">fn <a href="#method.on_mouseover" class="fnname">on_mouseover</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/1.55.0/std/primitive.reference.html">&amp;mut </a>A)</h4></div></summary><div class='docblock'><p>Called when the mouse has moved.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.other_event-10" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.other_event-10" class="anchor"></a><h4 class="code-header">fn <a href="#method.other_event" class="fnname">other_event</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/1.55.0/std/primitive.reference.html">&amp;mut </a>A) -&gt; Transition&lt;A&gt;</h4></div></summary><div class='docblock'><p>If a panel <code>on_click</code> event didnt occur and <code>panel_changed</code> didnt return transition, then
call this to handle all other events. <a href="#method.other_event">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="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 width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></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 width="18" height="18" alt="Change settings" src="../../../wheel.svg"></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-0716a03cc01a18cb/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.55.0/std/primitive.str.html">str</a> = r&quot;Fri, 17 Sep 2021 19:37:10 +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>
<!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 width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></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 width="18" height="18" alt="Change settings" src="../../../wheel.svg"></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-0716a03cc01a18cb/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.55.0/std/primitive.str.html">str</a> = r&quot;Fri, 17 Sep 2021 19:42:31 +0000&quot;;</pre><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
</div></details></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
<script src="../../../main.js"></script>
</body></html>

View File

@ -1,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 width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></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 width="18" height="18" alt="Change settings" src="../../../wheel.svg"></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-718" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<!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 width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></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 width="18" height="18" alt="Change settings" src="../../../wheel.svg"></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-731" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<div class="item-table"><div class="item-left module-item"><a class="struct" href="struct.NamedRoute.html" title="game::ungap::route::NamedRoute struct">NamedRoute</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="struct" href="struct.RenameEdits.html" title="game::ungap::route::RenameEdits struct">RenameEdits</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="struct" href="struct.RouteManagement.html" title="game::ungap::route::RouteManagement struct">RouteManagement</a></div><div class="item-right docblock-short"><p>Save sequences of waypoints as named routes. Basic file management save, load, browse. This
is useful to define “test cases,” then edit the bike network and “run the tests” to compare
results.</p>

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

@ -175,7 +175,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.55.0 (c8dfcfe04 2021-09-06)&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;Fri, 17 Sep 2021 19:37:10 +0000&quot;</span>;
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;Fri, 17 Sep 2021 19:42:31 +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

@ -716,6 +716,19 @@
<span id="716">716</span>
<span id="717">717</span>
<span id="718">718</span>
<span id="719">719</span>
<span id="720">720</span>
<span id="721">721</span>
<span id="722">722</span>
<span id="723">723</span>
<span id="724">724</span>
<span id="725">725</span>
<span id="726">726</span>
<span id="727">727</span>
<span id="728">728</span>
<span id="729">729</span>
<span id="730">730</span>
<span id="731">731</span>
</pre><pre class="rust">
<span class="kw">use</span> <span class="ident">std::collections</span>::{<span class="ident">BTreeMap</span>, <span class="ident">HashSet</span>};
@ -853,6 +866,7 @@
<span class="ident">draw_high_stress</span>: <span class="ident">Drawable</span>,
<span class="ident">draw_traffic_signals</span>: <span class="ident">Drawable</span>,
<span class="ident">draw_unprotected_turns</span>: <span class="ident">Drawable</span>,
<span class="ident">panel</span>: <span class="ident">Panel</span>,
}
@ -863,6 +877,7 @@
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">zoomed_batch</span> <span class="op">=</span> <span class="ident">GeomBatch::new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">draw_high_stress</span> <span class="op">=</span> <span class="ident">GeomBatch::new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">draw_traffic_signals</span> <span class="op">=</span> <span class="ident">GeomBatch::new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">draw_unprotected_turns</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">let</span> <span class="kw-2">mut</span> <span class="ident">total_distance</span> <span class="op">=</span> <span class="ident">Distance::ZERO</span>;
@ -913,6 +928,7 @@
<span class="ident">map</span>.<span class="ident">get_t</span>(<span class="kw-2">*</span><span class="ident">t</span>).<span class="ident">turn_type</span>,
) {
<span class="ident">num_unprotected_turns</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
<span class="ident">draw_unprotected_turns</span>.<span class="ident">push</span>(<span class="ident">Color::RED</span>, <span class="ident">i</span>.<span class="ident">polygon</span>.<span class="ident">clone</span>());
}
}
}
@ -989,12 +1005,17 @@
.<span class="ident">label_underlined_text</span>(<span class="ident">num_traffic_signals</span>.<span class="ident">to_string</span>())
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;traffic signals&quot;</span>),
]),
<span class="comment">// TODO Need tooltips and highlighting to explain and show where these are</span>
<span class="ident">Text::from_all</span>(<span class="macro">vec!</span>[
<span class="ident">Line</span>(<span class="string">&quot;Unprotected left turns onto busy roads: &quot;</span>).<span class="ident">secondary</span>(),
<span class="ident">Line</span>(<span class="ident">num_unprotected_turns</span>.<span class="ident">to_string</span>()),
])
.<span class="ident">into_widget</span>(<span class="ident">ctx</span>),
<span class="ident">Widget::row</span>(<span class="macro">vec!</span>[
<span class="ident">Line</span>(<span class="string">&quot;Unprotected left turns onto busy roads: &quot;</span>)
.<span class="ident">secondary</span>()
.<span class="ident">into_widget</span>(<span class="ident">ctx</span>)
.<span class="ident">centered_vert</span>(),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_plain</span>
.<span class="ident">btn</span>()
.<span class="ident">label_underlined_text</span>(<span class="ident">num_unprotected_turns</span>.<span class="ident">to_string</span>())
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;unprotected turns&quot;</span>),
]),
<span class="ident">Text::from_all</span>(<span class="macro">vec!</span>[
<span class="ident">Line</span>(<span class="string">&quot;Elevation change: &quot;</span>).<span class="ident">secondary</span>(),
<span class="ident">Line</span>(<span class="macro">format!</span>(
@ -1028,6 +1049,7 @@
<span class="ident">draw_route_zoomed</span>,
<span class="ident">draw_high_stress</span>: <span class="ident">ctx</span>.<span class="ident">upload</span>(<span class="ident">draw_high_stress</span>),
<span class="ident">draw_traffic_signals</span>: <span class="ident">ctx</span>.<span class="ident">upload</span>(<span class="ident">draw_traffic_signals</span>),
<span class="ident">draw_unprotected_turns</span>: <span class="ident">ctx</span>.<span class="ident">upload</span>(<span class="ident">draw_unprotected_turns</span>),
<span class="ident">panel</span>,
<span class="ident">paths</span>,
<span class="ident">closest_path_segment</span>,
@ -1053,6 +1075,7 @@
<span class="comment">// No effect. Maybe these should be toggles, so people can pan the map around and</span>
<span class="comment">// see these in more detail?</span>
<span class="string">&quot;traffic signals&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {}
<span class="string">&quot;unprotected turns&quot;</span> <span class="op">=</span><span class="op">&gt;</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> {}
@ -1154,6 +1177,9 @@
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">currently_hovering</span>() <span class="op">=</span><span class="op">=</span> <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="string">&quot;traffic signals&quot;</span>.<span class="ident">to_string</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_traffic_signals</span>);
}
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">currently_hovering</span>() <span class="op">=</span><span class="op">=</span> <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="string">&quot;unprotected turns&quot;</span>.<span class="ident">to_string</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_unprotected_turns</span>);
}
}
}