mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-28 03:35:51 +03:00
deploy: b6484f31d4
This commit is contained in:
parent
362166f0fd
commit
09492c12ac
@ -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">☰</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'>−</span>]</a></span>
|
||||
</span>
|
||||
<span class='in-band'>List of all items</span></h1><h3 id='Structs'>Structs</h3><ul class='structs docblock'><li><a href='controls/struct.InstantController.html'>controls::InstantController</a></li><li><a href='controls/struct.RotateController.html'>controls::RotateController</a></li><li><a href='game/struct.Config.html'>game::Config</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></ul><h3 id='Enums'>Enums</h3><ul class='enums docblock'><li><a href='game/enum.BldgState.html'>game::BldgState</a></li></ul><h3 id='Traits'>Traits</h3><ul class='traits docblock'><li><a href='controls/trait.Controller.html'>controls::Controller</a></li></ul><h3 id='Functions'>Functions</h3><ul class='functions docblock'><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></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='controls/struct.InstantController.html'>controls::InstantController</a></li><li><a href='controls/struct.RotateController.html'>controls::RotateController</a></li><li><a href='game/struct.Config.html'>game::Config</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='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='Traits'>Traits</h3><ul class='traits docblock'><li><a href='controls/trait.Controller.html'>controls::Controller</a></li></ul><h3 id='Functions'>Functions</h3><ul class='functions docblock'><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>
|
@ -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 `main` fn in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, main"><title>experiment::main - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../experiment/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='index.html'>experiment</a></p><script>window.sidebarCurrent = {name: 'main', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/experiment/main.rs.html#4-12' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='index.html'>experiment</a>::<wbr><a class="fn" href=''>main</a></span></h1><pre class='rust fn'>fn main()</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "experiment";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/experiment/main.rs.html#5-13' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='index.html'>experiment</a>::<wbr><a class="fn" href=''>main</a></span></h1><pre class='rust fn'>fn main()</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>
|
4
rustdoc/experiment/game/constant.ZOOM.html
Normal file
4
rustdoc/experiment/game/constant.ZOOM.html
Normal file
@ -0,0 +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 `ZOOM` constant in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, ZOOM"><title>experiment::game::ZOOM - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../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: 'ZOOM', ty: 'constant', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#15' title='goto source code'>[src]</a></span><span class='in-band'>Constant <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>game</a>::<wbr><a class="constant" href=''>ZOOM</a></span></h1><pre class='rust const'>const ZOOM: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a> = 10.0;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `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-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">☰</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<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class='location'><a href='../index.html'>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'>−</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#314-318' 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'>−</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#386-390' 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 {
|
||||
score: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
|
||||
cost: <a class="struct" href="../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>,
|
||||
@ -10,7 +10,7 @@
|
||||
Done,
|
||||
}</pre></div><h2 id='variants' class='variants small-section-header'>
|
||||
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</code></div><div class='autohide sub-variant' id='variant.Undelivered.fields'><h3>Fields of <b>Undelivered</b></h3><div><span id="variant.Undelivered.field.score" class="variant small-section-header"><a href="#variant.Undelivered.field.score" class="anchor field"></a><code>score: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span id="variant.Undelivered.field.cost" class="variant small-section-header"><a href="#variant.Undelivered.field.cost" class="anchor field"></a><code>cost: <a class="struct" href="../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a></code></span></div></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#313' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="enum" href="../../experiment/game/enum.BldgState.html" title="enum experiment::game::BldgState">BldgState</a></code><a class='srclink' href='../../src/experiment/game.rs.html#313' 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</code></div><div class='autohide sub-variant' id='variant.Undelivered.fields'><h3>Fields of <b>Undelivered</b></h3><div><span id="variant.Undelivered.field.score" class="variant small-section-header"><a href="#variant.Undelivered.field.score" class="anchor field"></a><code>score: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span id="variant.Undelivered.field.cost" class="variant small-section-header"><a href="#variant.Undelivered.field.cost" class="anchor field"></a><code>cost: <a class="struct" href="../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a></code></span></div></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#385' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="enum" href="../../experiment/game/enum.BldgState.html" title="enum experiment::game::BldgState">BldgState</a></code><a class='srclink' href='../../src/experiment/game.rs.html#385' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id='method.clone_from' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `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-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module 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></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'>−</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#1-347' 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>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module 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></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'>−</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#1-419' 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.Config.html" title='experiment::game::Config struct'>Config</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="enum" href="enum.BldgState.html" title='experiment::game::BldgState enum'>BldgState</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="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></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
@ -1 +1 @@
|
||||
initSidebarItems({"enum":[["BldgState",""]],"struct":[["Config",""],["Game",""],["OverBldg",""],["SleighState",""]]});
|
||||
initSidebarItems({"constant":[["ZOOM",""]],"enum":[["BldgState",""]],"struct":[["Config",""],["Game",""],["OverBldg",""],["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
@ -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 `experiment` crate."><meta name="keywords" content="rust, rustlang, rust-lang, experiment"><title>experiment - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../experiment/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Crate experiment</p><div class='block version'><p>Version 0.1.0</p></div><div class="sidebar-elems"><a id='all-types' href='all.html'><p>See all experiment's items</p></a><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'></p><script>window.sidebarCurrent = {name: 'experiment', ty: 'mod', relpath: '../'};</script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/experiment/main.rs.html#1-12' title='goto source code'>[src]</a></span><span class='in-band'>Crate <a class="mod" href=''>experiment</a></span></h1><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2>
|
||||
<table><tr class='module-item'><td><a class="mod" href="controls/index.html" title='experiment::controls mod'>controls</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="game/index.html" title='experiment::game mod'>game</a></td><td class='docblock-short'></td></tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/experiment/main.rs.html#1-13' title='goto source code'>[src]</a></span><span class='in-band'>Crate <a class="mod" href=''>experiment</a></span></h1><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2>
|
||||
<table><tr class='module-item'><td><a class="mod" href="controls/index.html" title='experiment::controls mod'>controls</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="game/index.html" title='experiment::game mod'>game</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="upzone/index.html" title='experiment::upzone mod'>upzone</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.main.html" title='experiment::main fn'>main</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>
|
@ -1 +1 @@
|
||||
initSidebarItems({"fn":[["main",""]],"mod":[["controls",""],["game",""]]});
|
||||
initSidebarItems({"fn":[["main",""]],"mod":[["controls",""],["game",""],["upzone",""]]});
|
5
rustdoc/experiment/upzone/index.html
Normal file
5
rustdoc/experiment/upzone/index.html
Normal file
@ -0,0 +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 `upzone` mod in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, upzone"><title>experiment::upzone - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module upzone</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class='location'><a href='../index.html'>experiment</a></p><script>window.sidebarCurrent = {name: 'upzone', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/experiment/upzone.rs.html#1-100' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>experiment</a>::<wbr><a class="mod" href=''>upzone</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<table><tr class='module-item'><td><a class="struct" href="struct.Picker.html" title='experiment::upzone::Picker struct'>Picker</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>
|
1
rustdoc/experiment/upzone/sidebar-items.js
Normal file
1
rustdoc/experiment/upzone/sidebar-items.js
Normal file
@ -0,0 +1 @@
|
||||
initSidebarItems({"struct":[["Picker",""]]});
|
39
rustdoc/experiment/upzone/struct.Picker.html
Normal file
39
rustdoc/experiment/upzone/struct.Picker.html
Normal file
@ -0,0 +1,39 @@
|
||||
<!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 `Picker` struct in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, Picker"><title>experiment::upzone::Picker - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct Picker</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.choices">choices</a><a href="#structfield.draw_all_choices">draw_all_choices</a><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<SimpleApp></a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>upzone</a></p><script>window.sidebarCurrent = {name: 'Picker', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/experiment/upzone.rs.html#11-15' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>upzone</a>::<wbr><a class="struct" href=''>Picker</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct Picker {
|
||||
panel: Panel,
|
||||
choices: <a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a><<a class="struct" href="../../map_model/objects/building/struct.BuildingID.html" title="struct map_model::objects::building::BuildingID">BuildingID</a>>,
|
||||
draw_all_choices: Drawable,
|
||||
}</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><span id="structfield.choices" class="structfield small-section-header"><a href="#structfield.choices" class="anchor field"></a><code>choices: <a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a><<a class="struct" href="../../map_model/objects/building/struct.BuildingID.html" title="struct map_model::objects::building::BuildingID">BuildingID</a>></code></span><span id="structfield.draw_all_choices" class="structfield small-section-header"><a href="#structfield.draw_all_choices" class="anchor field"></a><code>draw_all_choices: Drawable</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/upzone/struct.Picker.html" title="struct experiment::upzone::Picker">Picker</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/experiment/upzone.rs.html#17-42' 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>(<br> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>, <br> choices: <a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a><<a class="struct" href="../../map_model/objects/building/struct.BuildingID.html" title="struct map_model::objects::building::BuildingID">BuildingID</a>><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn State<<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/upzone.rs.html#18-41' 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<<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>> for <a class="struct" href="../../experiment/upzone/struct.Picker.html" title="struct experiment::upzone::Picker">Picker</a></code><a href='#impl-State%3CSimpleApp%3E' class='anchor'></a><a class='srclink' href='../../src/experiment/upzone.rs.html#44-100' 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> &mut self, <br> ctx: &mut EventCtx<'_>, <br> app: &mut <a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><br>) -> Transition<<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/upzone.rs.html#45-90' 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' class="method hidden"><code>fn <a href='#method.draw' class='fnname'>draw</a>(&self, g: &mut GfxCtx<'_>, app: &<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/upzone.rs.html#92-99' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Draw</p>
|
||||
</div><h4 id='method.draw_baselayer' class="method hidden"><code>fn <a href='#method.draw_baselayer' class='fnname'>draw_baselayer</a>(&self) -> DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
|
||||
</div><h4 id='method.on_destroy' class="method hidden"><code>fn <a href='#method.on_destroy' class='fnname'>on_destroy</a>(&mut self, &mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&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/upzone/struct.Picker.html" title="struct experiment::upzone::Picker">Picker</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/upzone/struct.Picker.html" title="struct experiment::upzone::Picker">Picker</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/upzone/struct.Picker.html" title="struct experiment::upzone::Picker">Picker</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/upzone/struct.Picker.html" title="struct experiment::upzone::Picker">Picker</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/upzone/struct.Picker.html" title="struct experiment::upzone::Picker">Picker</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
</div></div><h3 id='impl-Downcast' class='impl'><code class='in-band'>impl<T> Downcast for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>, </span></code><a href='#impl-Downcast' class='anchor'></a></h3><div class='impl-items'><h4 id='method.into_any' class="method hidden"><code>fn <a href='#method.into_any' class='fnname'>into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static></code></h4><div class='docblock hidden'><p>Convert <code>Box<dyn Trait></code> (where <code>Trait: Downcast</code>) to <code>Box<dyn Any></code>. <code>Box<dyn Any></code> can
|
||||
then be further <code>downcast</code> into <code>Box<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any">Read more</a></p>
|
||||
</div><h4 id='method.into_any_rc' class="method hidden"><code>fn <a href='#method.into_any_rc' class='fnname'>into_any_rc</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html" title="struct alloc::rc::Rc">Rc</a><T>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html" title="struct alloc::rc::Rc">Rc</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static></code></h4><div class='docblock hidden'><p>Convert <code>Rc<Trait></code> (where <code>Trait: Downcast</code>) to <code>Rc<Any></code>. <code>Rc<Any></code> can then be
|
||||
further <code>downcast</code> into <code>Rc<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any_rc">Read more</a></p>
|
||||
</div><h4 id='method.as_any' class="method hidden"><code>fn <a href='#method.as_any' class='fnname'>as_any</a>(&self) -> &(dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static)</code></h4><div class='docblock hidden'><p>Convert <code>&Trait</code> (where <code>Trait: Downcast</code>) to <code>&Any</code>. This is needed since Rust cannot
|
||||
generate <code>&Any</code>'s vtable from <code>&Trait</code>'s. <a href="#tymethod.as_any">Read more</a></p>
|
||||
</div><h4 id='method.as_any_mut' class="method hidden"><code>fn <a href='#method.as_any_mut' class='fnname'>as_any_mut</a>(&mut self) -> &mut (dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static)</code></h4><div class='docblock hidden'><p>Convert <code>&mut Trait</code> (where <code>Trait: Downcast</code>) to <code>&Any</code>. This is needed since Rust cannot
|
||||
generate <code>&mut Any</code>'s vtable from <code>&mut Trait</code>'s. <a href="#tymethod.as_any_mut">Read more</a></p>
|
||||
</div></div><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#551-555' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -> T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-554' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id='impl-Instrument' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://docs.rs/tracing/0.1.21/tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</code><a href='#impl-Instrument' class='anchor'></a><a class='srclink' href='https://docs.rs/tracing/0.1.21/src/tracing/instrument.rs.html#155' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.instrument' class="method hidden"><code>fn <a href='https://docs.rs/tracing/0.1.21/tracing/instrument/trait.Instrument.html#method.instrument' class='fnname'>instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.21/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="https://docs.rs/tracing/0.1.21/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class='srclink' href='https://docs.rs/tracing/0.1.21/src/tracing/instrument.rs.html#38-40' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
|
||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.21/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></p>
|
||||
</div><h4 id='method.in_current_span' class="method hidden"><code>fn <a href='https://docs.rs/tracing/0.1.21/tracing/instrument/trait.Instrument.html#method.in_current_span' class='fnname'>in_current_span</a>(self) -> <a class="struct" href="https://docs.rs/tracing/0.1.21/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class='srclink' href='https://docs.rs/tracing/0.1.21/src/tracing/instrument.rs.html#74-76' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="../struct.Span.html#method.current">current</a> <code>Span</code>, returning an
|
||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.21/tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></p>
|
||||
</div></div><h3 id='impl-Instrument-1' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/trait.Instrument.html" title="trait tracing_futures::Instrument">Instrument</a> for T</code><a href='#impl-Instrument-1' class='anchor'></a><a class='srclink' href='https://docs.rs/tracing-futures/0.2.3/src/tracing_futures/lib.rs.html#248' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.instrument-1' class="method hidden"><code>fn <a href='https://docs.rs/tracing-futures/0.2.3/tracing_futures/trait.Instrument.html#method.instrument' class='fnname'>instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.21/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/struct.Instrumented.html" title="struct tracing_futures::Instrumented">Instrumented</a><Self></code><a class='srclink' href='https://docs.rs/tracing-futures/0.2.3/src/tracing_futures/lib.rs.html#129-131' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
|
||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/trait.Instrument.html#method.instrument">Read more</a></p>
|
||||
</div><h4 id='method.in_current_span-1' class="method hidden"><code>fn <a href='https://docs.rs/tracing-futures/0.2.3/tracing_futures/trait.Instrument.html#method.in_current_span' class='fnname'>in_current_span</a>(self) -> <a class="struct" href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/struct.Instrumented.html" title="struct tracing_futures::Instrumented">Instrumented</a><Self></code><a class='srclink' href='https://docs.rs/tracing-futures/0.2.3/src/tracing_futures/lib.rs.html#166-168' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="https://docs.rs/tracing/latest/tracing/span/struct.Span.html#method.current">current</a> <code>Span</code>, returning an
|
||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/trait.Instrument.html#method.in_current_span">Read more</a></p>
|
||||
</div></div><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#540-547' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -> U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#544-546' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id='impl-Same%3CT%3E' class='impl'><code class='in-band'>impl<T> Same<T> for T</code><a href='#impl-Same%3CT%3E' class='anchor'></a></h3><div class='impl-items'><h4 id='associatedtype.Output' class="type"><code>type <a href='#associatedtype.Output' class="type">Output</a> = T</code></h4><div class='docblock'><p>Should always be <code>Self</code></p>
|
||||
</div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#588-597' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id='method.try_from' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#594-596' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id='impl-TryInto%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#574-583' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id='method.try_into' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#580-582' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id='impl-VZip%3CV%3E' class='impl'><code class='in-band'>impl<V, T> VZip<V> for T <span class="where fmt-newline">where<br> V: MultiLane<T>, </span></code><a href='#impl-VZip%3CV%3E' class='anchor'></a></h3><div class='impl-items'><h4 id='method.vzip' class="method hidden"><code>fn <a href='#method.vzip' class='fnname'>vzip</a>(self) -> V</code></h4></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `BUILT_TIME_UTC` constant in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>game::pregame::built_info::BUILT_TIME_UTC - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a></p><script>window.sidebarCurrent = {name: 'BUILT_TIME_UTC', ty: 'constant', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-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: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "Fri, 27 Nov 2020 18:33:26 +0000";</pre><div class='docblock'><p>The built-time in RFC2822, UTC</p>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-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: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "Sat, 28 Nov 2020 01:58:16 +0000";</pre><div class='docblock'><p>The built-time in RFC2822, UTC</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
(function() {var implementors = {};
|
||||
implementors["experiment"] = [{"text":"impl State<SimpleApp> for Game","synthetic":false,"types":[]}];
|
||||
implementors["experiment"] = [{"text":"impl State<SimpleApp> for Game","synthetic":false,"types":[]},{"text":"impl State<SimpleApp> for Picker","synthetic":false,"types":[]}];
|
||||
implementors["fifteen_min"] = [{"text":"impl State<SimpleApp> for Viewer","synthetic":false,"types":[]}];
|
||||
implementors["game"] = [{"text":"impl State<App> for CutscenePlayer","synthetic":false,"types":[]},{"text":"impl State<App> for FYI","synthetic":false,"types":[]},{"text":"impl State<App> for ChallengesPicker","synthetic":false,"types":[]},{"text":"impl State<App> for Warping","synthetic":false,"types":[]},{"text":"impl State<App> for DebugWarp","synthetic":false,"types":[]},{"text":"impl State<App> for SimpleStateWrapper","synthetic":false,"types":[]},{"text":"impl State<App> for Viewer","synthetic":false,"types":[]},{"text":"impl State<App> for Floodfiller","synthetic":false,"types":[]},{"text":"impl State<App> for PathCounter","synthetic":false,"types":[]},{"text":"impl State<App> for PolygonDebugger","synthetic":false,"types":[]},{"text":"impl State<App> for DebugMode","synthetic":false,"types":[]},{"text":"impl State<App> for ScreenshotTest","synthetic":false,"types":[]},{"text":"impl State<App> for CollisionsViewer","synthetic":false,"types":[]},{"text":"impl State<App> for PopularDestinations","synthetic":false,"types":[]},{"text":"impl State<App> for ViewKML","synthetic":false,"types":[]},{"text":"impl State<App> for PolygonEditor","synthetic":false,"types":[]},{"text":"impl State<App> for ScenarioManager","synthetic":false,"types":[]},{"text":"impl State<App> for StoryMapEditor","synthetic":false,"types":[]},{"text":"impl State<App> for DevToolsMode","synthetic":false,"types":[]},{"text":"impl State<App> for BulkSelect","synthetic":false,"types":[]},{"text":"impl State<App> for BulkEdit","synthetic":false,"types":[]},{"text":"impl State<App> for ClusterTrafficSignalEditor","synthetic":false,"types":[]},{"text":"impl State<App> for RouteEditor","synthetic":false,"types":[]},{"text":"impl State<App> for SignalPicker","synthetic":false,"types":[]},{"text":"impl State<App> for PreviewTrafficSignal","synthetic":false,"types":[]},{"text":"impl State<App> for TrafficSignalEditor","synthetic":false,"types":[]},{"text":"impl State<App> for ZoneEditor","synthetic":false,"types":[]},{"text":"impl State<App> for EditMode","synthetic":false,"types":[]},{"text":"impl State<App> for SaveEdits","synthetic":false,"types":[]},{"text":"impl State<App> for LoadEdits","synthetic":false,"types":[]},{"text":"impl State<App> for ConfirmDiscard","synthetic":false,"types":[]},{"text":"impl State<App> for PickLayer","synthetic":false,"types":[]},{"text":"impl State<App> for TitleScreen","synthetic":false,"types":[]},{"text":"impl State<App> for MainMenu","synthetic":false,"types":[]},{"text":"impl State<App> for About","synthetic":false,"types":[]},{"text":"impl State<App> for Proposals","synthetic":false,"types":[]},{"text":"impl State<App> for CommuterPatterns","synthetic":false,"types":[]},{"text":"impl<T: 'static, F: 'static, P: 'static + Fn(&mut EventCtx<'_>, &App, &Table<T, F>) -> Panel> State<App> for GenericTripTable<T, F, P>","synthetic":false,"types":[]},{"text":"impl State<App> for ActiveTraffic","synthetic":false,"types":[]},{"text":"impl State<App> for TransitRoutes","synthetic":false,"types":[]},{"text":"impl State<App> for TripSummaries","synthetic":false,"types":[]},{"text":"impl State<App> for TrafficSignalDemand","synthetic":false,"types":[]},{"text":"impl State<App> for AgentSpawner","synthetic":false,"types":[]},{"text":"impl State<App> for EditScenarioModifiers","synthetic":false,"types":[]},{"text":"impl State<App> for ChangeMode","synthetic":false,"types":[]},{"text":"impl State<App> for FinalScore","synthetic":false,"types":[]},{"text":"impl State<App> for TrafficRecorder","synthetic":false,"types":[]},{"text":"impl State<App> for JumpToTime","synthetic":false,"types":[]},{"text":"impl State<App> for JumpToDelay","synthetic":false,"types":[]},{"text":"impl State<App> for TimeWarpScreen","synthetic":false,"types":[]},{"text":"impl State<App> for SandboxMode","synthetic":false,"types":[]},{"text":"impl State<App> for BackToMainMenu","synthetic":false,"types":[]},{"text":"impl State<App> for SandboxLoader","synthetic":false,"types":[]}];
|
||||
implementors["map_editor"] = [{"text":"impl State<App> for MainState","synthetic":false,"types":[]}];
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `map_gui` crate."><meta name="keywords" content="rust, rustlang, rust-lang, map_gui"><title>map_gui - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../map_gui/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Crate map_gui</p><div class='block version'><p>Version 0.1.0</p></div><div class="sidebar-elems"><a id='all-types' href='all.html'><p>See all map_gui's items</p></a><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li></ul></div><p class='location'></p><script>window.sidebarCurrent = {name: 'map_gui', ty: 'mod', relpath: '../'};</script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/map_gui/lib.rs.html#1-110' title='goto source code'>[src]</a></span><span class='in-band'>Crate <a class="mod" href=''>map_gui</a></span></h1><div class='docblock'><p>This crate contains common code for applications that draw and interact with a <code>Map</code>.</p>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/map_gui/lib.rs.html#1-117' title='goto source code'>[src]</a></span><span class='in-band'>Crate <a class="mod" href=''>map_gui</a></span></h1><div class='docblock'><p>This crate contains common code for applications that draw and interact with a <code>Map</code>.</p>
|
||||
</div><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2>
|
||||
<table><tr class='module-item'><td><a class="mod" href="colors/index.html" title='map_gui::colors mod'>colors</a></td><td class='docblock-short'><p>A color scheme groups colors used for different map, dynamic, and UI elements in one place, to
|
||||
encourage deduplication. The player can also switch between different color schemes.</p>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `simple_app` mod in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, simple_app"><title>map_gui::simple_app - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module simple_app</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class='location'><a href='../index.html'>map_gui</a></p><script>window.sidebarCurrent = {name: 'simple_app', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/map_gui/simple_app.rs.html#1-325' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>map_gui</a>::<wbr><a class="mod" href=''>simple_app</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/map_gui/simple_app.rs.html#1-328' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>map_gui</a>::<wbr><a class="mod" href=''>simple_app</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<table><tr class='module-item'><td><a class="struct" href="struct.Cached.html" title='map_gui::simple_app::Cached struct'>Cached</a></td><td class='docblock-short'><p>Store a cached key/value pair, only recalculating when the key changes.</p>
|
||||
</td></tr><tr class='module-item'><td><a class="struct" href="struct.SimpleApp.html" title='map_gui::simple_app::SimpleApp struct'>SimpleApp</a></td><td class='docblock-short'><p>Simple app state that just renders a static map, without any dynamic agents on the map.</p>
|
||||
</td></tr><tr class='module-item'><td><a class="struct" href="struct.SimpleWarper.html" title='map_gui::simple_app::SimpleWarper struct'>SimpleWarper</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 = "map_gui";</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
@ -1,11 +1,11 @@
|
||||
<!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 `SimpleWarper` struct in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, SimpleWarper"><title>map_gui::simple_app::SimpleWarper - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct SimpleWarper</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.warper">warper</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-State%3CSimpleApp%3E">State<SimpleApp></a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class='location'><a href='../index.html'>map_gui</a>::<wbr><a href='index.html'>simple_app</a></p><script>window.sidebarCurrent = {name: 'SimpleWarper', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/map_gui/simple_app.rs.html#275-277' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>map_gui</a>::<wbr><a href='index.html'>simple_app</a>::<wbr><a class="struct" href=''>SimpleWarper</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>struct SimpleWarper {
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/map_gui/simple_app.rs.html#278-280' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>map_gui</a>::<wbr><a href='index.html'>simple_app</a>::<wbr><a class="struct" href=''>SimpleWarper</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>struct SimpleWarper {
|
||||
warper: Warper,
|
||||
}</pre></div><h2 id='fields' class='fields small-section-header'>
|
||||
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.warper" class="structfield small-section-header"><a href="#structfield.warper" class="anchor field"></a><code>warper: Warper</code></span><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-State%3CSimpleApp%3E' class='impl'><code class='in-band'>impl State<<a class="struct" href="../../map_gui/struct.SimpleApp.html" title="struct map_gui::SimpleApp">SimpleApp</a>> for <a class="struct" href="../../map_gui/simple_app/struct.SimpleWarper.html" title="struct map_gui::simple_app::SimpleWarper">SimpleWarper</a></code><a href='#impl-State%3CSimpleApp%3E' class='anchor'></a><a class='srclink' href='../../src/map_gui/simple_app.rs.html#279-289' 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> &mut self, <br> ctx: &mut EventCtx<'_>, <br> _: &mut <a class="struct" href="../../map_gui/struct.SimpleApp.html" title="struct map_gui::SimpleApp">SimpleApp</a><br>) -> Transition<<a class="struct" href="../../map_gui/struct.SimpleApp.html" title="struct map_gui::SimpleApp">SimpleApp</a>></code><a class='srclink' href='../../src/map_gui/simple_app.rs.html#280-286' 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' class="method hidden"><code>fn <a href='#method.draw' class='fnname'>draw</a>(&self, _: &mut GfxCtx<'_>, _: &<a class="struct" href="../../map_gui/struct.SimpleApp.html" title="struct map_gui::SimpleApp">SimpleApp</a>)</code><a class='srclink' href='../../src/map_gui/simple_app.rs.html#288' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Draw</p>
|
||||
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.warper" class="structfield small-section-header"><a href="#structfield.warper" class="anchor field"></a><code>warper: Warper</code></span><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-State%3CSimpleApp%3E' class='impl'><code class='in-band'>impl State<<a class="struct" href="../../map_gui/struct.SimpleApp.html" title="struct map_gui::SimpleApp">SimpleApp</a>> for <a class="struct" href="../../map_gui/simple_app/struct.SimpleWarper.html" title="struct map_gui::simple_app::SimpleWarper">SimpleWarper</a></code><a href='#impl-State%3CSimpleApp%3E' class='anchor'></a><a class='srclink' href='../../src/map_gui/simple_app.rs.html#282-292' 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> &mut self, <br> ctx: &mut EventCtx<'_>, <br> _: &mut <a class="struct" href="../../map_gui/struct.SimpleApp.html" title="struct map_gui::SimpleApp">SimpleApp</a><br>) -> Transition<<a class="struct" href="../../map_gui/struct.SimpleApp.html" title="struct map_gui::SimpleApp">SimpleApp</a>></code><a class='srclink' href='../../src/map_gui/simple_app.rs.html#283-289' 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' class="method hidden"><code>fn <a href='#method.draw' class='fnname'>draw</a>(&self, _: &mut GfxCtx<'_>, _: &<a class="struct" href="../../map_gui/struct.SimpleApp.html" title="struct map_gui::SimpleApp">SimpleApp</a>)</code><a class='srclink' href='../../src/map_gui/simple_app.rs.html#291' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Draw</p>
|
||||
</div><h4 id='method.draw_baselayer' class="method hidden"><code>fn <a href='#method.draw_baselayer' class='fnname'>draw_baselayer</a>(&self) -> DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
|
||||
</div><h4 id='method.on_destroy' class="method hidden"><code>fn <a href='#method.on_destroy' class='fnname'>on_destroy</a>(&mut self, &mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&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="../../map_gui/simple_app/struct.SimpleWarper.html" title="struct map_gui::simple_app::SimpleWarper">SimpleWarper</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="../../map_gui/simple_app/struct.SimpleWarper.html" title="struct map_gui::simple_app::SimpleWarper">SimpleWarper</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="../../map_gui/simple_app/struct.SimpleWarper.html" title="struct map_gui::simple_app::SimpleWarper">SimpleWarper</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="../../map_gui/simple_app/struct.SimpleWarper.html" title="struct map_gui::simple_app::SimpleWarper">SimpleWarper</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="../../map_gui/simple_app/struct.SimpleWarper.html" title="struct map_gui::simple_app::SimpleWarper">SimpleWarper</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
|
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
@ -4,7 +4,7 @@ sourcesIndex["collisions"] = {"name":"","files":["lib.rs"]};
|
||||
sourcesIndex["convert_osm"] = {"name":"","files":["clip.rs","extract.rs","lib.rs","osm_geom.rs","parking.rs","reader.rs","snappy.rs","split_ways.rs","srtm.rs","transit.rs"]};
|
||||
sourcesIndex["dump_map"] = {"name":"","files":["dump_map.rs"]};
|
||||
sourcesIndex["dump_scenario"] = {"name":"","files":["dump_scenario.rs"]};
|
||||
sourcesIndex["experiment"] = {"name":"","files":["controls.rs","game.rs","main.rs"]};
|
||||
sourcesIndex["experiment"] = {"name":"","files":["controls.rs","game.rs","main.rs","upzone.rs"]};
|
||||
sourcesIndex["extract_cities"] = {"name":"","files":["extract_cities.rs"]};
|
||||
sourcesIndex["fifteen_min"] = {"name":"","files":["isochrone.rs","main.rs","viewer.rs"]};
|
||||
sourcesIndex["game"] = {"name":"","dirs":[{"name":"challenges","files":["cutscene.rs","mod.rs","prebake.rs"]},{"name":"common","files":["minimap.rs","mod.rs","warp.rs"]},{"name":"debug","files":["blocked_by.rs","floodfill.rs","mod.rs","objects.rs","path_counter.rs","polygons.rs","shared_row.rs","streetmix.rs"]},{"name":"devtools","files":["collisions.rs","destinations.rs","kml.rs","mod.rs","polygon.rs","scenario.rs","story.rs"]},{"name":"edit","dirs":[{"name":"traffic_signals","files":["edits.rs","mod.rs","offsets.rs","picker.rs","preview.rs"]}],"files":["bulk.rs","cluster_traffic_signals.rs","lanes.rs","mod.rs","routes.rs","select.rs","stop_signs.rs","validate.rs","zones.rs"]},{"name":"info","files":["building.rs","bus.rs","debug.rs","intersection.rs","lane.rs","mod.rs","parking_lot.rs","person.rs","trip.rs"]},{"name":"layer","files":["elevation.rs","map.rs","mod.rs","pandemic.rs","parking.rs","population.rs","traffic.rs","transit.rs"]},{"name":"sandbox","dirs":[{"name":"dashboards","files":["commuter.rs","generic_trip_table.rs","misc.rs","mod.rs","parking_overhead.rs","summaries.rs","table.rs","traffic_signals.rs","trip_table.rs"]},{"name":"gameplay","files":["commute.rs","fix_traffic_signals.rs","freeform.rs","mod.rs","play_scenario.rs","tutorial.rs"]}],"files":["misc_tools.rs","mod.rs","speed.rs","time_warp.rs","uber_turns.rs"]}],"files":["app.rs","lib.rs","pregame.rs"]};
|
||||
|
@ -348,10 +348,82 @@
|
||||
<span id="345">345</span>
|
||||
<span id="346">346</span>
|
||||
<span id="347">347</span>
|
||||
<span id="348">348</span>
|
||||
<span id="349">349</span>
|
||||
<span id="350">350</span>
|
||||
<span id="351">351</span>
|
||||
<span id="352">352</span>
|
||||
<span id="353">353</span>
|
||||
<span id="354">354</span>
|
||||
<span id="355">355</span>
|
||||
<span id="356">356</span>
|
||||
<span id="357">357</span>
|
||||
<span id="358">358</span>
|
||||
<span id="359">359</span>
|
||||
<span id="360">360</span>
|
||||
<span id="361">361</span>
|
||||
<span id="362">362</span>
|
||||
<span id="363">363</span>
|
||||
<span id="364">364</span>
|
||||
<span id="365">365</span>
|
||||
<span id="366">366</span>
|
||||
<span id="367">367</span>
|
||||
<span id="368">368</span>
|
||||
<span id="369">369</span>
|
||||
<span id="370">370</span>
|
||||
<span id="371">371</span>
|
||||
<span id="372">372</span>
|
||||
<span id="373">373</span>
|
||||
<span id="374">374</span>
|
||||
<span id="375">375</span>
|
||||
<span id="376">376</span>
|
||||
<span id="377">377</span>
|
||||
<span id="378">378</span>
|
||||
<span id="379">379</span>
|
||||
<span id="380">380</span>
|
||||
<span id="381">381</span>
|
||||
<span id="382">382</span>
|
||||
<span id="383">383</span>
|
||||
<span id="384">384</span>
|
||||
<span id="385">385</span>
|
||||
<span id="386">386</span>
|
||||
<span id="387">387</span>
|
||||
<span id="388">388</span>
|
||||
<span id="389">389</span>
|
||||
<span id="390">390</span>
|
||||
<span id="391">391</span>
|
||||
<span id="392">392</span>
|
||||
<span id="393">393</span>
|
||||
<span id="394">394</span>
|
||||
<span id="395">395</span>
|
||||
<span id="396">396</span>
|
||||
<span id="397">397</span>
|
||||
<span id="398">398</span>
|
||||
<span id="399">399</span>
|
||||
<span id="400">400</span>
|
||||
<span id="401">401</span>
|
||||
<span id="402">402</span>
|
||||
<span id="403">403</span>
|
||||
<span id="404">404</span>
|
||||
<span id="405">405</span>
|
||||
<span id="406">406</span>
|
||||
<span id="407">407</span>
|
||||
<span id="408">408</span>
|
||||
<span id="409">409</span>
|
||||
<span id="410">410</span>
|
||||
<span id="411">411</span>
|
||||
<span id="412">412</span>
|
||||
<span id="413">413</span>
|
||||
<span id="414">414</span>
|
||||
<span id="415">415</span>
|
||||
<span id="416">416</span>
|
||||
<span id="417">417</span>
|
||||
<span id="418">418</span>
|
||||
<span id="419">419</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">HashMap</span>;
|
||||
|
||||
<span class="kw">use</span> <span class="ident">abstutil</span>::<span class="ident">Timer</span>;
|
||||
<span class="kw">use</span> <span class="ident">abstutil</span>::{<span class="ident">prettyprint_usize</span>, <span class="ident">Timer</span>};
|
||||
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Circle</span>, <span class="ident">Distance</span>, <span class="ident">Duration</span>, <span class="ident">Pt2D</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">nice_map_name</span>, <span class="ident">CityPicker</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>};
|
||||
@ -363,6 +435,8 @@
|
||||
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">controls</span>::{<span class="ident">Controller</span>, <span class="ident">InstantController</span>, <span class="ident">RotateController</span>};
|
||||
|
||||
<span class="kw">const</span> <span class="ident">ZOOM</span>: <span class="ident">f64</span> <span class="op">=</span> <span class="number">10.0</span>;
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Game</span> {
|
||||
<span class="ident">panel</span>: <span class="ident">Panel</span>,
|
||||
<span class="ident">controls</span>: <span class="ident">Box</span><span class="op"><</span><span class="ident">dyn</span> <span class="ident">Controller</span><span class="op">></span>,
|
||||
@ -378,6 +452,8 @@
|
||||
<span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">SimpleApp</span>,
|
||||
<span class="ident">timer</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">Timer</span>,
|
||||
) <span class="op">-</span><span class="op">></span> <span class="ident">Box</span><span class="op"><</span><span class="ident">dyn</span> <span class="ident">State</span><span class="op"><</span><span class="ident">SimpleApp</span><span class="op">></span><span class="op">></span> {
|
||||
<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">cam_zoom</span> <span class="op">=</span> <span class="ident">ZOOM</span>;
|
||||
|
||||
<span class="comment">// Start on a commerical building</span>
|
||||
<span class="kw">let</span> <span class="ident">depot</span> <span class="op">=</span> <span class="ident">app</span>
|
||||
.<span class="ident">map</span>
|
||||
@ -392,40 +468,43 @@
|
||||
<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">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">depot</span>.<span class="ident">id</span>, <span class="ident">timer</span>);
|
||||
|
||||
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">Game</span> {
|
||||
<span class="ident">panel</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">Line</span>(<span class="string">"Experiment"</span>).<span class="ident">small_heading</span>().<span class="ident">draw</span>(<span class="ident">ctx</span>),
|
||||
<span class="ident">Btn</span>::<span class="ident">close</span>(<span class="ident">ctx</span>),
|
||||
]),
|
||||
<span class="ident">Checkbox</span>::<span class="ident">toggle</span>(<span class="ident">ctx</span>, <span class="string">"control type"</span>, <span class="string">"rotate"</span>, <span class="string">"instant"</span>, <span class="ident">Key</span>::<span class="ident">Tab</span>, <span class="bool-val">false</span>),
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">Btn</span>::<span class="ident">pop_up</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="prelude-val">Some</span>(<span class="ident">nice_map_name</span>(<span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_name</span>())),
|
||||
)
|
||||
.<span class="ident">build</span>(<span class="ident">ctx</span>, <span class="string">"change map"</span>, <span class="ident">lctrl</span>(<span class="ident">Key</span>::<span class="ident">L</span>))]),
|
||||
<span class="macro">format</span><span class="macro">!</span>(<span class="string">"Score: {}"</span>, <span class="ident">state</span>.<span class="ident">score</span>)
|
||||
.<span class="ident">draw_text</span>(<span class="ident">ctx</span>)
|
||||
.<span class="ident">named</span>(<span class="string">"score"</span>),
|
||||
<span class="macro">format</span><span class="macro">!</span>(<span class="string">"Energy: {}"</span>, <span class="ident">state</span>.<span class="ident">energy</span>)
|
||||
.<span class="ident">draw_text</span>(<span class="ident">ctx</span>)
|
||||
.<span class="ident">named</span>(<span class="string">"energy"</span>),
|
||||
]))
|
||||
.<span class="ident">aligned</span>(<span class="ident">HorizontalAlignment</span>::<span class="ident">Right</span>, <span class="ident">VerticalAlignment</span>::<span class="ident">Top</span>)
|
||||
.<span class="ident">build</span>(<span class="ident">ctx</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">Line</span>(<span class="string">"Experiment"</span>).<span class="ident">small_heading</span>().<span class="ident">draw</span>(<span class="ident">ctx</span>),
|
||||
<span class="ident">Btn</span>::<span class="ident">close</span>(<span class="ident">ctx</span>),
|
||||
]),
|
||||
<span class="ident">Checkbox</span>::<span class="ident">toggle</span>(<span class="ident">ctx</span>, <span class="string">"control type"</span>, <span class="string">"rotate"</span>, <span class="string">"instant"</span>, <span class="ident">Key</span>::<span class="ident">Tab</span>, <span class="bool-val">false</span>),
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">Btn</span>::<span class="ident">pop_up</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="prelude-val">Some</span>(<span class="ident">nice_map_name</span>(<span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_name</span>())),
|
||||
)
|
||||
.<span class="ident">build</span>(<span class="ident">ctx</span>, <span class="string">"change map"</span>, <span class="ident">lctrl</span>(<span class="ident">Key</span>::<span class="ident">L</span>))]),
|
||||
<span class="string">"Score"</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">named</span>(<span class="string">"score"</span>),
|
||||
<span class="string">"Energy"</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">named</span>(<span class="string">"energy"</span>),
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="string">"use upzone"</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">named</span>(<span class="string">"use upzone"</span>),
|
||||
<span class="string">"Next upzone"</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">named</span>(<span class="string">"next upzone"</span>),
|
||||
]),
|
||||
]))
|
||||
.<span class="ident">aligned</span>(<span class="ident">HorizontalAlignment</span>::<span class="ident">Right</span>, <span class="ident">VerticalAlignment</span>::<span class="ident">Top</span>)
|
||||
.<span class="ident">build</span>(<span class="ident">ctx</span>);
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">game</span> <span class="op">=</span> <span class="ident">Game</span> {
|
||||
<span class="ident">panel</span>,
|
||||
<span class="ident">controls</span>: <span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">InstantController</span>::<span class="ident">new</span>()),
|
||||
|
||||
<span class="ident">sleigh</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">game</span>.<span class="ident">update_panel</span>(<span class="ident">ctx</span>);
|
||||
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">game</span>)
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">update_panel</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>) {
|
||||
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">replace</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="string">"score"</span>,
|
||||
<span class="macro">format</span><span class="macro">!</span>(<span class="string">"Score: {}"</span>, <span class="ident">abstutil</span>::<span class="ident">prettyprint_usize</span>(<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">score</span>)).<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
|
||||
<span class="macro">format</span><span class="macro">!</span>(<span class="string">"Score: {}"</span>, <span class="ident">prettyprint_usize</span>(<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">score</span>)).<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
|
||||
);
|
||||
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">replace</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
@ -436,6 +515,35 @@
|
||||
<span class="ident">Line</span>(<span class="string">"Energy: you need to refuel!"</span>).<span class="ident">fg</span>(<span class="ident">Color</span>::<span class="ident">RED</span>).<span class="ident">draw</span>(<span class="ident">ctx</span>)
|
||||
},
|
||||
);
|
||||
<span class="kw">let</span> (<span class="ident">upzones_free</span>, <span class="ident">next_upzone</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">get_upzones</span>();
|
||||
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">replace</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="string">"use upzone"</span>,
|
||||
<span class="kw">if</span> <span class="ident">upzones_free</span> <span class="op">=</span><span class="op">=</span> <span class="number">0</span> {
|
||||
<span class="ident">Btn</span>::<span class="ident">text_bg2</span>(<span class="string">"0 upzones"</span>).<span class="ident">inactive</span>(<span class="ident">ctx</span>).<span class="ident">named</span>(<span class="string">"use upzone"</span>)
|
||||
} <span class="kw">else</span> {
|
||||
<span class="comment">// TODO Since we constantly recreate this, the button isn't clickable</span>
|
||||
<span class="ident">Btn</span>::<span class="ident">text_bg2</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">"Apply upzone ({} available)"</span>, <span class="ident">upzones_free</span>)).<span class="ident">build</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="string">"use upzone"</span>,
|
||||
<span class="ident">Key</span>::<span class="ident">U</span>,
|
||||
)
|
||||
},
|
||||
);
|
||||
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">replace</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="string">"next upzone"</span>,
|
||||
<span class="macro">format</span><span class="macro">!</span>(<span class="string">"Next upzone: {}"</span>, <span class="ident">prettyprint_usize</span>(<span class="ident">next_upzone</span>)).<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
|
||||
);
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">upzone</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">SimpleApp</span>, <span class="ident">b</span>: <span class="ident">BuildingID</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">depot</span> <span class="op">=</span> <span class="ident">b</span>;
|
||||
<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">redraw</span>(<span class="ident">ctx</span>, <span class="ident">app</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>);
|
||||
}
|
||||
}
|
||||
|
||||
@ -445,6 +553,8 @@
|
||||
<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="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="ident">ctx</span>.<span class="ident">is_key_down</span>(<span class="ident">Key</span>::<span class="ident">Space</span>) <span class="op">&&</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">recharge</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">b</span>, <span class="ident">dt</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">redraw</span>(<span class="ident">ctx</span>, <span class="ident">app</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>;
|
||||
}
|
||||
@ -500,6 +610,18 @@
|
||||
}),
|
||||
));
|
||||
}
|
||||
<span class="string">"use upzone"</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">choices</span> <span class="op">=</span> <span class="self">self</span>
|
||||
.<span class="ident">state</span>
|
||||
.<span class="ident">houses</span>
|
||||
.<span class="ident">iter</span>()
|
||||
.<span class="ident">filter_map</span>(<span class="op">|</span>(<span class="ident">id</span>, <span class="ident">state</span>)<span class="op">|</span> <span class="kw">match</span> <span class="ident">state</span> {
|
||||
<span class="ident">BldgState</span>::<span class="ident">Undelivered</span> { .. } <span class="op">=</span><span class="op">></span> <span class="prelude-val">Some</span>(<span class="kw-2">*</span><span class="ident">id</span>),
|
||||
<span class="kw">_</span> <span class="op">=</span><span class="op">></span> <span class="prelude-val">None</span>,
|
||||
})
|
||||
.<span class="ident">collect</span>();
|
||||
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Push</span>(<span class="kw">crate</span>::<span class="ident">upzone</span>::<span class="ident">Picker</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">choices</span>));
|
||||
}
|
||||
<span class="kw">_</span> <span class="op">=</span><span class="op">></span> <span class="macro">unreachable</span><span class="macro">!</span>(),
|
||||
},
|
||||
<span class="ident">Outcome</span>::<span class="ident">Changed</span> <span class="op">=</span><span class="op">></span> {
|
||||
@ -536,16 +658,19 @@
|
||||
<span class="ident">tired_speed</span>: <span class="ident">Speed</span>,
|
||||
<span class="ident">recharge_rate</span>: <span class="ident">f64</span>,
|
||||
<span class="ident">max_energy</span>: <span class="ident">Duration</span>,
|
||||
<span class="ident">upzone_rate</span>: <span class="ident">usize</span>,
|
||||
}
|
||||
|
||||
<span class="kw">struct</span> <span class="ident">SleighState</span> {
|
||||
<span class="ident">depot</span>: <span class="ident">BuildingID</span>,
|
||||
<span class="ident">score</span>: <span class="ident">usize</span>,
|
||||
<span class="ident">upzones_used</span>: <span class="ident">usize</span>,
|
||||
<span class="ident">energy</span>: <span class="ident">Duration</span>,
|
||||
<span class="ident">houses</span>: <span class="ident">HashMap</span><span class="op"><</span><span class="ident">BuildingID</span>, <span class="ident">BldgState</span><span class="op">></span>,
|
||||
<span class="ident">draw_scores</span>: <span class="ident">Drawable</span>,
|
||||
<span class="ident">draw_done</span>: <span class="ident">Drawable</span>,
|
||||
<span class="ident">config</span>: <span class="ident">Config</span>,
|
||||
<span class="ident">upzoned_depots</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">BuildingID</span><span class="op">></span>,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">SleighState</span> {
|
||||
@ -602,15 +727,18 @@
|
||||
<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">1000.0</span>,
|
||||
<span class="ident">max_energy</span>: <span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">90</span>),
|
||||
<span class="ident">upzone_rate</span>: <span class="number">30_000</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">depot</span>,
|
||||
<span class="ident">score</span>: <span class="number">0</span>,
|
||||
<span class="ident">upzones_used</span>: <span class="number">0</span>,
|
||||
<span class="ident">energy</span>: <span class="ident">config</span>.<span class="ident">max_energy</span>,
|
||||
<span class="ident">houses</span>,
|
||||
<span class="ident">draw_scores</span>: <span class="ident">ctx</span>.<span class="ident">upload</span>(<span class="ident">batch</span>),
|
||||
<span class="ident">draw_done</span>: <span class="ident">Drawable</span>::<span class="ident">empty</span>(<span class="ident">ctx</span>),
|
||||
<span class="ident">config</span>,
|
||||
<span class="ident">upzoned_depots</span>: <span class="ident">Vec</span>::<span class="ident">new</span>(),
|
||||
};
|
||||
<span class="ident">s</span>.<span class="ident">redraw</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
|
||||
<span class="ident">s</span>
|
||||
@ -623,6 +751,13 @@
|
||||
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">Color</span>::<span class="ident">BLACK</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="comment">// TODO This doesnt seem to be working</span>
|
||||
<span class="kw">for</span> <span class="ident">b</span> <span class="kw">in</span> <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">upzoned_depots</span> {
|
||||
<span class="ident">batch</span>.<span class="ident">push</span>(
|
||||
<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">commerical_building</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">push</span>(<span class="ident">Color</span>::<span class="ident">GREEN</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">polygon</span>.<span class="ident">clone</span>());
|
||||
<span class="self">self</span>.<span class="ident">draw_done</span> <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">upload</span>(<span class="ident">batch</span>);
|
||||
}
|
||||
@ -659,6 +794,15 @@
|
||||
<span class="kw">fn</span> <span class="ident">has_energy</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">bool</span> {
|
||||
<span class="self">self</span>.<span class="ident">energy</span> <span class="op">></span> <span class="ident">Duration</span>::<span class="ident">ZERO</span>
|
||||
}
|
||||
|
||||
<span class="doccomment">/// (upzones_free, next_upzone)</span>
|
||||
<span class="kw">fn</span> <span class="ident">get_upzones</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> (<span class="ident">usize</span>, <span class="ident">usize</span>) {
|
||||
<span class="comment">// Start with a freebie</span>
|
||||
<span class="kw">let</span> <span class="ident">total</span> <span class="op">=</span> <span class="number">1</span> <span class="op">+</span> <span class="self">self</span>.<span class="ident">score</span> <span class="op">/</span> <span class="self">self</span>.<span class="ident">config</span>.<span class="ident">upzone_rate</span>;
|
||||
<span class="kw">let</span> <span class="ident">upzones_free</span> <span class="op">=</span> <span class="ident">total</span> <span class="op">-</span> <span class="self">self</span>.<span class="ident">upzones_used</span>;
|
||||
<span class="kw">let</span> <span class="ident">next_upzone</span> <span class="op">=</span> (<span class="ident">total</span> <span class="op">+</span> <span class="number">1</span>) <span class="op">*</span> <span class="self">self</span>.<span class="ident">config</span>.<span class="ident">upzone_rate</span>;
|
||||
(<span class="ident">upzones_free</span>, <span class="ident">next_upzone</span> <span class="op">-</span> <span class="self">self</span>.<span class="ident">score</span>)
|
||||
}
|
||||
}
|
||||
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>)]</span>
|
||||
|
@ -13,9 +13,11 @@
|
||||
<span id="10">10</span>
|
||||
<span id="11">11</span>
|
||||
<span id="12">12</span>
|
||||
<span id="13">13</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">mod</span> <span class="ident">controls</span>;
|
||||
<span class="kw">mod</span> <span class="ident">game</span>;
|
||||
<span class="kw">mod</span> <span class="ident">upzone</span>;
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">main</span>() {
|
||||
<span class="ident">widgetry</span>::<span class="ident">run</span>(<span class="ident">widgetry</span>::<span class="ident">Settings</span>::<span class="ident">new</span>(<span class="string">"experiment"</span>), <span class="op">|</span><span class="ident">ctx</span><span class="op">|</span> {
|
||||
|
206
rustdoc/src/experiment/upzone.rs.html
Normal file
206
rustdoc/src/experiment/upzone.rs.html
Normal file
@ -0,0 +1,206 @@
|
||||
<!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="Source to the Rust file `experiment/src/upzone.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>upzone.rs.html -- source</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a></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"><pre class="line-numbers"><span id="1"> 1</span>
|
||||
<span id="2"> 2</span>
|
||||
<span id="3"> 3</span>
|
||||
<span id="4"> 4</span>
|
||||
<span id="5"> 5</span>
|
||||
<span id="6"> 6</span>
|
||||
<span id="7"> 7</span>
|
||||
<span id="8"> 8</span>
|
||||
<span id="9"> 9</span>
|
||||
<span id="10"> 10</span>
|
||||
<span id="11"> 11</span>
|
||||
<span id="12"> 12</span>
|
||||
<span id="13"> 13</span>
|
||||
<span id="14"> 14</span>
|
||||
<span id="15"> 15</span>
|
||||
<span id="16"> 16</span>
|
||||
<span id="17"> 17</span>
|
||||
<span id="18"> 18</span>
|
||||
<span id="19"> 19</span>
|
||||
<span id="20"> 20</span>
|
||||
<span id="21"> 21</span>
|
||||
<span id="22"> 22</span>
|
||||
<span id="23"> 23</span>
|
||||
<span id="24"> 24</span>
|
||||
<span id="25"> 25</span>
|
||||
<span id="26"> 26</span>
|
||||
<span id="27"> 27</span>
|
||||
<span id="28"> 28</span>
|
||||
<span id="29"> 29</span>
|
||||
<span id="30"> 30</span>
|
||||
<span id="31"> 31</span>
|
||||
<span id="32"> 32</span>
|
||||
<span id="33"> 33</span>
|
||||
<span id="34"> 34</span>
|
||||
<span id="35"> 35</span>
|
||||
<span id="36"> 36</span>
|
||||
<span id="37"> 37</span>
|
||||
<span id="38"> 38</span>
|
||||
<span id="39"> 39</span>
|
||||
<span id="40"> 40</span>
|
||||
<span id="41"> 41</span>
|
||||
<span id="42"> 42</span>
|
||||
<span id="43"> 43</span>
|
||||
<span id="44"> 44</span>
|
||||
<span id="45"> 45</span>
|
||||
<span id="46"> 46</span>
|
||||
<span id="47"> 47</span>
|
||||
<span id="48"> 48</span>
|
||||
<span id="49"> 49</span>
|
||||
<span id="50"> 50</span>
|
||||
<span id="51"> 51</span>
|
||||
<span id="52"> 52</span>
|
||||
<span id="53"> 53</span>
|
||||
<span id="54"> 54</span>
|
||||
<span id="55"> 55</span>
|
||||
<span id="56"> 56</span>
|
||||
<span id="57"> 57</span>
|
||||
<span id="58"> 58</span>
|
||||
<span id="59"> 59</span>
|
||||
<span id="60"> 60</span>
|
||||
<span id="61"> 61</span>
|
||||
<span id="62"> 62</span>
|
||||
<span id="63"> 63</span>
|
||||
<span id="64"> 64</span>
|
||||
<span id="65"> 65</span>
|
||||
<span id="66"> 66</span>
|
||||
<span id="67"> 67</span>
|
||||
<span id="68"> 68</span>
|
||||
<span id="69"> 69</span>
|
||||
<span id="70"> 70</span>
|
||||
<span id="71"> 71</span>
|
||||
<span id="72"> 72</span>
|
||||
<span id="73"> 73</span>
|
||||
<span id="74"> 74</span>
|
||||
<span id="75"> 75</span>
|
||||
<span id="76"> 76</span>
|
||||
<span id="77"> 77</span>
|
||||
<span id="78"> 78</span>
|
||||
<span id="79"> 79</span>
|
||||
<span id="80"> 80</span>
|
||||
<span id="81"> 81</span>
|
||||
<span id="82"> 82</span>
|
||||
<span id="83"> 83</span>
|
||||
<span id="84"> 84</span>
|
||||
<span id="85"> 85</span>
|
||||
<span id="86"> 86</span>
|
||||
<span id="87"> 87</span>
|
||||
<span id="88"> 88</span>
|
||||
<span id="89"> 89</span>
|
||||
<span id="90"> 90</span>
|
||||
<span id="91"> 91</span>
|
||||
<span id="92"> 92</span>
|
||||
<span id="93"> 93</span>
|
||||
<span id="94"> 94</span>
|
||||
<span id="95"> 95</span>
|
||||
<span id="96"> 96</span>
|
||||
<span id="97"> 97</span>
|
||||
<span id="98"> 98</span>
|
||||
<span id="99"> 99</span>
|
||||
<span id="100">100</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">HashSet</span>;
|
||||
|
||||
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">tools</span>::<span class="ident">ChooseSomething</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="kw">use</span> <span class="ident">widgetry</span>::{
|
||||
<span class="ident">Btn</span>, <span class="ident">Choice</span>, <span class="ident">Color</span>, <span class="ident">Drawable</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>, <span class="ident">HorizontalAlignment</span>, <span class="ident">Line</span>, <span class="ident">Outcome</span>,
|
||||
<span class="ident">Panel</span>, <span class="ident">State</span>, <span class="ident">TextExt</span>, <span class="ident">Transition</span>, <span class="ident">VerticalAlignment</span>, <span class="ident">Widget</span>,
|
||||
};
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Picker</span> {
|
||||
<span class="ident">panel</span>: <span class="ident">Panel</span>,
|
||||
<span class="ident">choices</span>: <span class="ident">HashSet</span><span class="op"><</span><span class="ident">BuildingID</span><span class="op">></span>,
|
||||
<span class="ident">draw_all_choices</span>: <span class="ident">Drawable</span>,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">Picker</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(
|
||||
<span class="ident">ctx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>,
|
||||
<span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">SimpleApp</span>,
|
||||
<span class="ident">choices</span>: <span class="ident">HashSet</span><span class="op"><</span><span class="ident">BuildingID</span><span class="op">></span>,
|
||||
) <span class="op">-</span><span class="op">></span> <span class="ident">Box</span><span class="op"><</span><span class="ident">dyn</span> <span class="ident">State</span><span class="op"><</span><span class="ident">SimpleApp</span><span class="op">></span><span class="op">></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="kw">for</span> <span class="ident">b</span> <span class="kw">in</span> <span class="kw-2">&</span><span class="ident">choices</span> {
|
||||
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">Color</span>::<span class="ident">GREEN</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">Box</span>::<span class="ident">new</span>(<span class="ident">Picker</span> {
|
||||
<span class="ident">panel</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">Line</span>(<span class="string">"Upzone"</span>).<span class="ident">small_heading</span>().<span class="ident">draw</span>(<span class="ident">ctx</span>),
|
||||
<span class="ident">Btn</span>::<span class="ident">close</span>(<span class="ident">ctx</span>),
|
||||
]),
|
||||
<span class="macro">format</span><span class="macro">!</span>(<span class="string">"Click on a residential building to upzone it"</span>).<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
|
||||
]))
|
||||
.<span class="ident">aligned</span>(<span class="ident">HorizontalAlignment</span>::<span class="ident">Right</span>, <span class="ident">VerticalAlignment</span>::<span class="ident">Top</span>)
|
||||
.<span class="ident">build</span>(<span class="ident">ctx</span>),
|
||||
<span class="ident">choices</span>,
|
||||
<span class="ident">draw_all_choices</span>: <span class="ident">ctx</span>.<span class="ident">upload</span>(<span class="ident">batch</span>),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">State</span><span class="op"><</span><span class="ident">SimpleApp</span><span class="op">></span> <span class="kw">for</span> <span class="ident">Picker</span> {
|
||||
<span class="kw">fn</span> <span class="ident">event</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">SimpleApp</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Transition</span><span class="op"><</span><span class="ident">SimpleApp</span><span class="op">></span> {
|
||||
<span class="ident">ctx</span>.<span class="ident">canvas_movement</span>();
|
||||
|
||||
<span class="kw">if</span> <span class="ident">ctx</span>.<span class="ident">redo_mouseover</span>() {
|
||||
<span class="ident">app</span>.<span class="ident">current_selection</span> <span class="op">=</span> <span class="ident">app</span>
|
||||
.<span class="ident">mouseover_unzoomed_buildings</span>(<span class="ident">ctx</span>)
|
||||
.<span class="ident">filter</span>(<span class="op">|</span><span class="ident">id</span><span class="op">|</span> <span class="self">self</span>.<span class="ident">choices</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="ident">id</span>.<span class="ident">as_building</span>()));
|
||||
}
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">ID</span>::<span class="ident">Building</span>(<span class="ident">b</span>)) <span class="op">=</span> <span class="ident">app</span>.<span class="ident">current_selection</span> {
|
||||
<span class="kw">if</span> <span class="ident">ctx</span>.<span class="ident">normal_left_click</span>() {
|
||||
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Push</span>(<span class="ident">ChooseSomething</span>::<span class="ident">new</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="string">"What do you want to build here?"</span>,
|
||||
<span class="ident">Choice</span>::<span class="ident">strings</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="string">"Pokémon-themed poké bar"</span>,
|
||||
<span class="string">"caviar donut shop"</span>,
|
||||
<span class="string">"curry beignet stand"</span>,
|
||||
]),
|
||||
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="kw">move</span> <span class="op">|</span><span class="kw">_</span>, <span class="kw">_</span>, <span class="ident">app</span><span class="op">|</span> {
|
||||
<span class="ident">app</span>.<span class="ident">current_selection</span> <span class="op">=</span> <span class="prelude-val">None</span>;
|
||||
<span class="ident">Transition</span>::<span class="ident">Multi</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Transition</span>::<span class="ident">Pop</span>,
|
||||
<span class="ident">Transition</span>::<span class="ident">Pop</span>,
|
||||
<span class="ident">Transition</span>::<span class="ident">ModifyState</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="kw">move</span> <span class="op">|</span><span class="ident">state</span>, <span class="ident">ctx</span>, <span class="ident">app</span><span class="op">|</span> {
|
||||
<span class="kw">let</span> <span class="ident">game</span> <span class="op">=</span> <span class="ident">state</span>.<span class="ident">downcast_mut</span>::<span class="op"><</span><span class="kw">crate</span>::<span class="ident">game</span>::<span class="ident">Game</span><span class="op">></span>().<span class="ident">unwrap</span>();
|
||||
<span class="ident">game</span>.<span class="ident">upzone</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">b</span>);
|
||||
})),
|
||||
])
|
||||
}),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">match</span> <span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">event</span>(<span class="ident">ctx</span>) {
|
||||
<span class="ident">Outcome</span>::<span class="ident">Clicked</span>(<span class="ident">x</span>) <span class="op">=</span><span class="op">></span> <span class="kw">match</span> <span class="ident">x</span>.<span class="ident">as_ref</span>() {
|
||||
<span class="string">"close"</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="ident">app</span>.<span class="ident">current_selection</span> <span class="op">=</span> <span class="prelude-val">None</span>;
|
||||
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Pop</span>;
|
||||
}
|
||||
<span class="kw">_</span> <span class="op">=</span><span class="op">></span> <span class="macro">unreachable</span><span class="macro">!</span>(),
|
||||
},
|
||||
<span class="kw">_</span> <span class="op">=</span><span class="op">></span> {}
|
||||
}
|
||||
|
||||
<span class="ident">Transition</span>::<span class="ident">Keep</span>
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">SimpleApp</span>) {
|
||||
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">draw</span>(<span class="ident">g</span>);
|
||||
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">draw_all_choices</span>);
|
||||
<span class="comment">// This covers up the current selection, so...</span>
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">ID</span>::<span class="ident">Building</span>(<span class="ident">b</span>)) <span class="op">=</span> <span class="ident">app</span>.<span class="ident">current_selection</span> {
|
||||
<span class="ident">g</span>.<span class="ident">draw_polygon</span>(<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">selected</span>, <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="ident">b</span>).<span class="ident">polygon</span>.<span class="ident">clone</span>());
|
||||
}
|
||||
}
|
||||
}
|
||||
</pre></div>
|
||||
</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 src="../../source-script.js"></script><script src="../../source-files.js"></script><script defer src="../../search-index.js"></script></body></html>
|
@ -114,7 +114,7 @@
|
||||
<span class="doccomment">/// The output of `rustdoc -V`</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"rustdoc 1.48.0 (7eac88abb 2020-11-16)"</span>;
|
||||
<span class="doccomment">/// The built-time in RFC2822, UTC</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"Fri, 27 Nov 2020 18:33:26 +0000"</span>;
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"Sat, 28 Nov 2020 01:58:16 +0000"</span>;
|
||||
<span class="doccomment">/// The target architecture, given by `cfg!(target_arch)`.</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"x86_64"</span>;
|
||||
<span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>
|
||||
|
@ -111,6 +111,13 @@
|
||||
<span id="108">108</span>
|
||||
<span id="109">109</span>
|
||||
<span id="110">110</span>
|
||||
<span id="111">111</span>
|
||||
<span id="112">112</span>
|
||||
<span id="113">113</span>
|
||||
<span id="114">114</span>
|
||||
<span id="115">115</span>
|
||||
<span id="116">116</span>
|
||||
<span id="117">117</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="doccomment">//! This crate contains common code for applications that draw and interact with a `Map`.</span>
|
||||
|
||||
@ -221,6 +228,13 @@
|
||||
<span class="kw">_</span> <span class="op">=</span><span class="op">></span> <span class="macro">panic</span><span class="macro">!</span>(<span class="string">"Can't call as_intersection on {:?}"</span>, <span class="self">self</span>),
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">as_building</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">BuildingID</span> {
|
||||
<span class="kw">match</span> <span class="kw-2">*</span><span class="self">self</span> {
|
||||
<span class="ident">ID</span>::<span class="ident">Building</span>(<span class="ident">b</span>) <span class="op">=</span><span class="op">></span> <span class="ident">b</span>,
|
||||
<span class="kw">_</span> <span class="op">=</span><span class="op">></span> <span class="macro">panic</span><span class="macro">!</span>(<span class="string">"Can't call as_building on {:?}"</span>, <span class="self">self</span>),
|
||||
}
|
||||
}
|
||||
}
|
||||
</pre></div>
|
||||
</section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "map_gui";</script><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script><script defer src="../../search-index.js"></script></body></html>
|
@ -326,6 +326,9 @@
|
||||
<span id="323">323</span>
|
||||
<span id="324">324</span>
|
||||
<span id="325">325</span>
|
||||
<span id="326">326</span>
|
||||
<span id="327">327</span>
|
||||
<span id="328">328</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="ident">abstutil</span>::{<span class="ident">CmdArgs</span>, <span class="ident">Timer</span>};
|
||||
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Circle</span>, <span class="ident">Distance</span>, <span class="ident">Duration</span>, <span class="ident">Pt2D</span>, <span class="ident">Time</span>};
|
||||
@ -446,14 +449,17 @@
|
||||
<span class="self">self</span>.<span class="ident">current_selection</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">calculate_current_selection</span>(<span class="ident">ctx</span>, <span class="bool-val">false</span>, <span class="bool-val">false</span>);
|
||||
}
|
||||
|
||||
<span class="comment">// TODO Returns anything; I think it should just return roads</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">mouseover_unzoomed_roads_and_intersections</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">ID</span><span class="op">></span> {
|
||||
<span class="self">self</span>.<span class="ident">calculate_current_selection</span>(<span class="ident">ctx</span>, <span class="bool-val">true</span>, <span class="bool-val">false</span>)
|
||||
}
|
||||
<span class="doccomment">/// Only select buildings, and work whether zoomed in or not.</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">mouseover_unzoomed_buildings</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">ID</span><span class="op">></span> {
|
||||
<span class="self">self</span>.<span class="ident">calculate_current_selection</span>(<span class="ident">ctx</span>, <span class="bool-val">false</span>, <span class="bool-val">true</span>)
|
||||
}
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">mouseover_unzoomed_everything</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">ID</span><span class="op">></span> {
|
||||
<span class="self">self</span>.<span class="ident">calculate_current_selection</span>(<span class="ident">ctx</span>, <span class="bool-val">true</span>, <span class="bool-val">true</span>)
|
||||
.<span class="ident">filter</span>(<span class="op">|</span><span class="ident">id</span><span class="op">|</span> <span class="kw">match</span> <span class="ident">id</span> {
|
||||
<span class="ident">ID</span>::<span class="ident">Building</span>(<span class="kw">_</span>) <span class="op">=</span><span class="op">></span> <span class="bool-val">true</span>,
|
||||
<span class="kw">_</span> <span class="op">=</span><span class="op">></span> <span class="bool-val">false</span>,
|
||||
})
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">calculate_current_selection</span>(
|
||||
|
Loading…
Reference in New Issue
Block a user