This commit is contained in:
dabreegster 2020-12-02 20:21:18 +00:00
parent 81d3c86e2e
commit 25b3be1340
24 changed files with 135 additions and 338 deletions

View File

@ -3,4 +3,4 @@
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../experiment/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Crate experiment</p><div class='block version'><p>Version 0.1.0</p></div><a id='all-types' href='index.html'><p>Back to index</p></a></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> <link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../experiment/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Crate experiment</p><div class='block version'><p>Version 0.1.0</p></div><a id='all-types' href='index.html'><p>Back to index</p></a></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'>&#x2212;</span>]</a></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'>&#x2212;</span>]</a></span>
</span> </span>
<span class='in-band'>List of all items</span></h1><h3 id='Structs'>Structs</h3><ul class='structs docblock'><li><a href='animation/struct.Animator.html'>animation::Animator</a></li><li><a href='animation/struct.Effect.html'>animation::Effect</a></li><li><a href='animation/struct.SnowEffect.html'>animation::SnowEffect</a></li><li><a href='animation/struct.Snowflake.html'>animation::Snowflake</a></li><li><a href='controls/struct.InstantController.html'>controls::InstantController</a></li><li><a href='game/struct.EnergylessArrow.html'>game::EnergylessArrow</a></li><li><a href='game/struct.Game.html'>game::Game</a></li><li><a href='game/struct.OverBldg.html'>game::OverBldg</a></li><li><a href='game/struct.SleighState.html'>game::SleighState</a></li><li><a href='levels/struct.Config.html'>levels::Config</a></li><li><a href='levels/struct.TitleScreen.html'>levels::TitleScreen</a></li><li><a href='upzone/struct.Picker.html'>upzone::Picker</a></li></ul><h3 id='Enums'>Enums</h3><ul class='enums docblock'><li><a href='game/enum.BldgState.html'>game::BldgState</a></li></ul><h3 id='Functions'>Functions</h3><ul class='functions docblock'><li><a href='game/fn.make_bar.html'>game::make_bar</a></li><li><a href='levels/fn.all_levels.html'>levels::all_levels</a></li><li><a href='fn.main.html'>main</a></li></ul><h3 id='Constants'>Constants</h3><ul class='constants docblock'><li><a href='controls/constant.HACK.html'>controls::HACK</a></li><li><a href='game/constant.ZOOM.html'>game::ZOOM</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "experiment";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> <span class='in-band'>List of all items</span></h1><h3 id='Structs'>Structs</h3><ul class='structs docblock'><li><a href='animation/struct.Animator.html'>animation::Animator</a></li><li><a href='animation/struct.Effect.html'>animation::Effect</a></li><li><a href='animation/struct.SnowEffect.html'>animation::SnowEffect</a></li><li><a href='animation/struct.Snowflake.html'>animation::Snowflake</a></li><li><a href='controls/struct.InstantController.html'>controls::InstantController</a></li><li><a href='game/struct.EnergylessArrow.html'>game::EnergylessArrow</a></li><li><a href='game/struct.Game.html'>game::Game</a></li><li><a href='game/struct.SleighState.html'>game::SleighState</a></li><li><a href='levels/struct.Config.html'>levels::Config</a></li><li><a href='levels/struct.TitleScreen.html'>levels::TitleScreen</a></li><li><a href='upzone/struct.Picker.html'>upzone::Picker</a></li></ul><h3 id='Enums'>Enums</h3><ul class='enums docblock'><li><a href='game/enum.BldgState.html'>game::BldgState</a></li></ul><h3 id='Functions'>Functions</h3><ul class='functions docblock'><li><a href='game/fn.make_bar.html'>game::make_bar</a></li><li><a href='levels/fn.all_levels.html'>levels::all_levels</a></li><li><a href='fn.main.html'>main</a></li></ul><h3 id='Constants'>Constants</h3><ul class='constants docblock'><li><a href='controls/constant.HACK.html'>controls::HACK</a></li><li><a href='game/constant.ZOOM.html'>game::ZOOM</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "experiment";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@ -1,13 +1,13 @@
<!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 `BldgState` enum in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, BldgState"><title>experiment::game::BldgState - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> <!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 `BldgState` enum in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, BldgState"><title>experiment::game::BldgState - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> <link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[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">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Enum BldgState</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.Depot">Depot</a><a href="#variant.Done">Done</a><a href="#variant.Undelivered">Undelivered</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>game</a></p><script>window.sidebarCurrent = {name: 'BldgState', ty: 'enum', 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> <link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[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">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Enum BldgState</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.Depot">Depot</a><a href="#variant.Done">Done</a><a href="#variant.Undelivered">Undelivered</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>game</a></p><script>window.sidebarCurrent = {name: 'BldgState', ty: 'enum', 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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#482-487' title='goto source code'>[src]</a></span><span class='in-band'>Enum <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>game</a>::<wbr><a class="enum" href=''>BldgState</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust enum'>enum BldgState { <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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#447-452' title='goto source code'>[src]</a></span><span class='in-band'>Enum <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>game</a>::<wbr><a class="enum" href=''>BldgState</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust enum'>enum BldgState {
Undelivered(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>), Undelivered(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>),
Depot, Depot,
Done, Done,
}</pre></div><h2 id='variants' class='variants small-section-header'> }</pre></div><h2 id='variants' class='variants small-section-header'>
Variants<a href='#variants' class='anchor'></a></h2> Variants<a href='#variants' class='anchor'></a></h2>
<div id="variant.Undelivered" class="variant small-section-header"><a href="#variant.Undelivered" class="anchor field"></a><code>Undelivered(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code></div><div id="variant.Depot" class="variant small-section-header"><a href="#variant.Depot" class="anchor field"></a><code>Depot</code></div><div id="variant.Done" class="variant small-section-header"><a href="#variant.Done" class="anchor field"></a><code>Done</code></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="enum" href="../../experiment/game/enum.BldgState.html" title="enum experiment::game::BldgState">BldgState</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../src/experiment/game.rs.html#481' 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>(&amp;self) -&gt; <a class="enum" href="../../experiment/game/enum.BldgState.html" title="enum experiment::game::BldgState">BldgState</a></code><a class='srclink' href='../../src/experiment/game.rs.html#481' 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 id="variant.Undelivered" class="variant small-section-header"><a href="#variant.Undelivered" class="anchor field"></a><code>Undelivered(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code></div><div id="variant.Depot" class="variant small-section-header"><a href="#variant.Depot" class="anchor field"></a><code>Depot</code></div><div id="variant.Done" class="variant small-section-header"><a href="#variant.Done" class="anchor field"></a><code>Done</code></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="enum" href="../../experiment/game/enum.BldgState.html" title="enum experiment::game::BldgState">BldgState</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../src/experiment/game.rs.html#446' 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>(&amp;self) -&gt; <a class="enum" href="../../experiment/game/enum.BldgState.html" title="enum experiment::game::BldgState">BldgState</a></code><a class='srclink' href='../../src/experiment/game.rs.html#446' 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>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</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#128-130' 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><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>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</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#128-130' 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="enum" href="../../experiment/game/enum.BldgState.html" title="enum experiment::game::BldgState">BldgState</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="enum" href="../../experiment/game/enum.BldgState.html" title="enum experiment::game::BldgState">BldgState</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="enum" href="../../experiment/game/enum.BldgState.html" title="enum experiment::game::BldgState">BldgState</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="enum" href="../../experiment/game/enum.BldgState.html" title="enum experiment::game::BldgState">BldgState</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="enum" href="../../experiment/game/enum.BldgState.html" title="enum experiment::game::BldgState">BldgState</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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>(&amp;self) -&gt; <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></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="enum" href="../../experiment/game/enum.BldgState.html" title="enum experiment::game::BldgState">BldgState</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="enum" href="../../experiment/game/enum.BldgState.html" title="enum experiment::game::BldgState">BldgState</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="enum" href="../../experiment/game/enum.BldgState.html" title="enum experiment::game::BldgState">BldgState</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="enum" href="../../experiment/game/enum.BldgState.html" title="enum experiment::game::BldgState">BldgState</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="enum" href="../../experiment/game/enum.BldgState.html" title="enum experiment::game::BldgState">BldgState</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</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> </div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</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>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `make_bar` fn in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, make_bar"><title>experiment::game::make_bar - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> <!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_bar` fn in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, make_bar"><title>experiment::game::make_bar - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> <link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>game</a></p><script>window.sidebarCurrent = {name: 'make_bar', 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> <link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>game</a></p><script>window.sidebarCurrent = {name: 'make_bar', 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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#587-625' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>game</a>::<wbr><a class="fn" href=''>make_bar</a></span></h1><pre class='rust fn'>fn make_bar(ctx: &amp;mut EventCtx&lt;'_&gt;, pct_full: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, scale: <a class="struct" href="../../map_gui/tools/colors/struct.ColorScale.html" title="struct map_gui::tools::colors::ColorScale">ColorScale</a>) -&gt; Widget</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html> <a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#506-544' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>game</a>::<wbr><a class="fn" href=''>make_bar</a></span></h1><pre class='rust fn'>fn make_bar(ctx: &amp;mut EventCtx&lt;'_&gt;, pct_full: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, scale: <a class="struct" href="../../map_gui/tools/colors/struct.ColorScale.html" title="struct map_gui::tools::colors::ColorScale">ColorScale</a>) -&gt; Widget</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1,8 +1,8 @@
<!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 `game` mod in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, game"><title>experiment::game - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> <!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 `game` mod in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, game"><title>experiment::game - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> <link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module game</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../index.html'>experiment</a></p><script>window.sidebarCurrent = {name: 'game', 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> <link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module game</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../index.html'>experiment</a></p><script>window.sidebarCurrent = {name: 'game', 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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#1-625' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>experiment</a>::<wbr><a class="mod" href=''>game</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2> <a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#1-544' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>experiment</a>::<wbr><a class="mod" href=''>game</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.EnergylessArrow.html" title='experiment::game::EnergylessArrow struct'>EnergylessArrow</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Game.html" title='experiment::game::Game struct'>Game</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.OverBldg.html" title='experiment::game::OverBldg struct'>OverBldg</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.SleighState.html" title='experiment::game::SleighState struct'>SleighState</a></td><td class='docblock-short'></td></tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2> <table><tr class='module-item'><td><a class="struct" href="struct.EnergylessArrow.html" title='experiment::game::EnergylessArrow struct'>EnergylessArrow</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Game.html" title='experiment::game::Game struct'>Game</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.SleighState.html" title='experiment::game::SleighState struct'>SleighState</a></td><td class='docblock-short'></td></tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
<table><tr class='module-item'><td><a class="enum" href="enum.BldgState.html" title='experiment::game::BldgState enum'>BldgState</a></td><td class='docblock-short'></td></tr></table><h2 id='constants' class='section-header'><a href="#constants">Constants</a></h2> <table><tr class='module-item'><td><a class="enum" href="enum.BldgState.html" title='experiment::game::BldgState enum'>BldgState</a></td><td class='docblock-short'></td></tr></table><h2 id='constants' class='section-header'><a href="#constants">Constants</a></h2>
<table><tr class='module-item'><td><a class="constant" href="constant.ZOOM.html" title='experiment::game::ZOOM constant'>ZOOM</a></td><td class='docblock-short'></td></tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2> <table><tr class='module-item'><td><a class="constant" href="constant.ZOOM.html" title='experiment::game::ZOOM constant'>ZOOM</a></td><td class='docblock-short'></td></tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
<table><tr class='module-item'><td><a class="fn" href="fn.make_bar.html" title='experiment::game::make_bar fn'>make_bar</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html> <table><tr class='module-item'><td><a class="fn" href="fn.make_bar.html" title='experiment::game::make_bar fn'>make_bar</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1 +1 @@
initSidebarItems({"constant":[["ZOOM",""]],"enum":[["BldgState",""]],"fn":[["make_bar",""]],"struct":[["EnergylessArrow",""],["Game",""],["OverBldg",""],["SleighState",""]]}); initSidebarItems({"constant":[["ZOOM",""]],"enum":[["BldgState",""]],"fn":[["make_bar",""]],"struct":[["EnergylessArrow",""],["Game",""],["SleighState",""]]});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,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 `all_levels` fn in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, all_levels"><title>experiment::levels::all_levels - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> <!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 `all_levels` fn in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, all_levels"><title>experiment::levels::all_levels - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> <link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>levels</a></p><script>window.sidebarCurrent = {name: 'all_levels', 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> <link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>levels</a></p><script>window.sidebarCurrent = {name: 'all_levels', 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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/levels.rs.html#25-52' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>levels</a>::<wbr><a class="fn" href=''>all_levels</a></span></h1><pre class='rust fn'>fn all_levels() -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../experiment/levels/struct.Config.html" title="struct experiment::levels::Config">Config</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html> <a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/levels.rs.html#24-49' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>levels</a>::<wbr><a class="fn" href=''>all_levels</a></span></h1><pre class='rust fn'>fn all_levels() -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../experiment/levels/struct.Config.html" title="struct experiment::levels::Config">Config</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `levels` mod in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, levels"><title>experiment::levels - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> <!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 `levels` mod in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, levels"><title>experiment::levels - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> <link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module levels</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../index.html'>experiment</a></p><script>window.sidebarCurrent = {name: 'levels', 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> <link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module levels</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../index.html'>experiment</a></p><script>window.sidebarCurrent = {name: 'levels', 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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/levels.rs.html#1-162' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>experiment</a>::<wbr><a class="mod" href=''>levels</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2> <a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/levels.rs.html#1-159' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>experiment</a>::<wbr><a class="mod" href=''>levels</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.Config.html" title='experiment::levels::Config struct'>Config</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.TitleScreen.html" title='experiment::levels::TitleScreen struct'>TitleScreen</a></td><td class='docblock-short'></td></tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2> <table><tr class='module-item'><td><a class="struct" href="struct.Config.html" title='experiment::levels::Config struct'>Config</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.TitleScreen.html" title='experiment::levels::TitleScreen struct'>TitleScreen</a></td><td class='docblock-short'></td></tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
<table><tr class='module-item'><td><a class="fn" href="fn.all_levels.html" title='experiment::levels::all_levels fn'>all_levels</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html> <table><tr class='module-item'><td><a class="fn" href="fn.all_levels.html" title='experiment::levels::all_levels fn'>all_levels</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

File diff suppressed because one or more lines are too long

View File

@ -1,12 +1,12 @@
<!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 `TitleScreen` struct in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, TitleScreen"><title>experiment::levels::TitleScreen - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> <!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 `TitleScreen` struct in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, TitleScreen"><title>experiment::levels::TitleScreen - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> <link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 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">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct TitleScreen</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.panel">panel</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.new">new</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-State%3CSimpleApp%3E">State&lt;SimpleApp&gt;</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>levels</a></p><script>window.sidebarCurrent = {name: 'TitleScreen', 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> <link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 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">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct TitleScreen</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.panel">panel</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.new">new</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-State%3CSimpleApp%3E">State&lt;SimpleApp&gt;</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>levels</a></p><script>window.sidebarCurrent = {name: 'TitleScreen', 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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/levels.rs.html#54-56' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>levels</a>::<wbr><a class="struct" href=''>TitleScreen</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct TitleScreen { <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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/levels.rs.html#51-53' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>levels</a>::<wbr><a class="struct" href=''>TitleScreen</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct TitleScreen {
panel: Panel, panel: Panel,
}</pre></div><h2 id='fields' class='fields small-section-header'> }</pre></div><h2 id='fields' class='fields small-section-header'>
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.panel" class="structfield small-section-header"><a href="#structfield.panel" class="anchor field"></a><code>panel: Panel</code></span><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../../experiment/levels/struct.TitleScreen.html" title="struct experiment::levels::TitleScreen">TitleScreen</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/experiment/levels.rs.html#58-92' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code>pub fn <a href='#method.new' class='fnname'>new</a>(ctx: &amp;mut EventCtx&lt;'_&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&gt;&gt;</code><a class='srclink' href='../../src/experiment/levels.rs.html#59-91' title='goto source code'>[src]</a></h4></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-State%3CSimpleApp%3E' class='impl'><code class='in-band'>impl State&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&gt; for <a class="struct" href="../../experiment/levels/struct.TitleScreen.html" title="struct experiment::levels::TitleScreen">TitleScreen</a></code><a href='#impl-State%3CSimpleApp%3E' class='anchor'></a><a class='srclink' href='../../src/experiment/levels.rs.html#94-162' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.event' class="method hidden"><code>fn <a href='#method.event' class='fnname'>event</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><br>) -&gt; Transition&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&gt;</code><a class='srclink' href='../../src/experiment/levels.rs.html#95-152' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p> Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.panel" class="structfield small-section-header"><a href="#structfield.panel" class="anchor field"></a><code>panel: Panel</code></span><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../../experiment/levels/struct.TitleScreen.html" title="struct experiment::levels::TitleScreen">TitleScreen</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/experiment/levels.rs.html#55-89' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code>pub fn <a href='#method.new' class='fnname'>new</a>(ctx: &amp;mut EventCtx&lt;'_&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&gt;&gt;</code><a class='srclink' href='../../src/experiment/levels.rs.html#56-88' title='goto source code'>[src]</a></h4></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-State%3CSimpleApp%3E' class='impl'><code class='in-band'>impl State&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&gt; for <a class="struct" href="../../experiment/levels/struct.TitleScreen.html" title="struct experiment::levels::TitleScreen">TitleScreen</a></code><a href='#impl-State%3CSimpleApp%3E' class='anchor'></a><a class='srclink' href='../../src/experiment/levels.rs.html#91-159' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.event' class="method hidden"><code>fn <a href='#method.event' class='fnname'>event</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><br>) -&gt; Transition&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&gt;</code><a class='srclink' href='../../src/experiment/levels.rs.html#92-149' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
</div><h4 id='method.draw_baselayer' class="method hidden"><code>fn <a href='#method.draw_baselayer' class='fnname'>draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</code><a class='srclink' href='../../src/experiment/levels.rs.html#154-156' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p> </div><h4 id='method.draw_baselayer' class="method hidden"><code>fn <a href='#method.draw_baselayer' class='fnname'>draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</code><a class='srclink' href='../../src/experiment/levels.rs.html#151-153' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
</div><h4 id='method.draw' class="method hidden"><code>fn <a href='#method.draw' class='fnname'>draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>)</code><a class='srclink' href='../../src/experiment/levels.rs.html#158-161' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Draw</p> </div><h4 id='method.draw' class="method hidden"><code>fn <a href='#method.draw' class='fnname'>draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>)</code><a class='srclink' href='../../src/experiment/levels.rs.html#155-158' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Draw</p>
</div><h4 id='method.on_destroy' class="method hidden"><code>fn <a href='#method.on_destroy' class='fnname'>on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p> </div><h4 id='method.on_destroy' class="method hidden"><code>fn <a href='#method.on_destroy' class='fnname'>on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</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="../../experiment/levels/struct.TitleScreen.html" title="struct experiment::levels::TitleScreen">TitleScreen</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="../../experiment/levels/struct.TitleScreen.html" title="struct experiment::levels::TitleScreen">TitleScreen</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="../../experiment/levels/struct.TitleScreen.html" title="struct experiment::levels::TitleScreen">TitleScreen</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="../../experiment/levels/struct.TitleScreen.html" title="struct experiment::levels::TitleScreen">TitleScreen</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="../../experiment/levels/struct.TitleScreen.html" title="struct experiment::levels::TitleScreen">TitleScreen</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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>(&amp;self) -&gt; <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></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="../../experiment/levels/struct.TitleScreen.html" title="struct experiment::levels::TitleScreen">TitleScreen</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="../../experiment/levels/struct.TitleScreen.html" title="struct experiment::levels::TitleScreen">TitleScreen</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="../../experiment/levels/struct.TitleScreen.html" title="struct experiment::levels::TitleScreen">TitleScreen</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="../../experiment/levels/struct.TitleScreen.html" title="struct experiment::levels::TitleScreen">TitleScreen</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="../../experiment/levels/struct.TitleScreen.html" title="struct experiment::levels::TitleScreen">TitleScreen</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</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> </div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</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>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `BUILT_TIME_UTC` constant in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>game::pregame::built_info::BUILT_TIME_UTC - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"> <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `BUILT_TIME_UTC` constant in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>game::pregame::built_info::BUILT_TIME_UTC - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"> <link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a></p><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> <link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a></p><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'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-dbd8f61b42b849fa/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: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;Wed, 02 Dec 2020 19:07:01 +0000&quot;;</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'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-dbd8f61b42b849fa/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: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;Wed, 02 Dec 2020 20:18:31 +0000&quot;;</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> </div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -545,99 +545,18 @@
<span id="542">542</span> <span id="542">542</span>
<span id="543">543</span> <span id="543">543</span>
<span id="544">544</span> <span id="544">544</span>
<span id="545">545</span>
<span id="546">546</span>
<span id="547">547</span>
<span id="548">548</span>
<span id="549">549</span>
<span id="550">550</span>
<span id="551">551</span>
<span id="552">552</span>
<span id="553">553</span>
<span id="554">554</span>
<span id="555">555</span>
<span id="556">556</span>
<span id="557">557</span>
<span id="558">558</span>
<span id="559">559</span>
<span id="560">560</span>
<span id="561">561</span>
<span id="562">562</span>
<span id="563">563</span>
<span id="564">564</span>
<span id="565">565</span>
<span id="566">566</span>
<span id="567">567</span>
<span id="568">568</span>
<span id="569">569</span>
<span id="570">570</span>
<span id="571">571</span>
<span id="572">572</span>
<span id="573">573</span>
<span id="574">574</span>
<span id="575">575</span>
<span id="576">576</span>
<span id="577">577</span>
<span id="578">578</span>
<span id="579">579</span>
<span id="580">580</span>
<span id="581">581</span>
<span id="582">582</span>
<span id="583">583</span>
<span id="584">584</span>
<span id="585">585</span>
<span id="586">586</span>
<span id="587">587</span>
<span id="588">588</span>
<span id="589">589</span>
<span id="590">590</span>
<span id="591">591</span>
<span id="592">592</span>
<span id="593">593</span>
<span id="594">594</span>
<span id="595">595</span>
<span id="596">596</span>
<span id="597">597</span>
<span id="598">598</span>
<span id="599">599</span>
<span id="600">600</span>
<span id="601">601</span>
<span id="602">602</span>
<span id="603">603</span>
<span id="604">604</span>
<span id="605">605</span>
<span id="606">606</span>
<span id="607">607</span>
<span id="608">608</span>
<span id="609">609</span>
<span id="610">610</span>
<span id="611">611</span>
<span id="612">612</span>
<span id="613">613</span>
<span id="614">614</span>
<span id="615">615</span>
<span id="616">616</span>
<span id="617">617</span>
<span id="618">618</span>
<span id="619">619</span>
<span id="620">620</span>
<span id="621">621</span>
<span id="622">622</span>
<span id="623">623</span>
<span id="624">624</span>
<span id="625">625</span>
</pre><div class="example-wrap"><pre class="rust "> </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>; <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">HashMap</span>;
<span class="kw">use</span> <span class="ident">abstutil</span>::<span class="ident">prettyprint_usize</span>; <span class="kw">use</span> <span class="ident">abstutil</span>::<span class="ident">prettyprint_usize</span>;
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">ArrowCap</span>, <span class="ident">Circle</span>, <span class="ident">Distance</span>, <span class="ident">Duration</span>, <span class="ident">Line</span>, <span class="ident">PolyLine</span>, <span class="ident">Polygon</span>, <span class="ident">Pt2D</span>, <span class="ident">Time</span>}; <span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">ArrowCap</span>, <span class="ident">Circle</span>, <span class="ident">Distance</span>, <span class="ident">Duration</span>, <span class="ident">Line</span>, <span class="ident">PolyLine</span>, <span class="ident">Polygon</span>, <span class="ident">Pt2D</span>, <span class="ident">Time</span>};
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">load</span>::<span class="ident">MapLoader</span>; <span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">load</span>::<span class="ident">MapLoader</span>;
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">tools</span>::{<span class="ident">ColorScale</span>, <span class="ident">DivergingScale</span>, <span class="ident">SimpleMinimap</span>}; <span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">tools</span>::{<span class="ident">ColorScale</span>, <span class="ident">SimpleMinimap</span>};
<span class="kw">use</span> <span class="ident">map_gui</span>::{<span class="ident">Cached</span>, <span class="ident">SimpleApp</span>, <span class="ident">ID</span>}; <span class="kw">use</span> <span class="ident">map_gui</span>::{<span class="ident">SimpleApp</span>, <span class="ident">ID</span>};
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">BuildingID</span>, <span class="ident">BuildingType</span>, <span class="ident">PathConstraints</span>}; <span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">BuildingID</span>, <span class="ident">BuildingType</span>};
<span class="kw">use</span> <span class="ident">widgetry</span>::{ <span class="kw">use</span> <span class="ident">widgetry</span>::{
<span class="ident">Btn</span>, <span class="ident">Color</span>, <span class="ident">Drawable</span>, <span class="ident">EventCtx</span>, <span class="ident">Fill</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>, <span class="ident">HorizontalAlignment</span>, <span class="ident">Key</span>, <span class="ident">Line</span>, <span class="ident">Btn</span>, <span class="ident">Color</span>, <span class="ident">Drawable</span>, <span class="ident">EventCtx</span>, <span class="ident">Fill</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>, <span class="ident">HorizontalAlignment</span>, <span class="ident">Key</span>, <span class="ident">Line</span>,
<span class="ident">LinearGradient</span>, <span class="ident">Outcome</span>, <span class="ident">Panel</span>, <span class="ident">RewriteColor</span>, <span class="ident">State</span>, <span class="ident">Text</span>, <span class="ident">TextExt</span>, <span class="ident">Transition</span>, <span class="ident">UpdateType</span>, <span class="ident">LinearGradient</span>, <span class="ident">Outcome</span>, <span class="ident">Panel</span>, <span class="ident">State</span>, <span class="ident">Text</span>, <span class="ident">TextExt</span>, <span class="ident">Transition</span>, <span class="ident">UpdateType</span>,
<span class="ident">VerticalAlignment</span>, <span class="ident">Widget</span>, <span class="ident">VerticalAlignment</span>, <span class="ident">Widget</span>,
}; };
@ -656,7 +575,7 @@
<span class="ident">sleigh</span>: <span class="ident">Pt2D</span>, <span class="ident">sleigh</span>: <span class="ident">Pt2D</span>,
<span class="ident">state</span>: <span class="ident">SleighState</span>, <span class="ident">state</span>: <span class="ident">SleighState</span>,
<span class="ident">over_bldg</span>: <span class="ident">Cached</span><span class="op">&lt;</span><span class="ident">BuildingID</span>, <span class="ident">OverBldg</span><span class="op">&gt;</span>, <span class="ident">over_bldg</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">BuildingID</span><span class="op">&gt;</span>,
} }
<span class="kw">impl</span> <span class="ident">Game</span> { <span class="kw">impl</span> <span class="ident">Game</span> {
@ -666,11 +585,15 @@
<span class="ident">app</span>, <span class="ident">app</span>,
<span class="ident">config</span>.<span class="ident">map</span>.<span class="ident">clone</span>(), <span class="ident">config</span>.<span class="ident">map</span>.<span class="ident">clone</span>(),
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="kw">move</span> <span class="op">|</span><span class="ident">ctx</span>, <span class="ident">app</span><span class="op">|</span> { <span class="ident">Box</span>::<span class="ident">new</span>(<span class="kw">move</span> <span class="op">|</span><span class="ident">ctx</span>, <span class="ident">app</span><span class="op">|</span> {
<span class="kw">let</span> <span class="ident">start</span> <span class="op">=</span> <span class="ident">app</span>
.<span class="ident">map</span>
.<span class="ident">find_b_by_osm_id</span>(<span class="ident">config</span>.<span class="ident">start_depot</span>)
.<span class="ident">expect</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;can&#39;t find {}&quot;</span>, <span class="ident">config</span>.<span class="ident">start_depot</span>));
<span class="kw">let</span> <span class="ident">sleigh</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="ident">start</span>).<span class="ident">label_center</span>;
<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">center_on_map_pt</span>(<span class="ident">sleigh</span>);
<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">cam_zoom</span> <span class="op">=</span> <span class="ident">ZOOM</span>; <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">cam_zoom</span> <span class="op">=</span> <span class="ident">ZOOM</span>;
<span class="kw">let</span> <span class="ident">state</span> <span class="op">=</span> <span class="ident">SleighState</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">config</span>); <span class="kw">let</span> <span class="ident">state</span> <span class="op">=</span> <span class="ident">SleighState</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">config</span>);
<span class="kw">let</span> <span class="ident">sleigh</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="ident">state</span>.<span class="ident">depot</span>).<span class="ident">label_center</span>;
<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">center_on_map_pt</span>(<span class="ident">sleigh</span>);
<span class="kw">let</span> <span class="ident">panel</span> <span class="op">=</span> <span class="ident">Panel</span>::<span class="ident">new</span>(<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[ <span class="kw">let</span> <span class="ident">panel</span> <span class="op">=</span> <span class="ident">Panel</span>::<span class="ident">new</span>(<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[ <span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
@ -705,7 +628,7 @@
<span class="ident">sleigh</span>, <span class="ident">sleigh</span>,
<span class="ident">state</span>, <span class="ident">state</span>,
<span class="ident">over_bldg</span>: <span class="ident">Cached</span>::<span class="ident">new</span>(), <span class="ident">over_bldg</span>: <span class="prelude-val">None</span>,
}; };
<span class="ident">game</span>.<span class="ident">update_panel</span>(<span class="ident">ctx</span>); <span class="ident">game</span>.<span class="ident">update_panel</span>(<span class="ident">ctx</span>);
<span class="ident">game</span>.<span class="ident">minimap</span> <span class="ident">game</span>.<span class="ident">minimap</span>
@ -724,7 +647,7 @@
<span class="kw">let</span> <span class="ident">energy_bar</span> <span class="op">=</span> <span class="ident">make_bar</span>( <span class="kw">let</span> <span class="ident">energy_bar</span> <span class="op">=</span> <span class="ident">make_bar</span>(
<span class="ident">ctx</span>, <span class="ident">ctx</span>,
<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">energy</span>.<span class="ident">max</span>(<span class="ident">Duration</span>::<span class="ident">ZERO</span>) <span class="op">/</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">config</span>.<span class="ident">max_energy</span>, (<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">energy</span> <span class="kw">as</span> <span class="ident">f64</span>) <span class="op">/</span> (<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">config</span>.<span class="ident">max_energy</span> <span class="kw">as</span> <span class="ident">f64</span>),
<span class="ident">ColorScale</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">Color</span>::<span class="ident">RED</span>, <span class="ident">Color</span>::<span class="ident">YELLOW</span>, <span class="ident">Color</span>::<span class="ident">GREEN</span>]), <span class="ident">ColorScale</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">Color</span>::<span class="ident">RED</span>, <span class="ident">Color</span>::<span class="ident">YELLOW</span>, <span class="ident">Color</span>::<span class="ident">GREEN</span>]),
); );
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">replace</span>(<span class="ident">ctx</span>, <span class="string">&quot;energy&quot;</span>, <span class="ident">energy_bar</span>); <span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">replace</span>(<span class="ident">ctx</span>, <span class="string">&quot;energy&quot;</span>, <span class="ident">energy_bar</span>);
@ -757,73 +680,74 @@
<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">energy</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">config</span>.<span class="ident">max_energy</span>; <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">energy</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">config</span>.<span class="ident">max_energy</span>;
<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">upzones_used</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>; <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">upzones_used</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">houses</span>.<span class="ident">insert</span>(<span class="ident">b</span>, <span class="ident">BldgState</span>::<span class="ident">Depot</span>); <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">houses</span>.<span class="ident">insert</span>(<span class="ident">b</span>, <span class="ident">BldgState</span>::<span class="ident">Depot</span>);
<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">depot</span> <span class="op">=</span> <span class="ident">b</span>;
<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">recalc_depots</span>(<span class="ident">ctx</span>, <span class="ident">app</span>); <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">recalc_depots</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="self">self</span>.<span class="ident">sleigh</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="ident">b</span>).<span class="ident">label_center</span>; <span class="self">self</span>.<span class="ident">sleigh</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="ident">b</span>).<span class="ident">label_center</span>;
<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">cam_zoom</span> <span class="op">=</span> <span class="ident">ZOOM</span>; <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">cam_zoom</span> <span class="op">=</span> <span class="ident">ZOOM</span>;
<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">center_on_map_pt</span>(<span class="self">self</span>.<span class="ident">sleigh</span>); <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">center_on_map_pt</span>(<span class="self">self</span>.<span class="ident">sleigh</span>);
} }
<span class="kw">fn</span> <span class="ident">over_bldg</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">SimpleApp</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">BuildingID</span><span class="op">&gt;</span> {
<span class="kw">for</span> <span class="ident">id</span> <span class="kw">in</span> <span class="ident">app</span>
.<span class="ident">draw_map</span>
.<span class="ident">get_matching_objects</span>(<span class="ident">Circle</span>::<span class="ident">new</span>(<span class="self">self</span>.<span class="ident">sleigh</span>, <span class="ident">Distance</span>::<span class="ident">meters</span>(<span class="number">3.0</span>)).<span class="ident">get_bounds</span>())
{
<span class="kw">if</span> <span class="kw">let</span> <span class="ident">ID</span>::<span class="ident">Building</span>(<span class="ident">b</span>) <span class="op">=</span> <span class="ident">id</span> {
<span class="kw">if</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="ident">b</span>).<span class="ident">polygon</span>.<span class="ident">contains_pt</span>(<span class="self">self</span>.<span class="ident">sleigh</span>) {
<span class="kw">return</span> <span class="prelude-val">Some</span>(<span class="ident">b</span>);
}
}
}
<span class="prelude-val">None</span>
}
} }
<span class="kw">impl</span> <span class="ident">State</span><span class="op">&lt;</span><span class="ident">SimpleApp</span><span class="op">&gt;</span> <span class="kw">for</span> <span class="ident">Game</span> { <span class="kw">impl</span> <span class="ident">State</span><span class="op">&lt;</span><span class="ident">SimpleApp</span><span class="op">&gt;</span> <span class="kw">for</span> <span class="ident">Game</span> {
<span class="kw">fn</span> <span class="ident">event</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">SimpleApp</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Transition</span><span class="op">&lt;</span><span class="ident">SimpleApp</span><span class="op">&gt;</span> { <span class="kw">fn</span> <span class="ident">event</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">SimpleApp</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Transition</span><span class="op">&lt;</span><span class="ident">SimpleApp</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">recharging</span> <span class="op">=</span> <span class="bool-val">false</span>; <span class="kw">let</span> <span class="ident">speed</span> <span class="op">=</span> <span class="kw">if</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">has_energy</span>() {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">dt</span>) <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">input</span>.<span class="ident">nonblocking_is_update_event</span>() { <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">config</span>.<span class="ident">normal_speed</span>
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">b</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">over_bldg</span>.<span class="ident">key</span>() { } <span class="kw">else</span> {
<span class="kw">if</span> <span class="ident">ctx</span>.<span class="ident">is_key_down</span>(<span class="ident">Key</span>::<span class="ident">Space</span>) <span class="op">&amp;&amp;</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">recharge</span>(<span class="ident">b</span>, <span class="ident">dt</span>) { <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">config</span>.<span class="ident">tired_speed</span>
<span class="self">self</span>.<span class="ident">update_panel</span>(<span class="ident">ctx</span>); };
<span class="ident">recharging</span> <span class="op">=</span> <span class="bool-val">true</span>; <span class="kw">let</span> (<span class="ident">dx</span>, <span class="ident">dy</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">controls</span>.<span class="ident">displacement</span>(<span class="ident">ctx</span>, <span class="ident">speed</span>);
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">depot</span> <span class="op">!</span><span class="op">=</span> <span class="ident">b</span> { <span class="kw">if</span> <span class="ident">dx</span> <span class="op">!</span><span class="op">=</span> <span class="number">0.0</span> <span class="op">|</span><span class="op">|</span> <span class="ident">dy</span> <span class="op">!</span><span class="op">=</span> <span class="number">0.0</span> {
<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">depot</span> <span class="op">=</span> <span class="ident">b</span>; <span class="self">self</span>.<span class="ident">sleigh</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">sleigh</span>.<span class="ident">offset</span>(<span class="ident">dx</span>, <span class="ident">dy</span>);
<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">recalc_depots</span>(<span class="ident">ctx</span>, <span class="ident">app</span>); <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">center_on_map_pt</span>(<span class="self">self</span>.<span class="ident">sleigh</span>);
<span class="self">self</span>.<span class="ident">over_bldg</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">over_bldg</span>(<span class="ident">app</span>);
}
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">b</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">over_bldg</span> {
<span class="kw">match</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">houses</span>.<span class="ident">get</span>(<span class="kw-2">&amp;</span><span class="ident">b</span>) {
<span class="prelude-val">Some</span>(<span class="ident">BldgState</span>::<span class="ident">Undelivered</span>(<span class="kw">_</span>)) <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">increase</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">present_dropped</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">b</span>) {
<span class="self">self</span>.<span class="ident">update_panel</span>(<span class="ident">ctx</span>);
<span class="self">self</span>.<span class="ident">animator</span>.<span class="ident">add</span>(
<span class="ident">Duration</span>::<span class="ident">seconds</span>(<span class="number">0.5</span>),
(<span class="number">1.0</span>, <span class="number">4.0</span>),
<span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="ident">b</span>).<span class="ident">label_center</span>,
<span class="ident">Text</span>::<span class="ident">from</span>(<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;+{}&quot;</span>, <span class="ident">prettyprint_usize</span>(<span class="ident">increase</span>))))
.<span class="ident">bg</span>(<span class="ident">Color</span>::<span class="ident">RED</span>)
.<span class="ident">render_to_batch</span>(<span class="ident">ctx</span>.<span class="ident">prerender</span>)
.<span class="ident">scale</span>(<span class="number">0.1</span>),
);
} }
} }
} <span class="prelude-val">Some</span>(<span class="ident">BldgState</span>::<span class="ident">Depot</span>) <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">refill</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">config</span>.<span class="ident">max_energy</span> <span class="op">-</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">energy</span>;
<span class="kw">if</span> <span class="op">!</span><span class="ident">recharging</span> <span class="op">&amp;&amp;</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">has_energy</span>() { <span class="kw">if</span> <span class="ident">refill</span> <span class="op">&gt;</span> <span class="number">0</span> {
<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">energy</span> <span class="op">-</span><span class="op">=</span> <span class="ident">dt</span>; <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">energy</span> <span class="op">+</span><span class="op">=</span> <span class="ident">refill</span>;
<span class="self">self</span>.<span class="ident">update_panel</span>(<span class="ident">ctx</span>); <span class="self">self</span>.<span class="ident">update_panel</span>(<span class="ident">ctx</span>);
} <span class="self">self</span>.<span class="ident">animator</span>.<span class="ident">add</span>(
} <span class="ident">Duration</span>::<span class="ident">seconds</span>(<span class="number">0.5</span>),
(<span class="number">1.0</span>, <span class="number">4.0</span>),
<span class="kw">if</span> <span class="op">!</span><span class="ident">recharging</span> { <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="ident">b</span>).<span class="ident">label_center</span>,
<span class="kw">let</span> <span class="ident">speed</span> <span class="op">=</span> <span class="kw">if</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">has_energy</span>() { <span class="ident">Text</span>::<span class="ident">from</span>(<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Refilled {}&quot;</span>, <span class="ident">prettyprint_usize</span>(<span class="ident">refill</span>))))
<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">config</span>.<span class="ident">normal_speed</span> .<span class="ident">bg</span>(<span class="ident">Color</span>::<span class="ident">BLUE</span>)
} <span class="kw">else</span> { .<span class="ident">render_to_batch</span>(<span class="ident">ctx</span>.<span class="ident">prerender</span>)
<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">config</span>.<span class="ident">tired_speed</span> .<span class="ident">scale</span>(<span class="number">0.1</span>),
}; );
<span class="kw">let</span> (<span class="ident">dx</span>, <span class="ident">dy</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">controls</span>.<span class="ident">displacement</span>(<span class="ident">ctx</span>, <span class="ident">speed</span>); }
<span class="kw">if</span> <span class="ident">dx</span> <span class="op">!</span><span class="op">=</span> <span class="number">0.0</span> <span class="op">|</span><span class="op">|</span> <span class="ident">dy</span> <span class="op">!</span><span class="op">=</span> <span class="number">0.0</span> {
<span class="self">self</span>.<span class="ident">sleigh</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">sleigh</span>.<span class="ident">offset</span>(<span class="ident">dx</span>, <span class="ident">dy</span>);
<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">center_on_map_pt</span>(<span class="self">self</span>.<span class="ident">sleigh</span>);
<span class="kw">let</span> <span class="ident">key</span> <span class="op">=</span> <span class="ident">OverBldg</span>::<span class="ident">key</span>(<span class="ident">app</span>, <span class="self">self</span>.<span class="ident">sleigh</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">state</span>);
<span class="kw">let</span> <span class="ident">is_depot</span> <span class="op">=</span> <span class="ident">key</span>
.<span class="ident">map</span>(<span class="op">|</span><span class="ident">b</span><span class="op">|</span> <span class="kw">match</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">houses</span>.<span class="ident">get</span>(<span class="kw-2">&amp;</span><span class="ident">b</span>) {
<span class="prelude-val">Some</span>(<span class="ident">BldgState</span>::<span class="ident">Depot</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="bool-val">true</span>,
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> <span class="bool-val">false</span>,
})
.<span class="ident">unwrap_or</span>(<span class="bool-val">false</span>);
<span class="self">self</span>.<span class="ident">over_bldg</span>
.<span class="ident">update</span>(<span class="ident">key</span>, <span class="op">|</span><span class="ident">key</span><span class="op">|</span> <span class="ident">OverBldg</span>::<span class="ident">value</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">key</span>, <span class="ident">is_depot</span>));
}
}
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">b</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">over_bldg</span>.<span class="ident">key</span>() {
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">has_energy</span>() {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">increase</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">present_dropped</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">b</span>) {
<span class="self">self</span>.<span class="ident">over_bldg</span>.<span class="ident">clear</span>();
<span class="self">self</span>.<span class="ident">update_panel</span>(<span class="ident">ctx</span>);
<span class="self">self</span>.<span class="ident">animator</span>.<span class="ident">add</span>(
<span class="ident">Duration</span>::<span class="ident">seconds</span>(<span class="number">0.5</span>),
(<span class="number">1.0</span>, <span class="number">4.0</span>),
<span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="ident">b</span>).<span class="ident">label_center</span>,
<span class="ident">Text</span>::<span class="ident">from</span>(<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;+{}&quot;</span>, <span class="ident">prettyprint_usize</span>(<span class="ident">increase</span>))))
.<span class="ident">bg</span>(<span class="ident">Color</span>::<span class="ident">RED</span>)
.<span class="ident">render_to_batch</span>(<span class="ident">ctx</span>.<span class="ident">prerender</span>)
.<span class="ident">scale</span>(<span class="number">0.1</span>),
);
} }
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> {}
} }
} }
@ -889,9 +813,6 @@
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">state</span>.<span class="ident">draw_todo_houses</span>); <span class="ident">g</span>.<span class="ident">redraw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">state</span>.<span class="ident">draw_todo_houses</span>);
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">state</span>.<span class="ident">draw_done_houses</span>); <span class="ident">g</span>.<span class="ident">redraw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">state</span>.<span class="ident">draw_done_houses</span>);
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">draw</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">over_bldg</span>.<span class="ident">value</span>() {
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="kw-2">&amp;</span><span class="ident">draw</span>.<span class="number">0</span>);
}
<span class="kw">if</span> <span class="op">!</span><span class="self">self</span>.<span class="ident">state</span>.<span class="ident">has_energy</span>() { <span class="kw">if</span> <span class="op">!</span><span class="self">self</span>.<span class="ident">state</span>.<span class="ident">has_energy</span>() {
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">state</span>.<span class="ident">draw_all_depots</span>); <span class="ident">g</span>.<span class="ident">redraw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">state</span>.<span class="ident">draw_all_depots</span>);
} }
@ -912,13 +833,12 @@
<span class="kw">struct</span> <span class="ident">SleighState</span> { <span class="kw">struct</span> <span class="ident">SleighState</span> {
<span class="ident">config</span>: <span class="ident">Config</span>, <span class="ident">config</span>: <span class="ident">Config</span>,
<span class="comment">// Number of deliveries</span>
<span class="ident">score</span>: <span class="ident">usize</span>, <span class="ident">score</span>: <span class="ident">usize</span>,
<span class="ident">energy</span>: <span class="ident">Duration</span>, <span class="comment">// Number of gifts currently being carried</span>
<span class="ident">energy</span>: <span class="ident">usize</span>,
<span class="ident">houses</span>: <span class="ident">HashMap</span><span class="op">&lt;</span><span class="ident">BuildingID</span>, <span class="ident">BldgState</span><span class="op">&gt;</span>, <span class="ident">houses</span>: <span class="ident">HashMap</span><span class="op">&lt;</span><span class="ident">BuildingID</span>, <span class="ident">BldgState</span><span class="op">&gt;</span>,
<span class="ident">depot</span>: <span class="ident">BuildingID</span>,
<span class="ident">cost_to_house</span>: <span class="ident">HashMap</span><span class="op">&lt;</span><span class="ident">BuildingID</span>, <span class="ident">Duration</span><span class="op">&gt;</span>,
<span class="ident">upzones_used</span>: <span class="ident">usize</span>, <span class="ident">upzones_used</span>: <span class="ident">usize</span>,
<span class="ident">upzoned_depots</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">BuildingID</span><span class="op">&gt;</span>, <span class="ident">upzoned_depots</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">BuildingID</span><span class="op">&gt;</span>,
@ -932,7 +852,6 @@
<span class="kw">impl</span> <span class="ident">SleighState</span> { <span class="kw">impl</span> <span class="ident">SleighState</span> {
<span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">SimpleApp</span>, <span class="ident">config</span>: <span class="ident">Config</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">SleighState</span> { <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">SimpleApp</span>, <span class="ident">config</span>: <span class="ident">Config</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">SleighState</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">houses</span> <span class="op">=</span> <span class="ident">HashMap</span>::<span class="ident">new</span>(); <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">houses</span> <span class="op">=</span> <span class="ident">HashMap</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">depot</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="kw">for</span> <span class="ident">b</span> <span class="kw">in</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">all_buildings</span>() { <span class="kw">for</span> <span class="ident">b</span> <span class="kw">in</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">all_buildings</span>() {
<span class="kw">if</span> <span class="kw">let</span> <span class="ident">BuildingType</span>::<span class="ident">Residential</span> { <span class="kw">if</span> <span class="kw">let</span> <span class="ident">BuildingType</span>::<span class="ident">Residential</span> {
<span class="ident">num_housing_units</span>, .. <span class="ident">num_housing_units</span>, ..
@ -945,13 +864,9 @@
} <span class="kw">else</span> <span class="kw">if</span> <span class="op">!</span><span class="ident">b</span>.<span class="ident">amenities</span>.<span class="ident">is_empty</span>() { } <span class="kw">else</span> <span class="kw">if</span> <span class="op">!</span><span class="ident">b</span>.<span class="ident">amenities</span>.<span class="ident">is_empty</span>() {
<span class="comment">// TODO Maybe just food?</span> <span class="comment">// TODO Maybe just food?</span>
<span class="ident">houses</span>.<span class="ident">insert</span>(<span class="ident">b</span>.<span class="ident">id</span>, <span class="ident">BldgState</span>::<span class="ident">Depot</span>); <span class="ident">houses</span>.<span class="ident">insert</span>(<span class="ident">b</span>.<span class="ident">id</span>, <span class="ident">BldgState</span>::<span class="ident">Depot</span>);
<span class="kw">if</span> <span class="ident">b</span>.<span class="ident">orig_id</span> <span class="op">=</span><span class="op">=</span> <span class="ident">config</span>.<span class="ident">start_depot</span> {
<span class="ident">depot</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">b</span>.<span class="ident">id</span>);
}
} }
} }
<span class="kw">let</span> <span class="ident">depot</span> <span class="op">=</span> <span class="ident">depot</span>.<span class="ident">expect</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;can&#39;t find {}&quot;</span>, <span class="ident">config</span>.<span class="ident">start_depot</span>));
<span class="kw">let</span> <span class="ident">energy</span> <span class="op">=</span> <span class="ident">config</span>.<span class="ident">max_energy</span>; <span class="kw">let</span> <span class="ident">energy</span> <span class="op">=</span> <span class="ident">config</span>.<span class="ident">max_energy</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">SleighState</span> { <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">SleighState</span> {
<span class="ident">config</span>, <span class="ident">config</span>,
@ -960,9 +875,6 @@
<span class="ident">energy</span>, <span class="ident">energy</span>,
<span class="ident">houses</span>, <span class="ident">houses</span>,
<span class="ident">depot</span>,
<span class="ident">cost_to_house</span>: <span class="ident">HashMap</span>::<span class="ident">new</span>(),
<span class="ident">upzones_used</span>: <span class="number">0</span>, <span class="ident">upzones_used</span>: <span class="number">0</span>,
<span class="ident">upzoned_depots</span>: <span class="ident">Vec</span>::<span class="ident">new</span>(), <span class="ident">upzoned_depots</span>: <span class="ident">Vec</span>::<span class="ident">new</span>(),
@ -986,42 +898,21 @@
<span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="kw-2">*</span><span class="ident">b</span>).<span class="ident">polygon</span>.<span class="ident">clone</span>(), <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="kw-2">*</span><span class="ident">b</span>).<span class="ident">polygon</span>.<span class="ident">clone</span>(),
); );
} }
<span class="ident">batch</span>.<span class="ident">append</span>(
<span class="ident">GeomBatch</span>::<span class="ident">load_svg</span>(<span class="ident">ctx</span>.<span class="ident">prerender</span>, <span class="string">&quot;system/assets/tools/star.svg&quot;</span>)
.<span class="ident">centered_on</span>(<span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="self">self</span>.<span class="ident">depot</span>).<span class="ident">label_center</span>)
.<span class="ident">color</span>(<span class="ident">RewriteColor</span>::<span class="ident">ChangeAll</span>(<span class="ident">Color</span>::<span class="ident">YELLOW</span>)),
);
<span class="self">self</span>.<span class="ident">cost_to_house</span> <span class="op">=</span> <span class="ident">map_model</span>::<span class="ident">connectivity</span>::<span class="ident">all_costs_from</span>(
<span class="kw-2">&amp;</span><span class="ident">app</span>.<span class="ident">map</span>,
<span class="self">self</span>.<span class="ident">depot</span>,
<span class="ident">Duration</span>::<span class="ident">hours</span>(<span class="number">3</span>),
<span class="ident">PathConstraints</span>::<span class="ident">Pedestrian</span>,
);
<span class="kw">let</span> <span class="ident">worst_duration</span> <span class="op">=</span> <span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">15</span>);
<span class="kw">let</span> <span class="ident">cost_scale</span> <span class="op">=</span>
<span class="ident">DivergingScale</span>::<span class="ident">new</span>(<span class="ident">Color</span>::<span class="ident">hex</span>(<span class="string">&quot;#5D9630&quot;</span>), <span class="ident">Color</span>::<span class="ident">WHITE</span>, <span class="ident">Color</span>::<span class="ident">hex</span>(<span class="string">&quot;#A32015&quot;</span>))
.<span class="ident">range</span>(<span class="number">0.0</span>, <span class="ident">worst_duration</span>.<span class="ident">inner_seconds</span>());
<span class="kw">for</span> <span class="ident">b</span> <span class="kw">in</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">all_buildings</span>() { <span class="kw">for</span> <span class="ident">b</span> <span class="kw">in</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">all_buildings</span>() {
<span class="kw">match</span> <span class="self">self</span>.<span class="ident">houses</span>.<span class="ident">get</span>(<span class="kw-2">&amp;</span><span class="ident">b</span>.<span class="ident">id</span>) { <span class="kw">match</span> <span class="self">self</span>.<span class="ident">houses</span>.<span class="ident">get</span>(<span class="kw-2">&amp;</span><span class="ident">b</span>.<span class="ident">id</span>) {
<span class="prelude-val">Some</span>(<span class="ident">BldgState</span>::<span class="ident">Undelivered</span>(<span class="ident">housing_units</span>)) <span class="op">=</span><span class="op">&gt;</span> { <span class="prelude-val">Some</span>(<span class="ident">BldgState</span>::<span class="ident">Undelivered</span>(<span class="ident">housing_units</span>)) <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">cost</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">cost_to_house</span>.<span class="ident">get</span>(<span class="kw-2">&amp;</span><span class="ident">b</span>.<span class="ident">id</span>) { <span class="comment">// Call out non-single family homes</span>
<span class="kw">let</span> <span class="ident">color</span> <span class="op">=</span> <span class="ident">cost_scale</span>.<span class="ident">eval</span>(<span class="ident">cost</span>.<span class="ident">inner_seconds</span>()).<span class="ident">unwrap</span>(); <span class="kw">if</span> <span class="kw-2">*</span><span class="ident">housing_units</span> <span class="op">&gt;</span> <span class="number">1</span> {
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">color</span>, <span class="ident">b</span>.<span class="ident">polygon</span>.<span class="ident">clone</span>()); <span class="comment">// TODO Text can be slow to render, and this should be louder anyway</span>
<span class="comment">// Call out non-single family homes</span> <span class="ident">batch</span>.<span class="ident">append</span>(
<span class="kw">if</span> <span class="kw-2">*</span><span class="ident">housing_units</span> <span class="op">&gt;</span> <span class="number">1</span> { <span class="ident">Text</span>::<span class="ident">from</span>(<span class="ident">Line</span>(<span class="ident">housing_units</span>.<span class="ident">to_string</span>()).<span class="ident">fg</span>(<span class="ident">Color</span>::<span class="ident">RED</span>))
<span class="comment">// TODO Text can be slow to render, and this should be louder anyway</span> .<span class="ident">render_to_batch</span>(<span class="ident">ctx</span>.<span class="ident">prerender</span>)
<span class="ident">batch</span>.<span class="ident">append</span>( .<span class="ident">scale</span>(<span class="number">0.2</span>)
<span class="ident">Text</span>::<span class="ident">from</span>(<span class="ident">Line</span>(<span class="ident">housing_units</span>.<span class="ident">to_string</span>()).<span class="ident">fg</span>(<span class="ident">Color</span>::<span class="ident">RED</span>)) .<span class="ident">centered_on</span>(<span class="ident">b</span>.<span class="ident">label_center</span>),
.<span class="ident">render_to_batch</span>(<span class="ident">ctx</span>.<span class="ident">prerender</span>) );
.<span class="ident">scale</span>(<span class="number">0.2</span>)
.<span class="ident">centered_on</span>(<span class="ident">b</span>.<span class="ident">label_center</span>),
);
}
<span class="kw">continue</span>;
} }
<span class="kw">continue</span>;
} }
<span class="prelude-val">Some</span>(<span class="ident">BldgState</span>::<span class="ident">Depot</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="kw">continue</span>, <span class="prelude-val">Some</span>(<span class="ident">BldgState</span>::<span class="ident">Depot</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="kw">continue</span>,
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> {} <span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> {}
@ -1058,30 +949,23 @@
<span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">SimpleApp</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">SimpleApp</span>,
<span class="ident">id</span>: <span class="ident">BuildingID</span>, <span class="ident">id</span>: <span class="ident">BuildingID</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">usize</span><span class="op">&gt;</span> { ) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">usize</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">BldgState</span>::<span class="ident">Undelivered</span>(<span class="ident">score</span>)) <span class="op">=</span> <span class="self">self</span>.<span class="ident">houses</span>.<span class="ident">get</span>(<span class="kw-2">&amp;</span><span class="ident">id</span>).<span class="ident">cloned</span>() { <span class="kw">if</span> <span class="op">!</span><span class="self">self</span>.<span class="ident">has_energy</span>() {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">cost</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">cost_to_house</span>.<span class="ident">get</span>(<span class="kw-2">&amp;</span><span class="ident">id</span>) { <span class="kw">return</span> <span class="prelude-val">None</span>;
<span class="self">self</span>.<span class="ident">score</span> <span class="op">+</span><span class="op">=</span> <span class="ident">score</span>; }
<span class="self">self</span>.<span class="ident">houses</span>.<span class="ident">insert</span>(<span class="ident">id</span>, <span class="ident">BldgState</span>::<span class="ident">Done</span>); <span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">BldgState</span>::<span class="ident">Undelivered</span>(<span class="ident">num_housing_units</span>)) <span class="op">=</span> <span class="self">self</span>.<span class="ident">houses</span>.<span class="ident">get</span>(<span class="kw-2">&amp;</span><span class="ident">id</span>).<span class="ident">cloned</span>() {
<span class="self">self</span>.<span class="ident">energy</span> <span class="op">-</span><span class="op">=</span> <span class="kw-2">*</span><span class="ident">cost</span>; <span class="comment">// TODO No partial deliveries.</span>
<span class="self">self</span>.<span class="ident">recalc_deliveries</span>(<span class="ident">ctx</span>, <span class="ident">app</span>); <span class="kw">let</span> <span class="ident">deliveries</span> <span class="op">=</span> <span class="ident">num_housing_units</span>.<span class="ident">min</span>(<span class="self">self</span>.<span class="ident">energy</span>);
<span class="kw">return</span> <span class="prelude-val">Some</span>(<span class="ident">score</span>); <span class="self">self</span>.<span class="ident">score</span> <span class="op">+</span><span class="op">=</span> <span class="ident">deliveries</span>;
} <span class="self">self</span>.<span class="ident">houses</span>.<span class="ident">insert</span>(<span class="ident">id</span>, <span class="ident">BldgState</span>::<span class="ident">Done</span>);
<span class="self">self</span>.<span class="ident">energy</span> <span class="op">-</span><span class="op">=</span> <span class="ident">deliveries</span>;
<span class="self">self</span>.<span class="ident">recalc_deliveries</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="kw">return</span> <span class="prelude-val">Some</span>(<span class="ident">deliveries</span>);
} }
<span class="prelude-val">None</span> <span class="prelude-val">None</span>
} }
<span class="comment">// True if state change</span>
<span class="kw">fn</span> <span class="ident">recharge</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">id</span>: <span class="ident">BuildingID</span>, <span class="ident">dt</span>: <span class="ident">Duration</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">bool</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">BldgState</span>::<span class="ident">Depot</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">houses</span>.<span class="ident">get</span>(<span class="kw-2">&amp;</span><span class="ident">id</span>) {
<span class="self">self</span>.<span class="ident">energy</span> <span class="op">+</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">config</span>.<span class="ident">recharge_rate</span> <span class="op">*</span> <span class="ident">dt</span>;
<span class="self">self</span>.<span class="ident">energy</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">energy</span>.<span class="ident">min</span>(<span class="self">self</span>.<span class="ident">config</span>.<span class="ident">max_energy</span>);
<span class="kw">return</span> <span class="bool-val">true</span>;
}
<span class="bool-val">false</span>
}
<span class="kw">fn</span> <span class="ident">has_energy</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">bool</span> { <span class="kw">fn</span> <span class="ident">has_energy</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">bool</span> {
<span class="self">self</span>.<span class="ident">energy</span> <span class="op">&gt;</span> <span class="ident">Duration</span>::<span class="ident">ZERO</span> <span class="self">self</span>.<span class="ident">energy</span> <span class="op">&gt;</span> <span class="number">0</span>
} }
<span class="doccomment">/// (upzones_free, next_upzone_pct)</span> <span class="doccomment">/// (upzones_free, next_upzone_pct)</span>
@ -1115,52 +999,6 @@
<span class="ident">Done</span>, <span class="ident">Done</span>,
} }
<span class="kw">struct</span> <span class="ident">OverBldg</span>(<span class="ident">Drawable</span>);
<span class="kw">impl</span> <span class="ident">OverBldg</span> {
<span class="kw">fn</span> <span class="ident">key</span>(<span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">SimpleApp</span>, <span class="ident">sleigh</span>: <span class="ident">Pt2D</span>, <span class="ident">state</span>: <span class="kw-2">&amp;</span><span class="ident">SleighState</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">BuildingID</span><span class="op">&gt;</span> {
<span class="kw">for</span> <span class="ident">id</span> <span class="kw">in</span> <span class="ident">app</span>
.<span class="ident">draw_map</span>
.<span class="ident">get_matching_objects</span>(<span class="ident">Circle</span>::<span class="ident">new</span>(<span class="ident">sleigh</span>, <span class="ident">Distance</span>::<span class="ident">meters</span>(<span class="number">3.0</span>)).<span class="ident">get_bounds</span>())
{
<span class="kw">if</span> <span class="kw">let</span> <span class="ident">ID</span>::<span class="ident">Building</span>(<span class="ident">b</span>) <span class="op">=</span> <span class="ident">id</span> {
<span class="kw">if</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="ident">b</span>).<span class="ident">polygon</span>.<span class="ident">contains_pt</span>(<span class="ident">sleigh</span>) {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">BldgState</span>::<span class="ident">Undelivered</span> { .. }) <span class="op">|</span> <span class="prelude-val">Some</span>(<span class="ident">BldgState</span>::<span class="ident">Depot</span>) <span class="op">=</span>
<span class="ident">state</span>.<span class="ident">houses</span>.<span class="ident">get</span>(<span class="kw-2">&amp;</span><span class="ident">b</span>)
{
<span class="kw">return</span> <span class="prelude-val">Some</span>(<span class="ident">b</span>);
}
}
}
}
<span class="prelude-val">None</span>
}
<span class="kw">fn</span> <span class="ident">value</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">SimpleApp</span>, <span class="ident">key</span>: <span class="ident">BuildingID</span>, <span class="ident">is_depot</span>: <span class="ident">bool</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">OverBldg</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>();
<span class="comment">// We only want to highlight when we&#39;re hovering over a depot and could recharge</span>
<span class="kw">if</span> <span class="ident">is_depot</span> {
<span class="kw">let</span> <span class="ident">b</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="ident">key</span>);
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">Color</span>::<span class="ident">YELLOW</span>,
<span class="ident">b</span>.<span class="ident">polygon</span>
.<span class="ident">to_outline</span>(<span class="ident">Distance</span>::<span class="ident">meters</span>(<span class="number">0.5</span>))
.<span class="ident">unwrap_or_else</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">b</span>.<span class="ident">polygon</span>.<span class="ident">clone</span>()),
);
<span class="ident">batch</span>.<span class="ident">append</span>(
<span class="ident">Text</span>::<span class="ident">from</span>(<span class="ident">Line</span>(<span class="string">&quot;Hold down SPACEBAR to recharge&quot;</span>))
.<span class="ident">bg</span>(<span class="ident">Color</span>::<span class="ident">RED</span>)
.<span class="ident">render_to_batch</span>(<span class="ident">ctx</span>.<span class="ident">prerender</span>)
.<span class="ident">scale</span>(<span class="number">0.2</span>)
.<span class="ident">centered_on</span>(<span class="ident">b</span>.<span class="ident">label_center</span>.<span class="ident">offset</span>(<span class="number">0.0</span>, <span class="op">-</span><span class="number">30.0</span>)),
);
}
<span class="ident">OverBldg</span>(<span class="ident">ctx</span>.<span class="ident">upload</span>(<span class="ident">batch</span>))
}
}
<span class="kw">struct</span> <span class="ident">EnergylessArrow</span> { <span class="kw">struct</span> <span class="ident">EnergylessArrow</span> {
<span class="ident">draw</span>: <span class="ident">Drawable</span>, <span class="ident">draw</span>: <span class="ident">Drawable</span>,
<span class="ident">started</span>: <span class="ident">Time</span>, <span class="ident">started</span>: <span class="ident">Time</span>,

View File

@ -160,12 +160,9 @@
<span id="157">157</span> <span id="157">157</span>
<span id="158">158</span> <span id="158">158</span>
<span id="159">159</span> <span id="159">159</span>
<span id="160">160</span>
<span id="161">161</span>
<span id="162">162</span>
</pre><div class="example-wrap"><pre class="rust "> </pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">abstutil</span>::<span class="ident">MapName</span>; <span class="kw">use</span> <span class="ident">abstutil</span>::<span class="ident">MapName</span>;
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Duration</span>, <span class="ident">Speed</span>}; <span class="kw">use</span> <span class="ident">geom</span>::<span class="ident">Speed</span>;
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">tools</span>::{<span class="ident">open_browser</span>, <span class="ident">PopupMsg</span>}; <span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">tools</span>::{<span class="ident">open_browser</span>, <span class="ident">PopupMsg</span>};
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">SimpleApp</span>; <span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">SimpleApp</span>;
<span class="kw">use</span> <span class="ident">map_model</span>::<span class="ident">osm</span>; <span class="kw">use</span> <span class="ident">map_model</span>::<span class="ident">osm</span>;
@ -182,8 +179,7 @@
<span class="kw">pub</span> <span class="ident">normal_speed</span>: <span class="ident">Speed</span>, <span class="kw">pub</span> <span class="ident">normal_speed</span>: <span class="ident">Speed</span>,
<span class="kw">pub</span> <span class="ident">tired_speed</span>: <span class="ident">Speed</span>, <span class="kw">pub</span> <span class="ident">tired_speed</span>: <span class="ident">Speed</span>,
<span class="kw">pub</span> <span class="ident">recharge_rate</span>: <span class="ident">f64</span>, <span class="kw">pub</span> <span class="ident">max_energy</span>: <span class="ident">usize</span>,
<span class="kw">pub</span> <span class="ident">max_energy</span>: <span class="ident">Duration</span>,
<span class="kw">pub</span> <span class="ident">upzone_rate</span>: <span class="ident">usize</span>, <span class="kw">pub</span> <span class="ident">upzone_rate</span>: <span class="ident">usize</span>,
} }
@ -198,8 +194,7 @@
<span class="ident">normal_speed</span>: <span class="ident">Speed</span>::<span class="ident">miles_per_hour</span>(<span class="number">30.0</span>), <span class="ident">normal_speed</span>: <span class="ident">Speed</span>::<span class="ident">miles_per_hour</span>(<span class="number">30.0</span>),
<span class="ident">tired_speed</span>: <span class="ident">Speed</span>::<span class="ident">miles_per_hour</span>(<span class="number">10.0</span>), <span class="ident">tired_speed</span>: <span class="ident">Speed</span>::<span class="ident">miles_per_hour</span>(<span class="number">10.0</span>),
<span class="ident">recharge_rate</span>: <span class="number">2000.0</span>, <span class="ident">max_energy</span>: <span class="number">1000</span>,
<span class="ident">max_energy</span>: <span class="ident">Duration</span>::<span class="ident">hours</span>(<span class="number">3</span>),
<span class="ident">upzone_rate</span>: <span class="number">100</span>, <span class="ident">upzone_rate</span>: <span class="number">100</span>,
}, },
<span class="ident">Config</span> { <span class="ident">Config</span> {
@ -210,8 +205,7 @@
<span class="ident">normal_speed</span>: <span class="ident">Speed</span>::<span class="ident">miles_per_hour</span>(<span class="number">40.0</span>), <span class="ident">normal_speed</span>: <span class="ident">Speed</span>::<span class="ident">miles_per_hour</span>(<span class="number">40.0</span>),
<span class="ident">tired_speed</span>: <span class="ident">Speed</span>::<span class="ident">miles_per_hour</span>(<span class="number">15.0</span>), <span class="ident">tired_speed</span>: <span class="ident">Speed</span>::<span class="ident">miles_per_hour</span>(<span class="number">15.0</span>),
<span class="ident">recharge_rate</span>: <span class="number">3000.0</span>, <span class="ident">max_energy</span>: <span class="number">1000</span>,
<span class="ident">max_energy</span>: <span class="ident">Duration</span>::<span class="ident">hours</span>(<span class="number">3</span>),
<span class="ident">upzone_rate</span>: <span class="number">150</span>, <span class="ident">upzone_rate</span>: <span class="number">150</span>,
}, },
] ]

View File

@ -114,7 +114,7 @@
<span class="doccomment">/// The output of `rustdoc -V`</span> <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">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;rustdoc 1.48.0 (7eac88abb 2020-11-16)&quot;</span>; <span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;rustdoc 1.48.0 (7eac88abb 2020-11-16)&quot;</span>;
<span class="doccomment">/// The built-time in RFC2822, UTC</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">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Wed, 02 Dec 2020 19:07:01 +0000&quot;</span>; <span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Wed, 02 Dec 2020 20:18:31 +0000&quot;</span>;
<span class="doccomment">/// The target architecture, given by `cfg!(target_arch)`.</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">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;x86_64&quot;</span>; <span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;x86_64&quot;</span>;
<span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span> <span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>