This commit is contained in:
dabreegster 2021-07-26 20:09:32 +00:00
parent a83ba5a66d
commit e2003463c4
7 changed files with 39 additions and 19 deletions

View File

@ -175,9 +175,9 @@ call this to handle all other events. <a href="#method.other_event">Read more</a
</div><h4 id="method.draw_baselayer-21" class="method hidden trait-impl"><code>fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</code><a href="#method.draw_baselayer-21" class="anchor"></a><a class="srclink" href="../../src/game/devtools/mod.rs.html#180-182" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
</div><h4 id="method.draw-22" class="method hidden trait-impl"><code>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>)</code><a href="#method.draw-22" class="anchor"></a><a class="srclink" href="../../src/game/devtools/mod.rs.html#184-187" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
</div><h4 id="method.on_destroy-21" class="method hidden trait-impl"><code>pub fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A)</code><a href="#method.on_destroy-21" class="anchor"></a></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-State%3CApp%3E-22" class="impl"><code class="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="../edit/multiple_roads/struct.SelectSegments.html" title="struct game::edit::multiple_roads::SelectSegments">SelectSegments</a></code><a href="#impl-State%3CApp%3E-22" class="anchor"></a><a class="srclink" href="../../src/game/edit/multiple_roads.rs.html#156-268" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.event-22" class="method hidden trait-impl"><code>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;</code><a href="#method.event-22" class="anchor"></a><a class="srclink" href="../../src/game/edit/multiple_roads.rs.html#157-237" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
</div><h4 id="method.draw-23" class="method hidden trait-impl"><code>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>)</code><a href="#method.draw-23" class="anchor"></a><a class="srclink" href="../../src/game/edit/multiple_roads.rs.html#239-262" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
</div><h4 id="method.on_destroy-22" class="method hidden trait-impl"><code>fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, _: &amp;mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>)</code><a href="#method.on_destroy-22" class="anchor"></a><a class="srclink" href="../../src/game/edit/multiple_roads.rs.html#264-267" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-State%3CApp%3E-22" class="impl"><code class="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="../edit/multiple_roads/struct.SelectSegments.html" title="struct game::edit::multiple_roads::SelectSegments">SelectSegments</a></code><a href="#impl-State%3CApp%3E-22" class="anchor"></a><a class="srclink" href="../../src/game/edit/multiple_roads.rs.html#156-278" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.event-22" class="method hidden trait-impl"><code>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;</code><a href="#method.event-22" class="anchor"></a><a class="srclink" href="../../src/game/edit/multiple_roads.rs.html#157-243" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
</div><h4 id="method.draw-23" class="method hidden trait-impl"><code>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>)</code><a href="#method.draw-23" class="anchor"></a><a class="srclink" href="../../src/game/edit/multiple_roads.rs.html#245-272" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
</div><h4 id="method.on_destroy-22" class="method hidden trait-impl"><code>fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, _: &amp;mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>)</code><a href="#method.on_destroy-22" class="anchor"></a><a class="srclink" href="../../src/game/edit/multiple_roads.rs.html#274-277" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
</div><h4 id="method.draw_baselayer-22" class="method hidden trait-impl"><code>pub fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</code><a href="#method.draw_baselayer-22" class="anchor"></a></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-State%3CApp%3E-23" class="impl"><code class="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="../edit/roads/struct.RoadEditor.html" title="struct game::edit::roads::RoadEditor">RoadEditor</a></code><a href="#impl-State%3CApp%3E-23" class="anchor"></a><a class="srclink" href="../../src/game/edit/roads.rs.html#141-373" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.event-23" class="method hidden trait-impl"><code>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;</code><a href="#method.event-23" class="anchor"></a><a class="srclink" href="../../src/game/edit/roads.rs.html#142-366" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
</div><h4 id="method.draw-24" class="method hidden trait-impl"><code>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>)</code><a href="#method.draw-24" class="anchor"></a><a class="srclink" href="../../src/game/edit/roads.rs.html#368-372" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="After a single road has been edited, these states let the changes be copied to all similar road segments. Note that only lane configuration is copied, not speed limit or access restrictions."><meta name="keywords" content="rust, rustlang, rust-lang, multiple_roads"><title>game::edit::multiple_roads - 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><p class="location">Module multiple_roads</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">edit</a></p><div id="sidebar-vars" data-name="multiple_roads" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" 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" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><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">edit</a>::<wbr><a class="mod" href="">multiple_roads</a><button id="copy-path" onclick="copy_path(this)"></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/edit/multiple_roads.rs.html#1-268" title="goto source code">[src]</a></span></h1><div class="docblock"><p>After a single road has been edited, these states let the changes be copied to all similar road
<a id="settings-menu" href="../../../settings.html"><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">edit</a>::<wbr><a class="mod" href="">multiple_roads</a><button id="copy-path" onclick="copy_path(this)"></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/edit/multiple_roads.rs.html#1-278" title="goto source code">[src]</a></span></h1><div class="docblock"><p>After a single road has been edited, these states let the changes be copied to all similar road
segments. Note that only lane configuration is copied, not speed limit or access restrictions.</p>
</div><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.SelectSegments.html" title="game::edit::multiple_roads::SelectSegments struct">SelectSegments</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>

