mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-29 01:13:53 +03:00
deploy: 54eee6d3e4
This commit is contained in:
parent
df5b87f6a2
commit
49dbea9f04
@ -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 `make_upzone_panel` fn in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, make_upzone_panel"><title>experiment::before_level::make_upzone_panel - 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 src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../experiment/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'>experiment</a>::<wbr><a href='index.html'>before_level</a></p><script>window.sidebarCurrent = {name: 'make_upzone_panel', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/experiment/before_level.rs.html#233-268' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>before_level</a>::<wbr><a class="fn" href=''>make_upzone_panel</a></span></h1><pre class='rust fn'>fn make_upzone_panel(<br> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>, <br> num_picked: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -> Panel</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/experiment/before_level.rs.html#266-301' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>before_level</a>::<wbr><a class="fn" href=''>make_upzone_panel</a></span></h1><pre class='rust fn'>fn make_upzone_panel(<br> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>, <br> num_picked: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -> Panel</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
@ -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 `make_vehicle_panel` fn in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, make_vehicle_panel"><title>experiment::before_level::make_vehicle_panel - 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 src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../experiment/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'>experiment</a>::<wbr><a href='index.html'>before_level</a></p><script>window.sidebarCurrent = {name: 'make_vehicle_panel', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/experiment/before_level.rs.html#175-231' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>before_level</a>::<wbr><a class="fn" href=''>make_vehicle_panel</a></span></h1><pre class='rust fn'>fn make_vehicle_panel(ctx: &mut EventCtx<'_>, app: &<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>) -> Panel</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/experiment/before_level.rs.html#208-264' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>before_level</a>::<wbr><a class="fn" href=''>make_vehicle_panel</a></span></h1><pre class='rust fn'>fn make_vehicle_panel(ctx: &mut EventCtx<'_>, app: &<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>) -> Panel</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
@ -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 `before_level` mod in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, before_level"><title>experiment::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 src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module before_level</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#constants">Constants</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../index.html'>experiment</a></p><script>window.sidebarCurrent = {name: 'before_level', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/experiment/before_level.rs.html#1-268' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>experiment</a>::<wbr><a class="mod" href=''>before_level</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/experiment/before_level.rs.html#1-301' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>experiment</a>::<wbr><a class="mod" href=''>before_level</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.Picker.html" title='experiment::before_level::Picker struct'>Picker</a></td><td class='docblock-short'></td></tr></table><h2 id='constants' class='section-header'><a href="#constants">Constants</a></h2>
|
||||
<table><tr class='module-item'><td><a class="constant" href="constant.ZOOM.html" title='experiment::before_level::ZOOM constant'>ZOOM</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_upzone_panel.html" title='experiment::before_level::make_upzone_panel fn'>make_upzone_panel</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.make_vehicle_panel.html" title='experiment::before_level::make_vehicle_panel fn'>make_vehicle_panel</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
File diff suppressed because one or more lines are too long
@ -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 `BUILT_TIME_UTC` constant in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>game::pregame::built_info::BUILT_TIME_UTC - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</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><script>window.sidebarCurrent = {name: 'BUILT_TIME_UTC', ty: 'constant', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-c1f324f9d3d7e3b2/out/built.rs.html#53' title='goto source code'>[src]</a></span><span class='in-band'>Constant <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a>::<wbr><a class="constant" href=''>BUILT_TIME_UTC</a></span></h1><pre class='rust const'>pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "Tue, 15 Dec 2020 20:53:15 +0000";</pre><div class='docblock'><p>The built-time in RFC2822, UTC</p>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-c1f324f9d3d7e3b2/out/built.rs.html#53' title='goto source code'>[src]</a></span><span class='in-band'>Constant <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a>::<wbr><a class="constant" href=''>BUILT_TIME_UTC</a></span></h1><pre class='rust const'>pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "Tue, 15 Dec 2020 21:10:54 +0000";</pre><div class='docblock'><p>The built-time in RFC2822, UTC</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
File diff suppressed because one or more lines are too long
@ -269,6 +269,39 @@
|
||||
<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>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">HashSet</span>;
|
||||
|
||||
@ -282,8 +315,8 @@
|
||||
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">ID</span>;
|
||||
<span class="kw">use</span> <span class="ident">map_model</span>::<span class="ident">BuildingID</span>;
|
||||
<span class="kw">use</span> <span class="ident">widgetry</span>::{
|
||||
<span class="ident">Btn</span>, <span class="ident">Color</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">RewriteColor</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="ident">Btn</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">RewriteColor</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">buildings</span>::{<span class="ident">BldgState</span>, <span class="ident">Buildings</span>};
|
||||
@ -302,6 +335,7 @@
|
||||
<span class="ident">level</span>: <span class="ident">Level</span>,
|
||||
<span class="ident">bldgs</span>: <span class="ident">Buildings</span>,
|
||||
<span class="ident">current_picks</span>: <span class="ident">HashSet</span><span class="op"><</span><span class="ident">BuildingID</span><span class="op">></span>,
|
||||
<span class="ident">draw_start</span>: <span class="ident">Drawable</span>,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">Picker</span> {
|
||||
@ -312,22 +346,22 @@
|
||||
<span class="ident">level</span>.<span class="ident">map</span>.<span class="ident">clone</span>(),
|
||||
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="kw">move</span> <span class="op">|</span><span class="ident">ctx</span>, <span class="ident">app</span><span class="op">|</span> {
|
||||
<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">cam_zoom</span> <span class="op">=</span> <span class="ident">ZOOM</span>;
|
||||
<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">center_on_map_pt</span>(<span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_bounds</span>().<span class="ident">center</span>());
|
||||
<span class="kw">let</span> <span class="ident">start</span> <span class="op">=</span> <span class="ident">app</span>
|
||||
.<span class="ident">map</span>
|
||||
.<span class="ident">get_i</span>(<span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">find_i_by_osm_id</span>(<span class="ident">level</span>.<span class="ident">start</span>).<span class="ident">unwrap</span>())
|
||||
.<span class="ident">polygon</span>
|
||||
.<span class="ident">center</span>();
|
||||
<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">center_on_map_pt</span>(<span class="ident">start</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="ident">bldgs</span> <span class="op">=</span> <span class="ident">Buildings</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">HashSet</span>::<span class="ident">new</span>());
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">txt</span> <span class="op">=</span> <span class="ident">Text</span>::<span class="ident">new</span>();
|
||||
<span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">"Prepare for {}"</span>, <span class="ident">level</span>.<span class="ident">title</span>)).<span class="ident">small_heading</span>());
|
||||
<span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">"Ready for {}?"</span>, <span class="ident">level</span>.<span class="ident">title</span>)).<span class="ident">small_heading</span>());
|
||||
<span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"Goal: deliver {} presents in {}"</span>,
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">level</span>.<span class="ident">goal</span>),
|
||||
<span class="ident">level</span>.<span class="ident">time_limit</span>
|
||||
<span class="string">"Goal: deliver {} presents"</span>,
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">level</span>.<span class="ident">goal</span>)
|
||||
)));
|
||||
<span class="ident">txt</span>.<span class="ident">add_appended</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Line</span>(<span class="string">"Use the "</span>),
|
||||
<span class="ident">Line</span>(<span class="string">"arrow keys"</span>).<span class="ident">fg</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">hotkey_color</span>),
|
||||
<span class="ident">Line</span>(<span class="string">" to move"</span>),
|
||||
]);
|
||||
<span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">"Time limit: {}"</span>, <span class="ident">level</span>.<span class="ident">time_limit</span>)));
|
||||
<span class="ident">txt</span>.<span class="ident">add_appended</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Line</span>(<span class="string">"Deliver presents to "</span>),
|
||||
<span class="ident">Line</span>(<span class="string">"single-family homes"</span>).<span class="ident">fg</span>(<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">residential_building</span>),
|
||||
@ -339,15 +373,46 @@
|
||||
<span class="ident">Line</span>(<span class="string">"stores"</span>).<span class="ident">fg</span>(<span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">colors</span>.<span class="ident">store</span>),
|
||||
]);
|
||||
|
||||
<span class="kw">let</span> <span class="ident">instructions_panel</span> <span class="op">=</span> <span class="ident">Panel</span>::<span class="ident">new</span>(<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">txt</span>.<span class="ident">draw</span>(<span class="ident">ctx</span>),
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Widget</span>::<span class="ident">draw_svg</span>(<span class="ident">ctx</span>, <span class="string">"system/assets/tools/arrow_keys.svg"</span>),
|
||||
<span class="ident">Text</span>::<span class="ident">from_all</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Line</span>(<span class="string">"arrow keys"</span>).<span class="ident">fg</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">hotkey_color</span>),
|
||||
<span class="ident">Line</span>(<span class="string">" to move"</span>),
|
||||
])
|
||||
.<span class="ident">draw</span>(<span class="ident">ctx</span>),
|
||||
]),
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Widget</span>::<span class="ident">draw_svg</span>(<span class="ident">ctx</span>, <span class="string">"system/assets/tools/mouse.svg"</span>),
|
||||
<span class="ident">Text</span>::<span class="ident">from_all</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Line</span>(<span class="string">"mouse scroll wheel or touchpad"</span>).<span class="ident">fg</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">hotkey_color</span>),
|
||||
<span class="ident">Line</span>(<span class="string">" to zoom in or out"</span>),
|
||||
])
|
||||
.<span class="ident">draw</span>(<span class="ident">ctx</span>),
|
||||
]),
|
||||
<span class="ident">Text</span>::<span class="ident">from_all</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Line</span>(<span class="string">"Escape key"</span>).<span class="ident">fg</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">hotkey_color</span>),
|
||||
<span class="ident">Line</span>(<span class="string">" to pause"</span>),
|
||||
])
|
||||
.<span class="ident">draw</span>(<span class="ident">ctx</span>),
|
||||
]))
|
||||
.<span class="ident">aligned</span>(<span class="ident">HorizontalAlignment</span>::<span class="ident">Center</span>, <span class="ident">VerticalAlignment</span>::<span class="ident">BottomInset</span>)
|
||||
.<span class="ident">build</span>(<span class="ident">ctx</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="ident">draw_start</span> <span class="op">=</span> <span class="ident">GeomBatch</span>::<span class="ident">load_svg</span>(<span class="ident">ctx</span>, <span class="string">"system/assets/timeline/start_pos.svg"</span>)
|
||||
.<span class="ident">scale</span>(<span class="number">3.0</span>)
|
||||
.<span class="ident">color</span>(<span class="ident">RewriteColor</span>::<span class="ident">ChangeAll</span>(<span class="ident">Color</span>::<span class="ident">RED</span>))
|
||||
.<span class="ident">centered_on</span>(<span class="ident">start</span>);
|
||||
|
||||
<span class="ident">Transition</span>::<span class="ident">Replace</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">Picker</span> {
|
||||
<span class="ident">vehicle_panel</span>: <span class="ident">make_vehicle_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>),
|
||||
<span class="ident">upzone_panel</span>: <span class="ident">make_upzone_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="number">0</span>),
|
||||
<span class="ident">instructions_panel</span>: <span class="ident">Panel</span>::<span class="ident">new</span>(<span class="ident">txt</span>.<span class="ident">draw</span>(<span class="ident">ctx</span>).<span class="ident">container</span>())
|
||||
.<span class="ident">aligned</span>(<span class="ident">HorizontalAlignment</span>::<span class="ident">Center</span>, <span class="ident">VerticalAlignment</span>::<span class="ident">BottomInset</span>)
|
||||
.<span class="ident">build</span>(<span class="ident">ctx</span>),
|
||||
<span class="ident">instructions_panel</span>,
|
||||
<span class="ident">level</span>,
|
||||
<span class="ident">bldgs</span>,
|
||||
<span class="ident">current_picks</span>: <span class="ident">HashSet</span>::<span class="ident">new</span>(),
|
||||
<span class="ident">draw_start</span>: <span class="ident">ctx</span>.<span class="ident">upload</span>(<span class="ident">draw_start</span>),
|
||||
}))
|
||||
}),
|
||||
)
|
||||
@ -441,6 +506,7 @@
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">ID</span>::<span class="ident">Building</span>(<span class="ident">b</span>)) <span class="op">=</span> <span class="ident">app</span>.<span class="ident">current_selection</span> {
|
||||
<span class="ident">g</span>.<span class="ident">draw_polygon</span>(<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">selected</span>, <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="ident">b</span>).<span class="ident">polygon</span>.<span class="ident">clone</span>());
|
||||
}
|
||||
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">draw_start</span>);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@
|
||||
<span class="doccomment">/// The output of `rustdoc -V`</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"rustdoc 1.48.0 (7eac88abb 2020-11-16)"</span>;
|
||||
<span class="doccomment">/// The built-time in RFC2822, UTC</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"Tue, 15 Dec 2020 20:53:15 +0000"</span>;
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"Tue, 15 Dec 2020 21:10:54 +0000"</span>;
|
||||
<span class="doccomment">/// The target architecture, given by `cfg!(target_arch)`.</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"x86_64"</span>;
|
||||
<span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>
|
||||
|
Loading…
Reference in New Issue
Block a user