mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-24 09:24:26 +03:00
deploy: 1de7065562
This commit is contained in:
parent
b1c8de834e
commit
fd2f1c0b23
@ -1,4 +1,6 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `app` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, app"><title>game::app - 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="shortcut icon" href="../../favicon.ico"><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='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module app</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#traits">Traits</a></li></ul></div><p class='location'><a href='../index.html'>game</a></p><script>window.sidebarCurrent = {name: 'app', 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/game/app.rs.html#1-711' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>game</a>::<wbr><a class="mod" href=''>app</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.App.html" title='game::app::App struct'>App</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.FindDelayedIntersections.html" title='game::app::FindDelayedIntersections struct'>FindDelayedIntersections</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Flags.html" title='game::app::Flags struct'>Flags</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.PerMap.html" title='game::app::PerMap struct'>PerMap</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.PerObjectActions.html" title='game::app::PerObjectActions struct'>PerObjectActions</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.SessionState.html" title='game::app::SessionState struct'>SessionState</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.ShowEverything.html" title='game::app::ShowEverything struct'>ShowEverything</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.ShowLayers.html" title='game::app::ShowLayers struct'>ShowLayers</a></td><td class='docblock-short'></td></tr></table><h2 id='traits' class='section-header'><a href="#traits">Traits</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/game/app.rs.html#1-714' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>game</a>::<wbr><a class="mod" href=''>app</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.App.html" title='game::app::App struct'>App</a></td><td class='docblock-short'><p>The top-level data that lasts through the entire game, no matter what state the game is in.</p>
|
||||
</td></tr><tr class='module-item'><td><a class="struct" href="struct.FindDelayedIntersections.html" title='game::app::FindDelayedIntersections struct'>FindDelayedIntersections</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Flags.html" title='game::app::Flags struct'>Flags</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.PerMap.html" title='game::app::PerMap struct'>PerMap</a></td><td class='docblock-short'><p>All of the state that's bound to a specific map.</p>
|
||||
</td></tr><tr class='module-item'><td><a class="struct" href="struct.PerObjectActions.html" title='game::app::PerObjectActions struct'>PerObjectActions</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.SessionState.html" title='game::app::SessionState struct'>SessionState</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.ShowEverything.html" title='game::app::ShowEverything struct'>ShowEverything</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.ShowLayers.html" title='game::app::ShowLayers struct'>ShowLayers</a></td><td class='docblock-short'></td></tr></table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2>
|
||||
<table><tr class='module-item'><td><a class="trait" href="trait.ShowObject.html" title='game::app::ShowObject trait'>ShowObject</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 = "game";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
@ -1 +1 @@
|
||||
initSidebarItems({"struct":[["App",""],["FindDelayedIntersections",""],["Flags",""],["PerMap",""],["PerObjectActions",""],["SessionState",""],["ShowEverything",""],["ShowLayers",""]],"trait":[["ShowObject",""]]});
|
||||
initSidebarItems({"struct":[["App","The top-level data that lasts through the entire game, no matter what state the game is in."],["FindDelayedIntersections",""],["Flags",""],["PerMap","All of the state that's bound to a specific map."],["PerObjectActions",""],["SessionState",""],["ShowEverything",""],["ShowLayers",""]],"trait":[["ShowObject",""]]});
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,10 +1,14 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Flags` struct in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, Flags"><title>game::app::Flags - 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="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[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><p class='location'>Struct Flags</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.live_map_edits">live_map_edits</a><a href="#structfield.num_agents">num_agents</a><a href="#structfield.sim_flags">sim_flags</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class='location'><a href='../index.html'>game</a>::<wbr><a href='index.html'>app</a></p><script>window.sidebarCurrent = {name: 'Flags', ty: 'struct', 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/app.rs.html#522-530' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>game</a>::<wbr><a href='index.html'>app</a>::<wbr><a class="struct" href=''>Flags</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct Flags {
|
||||
<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/app.rs.html#514-522' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>game</a>::<wbr><a href='index.html'>app</a>::<wbr><a class="struct" href=''>Flags</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct Flags {
|
||||
pub sim_flags: <a class="struct" href="../../sim/make/load/struct.SimFlags.html" title="struct sim::make::load::SimFlags">SimFlags</a>,
|
||||
pub num_agents: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>,
|
||||
pub live_map_edits: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
|
||||
}</pre></div><h2 id='fields' class='fields small-section-header'>
|
||||
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.sim_flags" class="structfield small-section-header"><a href="#structfield.sim_flags" class="anchor field"></a><code>sim_flags: <a class="struct" href="../../sim/make/load/struct.SimFlags.html" title="struct sim::make::load::SimFlags">SimFlags</a></code></span><span id="structfield.num_agents" class="structfield small-section-header"><a href="#structfield.num_agents" class="anchor field"></a><code>num_agents: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>></code></span><span id="structfield.live_map_edits" class="structfield small-section-header"><a href="#structfield.live_map_edits" class="anchor field"></a><code>live_map_edits: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../game/app/struct.Flags.html" title="struct game::app::Flags">Flags</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../src/game/app.rs.html#521' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="struct" href="../../game/app/struct.Flags.html" title="struct game::app::Flags">Flags</a></code><a class='srclink' href='../../src/game/app.rs.html#521' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.sim_flags" class="structfield small-section-header"><a href="#structfield.sim_flags" class="anchor field"></a><code>sim_flags: <a class="struct" href="../../sim/make/load/struct.SimFlags.html" title="struct sim::make::load::SimFlags">SimFlags</a></code></span><span id="structfield.num_agents" class="structfield small-section-header"><a href="#structfield.num_agents" class="anchor field"></a><code>num_agents: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>></code></span><div class='docblock'><p>Number of agents to generate when requested. If unspecified, trips to/from borders will be
|
||||
included.</p>
|
||||
</div><span id="structfield.live_map_edits" class="structfield small-section-header"><a href="#structfield.live_map_edits" class="anchor field"></a><code>live_map_edits: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><div class='docblock'><p>If true, all map edits immediately apply to the live simulation. Otherwise, most edits
|
||||
require resetting to midnight.</p>
|
||||
</div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../game/app/struct.Flags.html" title="struct game::app::Flags">Flags</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../src/game/app.rs.html#513' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="struct" href="../../game/app/struct.Flags.html" title="struct game::app::Flags">Flags</a></code><a class='srclink' href='../../src/game/app.rs.html#513' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id='method.clone_from' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#131-133' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../game/app/struct.Flags.html" title="struct game::app::Flags">Flags</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../game/app/struct.Flags.html" title="struct game::app::Flags">Flags</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../game/app/struct.Flags.html" title="struct game::app::Flags">Flags</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../game/app/struct.Flags.html" title="struct game::app::Flags">Flags</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../game/app/struct.Flags.html" title="struct game::app::Flags">Flags</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></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
@ -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 `ShowObject` trait in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, ShowObject"><title>game::app::ShowObject - 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="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[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><p class='location'>Trait ShowObject</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.layers">layers</a><a href="#tymethod.show">show</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='../index.html'>game</a>::<wbr><a href='index.html'>app</a></p><script>window.sidebarCurrent = {name: 'ShowObject', ty: 'trait', 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/app.rs.html#494-497' title='goto source code'>[src]</a></span><span class='in-band'>Trait <a href='../index.html'>game</a>::<wbr><a href='index.html'>app</a>::<wbr><a class="trait" href=''>ShowObject</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust trait'>pub trait ShowObject {
|
||||
<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/app.rs.html#486-489' title='goto source code'>[src]</a></span><span class='in-band'>Trait <a href='../index.html'>game</a>::<wbr><a href='index.html'>app</a>::<wbr><a class="trait" href=''>ShowObject</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust trait'>pub trait ShowObject {
|
||||
fn <a href='#tymethod.show' class='fnname'>show</a>(&self, obj: &<a class="enum" href="../../game/helpers/enum.ID.html" title="enum game::helpers::ID">ID</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>;
|
||||
<div class='item-spacer'></div> fn <a href='#tymethod.layers' class='fnname'>layers</a>(&self) -> &<a class="struct" href="../../game/app/struct.ShowLayers.html" title="struct game::app::ShowLayers">ShowLayers</a>;
|
||||
}</pre></div>
|
||||
<h2 id='required-methods' class='small-section-header'>Required methods<a href='#required-methods' class='anchor'></a></h2><div class='methods'><h3 id='tymethod.show' class='method'><code>fn <a href='#tymethod.show' class='fnname'>show</a>(&self, obj: &<a class="enum" href="../../game/helpers/enum.ID.html" title="enum game::helpers::ID">ID</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h3><h3 id='tymethod.layers' class='method'><code>fn <a href='#tymethod.layers' class='fnname'>layers</a>(&self) -> &<a class="struct" href="../../game/app/struct.ShowLayers.html" title="struct game::app::ShowLayers">ShowLayers</a></code></h3></div><span class='loading-content'>Loading content...</span>
|
||||
<h2 id='implementors' class='small-section-header'>Implementors<a href='#implementors' class='anchor'></a></h2><div class='item-list' id='implementors-list'><h3 id='impl-ShowObject' class='impl'><code class='in-band'>impl ShowObject for <a class="struct" href="../../game/app/struct.ShowEverything.html" title="struct game::app::ShowEverything">ShowEverything</a></code><a href='#impl-ShowObject' class='anchor'></a><a class='srclink' href='../../src/game/app.rs.html#511-519' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.show' class="method hidden"><code>fn <a href='#method.show' class='fnname'>show</a>(&self, _: &<a class="enum" href="../../game/helpers/enum.ID.html" title="enum game::helpers::ID">ID</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/game/app.rs.html#512-514' title='goto source code'>[src]</a></h4><h4 id='method.layers' class="method hidden"><code>fn <a href='#method.layers' class='fnname'>layers</a>(&self) -> &<a class="struct" href="../../game/app/struct.ShowLayers.html" title="struct game::app::ShowLayers">ShowLayers</a></code><a class='srclink' href='../../src/game/app.rs.html#516-518' title='goto source code'>[src]</a></h4></div><h3 id='impl-ShowObject-1' class='impl'><code class='in-band'>impl ShowObject for <a class="struct" href="../../game/debug/struct.DebugMode.html" title="struct game::debug::DebugMode">DebugMode</a></code><a href='#impl-ShowObject-1' class='anchor'></a><a class='srclink' href='../../src/game/debug/mod.rs.html#359-377' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.show-1' class="method hidden"><code>fn <a href='#method.show-1' class='fnname'>show</a>(&self, obj: &<a class="enum" href="../../game/helpers/enum.ID.html" title="enum game::helpers::ID">ID</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/game/debug/mod.rs.html#360-372' title='goto source code'>[src]</a></h4><h4 id='method.layers-1' class="method hidden"><code>fn <a href='#method.layers-1' class='fnname'>layers</a>(&self) -> &<a class="struct" href="../../game/app/struct.ShowLayers.html" title="struct game::app::ShowLayers">ShowLayers</a></code><a class='srclink' href='../../src/game/debug/mod.rs.html#374-376' title='goto source code'>[src]</a></h4></div></div><span class='loading-content'>Loading content...</span><script type="text/javascript" src="../../implementors/game/app/trait.ShowObject.js" async></script></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>
|
||||
<h2 id='implementors' class='small-section-header'>Implementors<a href='#implementors' class='anchor'></a></h2><div class='item-list' id='implementors-list'><h3 id='impl-ShowObject' class='impl'><code class='in-band'>impl ShowObject for <a class="struct" href="../../game/app/struct.ShowEverything.html" title="struct game::app::ShowEverything">ShowEverything</a></code><a href='#impl-ShowObject' class='anchor'></a><a class='srclink' href='../../src/game/app.rs.html#503-511' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.show' class="method hidden"><code>fn <a href='#method.show' class='fnname'>show</a>(&self, _: &<a class="enum" href="../../game/helpers/enum.ID.html" title="enum game::helpers::ID">ID</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/game/app.rs.html#504-506' title='goto source code'>[src]</a></h4><h4 id='method.layers' class="method hidden"><code>fn <a href='#method.layers' class='fnname'>layers</a>(&self) -> &<a class="struct" href="../../game/app/struct.ShowLayers.html" title="struct game::app::ShowLayers">ShowLayers</a></code><a class='srclink' href='../../src/game/app.rs.html#508-510' title='goto source code'>[src]</a></h4></div><h3 id='impl-ShowObject-1' class='impl'><code class='in-band'>impl ShowObject for <a class="struct" href="../../game/debug/struct.DebugMode.html" title="struct game::debug::DebugMode">DebugMode</a></code><a href='#impl-ShowObject-1' class='anchor'></a><a class='srclink' href='../../src/game/debug/mod.rs.html#359-377' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.show-1' class="method hidden"><code>fn <a href='#method.show-1' class='fnname'>show</a>(&self, obj: &<a class="enum" href="../../game/helpers/enum.ID.html" title="enum game::helpers::ID">ID</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/game/debug/mod.rs.html#360-372' title='goto source code'>[src]</a></h4><h4 id='method.layers-1' class="method hidden"><code>fn <a href='#method.layers-1' class='fnname'>layers</a>(&self) -> &<a class="struct" href="../../game/app/struct.ShowLayers.html" title="struct game::app::ShowLayers">ShowLayers</a></code><a class='srclink' href='../../src/game/debug/mod.rs.html#374-376' title='goto source code'>[src]</a></h4></div></div><span class='loading-content'>Loading content...</span><script type="text/javascript" src="../../implementors/game/app/trait.ShowObject.js" async></script></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>
|
@ -1,2 +1,2 @@
|
||||
<!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 `apply_map_edits` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, apply_map_edits"><title>game::edit::apply_map_edits - 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="shortcut icon" href="../../favicon.ico"><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='../../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'>edit</a></p><script>window.sidebarCurrent = {name: 'apply_map_edits', 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/game/edit/mod.rs.html#625-669' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>game</a>::<wbr><a href='index.html'>edit</a>::<wbr><a class="fn" href=''>apply_map_edits</a></span></h1><pre class='rust fn'>pub fn apply_map_edits(ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>, edits: <a class="struct" href="../../map_model/edits/struct.MapEdits.html" title="struct map_model::edits::MapEdits">MapEdits</a>)</pre></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>
|
||||
<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/edit/mod.rs.html#630-674' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>game</a>::<wbr><a href='index.html'>edit</a>::<wbr><a class="fn" href=''>apply_map_edits</a></span></h1><pre class='rust fn'>pub fn apply_map_edits(ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>, edits: <a class="struct" href="../../map_model/edits/struct.MapEdits.html" title="struct map_model::edits::MapEdits">MapEdits</a>)</pre></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>
|
@ -1,2 +1,2 @@
|
||||
<!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 `can_edit_lane` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, can_edit_lane"><title>game::edit::can_edit_lane - 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="shortcut icon" href="../../favicon.ico"><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='../../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'>edit</a></p><script>window.sidebarCurrent = {name: 'can_edit_lane', 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/game/edit/mod.rs.html#671-678' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>game</a>::<wbr><a href='index.html'>edit</a>::<wbr><a class="fn" href=''>can_edit_lane</a></span></h1><pre class='rust fn'>pub fn can_edit_lane(mode: &<a class="enum" href="../../game/sandbox/gameplay/enum.GameplayMode.html" title="enum game::sandbox::gameplay::GameplayMode">GameplayMode</a>, l: <a class="struct" href="../../map_model/objects/lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>, app: &<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></pre></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>
|
||||
<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/edit/mod.rs.html#676-683' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>game</a>::<wbr><a href='index.html'>edit</a>::<wbr><a class="fn" href=''>can_edit_lane</a></span></h1><pre class='rust fn'>pub fn can_edit_lane(mode: &<a class="enum" href="../../game/sandbox/gameplay/enum.GameplayMode.html" title="enum game::sandbox::gameplay::GameplayMode">GameplayMode</a>, l: <a class="struct" href="../../map_model/objects/lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>, app: &<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></pre></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>
|
@ -1,2 +1,2 @@
|
||||
<!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 `cmd_to_id` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, cmd_to_id"><title>game::edit::cmd_to_id - 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="shortcut icon" href="../../favicon.ico"><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='../../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'>edit</a></p><script>window.sidebarCurrent = {name: 'cmd_to_id', 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/game/edit/mod.rs.html#796-802' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>game</a>::<wbr><a href='index.html'>edit</a>::<wbr><a class="fn" href=''>cmd_to_id</a></span></h1><pre class='rust fn'>fn cmd_to_id(cmd: &<a class="enum" href="../../map_model/edits/enum.EditCmd.html" title="enum map_model::edits::EditCmd">EditCmd</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../../game/helpers/enum.ID.html" title="enum game::helpers::ID">ID</a>></pre></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>
|
||||
<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/edit/mod.rs.html#801-807' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>game</a>::<wbr><a href='index.html'>edit</a>::<wbr><a class="fn" href=''>cmd_to_id</a></span></h1><pre class='rust fn'>fn cmd_to_id(cmd: &<a class="enum" href="../../map_model/edits/enum.EditCmd.html" title="enum map_model::edits::EditCmd">EditCmd</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../../game/helpers/enum.ID.html" title="enum game::helpers::ID">ID</a>></pre></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>
|
@ -1,2 +1,2 @@
|
||||
<!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_changelist` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, make_changelist"><title>game::edit::make_changelist - 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="shortcut icon" href="../../favicon.ico"><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='../../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'>edit</a></p><script>window.sidebarCurrent = {name: 'make_changelist', 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/game/edit/mod.rs.html#740-793' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>game</a>::<wbr><a href='index.html'>edit</a>::<wbr><a class="fn" href=''>make_changelist</a></span></h1><pre class='rust fn'>fn make_changelist(ctx: &mut EventCtx<'_>, app: &<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Panel</pre></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>
|
||||
<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/edit/mod.rs.html#745-798' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>game</a>::<wbr><a href='index.html'>edit</a>::<wbr><a class="fn" href=''>make_changelist</a></span></h1><pre class='rust fn'>fn make_changelist(ctx: &mut EventCtx<'_>, app: &<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Panel</pre></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>
|
@ -1,2 +1,2 @@
|
||||
<!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_topcenter` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, make_topcenter"><title>game::edit::make_topcenter - 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="shortcut icon" href="../../favicon.ico"><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='../../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'>edit</a></p><script>window.sidebarCurrent = {name: 'make_topcenter', 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/game/edit/mod.rs.html#609-623' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>game</a>::<wbr><a href='index.html'>edit</a>::<wbr><a class="fn" href=''>make_topcenter</a></span></h1><pre class='rust fn'>fn make_topcenter(ctx: &mut EventCtx<'_>, app: &<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Panel</pre></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>
|
||||
<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/edit/mod.rs.html#609-628' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>game</a>::<wbr><a href='index.html'>edit</a>::<wbr><a class="fn" href=''>make_topcenter</a></span></h1><pre class='rust fn'>fn make_topcenter(ctx: &mut EventCtx<'_>, app: &<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Panel</pre></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>
|
@ -1,2 +1,2 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `maybe_edit_intersection` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, maybe_edit_intersection"><title>game::edit::maybe_edit_intersection - 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="shortcut icon" href="../../favicon.ico"><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='../../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'>edit</a></p><script>window.sidebarCurrent = {name: 'maybe_edit_intersection', 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/game/edit/mod.rs.html#699-738' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>game</a>::<wbr><a href='index.html'>edit</a>::<wbr><a class="fn" href=''>maybe_edit_intersection</a></span></h1><pre class='rust fn'>pub fn maybe_edit_intersection(<br> ctx: &mut EventCtx<'_>, <br> app: &mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br> id: <a class="struct" href="../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>, <br> mode: &<a class="enum" href="../../game/sandbox/gameplay/enum.GameplayMode.html" title="enum game::sandbox::gameplay::GameplayMode">GameplayMode</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="../../game/game/trait.State.html" title="trait game::game::State">State</a>>></pre></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>
|
||||
<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/edit/mod.rs.html#704-743' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>game</a>::<wbr><a href='index.html'>edit</a>::<wbr><a class="fn" href=''>maybe_edit_intersection</a></span></h1><pre class='rust fn'>pub fn maybe_edit_intersection(<br> ctx: &mut EventCtx<'_>, <br> app: &mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br> id: <a class="struct" href="../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>, <br> mode: &<a class="enum" href="../../game/sandbox/gameplay/enum.GameplayMode.html" title="enum game::sandbox::gameplay::GameplayMode">GameplayMode</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="../../game/game/trait.State.html" title="trait game::game::State">State</a>>></pre></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>
|
@ -1,2 +1,2 @@
|
||||
<!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 `speed_limit_choices` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, speed_limit_choices"><title>game::edit::speed_limit_choices - 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="shortcut icon" href="../../favicon.ico"><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='../../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'>edit</a></p><script>window.sidebarCurrent = {name: 'speed_limit_choices', 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/game/edit/mod.rs.html#680-697' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>game</a>::<wbr><a href='index.html'>edit</a>::<wbr><a class="fn" href=''>speed_limit_choices</a></span></h1><pre class='rust fn'>pub fn speed_limit_choices() -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><Choice<<a class="struct" href="../../geom/speed/struct.Speed.html" title="struct geom::speed::Speed">Speed</a>>></pre></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>
|
||||
<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/edit/mod.rs.html#685-702' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>game</a>::<wbr><a href='index.html'>edit</a>::<wbr><a class="fn" href=''>speed_limit_choices</a></span></h1><pre class='rust fn'>pub fn speed_limit_choices() -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><Choice<<a class="struct" href="../../geom/speed/struct.Speed.html" title="struct geom::speed::Speed">Speed</a>>></pre></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>
|
@ -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 `edit` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, edit"><title>game::edit - 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="shortcut icon" href="../../favicon.ico"><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='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module edit</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../index.html'>game</a></p><script>window.sidebarCurrent = {name: 'edit', 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/game/edit/mod.rs.html#1-851' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>game</a>::<wbr><a class="mod" href=''>edit</a></span></h1><h2 id='reexports' class='section-header'><a href="#reexports">Re-exports</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/game/edit/mod.rs.html#1-856' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>game</a>::<wbr><a class="mod" href=''>edit</a></span></h1><h2 id='reexports' class='section-header'><a href="#reexports">Re-exports</a></h2>
|
||||
<table><tr><td><code>pub use self::cluster_traffic_signals::<a class="struct" href="../../game/edit/cluster_traffic_signals/struct.ClusterTrafficSignalEditor.html" title="struct game::edit::cluster_traffic_signals::ClusterTrafficSignalEditor">ClusterTrafficSignalEditor</a>;</code></td></tr><tr><td><code>pub use self::lanes::<a class="struct" href="../../game/edit/lanes/struct.LaneEditor.html" title="struct game::edit::lanes::LaneEditor">LaneEditor</a>;</code></td></tr><tr><td><code>pub use self::routes::<a class="struct" href="../../game/edit/routes/struct.RouteEditor.html" title="struct game::edit::routes::RouteEditor">RouteEditor</a>;</code></td></tr><tr><td><code>pub use self::stop_signs::<a class="struct" href="../../game/edit/stop_signs/struct.StopSignEditor.html" title="struct game::edit::stop_signs::StopSignEditor">StopSignEditor</a>;</code></td></tr><tr><td><code>pub use self::traffic_signals::<a class="struct" href="../../game/edit/traffic_signals/struct.TrafficSignalEditor.html" title="struct game::edit::traffic_signals::TrafficSignalEditor">TrafficSignalEditor</a>;</code></td></tr><tr><td><code>pub use self::validate::<a class="fn" href="../../game/edit/validate/fn.check_blackholes.html" title="fn game::edit::validate::check_blackholes">check_blackholes</a>;</code></td></tr><tr><td><code>pub use self::validate::<a class="fn" href="../../game/edit/validate/fn.check_sidewalk_connectivity.html" title="fn game::edit::validate::check_sidewalk_connectivity">check_sidewalk_connectivity</a>;</code></td></tr><tr><td><code>pub use self::validate::<a class="fn" href="../../game/edit/validate/fn.try_change_lt.html" title="fn game::edit::validate::try_change_lt">try_change_lt</a>;</code></td></tr></table><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2>
|
||||
<table><tr class='module-item'><td><a class="mod" href="bulk/index.html" title='game::edit::bulk mod'>bulk</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="cluster_traffic_signals/index.html" title='game::edit::cluster_traffic_signals mod'>cluster_traffic_signals</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="lanes/index.html" title='game::edit::lanes mod'>lanes</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="routes/index.html" title='game::edit::routes mod'>routes</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="select/index.html" title='game::edit::select mod'>select</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="stop_signs/index.html" title='game::edit::stop_signs mod'>stop_signs</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="traffic_signals/index.html" title='game::edit::traffic_signals mod'>traffic_signals</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="validate/index.html" title='game::edit::validate mod'>validate</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="zones/index.html" title='game::edit::zones mod'>zones</a></td><td class='docblock-short'></td></tr></table><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<table><tr class='module-item'><td><a class="struct" href="struct.ConfirmDiscard.html" title='game::edit::ConfirmDiscard struct'>ConfirmDiscard</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.EditMode.html" title='game::edit::EditMode struct'>EditMode</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.LoadEdits.html" title='game::edit::LoadEdits struct'>LoadEdits</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.SaveEdits.html" title='game::edit::SaveEdits struct'>SaveEdits</a></td><td class='docblock-short'></td></tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,3 +1,3 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `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="shortcut icon" href="../../../favicon.ico"><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-e788b46a21eaee2a/out/built.rs.html#49' 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> = "Fri, 09 Oct 2020 20:52:46 +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-e788b46a21eaee2a/out/built.rs.html#49' 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> = "Fri, 09 Oct 2020 21:05:32 +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>
|
@ -1,2 +1,2 @@
|
||||
<!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 `time` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, time"><title>game::pregame::built_info::time - 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="shortcut icon" href="../../../favicon.ico"><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='../../../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: 'time', 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/game/pregame.rs.html#539-551' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a>::<wbr><a class="fn" href=''>time</a></span></h1><pre class='rust fn'>pub fn time() -> Text</pre></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>
|
||||
<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/pregame.rs.html#540-552' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a>::<wbr><a class="fn" href=''>time</a></span></h1><pre class='rust fn'>pub fn time() -> Text</pre></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>
|
@ -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_info` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, built_info"><title>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 src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><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='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class='location'>Module built_info</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#constants">Constants</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a></p><script>window.sidebarCurrent = {name: 'built_info', 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/game/pregame.rs.html#534-552' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a class="mod" href=''>built_info</a></span></h1><h2 id='constants' class='section-header'><a href="#constants">Constants</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/game/pregame.rs.html#535-553' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a class="mod" href=''>built_info</a></span></h1><h2 id='constants' class='section-header'><a href="#constants">Constants</a></h2>
|
||||
<table><tr class='module-item'><td><a class="constant" href="constant.BUILT_TIME_UTC.html" title='game::pregame::built_info::BUILT_TIME_UTC constant'>BUILT_TIME_UTC</a></td><td class='docblock-short'><p>The built-time in RFC2822, UTC</p>
|
||||
</td></tr><tr class='module-item'><td><a class="constant" href="constant.CFG_ENDIAN.html" title='game::pregame::built_info::CFG_ENDIAN constant'>CFG_ENDIAN</a></td><td class='docblock-short'><p>The endianness, given by <code>cfg!(target_endian)</code>.</p>
|
||||
</td></tr><tr class='module-item'><td><a class="constant" href="constant.CFG_ENV.html" title='game::pregame::built_info::CFG_ENV constant'>CFG_ENV</a></td><td class='docblock-short'><p>The toolchain-environment, given by <code>cfg!(target_env)</code>.</p>
|
||||
|
@ -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 `pregame` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, pregame"><title>game::pregame - 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="shortcut icon" href="../../favicon.ico"><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='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module pregame</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li></ul></div><p class='location'><a href='../index.html'>game</a></p><script>window.sidebarCurrent = {name: 'pregame', 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/game/pregame.rs.html#1-559' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>game</a>::<wbr><a class="mod" href=''>pregame</a></span></h1><h2 id='modules' class='section-header'><a href="#modules">Modules</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/game/pregame.rs.html#1-560' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>game</a>::<wbr><a class="mod" href=''>pregame</a></span></h1><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2>
|
||||
<table><tr class='module-item'><td><a class="mod" href="built_info/index.html" title='game::pregame::built_info mod'>built_info</a></td><td class='docblock-short'></td></tr></table><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<table><tr class='module-item'><td><a class="struct" href="struct.About.html" title='game::pregame::About struct'>About</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.MainMenu.html" title='game::pregame::MainMenu struct'>MainMenu</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Proposals.html" title='game::pregame::Proposals struct'>Proposals</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Screensaver.html" title='game::pregame::Screensaver struct'>Screensaver</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.TitleScreen.html" title='game::pregame::TitleScreen struct'>TitleScreen</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 = "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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -710,6 +710,9 @@
|
||||
<span id="709">709</span>
|
||||
<span id="710">710</span>
|
||||
<span id="711">711</span>
|
||||
<span id="712">712</span>
|
||||
<span id="713">713</span>
|
||||
<span id="714">714</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">cell</span>::<span class="ident">RefCell</span>;
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">BTreeMap</span>;
|
||||
@ -731,13 +734,11 @@
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">render</span>::{<span class="ident">AgentCache</span>, <span class="ident">DrawMap</span>, <span class="ident">DrawOptions</span>, <span class="ident">Renderable</span>, <span class="ident">UnzoomedAgents</span>};
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">sandbox</span>::{<span class="ident">GameplayMode</span>, <span class="ident">TutorialState</span>};
|
||||
|
||||
<span class="doccomment">/// The top-level data that lasts through the entire game, no matter what state the game is in.</span>
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">App</span> {
|
||||
<span class="comment">// Naming is from older days when there was an A/B test, "side-by-side" mode. Keeping this</span>
|
||||
<span class="comment">// naming, because that mode will return someday.</span>
|
||||
<span class="kw">pub</span> <span class="ident">primary</span>: <span class="ident">PerMap</span>,
|
||||
<span class="comment">// Only exists in some gameplay modes. Must be carefully reset otherwise. Has the map and</span>
|
||||
<span class="comment">// scenario name too. TODO Embed that in Analytics directly instead.</span>
|
||||
<span class="ident">prebaked</span>: <span class="prelude-ty">Option</span><span class="op"><</span>(<span class="ident">String</span>, <span class="ident">String</span>, <span class="ident">Analytics</span>)<span class="op">></span>,
|
||||
<span class="kw">pub</span> <span class="ident">cs</span>: <span class="ident">ColorScheme</span>,
|
||||
<span class="comment">// TODO This is a bit weird to keep here; it's controlled almost entirely by the minimap panel.</span>
|
||||
<span class="comment">// It has no meaning in edit mode.</span>
|
||||
@ -745,13 +746,9 @@
|
||||
<span class="kw">pub</span> <span class="ident">opts</span>: <span class="ident">Options</span>,
|
||||
|
||||
<span class="kw">pub</span> <span class="ident">per_obj</span>: <span class="ident">PerObjectActions</span>,
|
||||
<span class="kw">pub</span> <span class="ident">layer</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Box</span><span class="op"><</span><span class="kw">dyn</span> <span class="ident">Layer</span><span class="op">>></span>,
|
||||
|
||||
<span class="comment">// Static data that lasts the entire session. Use sparingly.</span>
|
||||
<span class="doccomment">/// Static data that lasts the entire session. Use sparingly.</span>
|
||||
<span class="kw">pub</span> <span class="ident">session</span>: <span class="ident">SessionState</span>,
|
||||
|
||||
<span class="comment">// Only filled out in edit mode. Stored here once to avoid lots of clones. Used for preview.</span>
|
||||
<span class="kw">pub</span> <span class="ident">suspended_sim</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Sim</span><span class="op">></span>,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">App</span> {
|
||||
@ -766,28 +763,26 @@
|
||||
|
||||
<span class="ident">App</span> {
|
||||
<span class="ident">primary</span>,
|
||||
<span class="ident">prebaked</span>: <span class="prelude-val">None</span>,
|
||||
<span class="ident">unzoomed_agents</span>: <span class="ident">UnzoomedAgents</span>::<span class="ident">new</span>(<span class="kw-2">&</span><span class="ident">cs</span>),
|
||||
<span class="ident">cs</span>,
|
||||
<span class="ident">opts</span>,
|
||||
<span class="ident">per_obj</span>: <span class="ident">PerObjectActions</span>::<span class="ident">new</span>(),
|
||||
<span class="ident">layer</span>: <span class="prelude-val">None</span>,
|
||||
<span class="ident">session</span>: <span class="ident">SessionState</span>::<span class="ident">empty</span>(),
|
||||
<span class="ident">suspended_sim</span>: <span class="prelude-val">None</span>,
|
||||
}
|
||||
}
|
||||
|
||||
<span class="comment">// TODO Should the prebaked methods be on primary along with the data?</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">has_prebaked</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-></span> <span class="prelude-ty">Option</span><span class="op"><</span>(<span class="kw-2">&</span><span class="ident">String</span>, <span class="kw-2">&</span><span class="ident">String</span>)<span class="op">></span> {
|
||||
<span class="self">self</span>.<span class="ident">prebaked</span>.<span class="ident">as_ref</span>().<span class="ident">map</span>(<span class="op">|</span>(<span class="ident">m</span>, <span class="ident">s</span>, <span class="kw">_</span>)<span class="op">|</span> (<span class="ident">m</span>, <span class="ident">s</span>))
|
||||
<span class="self">self</span>.<span class="ident">primary</span>.<span class="ident">prebaked</span>.<span class="ident">as_ref</span>().<span class="ident">map</span>(<span class="op">|</span>(<span class="ident">m</span>, <span class="ident">s</span>, <span class="kw">_</span>)<span class="op">|</span> (<span class="ident">m</span>, <span class="ident">s</span>))
|
||||
}
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">prebaked</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-></span> <span class="kw-2">&</span><span class="ident">Analytics</span> {
|
||||
<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">prebaked</span>.<span class="ident">as_ref</span>().<span class="ident">unwrap</span>().<span class="number">2</span>
|
||||
<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">primary</span>.<span class="ident">prebaked</span>.<span class="ident">as_ref</span>().<span class="ident">unwrap</span>().<span class="number">2</span>
|
||||
}
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">set_prebaked</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">prebaked</span>: <span class="prelude-ty">Option</span><span class="op"><</span>(<span class="ident">String</span>, <span class="ident">String</span>, <span class="ident">Analytics</span>)<span class="op">></span>) {
|
||||
<span class="self">self</span>.<span class="ident">prebaked</span> <span class="op">=</span> <span class="ident">prebaked</span>;
|
||||
<span class="self">self</span>.<span class="ident">primary</span>.<span class="ident">prebaked</span> <span class="op">=</span> <span class="ident">prebaked</span>;
|
||||
|
||||
<span class="kw">if</span> <span class="bool-val">false</span> {
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>((<span class="kw">_</span>, <span class="kw">_</span>, <span class="kw-2">ref</span> <span class="ident">a</span>)) <span class="op">=</span> <span class="self">self</span>.<span class="ident">prebaked</span> {
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>((<span class="kw">_</span>, <span class="kw">_</span>, <span class="kw-2">ref</span> <span class="ident">a</span>)) <span class="op">=</span> <span class="self">self</span>.<span class="ident">primary</span>.<span class="ident">prebaked</span> {
|
||||
<span class="kw">use</span> <span class="ident">abstutil</span>::{<span class="ident">prettyprint_usize</span>, <span class="ident">serialized_size_bytes</span>};
|
||||
<span class="macro">println</span><span class="macro">!</span>(
|
||||
<span class="string">"- road_thruput: {} bytes"</span>,
|
||||
@ -978,7 +973,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="comment">// Assumes some defaults.</span>
|
||||
<span class="doccomment">/// Assumes some defaults.</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">recalculate_current_selection</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="ident">EventCtx</span>) {
|
||||
<span class="self">self</span>.<span class="ident">primary</span>.<span class="ident">current_selection</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">calculate_current_selection</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
@ -1234,15 +1229,15 @@
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Flags</span> {
|
||||
<span class="kw">pub</span> <span class="ident">sim_flags</span>: <span class="ident">SimFlags</span>,
|
||||
<span class="comment">// Number of agents to generate when requested. If unspecified, trips to/from borders will be</span>
|
||||
<span class="comment">// included.</span>
|
||||
<span class="doccomment">/// Number of agents to generate when requested. If unspecified, trips to/from borders will be</span>
|
||||
<span class="doccomment">/// included.</span>
|
||||
<span class="kw">pub</span> <span class="ident">num_agents</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">usize</span><span class="op">></span>,
|
||||
<span class="comment">// If true, all map edits immediately apply to the live simulation. Otherwise, most edits</span>
|
||||
<span class="comment">// require resetting to midnight.</span>
|
||||
<span class="doccomment">/// If true, all map edits immediately apply to the live simulation. Otherwise, most edits</span>
|
||||
<span class="doccomment">/// require resetting to midnight.</span>
|
||||
<span class="kw">pub</span> <span class="ident">live_map_edits</span>: <span class="ident">bool</span>,
|
||||
}
|
||||
|
||||
<span class="comment">// All of the state that's bound to a specific map+edit has to live here.</span>
|
||||
<span class="doccomment">/// All of the state that's bound to a specific map.</span>
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">PerMap</span> {
|
||||
<span class="kw">pub</span> <span class="ident">map</span>: <span class="ident">Map</span>,
|
||||
<span class="kw">pub</span> <span class="ident">draw_map</span>: <span class="ident">DrawMap</span>,
|
||||
@ -1254,13 +1249,21 @@
|
||||
<span class="kw">pub</span> <span class="ident">sim_cb</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Box</span><span class="op"><</span><span class="kw">dyn</span> <span class="ident">SimCallback</span><span class="op">>></span>,
|
||||
<span class="kw">pub</span> <span class="ident">show_zorder</span>: <span class="ident">isize</span>,
|
||||
<span class="kw">pub</span> <span class="ident">zorder_range</span>: (<span class="ident">isize</span>, <span class="ident">isize</span>),
|
||||
<span class="comment">// If we ever left edit mode and resumed without restarting from midnight, this is true.</span>
|
||||
<span class="doccomment">/// If we ever left edit mode and resumed without restarting from midnight, this is true.</span>
|
||||
<span class="kw">pub</span> <span class="ident">dirty_from_edits</span>: <span class="ident">bool</span>,
|
||||
<span class="comment">// Any ScenarioModifiers in effect?</span>
|
||||
<span class="doccomment">/// Any ScenarioModifiers in effect?</span>
|
||||
<span class="kw">pub</span> <span class="ident">has_modified_trips</span>: <span class="ident">bool</span>,
|
||||
|
||||
<span class="comment">// Sometimes we need the map before any edits have been applied. Cache it here.</span>
|
||||
<span class="doccomment">/// Sometimes we need the map before any edits have been applied. Cache it here.</span>
|
||||
<span class="kw">pub</span> <span class="ident">unedited_map</span>: <span class="ident">RefCell</span><span class="op"><</span><span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Map</span><span class="op">>></span>,
|
||||
|
||||
<span class="kw">pub</span> <span class="ident">layer</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Box</span><span class="op"><</span><span class="kw">dyn</span> <span class="ident">Layer</span><span class="op">>></span>,
|
||||
<span class="doccomment">/// Only filled out in edit mode. Stored here once to avoid lots of clones. Used for preview.</span>
|
||||
<span class="kw">pub</span> <span class="ident">suspended_sim</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Sim</span><span class="op">></span>,
|
||||
<span class="doccomment">/// Only exists in some gameplay modes. Must be carefully reset otherwise. Has the map and</span>
|
||||
<span class="doccomment">/// scenario name too.</span>
|
||||
<span class="comment">// TODO Embed that in Analytics directly instead.</span>
|
||||
<span class="ident">prebaked</span>: <span class="prelude-ty">Option</span><span class="op"><</span>(<span class="ident">String</span>, <span class="ident">String</span>, <span class="ident">Analytics</span>)<span class="op">></span>,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">PerMap</span> {
|
||||
@ -1298,6 +1301,9 @@
|
||||
<span class="ident">dirty_from_edits</span>: <span class="bool-val">false</span>,
|
||||
<span class="ident">has_modified_trips</span>: <span class="bool-val">false</span>,
|
||||
<span class="ident">unedited_map</span>: <span class="ident">RefCell</span>::<span class="ident">new</span>(<span class="prelude-val">None</span>),
|
||||
<span class="ident">layer</span>: <span class="prelude-val">None</span>,
|
||||
<span class="ident">suspended_sim</span>: <span class="prelude-val">None</span>,
|
||||
<span class="ident">prebaked</span>: <span class="prelude-val">None</span>,
|
||||
};
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rng</span> <span class="op">=</span> <span class="ident">per_map</span>.<span class="ident">current_flags</span>.<span class="ident">sim_flags</span>.<span class="ident">make_rng</span>();
|
||||
@ -1329,7 +1335,7 @@
|
||||
<span class="ident">per_map</span>
|
||||
}
|
||||
|
||||
<span class="comment">// Returns whatever was there</span>
|
||||
<span class="doccomment">/// Returns whatever was there</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">clear_sim</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>) <span class="op">-></span> <span class="ident">Sim</span> {
|
||||
<span class="self">self</span>.<span class="ident">dirty_from_edits</span> <span class="op">=</span> <span class="bool-val">false</span>;
|
||||
<span class="ident">std</span>::<span class="ident">mem</span>::<span class="ident">replace</span>(
|
||||
@ -1342,8 +1348,8 @@
|
||||
)
|
||||
}
|
||||
|
||||
<span class="comment">// If needed, makes sure the unedited_map is populated. Callers can then do</span>
|
||||
<span class="comment">// self.unedited_map.borrow().unwrap_or(&self.map).</span>
|
||||
<span class="doccomment">/// If needed, makes sure the unedited_map is populated. Callers can then do</span>
|
||||
<span class="doccomment">/// `self.unedited_map.borrow().unwrap_or(&self.map)`.</span>
|
||||
<span class="comment">// TODO I'd like to return &Map or something here, but can't get the borrow checker to work.</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">calculate_unedited_map</span>(<span class="kw-2">&</span><span class="self">self</span>) {
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">map</span>.<span class="ident">get_edits</span>().<span class="ident">commands</span>.<span class="ident">is_empty</span>() {
|
||||
|
@ -497,7 +497,7 @@
|
||||
<span class="ident">dragging</span>: <span class="bool-val">false</span>,
|
||||
<span class="ident">panel</span>: <span class="ident">make_minimap_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="number">0</span>),
|
||||
<span class="ident">zoomed</span>: <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">cam_zoom</span> <span class="op">>=</span> <span class="ident">app</span>.<span class="ident">opts</span>.<span class="ident">min_zoom_for_detail</span>,
|
||||
<span class="ident">layer</span>: <span class="ident">app</span>.<span class="ident">layer</span>.<span class="ident">is_none</span>(),
|
||||
<span class="ident">layer</span>: <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span>.<span class="ident">is_none</span>(),
|
||||
|
||||
<span class="ident">zoom_lvl</span>: <span class="number">0</span>,
|
||||
<span class="ident">base_zoom</span>,
|
||||
@ -551,7 +551,7 @@
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">event</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">App</span>) <span class="op">-></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Transition</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">zoomed</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">app</span>.<span class="ident">opts</span>.<span class="ident">min_zoom_for_detail</span>;
|
||||
<span class="kw">let</span> <span class="ident">layer</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">layer</span>.<span class="ident">is_none</span>();
|
||||
<span class="kw">let</span> <span class="ident">layer</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span>.<span class="ident">is_none</span>();
|
||||
<span class="kw">if</span> <span class="ident">zoomed</span> <span class="op">!=</span> <span class="self">self</span>.<span class="ident">zoomed</span> <span class="op">||</span> <span class="ident">layer</span> <span class="op">!=</span> <span class="self">self</span>.<span class="ident">layer</span> {
|
||||
<span class="kw">let</span> <span class="ident">just_zoomed_in</span> <span class="op">=</span> <span class="ident">zoomed</span> <span class="op">&&</span> <span class="op">!</span><span class="self">self</span>.<span class="ident">zoomed</span>;
|
||||
|
||||
@ -740,7 +740,7 @@
|
||||
);
|
||||
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">draw_map</span>.<span class="ident">draw_all_buildings</span>);
|
||||
<span class="comment">// Not the building or parking lot paths</span>
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="kw-2">ref</span> <span class="ident">l</span>) <span class="op">=</span> <span class="ident">app</span>.<span class="ident">layer</span> {
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="kw-2">ref</span> <span class="ident">l</span>) <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> {
|
||||
<span class="ident">l</span>.<span class="ident">draw_minimap</span>(<span class="ident">g</span>);
|
||||
}
|
||||
|
||||
|
@ -850,6 +850,11 @@
|
||||
<span id="849">849</span>
|
||||
<span id="850">850</span>
|
||||
<span id="851">851</span>
|
||||
<span id="852">852</span>
|
||||
<span id="853">853</span>
|
||||
<span id="854">854</span>
|
||||
<span id="855">855</span>
|
||||
<span id="856">856</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">BTreeSet</span>;
|
||||
|
||||
@ -908,8 +913,8 @@
|
||||
<span class="kw">impl</span> <span class="ident">EditMode</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">ctx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">App</span>, <span class="ident">mode</span>: <span class="ident">GameplayMode</span>) <span class="op">-></span> <span class="ident">Box</span><span class="op"><</span><span class="kw">dyn</span> <span class="ident">State</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">orig_dirty</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">dirty_from_edits</span>;
|
||||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">app</span>.<span class="ident">suspended_sim</span>.<span class="ident">is_none</span>());
|
||||
<span class="ident">app</span>.<span class="ident">suspended_sim</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">clear_sim</span>());
|
||||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">suspended_sim</span>.<span class="ident">is_none</span>());
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">suspended_sim</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">clear_sim</span>());
|
||||
<span class="kw">let</span> <span class="ident">edits</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_edits</span>();
|
||||
<span class="kw">let</span> <span class="ident">layer</span> <span class="op">=</span> <span class="kw">crate</span>::<span class="ident">layer</span>::<span class="ident">map</span>::<span class="ident">Static</span>::<span class="ident">edits</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
|
||||
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">EditMode</span> {
|
||||
@ -926,7 +931,7 @@
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">quit</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">App</span>) <span class="op">-></span> <span class="ident">Transition</span> {
|
||||
<span class="kw">let</span> <span class="ident">old_sim</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">suspended_sim</span>.<span class="ident">take</span>().<span class="ident">unwrap</span>();
|
||||
<span class="kw">let</span> <span class="ident">old_sim</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">suspended_sim</span>.<span class="ident">take</span>().<span class="ident">unwrap</span>();
|
||||
|
||||
<span class="comment">// If nothing changed, short-circuit</span>
|
||||
<span class="kw">if</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_edits</span>() <span class="op">==</span> <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">orig_edits</span> {
|
||||
@ -1467,7 +1472,12 @@
|
||||
.<span class="ident">centered_horiz</span>(),
|
||||
<span class="ident">Btn</span>::<span class="ident">text_bg2</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"Finish & resume from {}"</span>,
|
||||
<span class="ident">app</span>.<span class="ident">suspended_sim</span>.<span class="ident">as_ref</span>().<span class="ident">unwrap</span>().<span class="ident">time</span>().<span class="ident">ampm_tostring</span>()
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>
|
||||
.<span class="ident">suspended_sim</span>
|
||||
.<span class="ident">as_ref</span>()
|
||||
.<span class="ident">unwrap</span>()
|
||||
.<span class="ident">time</span>()
|
||||
.<span class="ident">ampm_tostring</span>()
|
||||
))
|
||||
.<span class="ident">build</span>(<span class="ident">ctx</span>, <span class="string">"finish editing"</span>, <span class="ident">Key</span>::<span class="ident">Escape</span>),
|
||||
]))
|
||||
@ -1513,8 +1523,8 @@
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">draw_map</span>.<span class="ident">intersections</span>[<span class="ident">i</span>.<span class="number">0</span>].<span class="ident">clear_rendering</span>();
|
||||
}
|
||||
|
||||
<span class="kw">if</span> <span class="ident">app</span>.<span class="ident">layer</span>.<span class="ident">as_ref</span>().<span class="ident">and_then</span>(<span class="op">|</span><span class="ident">l</span><span class="op">|</span> <span class="ident">l</span>.<span class="ident">name</span>()) <span class="op">==</span> <span class="prelude-val">Some</span>(<span class="string">"map edits"</span>) {
|
||||
<span class="ident">app</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="kw">crate</span>::<span class="ident">layer</span>::<span class="ident">map</span>::<span class="ident">Static</span>::<span class="ident">edits</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
<span class="kw">if</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span>.<span class="ident">as_ref</span>().<span class="ident">and_then</span>(<span class="op">|</span><span class="ident">l</span><span class="op">|</span> <span class="ident">l</span>.<span class="ident">name</span>()) <span class="op">==</span> <span class="prelude-val">Some</span>(<span class="string">"map edits"</span>) {
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="kw">crate</span>::<span class="ident">layer</span>::<span class="ident">map</span>::<span class="ident">Static</span>::<span class="ident">edits</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
}
|
||||
|
||||
<span class="comment">// Autosave</span>
|
||||
|
@ -203,7 +203,7 @@
|
||||
<span class="kw">let</span> <span class="ident">random</span> <span class="op">=</span> <span class="string">"random agents around these intersections"</span>.<span class="ident">to_string</span>();
|
||||
<span class="kw">let</span> <span class="ident">right_now</span> <span class="op">=</span> <span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"change the traffic signal live at {}"</span>,
|
||||
<span class="ident">app</span>.<span class="ident">suspended_sim</span>.<span class="ident">as_ref</span>().<span class="ident">unwrap</span>().<span class="ident">time</span>()
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">suspended_sim</span>.<span class="ident">as_ref</span>().<span class="ident">unwrap</span>().<span class="ident">time</span>()
|
||||
);
|
||||
|
||||
<span class="ident">ChooseSomething</span>::<span class="ident">new</span>(
|
||||
@ -233,7 +233,7 @@
|
||||
<span class="ident">spawn_agents_around</span>(<span class="kw-2">*</span><span class="ident">i</span>, <span class="ident">app</span>);
|
||||
}
|
||||
} <span class="kw">else</span> {
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">sim</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">suspended_sim</span>.<span class="ident">as_ref</span>().<span class="ident">unwrap</span>().<span class="ident">clone</span>();
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">sim</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">suspended_sim</span>.<span class="ident">as_ref</span>().<span class="ident">unwrap</span>().<span class="ident">clone</span>();
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>
|
||||
.<span class="ident">sim</span>
|
||||
.<span class="ident">handle_live_edited_traffic_signals</span>(<span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>);
|
||||
|
@ -112,7 +112,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.47.0 (18bf6b4f0 2020-10-07)"</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">"Fri, 09 Oct 2020 20:52:46 +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">"Fri, 09 Oct 2020 21:05:32 +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>
|
||||
|
@ -316,24 +316,24 @@
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">PickLayer</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">update</span>(<span class="ident">ctx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">App</span>, <span class="ident">minimap</span>: <span class="kw-2">&</span><span class="ident">Panel</span>) <span class="op">-></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Transition</span><span class="op">></span> {
|
||||
<span class="kw">if</span> <span class="ident">app</span>.<span class="ident">layer</span>.<span class="ident">is_none</span>() {
|
||||
<span class="kw">if</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span>.<span class="ident">is_none</span>() {
|
||||
<span class="kw">return</span> <span class="prelude-val">None</span>;
|
||||
}
|
||||
|
||||
<span class="comment">// TODO Since the Layer is embedded in UI, we have to do this slight trick</span>
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">layer</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">layer</span>.<span class="ident">take</span>().<span class="ident">unwrap</span>();
|
||||
<span class="comment">// TODO Since the Layer is embedded in App, we have to do this slight trick</span>
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">layer</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span>.<span class="ident">take</span>().<span class="ident">unwrap</span>();
|
||||
<span class="kw">match</span> <span class="ident">layer</span>.<span class="ident">event</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">minimap</span>) {
|
||||
<span class="prelude-val">Some</span>(<span class="ident">LayerOutcome</span>::<span class="ident">Close</span>) <span class="op">=></span> {
|
||||
<span class="ident">app</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">None</span>;
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">None</span>;
|
||||
<span class="kw">return</span> <span class="prelude-val">None</span>;
|
||||
}
|
||||
<span class="prelude-val">Some</span>(<span class="ident">LayerOutcome</span>::<span class="ident">Replace</span>(<span class="ident">l</span>)) <span class="op">=></span> {
|
||||
<span class="ident">app</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">l</span>);
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">l</span>);
|
||||
<span class="kw">return</span> <span class="prelude-val">None</span>;
|
||||
}
|
||||
<span class="prelude-val">None</span> <span class="op">=></span> {}
|
||||
}
|
||||
<span class="ident">app</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">layer</span>);
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">layer</span>);
|
||||
|
||||
<span class="prelude-val">None</span>
|
||||
}
|
||||
@ -346,7 +346,7 @@
|
||||
.<span class="ident">align_right</span>(),
|
||||
])];
|
||||
|
||||
<span class="kw">let</span> <span class="ident">current</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">app</span>.<span class="ident">layer</span> {
|
||||
<span class="kw">let</span> <span class="ident">current</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> {
|
||||
<span class="prelude-val">None</span> <span class="op">=></span> <span class="string">"None"</span>,
|
||||
<span class="prelude-val">Some</span>(<span class="kw-2">ref</span> <span class="ident">l</span>) <span class="op">=></span> <span class="ident">l</span>.<span class="ident">name</span>().<span class="ident">unwrap_or</span>(<span class="string">""</span>),
|
||||
};
|
||||
@ -420,31 +420,31 @@
|
||||
<span class="ident">Outcome</span>::<span class="ident">Clicked</span>(<span class="ident">x</span>) <span class="op">=></span> <span class="kw">match</span> <span class="ident">x</span>.<span class="ident">as_ref</span>() {
|
||||
<span class="string">"close"</span> <span class="op">=></span> {}
|
||||
<span class="string">"None"</span> <span class="op">=></span> {
|
||||
<span class="ident">app</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">None</span>;
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">None</span>;
|
||||
}
|
||||
<span class="string">"amenities"</span> <span class="op">=></span> {
|
||||
<span class="ident">app</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">map</span>::<span class="ident">Static</span>::<span class="ident">amenities</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">map</span>::<span class="ident">Static</span>::<span class="ident">amenities</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
}
|
||||
<span class="string">"backpressure"</span> <span class="op">=></span> {
|
||||
<span class="ident">app</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">traffic</span>::<span class="ident">Backpressure</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">traffic</span>::<span class="ident">Backpressure</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
}
|
||||
<span class="string">"bike network"</span> <span class="op">=></span> {
|
||||
<span class="ident">app</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">map</span>::<span class="ident">BikeNetwork</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">map</span>::<span class="ident">BikeNetwork</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
}
|
||||
<span class="string">"delay"</span> <span class="op">=></span> {
|
||||
<span class="ident">app</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">traffic</span>::<span class="ident">Delay</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">traffic</span>::<span class="ident">Delay</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
}
|
||||
<span class="string">"elevation"</span> <span class="op">=></span> {
|
||||
<span class="ident">app</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">elevation</span>::<span class="ident">Elevation</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">elevation</span>::<span class="ident">Elevation</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
}
|
||||
<span class="string">"map edits"</span> <span class="op">=></span> {
|
||||
<span class="ident">app</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">map</span>::<span class="ident">Static</span>::<span class="ident">edits</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">map</span>::<span class="ident">Static</span>::<span class="ident">edits</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
}
|
||||
<span class="string">"no sidewalks"</span> <span class="op">=></span> {
|
||||
<span class="ident">app</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">map</span>::<span class="ident">Static</span>::<span class="ident">no_sidewalks</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">map</span>::<span class="ident">Static</span>::<span class="ident">no_sidewalks</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
}
|
||||
<span class="string">"pandemic model"</span> <span class="op">=></span> {
|
||||
<span class="ident">app</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">pandemic</span>::<span class="ident">Pandemic</span>::<span class="ident">new</span>(
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">pandemic</span>::<span class="ident">Pandemic</span>::<span class="ident">new</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="ident">app</span>,
|
||||
<span class="ident">pandemic</span>::<span class="ident">Options</span> {
|
||||
@ -454,21 +454,21 @@
|
||||
)));
|
||||
}
|
||||
<span class="string">"blackholes"</span> <span class="op">=></span> {
|
||||
<span class="ident">app</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">map</span>::<span class="ident">Static</span>::<span class="ident">blackholes</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">map</span>::<span class="ident">Static</span>::<span class="ident">blackholes</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
}
|
||||
<span class="string">"congestion caps"</span> <span class="op">=></span> {
|
||||
<span class="ident">app</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">map</span>::<span class="ident">CongestionCaps</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">map</span>::<span class="ident">CongestionCaps</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
}
|
||||
<span class="string">"parking occupancy"</span> <span class="op">=></span> {
|
||||
<span class="ident">app</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">parking</span>::<span class="ident">Occupancy</span>::<span class="ident">new</span>(
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">parking</span>::<span class="ident">Occupancy</span>::<span class="ident">new</span>(
|
||||
<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="bool-val">true</span>, <span class="bool-val">true</span>, <span class="bool-val">true</span>, <span class="bool-val">false</span>, <span class="bool-val">true</span>,
|
||||
)));
|
||||
}
|
||||
<span class="string">"parking efficiency"</span> <span class="op">=></span> {
|
||||
<span class="ident">app</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">parking</span>::<span class="ident">Efficiency</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">parking</span>::<span class="ident">Efficiency</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
}
|
||||
<span class="string">"population map"</span> <span class="op">=></span> {
|
||||
<span class="ident">app</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">population</span>::<span class="ident">PopulationMap</span>::<span class="ident">new</span>(
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">population</span>::<span class="ident">PopulationMap</span>::<span class="ident">new</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="ident">app</span>,
|
||||
<span class="ident">population</span>::<span class="ident">Options</span> {
|
||||
@ -477,13 +477,13 @@
|
||||
)));
|
||||
}
|
||||
<span class="string">"throughput"</span> <span class="op">=></span> {
|
||||
<span class="ident">app</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">traffic</span>::<span class="ident">Throughput</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">traffic</span>::<span class="ident">Throughput</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
}
|
||||
<span class="string">"traffic jams"</span> <span class="op">=></span> {
|
||||
<span class="ident">app</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">traffic</span>::<span class="ident">TrafficJams</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">traffic</span>::<span class="ident">TrafficJams</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
}
|
||||
<span class="string">"transit network"</span> <span class="op">=></span> {
|
||||
<span class="ident">app</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">transit</span>::<span class="ident">TransitNetwork</span>::<span class="ident">new</span>(
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">transit</span>::<span class="ident">TransitNetwork</span>::<span class="ident">new</span>(
|
||||
<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="bool-val">false</span>, <span class="bool-val">true</span>, <span class="bool-val">true</span>,
|
||||
)));
|
||||
}
|
||||
|
@ -558,6 +558,7 @@
|
||||
<span id="557">557</span>
|
||||
<span id="558">558</span>
|
||||
<span id="559">559</span>
|
||||
<span id="560">560</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">HashMap</span>;
|
||||
|
||||
@ -1000,7 +1001,8 @@
|
||||
<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">err</span>],
|
||||
));
|
||||
} <span class="kw">else</span> {
|
||||
<span class="ident">app</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="kw">crate</span>::<span class="ident">layer</span>::<span class="ident">map</span>::<span class="ident">Static</span>::<span class="ident">edits</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> <span class="op">=</span>
|
||||
<span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="kw">crate</span>::<span class="ident">layer</span>::<span class="ident">map</span>::<span class="ident">Static</span>::<span class="ident">edits</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Push</span>(<span class="ident">SandboxMode</span>::<span class="ident">new</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="ident">app</span>,
|
||||
|
@ -728,7 +728,7 @@
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>) {
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="kw-2">ref</span> <span class="ident">l</span>) <span class="op">=</span> <span class="ident">app</span>.<span class="ident">layer</span> {
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="kw-2">ref</span> <span class="ident">l</span>) <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> {
|
||||
<span class="ident">l</span>.<span class="ident">draw</span>(<span class="ident">g</span>, <span class="ident">app</span>);
|
||||
}
|
||||
|
||||
@ -760,7 +760,7 @@
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">on_destroy</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="kw">_</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">App</span>) {
|
||||
<span class="ident">app</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">None</span>;
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">None</span>;
|
||||
<span class="ident">app</span>.<span class="ident">unzoomed_agents</span> <span class="op">=</span> <span class="ident">UnzoomedAgents</span>::<span class="ident">new</span>(<span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">cs</span>);
|
||||
<span class="self">self</span>.<span class="ident">gameplay</span>.<span class="ident">on_destroy</span>(<span class="ident">app</span>);
|
||||
}
|
||||
|
@ -771,7 +771,7 @@
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>((<span class="ident">i</span>, <span class="ident">t</span>)) <span class="op">=</span> <span class="ident">di</span>.<span class="ident">currently_delayed</span>.<span class="ident">get</span>(<span class="number">0</span>) {
|
||||
<span class="kw">if</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">sim</span>.<span class="ident">time</span>() <span class="op">-</span> <span class="kw-2">*</span><span class="ident">t</span> <span class="op">></span> <span class="ident">di</span>.<span class="ident">halt_limit</span> {
|
||||
<span class="kw">let</span> <span class="ident">id</span> <span class="op">=</span> <span class="ident">ID</span>::<span class="ident">Intersection</span>(<span class="kw-2">*</span><span class="ident">i</span>);
|
||||
<span class="ident">app</span>.<span class="ident">layer</span> <span class="op">=</span>
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> <span class="op">=</span>
|
||||
<span class="prelude-val">Some</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="kw">crate</span>::<span class="ident">layer</span>::<span class="ident">traffic</span>::<span class="ident">TrafficJams</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)));
|
||||
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Replace</span>(<span class="ident">Warping</span>::<span class="ident">new</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
|
Loading…
Reference in New Issue
Block a user