File diff suppressed because one or more lines are too long

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="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"><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a></p><div id="sidebar-vars" data-name="BUILT_TIME_UTC" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" 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" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><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)"></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-b46195c1bf7e0216/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/nightly/std/primitive.str.html">str</a> = r&quot;Mon, 26 Jul 2021 19:59:38 +0000&quot;;</pre><div class="docblock"><p>The build time in RFC2822, UTC.</p>
<a id="settings-menu" href="../../../settings.html"><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)"></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-b46195c1bf7e0216/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/nightly/std/primitive.str.html">str</a> = r&quot;Mon, 26 Jul 2021 20:08:26 +0000&quot;;</pre><div class="docblock"><p>The build time in RFC2822, UTC.</p>
</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></body></html>

File diff suppressed because one or more lines are too long

View File

@ -269,6 +269,16 @@
<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>
</pre><div class="example-wrap"><pre class="rust ">
<span class="doccomment">//! After a single road has been edited, these states let the changes be copied to all similar road</span>
<span class="doccomment">//! segments. Note that only lane configuration is copied, not speed limit or access restrictions.</span>
@ -280,8 +290,8 @@
<span class="kw">use</span> <span class="ident">map_gui::ID</span>;
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">EditRoad</span>, <span class="ident">MapEdits</span>, <span class="ident">RoadID</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="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="ident">Drawable</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">State</span>,
<span class="ident">Text</span>, <span class="ident">TextExt</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>;
@ -353,7 +363,7 @@
<span class="comment">// Update the drawn view</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">let</span> <span class="ident">color</span> <span class="op">=</span> <span class="ident">Color::hex</span>(<span class="string">&quot;#204AA1&quot;</span>);
<span class="kw">let</span> <span class="ident">color</span> <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">primary_fg</span>;
<span class="comment">// Some alpha is always useful, in case the player wants to peek at the lanes beneath</span>
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">color</span>.<span class="ident">alpha</span>(<span class="number">0.8</span>),
@ -490,18 +500,24 @@
<span class="self">self</span>.<span class="ident">selected</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">r</span>);
<span class="ident">ctx</span>.<span class="ident">hide_cursor</span>();
}
<span class="kw">if</span> <span class="ident">r</span> <span class="op">=</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">base_road</span> {
<span class="self">self</span>.<span class="ident">selected</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">r</span>);
}
}
}
<span class="ident">ctx</span>.<span class="ident">canvas_movement</span>();
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">r</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">selected</span> {
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">current</span>.<span class="ident">contains</span>(<span class="kw-2">&amp;</span><span class="ident">r</span>) <span class="op">&amp;&amp;</span> <span class="ident">app</span>.<span class="ident">per_obj</span>.<span class="ident">left_click</span>(<span class="ident">ctx</span>, <span class="string">&quot;exclude road&quot;</span>) {
<span class="self">self</span>.<span class="ident">current</span>.<span class="ident">remove</span>(<span class="kw-2">&amp;</span><span class="ident">r</span>);
<span class="self">self</span>.<span class="ident">recalculate</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
} <span class="kw">else</span> <span class="kw">if</span> <span class="op">!</span><span class="self">self</span>.<span class="ident">current</span>.<span class="ident">contains</span>(<span class="kw-2">&amp;</span><span class="ident">r</span>) <span class="op">&amp;&amp;</span> <span class="ident">app</span>.<span class="ident">per_obj</span>.<span class="ident">left_click</span>(<span class="ident">ctx</span>, <span class="string">&quot;include road&quot;</span>) {
<span class="self">self</span>.<span class="ident">current</span>.<span class="ident">insert</span>(<span class="ident">r</span>);
<span class="self">self</span>.<span class="ident">recalculate</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="kw">if</span> <span class="ident">r</span> <span class="op">!</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">base_road</span> {
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">current</span>.<span class="ident">contains</span>(<span class="kw-2">&amp;</span><span class="ident">r</span>) <span class="op">&amp;&amp;</span> <span class="ident">app</span>.<span class="ident">per_obj</span>.<span class="ident">left_click</span>(<span class="ident">ctx</span>, <span class="string">&quot;exclude road&quot;</span>) {
<span class="self">self</span>.<span class="ident">current</span>.<span class="ident">remove</span>(<span class="kw-2">&amp;</span><span class="ident">r</span>);
<span class="self">self</span>.<span class="ident">recalculate</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
} <span class="kw">else</span> <span class="kw">if</span> <span class="op">!</span><span class="self">self</span>.<span class="ident">current</span>.<span class="ident">contains</span>(<span class="kw-2">&amp;</span><span class="ident">r</span>) <span class="op">&amp;&amp;</span> <span class="ident">app</span>.<span class="ident">per_obj</span>.<span class="ident">left_click</span>(<span class="ident">ctx</span>, <span class="string">&quot;include road&quot;</span>)
{
<span class="self">self</span>.<span class="ident">current</span>.<span class="ident">insert</span>(<span class="ident">r</span>);
<span class="self">self</span>.<span class="ident">recalculate</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
}
}
}
@ -530,6 +546,10 @@
<span class="ident">batch</span>.<span class="ident">draw</span>(<span class="ident">g</span>);
<span class="ident">g</span>.<span class="ident">unfork</span>();
}
<span class="kw">if</span> <span class="ident">r</span> <span class="op">=</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">base_road</span> {
<span class="ident">g</span>.<span class="ident">draw_mouse_tooltip</span>(<span class="ident">Text::from</span>(<span class="macro">format!</span>(<span class="string">&quot;Edited {}&quot;</span>, <span class="ident">r</span>)));
}
}
}

View File

@ -178,7 +178,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.53.0 (53cb7b09b 2021-06-17)&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;Mon, 26 Jul 2021 19:59:38 +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;Mon, 26 Jul 2021 20:08:26 +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>;