This commit is contained in:
dabreegster 2021-08-24 20:54:08 +00:00
parent 107b8efc68
commit 4bb2066d1c
14 changed files with 150 additions and 174 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The build time in RFC2822, UTC."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>BUILT_TIME_UTC in game::pregame::built_info - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"> <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The build time in RFC2822, UTC."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>BUILT_TIME_UTC in game::pregame::built_info - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"> <link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a></h2><div id="sidebar-vars" data-name="BUILT_TIME_UTC" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-7b2f388b02b372bc/out/built.rs.html#78" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a> = r&quot;Tue, 24 Aug 2021 20:31:05 +0000&quot;;</pre><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p> <link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a></h2><div id="sidebar-vars" data-name="BUILT_TIME_UTC" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-7b2f388b02b372bc/out/built.rs.html#78" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a> = r&quot;Tue, 24 Aug 2021 20:53:11 +0000&quot;;</pre><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
</div></details></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html> </div></details></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1,3 +1,3 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `legend_batch` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, legend_batch"><title>legend_batch in game::ungap::layers - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"> <!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 `legend_batch` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, legend_batch"><title>legend_batch in game::ungap::layers - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"> <link rel="alternate icon" type="image/png" href="../../../favicon-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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">layers</a></h2><div id="sidebar-vars" data-name="legend_batch" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">layers</a>::<wbr><a class="fn" href="#">legend_batch</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/ungap/layers.rs.html#375-391" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn legend_batch(ctx: &amp;mut EventCtx&lt;'_&gt;, color: Color, txt: Text) -&gt; GeomBatch</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html> <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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">layers</a></h2><div id="sidebar-vars" data-name="legend_batch" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">layers</a>::<wbr><a class="fn" href="#">legend_batch</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/ungap/layers.rs.html#366-382" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn legend_batch(ctx: &amp;mut EventCtx&lt;'_&gt;, color: Color, txt: Text) -&gt; GeomBatch</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1,3 +1,3 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `legend_item` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, legend_item"><title>legend_item in game::ungap::layers - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"> <!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 `legend_item` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, legend_item"><title>legend_item in game::ungap::layers - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"> <link rel="alternate icon" type="image/png" href="../../../favicon-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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">layers</a></h2><div id="sidebar-vars" data-name="legend_item" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">layers</a>::<wbr><a class="fn" href="#">legend_item</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/ungap/layers.rs.html#393-402" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn legend_item(ctx: &amp;mut EventCtx&lt;'_&gt;, color: Color, label: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a>) -&gt; Widget</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html> <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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">layers</a></h2><div id="sidebar-vars" data-name="legend_item" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">layers</a>::<wbr><a class="fn" href="#">legend_item</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/ungap/layers.rs.html#384-393" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn legend_item(ctx: &amp;mut EventCtx&lt;'_&gt;, color: Color, label: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a>) -&gt; Widget</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1,3 +0,0 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `make_bottom_right_panel` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, make_bottom_right_panel"><title>make_bottom_right_panel in game::ungap::layers - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">layers</a></h2><div id="sidebar-vars" data-name="make_bottom_right_panel" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">layers</a>::<wbr><a class="fn" href="#">make_bottom_right_panel</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/ungap/layers.rs.html#357-373" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_bottom_right_panel(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;bike_network: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;labels: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;elevation: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;steep_streets: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a><br>) -&gt; Panel</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1,3 +0,0 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `make_legend` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, make_legend"><title>make_legend in game::ungap::layers - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">layers</a></h2><div id="sidebar-vars" data-name="make_legend" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">layers</a>::<wbr><a class="fn" href="#">make_legend</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/ungap/layers.rs.html#306-355" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_legend(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;bike_network: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;labels: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;elevation: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;steep_streets: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a><br>) -&gt; Widget</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1,3 +1,3 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `make_zoom_controls` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, make_zoom_controls"><title>make_zoom_controls in game::ungap::layers - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"> <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `make_zoom_controls` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, make_zoom_controls"><title>make_zoom_controls in game::ungap::layers - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"> <link rel="alternate icon" type="image/png" href="../../../favicon-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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">layers</a></h2><div id="sidebar-vars" data-name="make_zoom_controls" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">layers</a>::<wbr><a class="fn" href="#">make_zoom_controls</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/ungap/layers.rs.html#270-304" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_zoom_controls(ctx: &amp;mut EventCtx&lt;'_&gt;) -&gt; Widget</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html> <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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">layers</a></h2><div id="sidebar-vars" data-name="make_zoom_controls" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">layers</a>::<wbr><a class="fn" href="#">make_zoom_controls</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/ungap/layers.rs.html#330-364" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_zoom_controls(ctx: &amp;mut EventCtx&lt;'_&gt;) -&gt; Widget</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1,3 +1,3 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `zoom_enabled_cache_key` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, zoom_enabled_cache_key"><title>zoom_enabled_cache_key in game::ungap::layers - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"> <!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_enabled_cache_key` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, zoom_enabled_cache_key"><title>zoom_enabled_cache_key in game::ungap::layers - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"> <link rel="alternate icon" type="image/png" href="../../../favicon-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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">layers</a></h2><div id="sidebar-vars" data-name="zoom_enabled_cache_key" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">layers</a>::<wbr><a class="fn" href="#">zoom_enabled_cache_key</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/ungap/layers.rs.html#404-406" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn zoom_enabled_cache_key(ctx: &amp;EventCtx&lt;'_&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a>, <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html">)</a></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html> <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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">layers</a></h2><div id="sidebar-vars" data-name="zoom_enabled_cache_key" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">layers</a>::<wbr><a class="fn" href="#">zoom_enabled_cache_key</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/ungap/layers.rs.html#395-397" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn zoom_enabled_cache_key(ctx: &amp;EventCtx&lt;'_&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a>, <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html">)</a></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `layers` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, layers"><title>game::ungap::layers - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"> <!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 `layers` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, layers"><title>game::ungap::layers - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"> <link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module layers</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="layers" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a class="mod" href="#">layers</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/ungap/layers.rs.html#1-406" title="goto source code">[src]</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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module layers</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="layers" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a class="mod" href="#">layers</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/ungap/layers.rs.html#1-397" title="goto source code">[src]</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.Layers.html" title="game::ungap::layers::Layers struct">Layers</a></td><td class="docblock-short"><p>A bottom-right panel for managing a bunch of toggleable layers in the “ungap the map” tool.</p> <table><tr class="module-item"><td><a class="struct" href="struct.Layers.html" title="game::ungap::layers::Layers struct">Layers</a></td><td class="docblock-short"><p>A bottom-right panel for managing a bunch of toggleable layers in the “ungap the map” tool.</p>
</td></tr></table><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2> </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.legend_batch.html" title="game::ungap::layers::legend_batch fn">legend_batch</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.legend_item.html" title="game::ungap::layers::legend_item fn">legend_item</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.make_bottom_right_panel.html" title="game::ungap::layers::make_bottom_right_panel fn">make_bottom_right_panel</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.make_legend.html" title="game::ungap::layers::make_legend fn">make_legend</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.make_zoom_controls.html" title="game::ungap::layers::make_zoom_controls fn">make_zoom_controls</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.zoom_enabled_cache_key.html" title="game::ungap::layers::zoom_enabled_cache_key fn">zoom_enabled_cache_key</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html> <table><tr class="module-item"><td><a class="fn" href="fn.legend_batch.html" title="game::ungap::layers::legend_batch fn">legend_batch</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.legend_item.html" title="game::ungap::layers::legend_item fn">legend_item</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.make_zoom_controls.html" title="game::ungap::layers::make_zoom_controls fn">make_zoom_controls</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.zoom_enabled_cache_key.html" title="game::ungap::layers::zoom_enabled_cache_key fn">zoom_enabled_cache_key</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1 +1 @@
initSidebarItems({"fn":[["legend_batch",""],["legend_item",""],["make_bottom_right_panel",""],["make_legend",""],["make_zoom_controls",""],["zoom_enabled_cache_key",""]],"struct":[["Layers","A bottom-right panel for managing a bunch of toggleable layers in the “ungap the map” tool."]]}); initSidebarItems({"fn":[["legend_batch",""],["legend_item",""],["make_zoom_controls",""],["zoom_enabled_cache_key",""]],"struct":[["Layers","A bottom-right panel for managing a bunch of toggleable layers in the “ungap the map” tool."]]});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -177,7 +177,7 @@
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;rustdoc 1.54.0 (a178d0322 2021-07-26)&quot;</span>; <span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;rustdoc 1.54.0 (a178d0322 2021-07-26)&quot;</span>;
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#&quot;The build time in RFC2822, UTC.&quot;#</span>]</span> <span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#&quot;The build time in RFC2822, UTC.&quot;#</span>]</span>
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span> <span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;Tue, 24 Aug 2021 20:31:05 +0000&quot;</span>; <span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;Tue, 24 Aug 2021 20:53:11 +0000&quot;</span>;
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#&quot;The target architecture, given by `CARGO_CFG_TARGET_ARCH`.&quot;#</span>]</span> <span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#&quot;The target architecture, given by `CARGO_CFG_TARGET_ARCH`.&quot;#</span>]</span>
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span> <span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;x86_64&quot;</span>; <span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;x86_64&quot;</span>;

View File

@ -397,15 +397,6 @@
<span id="395">395</span> <span id="395">395</span>
<span id="396">396</span> <span id="396">396</span>
<span id="397">397</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>
</pre><pre class="rust"> </pre><pre class="rust">
<span class="kw">use</span> <span class="ident">std::collections::HashMap</span>; <span class="kw">use</span> <span class="ident">std::collections::HashMap</span>;
@ -415,8 +406,8 @@
<span class="kw">use</span> <span class="ident">map_model::LaneType</span>; <span class="kw">use</span> <span class="ident">map_model::LaneType</span>;
<span class="kw">use</span> <span class="ident">widgetry</span>::{ <span class="kw">use</span> <span class="ident">widgetry</span>::{
<span class="ident">ButtonBuilder</span>, <span class="ident">Color</span>, <span class="ident">ControlState</span>, <span class="ident">Drawable</span>, <span class="ident">EdgeInsets</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>, <span class="ident">ButtonBuilder</span>, <span class="ident">Color</span>, <span class="ident">ControlState</span>, <span class="ident">Drawable</span>, <span class="ident">EdgeInsets</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>,
<span class="ident">HorizontalAlignment</span>, <span class="ident">Key</span>, <span class="ident">Line</span>, <span class="ident">Outcome</span>, <span class="ident">Panel</span>, <span class="ident">RewriteColor</span>, <span class="ident">Text</span>, <span class="ident">Toggle</span>, <span class="ident">VerticalAlignment</span>, <span class="ident">HorizontalAlignment</span>, <span class="ident">Image</span>, <span class="ident">Key</span>, <span class="ident">Line</span>, <span class="ident">Outcome</span>, <span class="ident">Panel</span>, <span class="ident">RewriteColor</span>, <span class="ident">Text</span>, <span class="ident">Toggle</span>,
<span class="ident">Widget</span>, <span class="ident">VerticalAlignment</span>, <span class="ident">Widget</span>,
}; };
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::app</span>::{<span class="ident">App</span>, <span class="ident">Transition</span>}; <span class="kw">use</span> <span class="kw">crate</span><span class="ident">::app</span>::{<span class="ident">App</span>, <span class="ident">Transition</span>};
@ -427,7 +418,7 @@
<span class="doccomment">/// A bottom-right panel for managing a bunch of toggleable layers in the &quot;ungap the map&quot; tool.</span> <span class="doccomment">/// A bottom-right panel for managing a bunch of toggleable layers in the &quot;ungap the map&quot; tool.</span>
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Layers</span> { <span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Layers</span> {
<span class="ident">panel</span>: <span class="ident">Panel</span>, <span class="ident">panel</span>: <span class="ident">Panel</span>,
<span class="ident">bike_network_layer</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">DrawNetworkLayer</span><span class="op">&gt;</span>, <span class="ident">bike_network</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">DrawNetworkLayer</span><span class="op">&gt;</span>,
<span class="ident">labels</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">DrawRoadLabels</span><span class="op">&gt;</span>, <span class="ident">labels</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">DrawRoadLabels</span><span class="op">&gt;</span>,
<span class="ident">elevation</span>: <span class="ident">bool</span>, <span class="ident">elevation</span>: <span class="ident">bool</span>,
<span class="ident">steep_streets</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Drawable</span><span class="op">&gt;</span>, <span class="ident">steep_streets</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Drawable</span><span class="op">&gt;</span>,
@ -440,68 +431,26 @@
<span class="kw">impl</span> <span class="ident">Layers</span> { <span class="kw">impl</span> <span class="ident">Layers</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">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Layers</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">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Layers</span> {
<span class="ident">Layers</span> { <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">l</span> <span class="op">=</span> <span class="ident">Layers</span> {
<span class="ident">panel</span>: <span class="ident">make_bottom_right_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="bool-val">true</span>, <span class="bool-val">true</span>, <span class="bool-val">false</span>, <span class="bool-val">false</span>), <span class="ident">panel</span>: <span class="ident">Panel::empty</span>(<span class="ident">ctx</span>),
<span class="ident">bike_network_layer</span>: <span class="prelude-val">Some</span>(<span class="ident">DrawNetworkLayer::new</span>()), <span class="ident">bike_network</span>: <span class="prelude-val">Some</span>(<span class="ident">DrawNetworkLayer::new</span>()),
<span class="ident">labels</span>: <span class="prelude-val">Some</span>(<span class="ident">DrawRoadLabels::new</span>()), <span class="ident">labels</span>: <span class="prelude-val">Some</span>(<span class="ident">DrawRoadLabels::new</span>()),
<span class="ident">elevation</span>: <span class="bool-val">false</span>, <span class="ident">elevation</span>: <span class="bool-val">false</span>,
<span class="ident">steep_streets</span>: <span class="prelude-val">None</span>, <span class="ident">steep_streets</span>: <span class="prelude-val">None</span>,
<span class="ident">road_types</span>: <span class="ident">HashMap::new</span>(), <span class="ident">road_types</span>: <span class="ident">HashMap::new</span>(),
<span class="ident">zoom_enabled_cache_key</span>: <span class="ident">zoom_enabled_cache_key</span>(<span class="ident">ctx</span>), <span class="ident">zoom_enabled_cache_key</span>: <span class="ident">zoom_enabled_cache_key</span>(<span class="ident">ctx</span>),
<span class="ident">map_edit_key</span>: <span class="ident">usize::MAX</span>, <span class="ident">map_edit_key</span>: <span class="ident">usize::MAX</span>,
} };
} <span class="ident">l</span>.<span class="ident">update_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="ident">l</span>
<span class="kw">fn</span> <span class="ident">highlight_road_type</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>, <span class="ident">name</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>) {
<span class="comment">// TODO Button enums would rock</span>
<span class="kw">if</span> <span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;bike network&quot;</span>
<span class="op">|</span><span class="op">|</span> <span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;road labels&quot;</span>
<span class="op">|</span><span class="op">|</span> <span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;elevation&quot;</span>
<span class="op">|</span><span class="op">|</span> <span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;steep streets&quot;</span>
<span class="op">|</span><span class="op">|</span> <span class="ident">name</span>.<span class="ident">starts_with</span>(<span class="string">&quot;about &quot;</span>)
{
<span class="kw">return</span>;
}
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">road_types</span>.<span class="ident">contains_key</span>(<span class="ident">name</span>) {
<span class="kw">return</span>;
}
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">GeomBatch::new</span>();
<span class="kw">for</span> <span class="ident">r</span> <span class="kw">in</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">all_roads</span>() {
<span class="kw">let</span> <span class="ident">rank</span> <span class="op">=</span> <span class="ident">r</span>.<span class="ident">get_rank</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">bike_lane</span> <span class="op">=</span> <span class="bool-val">false</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buffer</span> <span class="op">=</span> <span class="bool-val">false</span>;
<span class="kw">for</span> (<span class="kw">_</span>, <span class="kw">_</span>, <span class="ident">lt</span>) <span class="kw">in</span> <span class="ident">r</span>.<span class="ident">lanes_ltr</span>() {
<span class="kw">if</span> <span class="ident">lt</span> <span class="op">=</span><span class="op">=</span> <span class="ident">LaneType::Biking</span> {
<span class="ident">bike_lane</span> <span class="op">=</span> <span class="bool-val">true</span>;
} <span class="kw">else</span> <span class="kw">if</span> <span class="macro">matches!</span>(<span class="ident">lt</span>, <span class="ident">LaneType::Buffer</span>(<span class="kw">_</span>)) {
<span class="ident">buffer</span> <span class="op">=</span> <span class="bool-val">true</span>;
}
}
<span class="kw">let</span> <span class="ident">show</span> <span class="op">=</span> (<span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;highway&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">rank</span> <span class="op">=</span><span class="op">=</span> <span class="ident">RoadRank::Highway</span>)
<span class="op">|</span><span class="op">|</span> (<span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;major street&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">rank</span> <span class="op">=</span><span class="op">=</span> <span class="ident">RoadRank::Arterial</span>)
<span class="op">|</span><span class="op">|</span> (<span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;minor street&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">rank</span> <span class="op">=</span><span class="op">=</span> <span class="ident">RoadRank::Local</span>)
<span class="op">|</span><span class="op">|</span> (<span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;trail&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">r</span>.<span class="ident">is_cycleway</span>())
<span class="op">|</span><span class="op">|</span> (<span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;protected bike lane&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">bike_lane</span> <span class="op">&amp;&amp;</span> <span class="ident">buffer</span>)
<span class="op">|</span><span class="op">|</span> (<span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;painted bike lane&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">bike_lane</span> <span class="op">&amp;&amp;</span> <span class="op">!</span><span class="ident">buffer</span>)
<span class="op">|</span><span class="op">|</span> (<span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;greenway&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">bike_network::is_greenway</span>(<span class="ident">r</span>));
<span class="kw">if</span> <span class="ident">show</span> {
<span class="comment">// TODO If it&#39;s a bike element, should probably thicken for the unzoomed scale...</span>
<span class="comment">// the maximum amount?</span>
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">Color::CYAN</span>, <span class="ident">r</span>.<span class="ident">get_thick_polygon</span>(<span class="kw-2">&amp;</span><span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>));
}
}
<span class="self">self</span>.<span class="ident">road_types</span>.<span class="ident">insert</span>(<span class="ident">name</span>.<span class="ident">to_string</span>(), <span class="ident">ctx</span>.<span class="ident">upload</span>(<span class="ident">batch</span>));
} }
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">event</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">App</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Transition</span><span class="op">&gt;</span> { <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">event</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">App</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Transition</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">key</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_edits_change_key</span>(); <span class="kw">let</span> <span class="ident">key</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_edits_change_key</span>();
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">map_edit_key</span> <span class="op">!</span><span class="op">=</span> <span class="ident">key</span> { <span class="kw">if</span> <span class="self">self</span>.<span class="ident">map_edit_key</span> <span class="op">!</span><span class="op">=</span> <span class="ident">key</span> {
<span class="self">self</span>.<span class="ident">map_edit_key</span> <span class="op">=</span> <span class="ident">key</span>; <span class="self">self</span>.<span class="ident">map_edit_key</span> <span class="op">=</span> <span class="ident">key</span>;
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">bike_network_layer</span>.<span class="ident">is_some</span>() { <span class="kw">if</span> <span class="self">self</span>.<span class="ident">bike_network</span>.<span class="ident">is_some</span>() {
<span class="self">self</span>.<span class="ident">bike_network_layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">DrawNetworkLayer::new</span>()); <span class="self">self</span>.<span class="ident">bike_network</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">DrawNetworkLayer::new</span>());
} }
<span class="self">self</span>.<span class="ident">road_types</span>.<span class="ident">clear</span>(); <span class="self">self</span>.<span class="ident">road_types</span>.<span class="ident">clear</span>();
} }
@ -542,14 +491,12 @@
<span class="string">&quot;about the elevation data&quot;</span> <span class="op">=</span><span class="op">&gt;</span> <span class="ident">PopupMsg::new_state</span>(<span class="ident">ctx</span>, <span class="string">&quot;About the elevation data&quot;</span>, <span class="macro">vec!</span>[<span class="string">&quot;Biking uphill next to traffic without any dedicated space isn&#39;t fun.&quot;</span>, <span class="string">&quot;Biking downhill next to traffic, especially in the door-zone of parked cars, and especially on Seattle&#39;s bumpy roads... is downright terrifying.&quot;</span>, <span class="string">&quot;&quot;</span>, <span class="string">&quot;Note the elevation data is incorrect near bridges.&quot;</span>, <span class="string">&quot;Thanks to King County LIDAR for the data, and Eldan Goldenberg for processing it.&quot;</span>]), <span class="string">&quot;about the elevation data&quot;</span> <span class="op">=</span><span class="op">&gt;</span> <span class="ident">PopupMsg::new_state</span>(<span class="ident">ctx</span>, <span class="string">&quot;About the elevation data&quot;</span>, <span class="macro">vec!</span>[<span class="string">&quot;Biking uphill next to traffic without any dedicated space isn&#39;t fun.&quot;</span>, <span class="string">&quot;Biking downhill next to traffic, especially in the door-zone of parked cars, and especially on Seattle&#39;s bumpy roads... is downright terrifying.&quot;</span>, <span class="string">&quot;&quot;</span>, <span class="string">&quot;Note the elevation data is incorrect near bridges.&quot;</span>, <span class="string">&quot;Thanks to King County LIDAR for the data, and Eldan Goldenberg for processing it.&quot;</span>]),
<span class="string">&quot;zoom map out&quot;</span> <span class="op">=</span><span class="op">&gt;</span> { <span class="string">&quot;zoom map out&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">center_zoom</span>(<span class="op">-</span><span class="number">8.0</span>); <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">center_zoom</span>(<span class="op">-</span><span class="number">8.0</span>);
<span class="macro">debug!</span>(<span class="string">&quot;clicked zoomed out to: {}&quot;</span>, <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">cam_zoom</span>); <span class="self">self</span>.<span class="ident">update_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="self">self</span>.<span class="ident">panel</span> <span class="op">=</span> <span class="ident">make_bottom_right_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="self">self</span>.<span class="ident">bike_network_layer</span>.<span class="ident">is_some</span>(), <span class="self">self</span>.<span class="ident">labels</span>.<span class="ident">is_some</span>(), <span class="self">self</span>.<span class="ident">elevation</span>, <span class="self">self</span>.<span class="ident">steep_streets</span>.<span class="ident">is_some</span>());
<span class="kw">return</span> <span class="prelude-val">Some</span>(<span class="ident">Transition::Keep</span>); <span class="kw">return</span> <span class="prelude-val">Some</span>(<span class="ident">Transition::Keep</span>);
}, },
<span class="string">&quot;zoom map in&quot;</span> <span class="op">=</span><span class="op">&gt;</span> { <span class="string">&quot;zoom map in&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">center_zoom</span>(<span class="number">8.0</span>); <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">center_zoom</span>(<span class="number">8.0</span>);
<span class="macro">debug!</span>(<span class="string">&quot;clicked zoomed in to: {}&quot;</span>, <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">cam_zoom</span>); <span class="self">self</span>.<span class="ident">update_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="self">self</span>.<span class="ident">panel</span> <span class="op">=</span> <span class="ident">make_bottom_right_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="self">self</span>.<span class="ident">bike_network_layer</span>.<span class="ident">is_some</span>(), <span class="self">self</span>.<span class="ident">labels</span>.<span class="ident">is_some</span>(), <span class="self">self</span>.<span class="ident">elevation</span>, <span class="self">self</span>.<span class="ident">steep_streets</span>.<span class="ident">is_some</span>());
<span class="kw">return</span> <span class="prelude-val">Some</span>(<span class="ident">Transition::Keep</span>); <span class="kw">return</span> <span class="prelude-val">Some</span>(<span class="ident">Transition::Keep</span>);
}, },
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">unreachable!</span>(), <span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">unreachable!</span>(),
@ -558,10 +505,11 @@
<span class="ident">Outcome::Changed</span>(<span class="ident">x</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="kw">match</span> <span class="ident">x</span>.<span class="ident">as_ref</span>() { <span class="ident">Outcome::Changed</span>(<span class="ident">x</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="kw">match</span> <span class="ident">x</span>.<span class="ident">as_ref</span>() {
<span class="string">&quot;bike network&quot;</span> <span class="op">=</span><span class="op">&gt;</span> { <span class="string">&quot;bike network&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">is_checked</span>(<span class="string">&quot;bike network&quot;</span>) { <span class="kw">if</span> <span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">is_checked</span>(<span class="string">&quot;bike network&quot;</span>) {
<span class="self">self</span>.<span class="ident">bike_network_layer</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">DrawNetworkLayer::new</span>()); <span class="self">self</span>.<span class="ident">bike_network</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">DrawNetworkLayer::new</span>());
} <span class="kw">else</span> { } <span class="kw">else</span> {
<span class="self">self</span>.<span class="ident">bike_network_layer</span> <span class="op">=</span> <span class="prelude-val">None</span>; <span class="self">self</span>.<span class="ident">bike_network</span> <span class="op">=</span> <span class="prelude-val">None</span>;
} }
<span class="self">self</span>.<span class="ident">update_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
} }
<span class="string">&quot;road labels&quot;</span> <span class="op">=</span><span class="op">&gt;</span> { <span class="string">&quot;road labels&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">is_checked</span>(<span class="string">&quot;road labels&quot;</span>) { <span class="kw">if</span> <span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">is_checked</span>(<span class="string">&quot;road labels&quot;</span>) {
@ -572,14 +520,7 @@
} }
<span class="string">&quot;elevation&quot;</span> <span class="op">=</span><span class="op">&gt;</span> { <span class="string">&quot;elevation&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">elevation</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">is_checked</span>(<span class="string">&quot;elevation&quot;</span>); <span class="self">self</span>.<span class="ident">elevation</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">is_checked</span>(<span class="string">&quot;elevation&quot;</span>);
<span class="self">self</span>.<span class="ident">panel</span> <span class="op">=</span> <span class="ident">make_bottom_right_panel</span>( <span class="self">self</span>.<span class="ident">update_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="ident">ctx</span>,
<span class="ident">app</span>,
<span class="self">self</span>.<span class="ident">bike_network_layer</span>.<span class="ident">is_some</span>(),
<span class="self">self</span>.<span class="ident">labels</span>.<span class="ident">is_some</span>(),
<span class="self">self</span>.<span class="ident">elevation</span>,
<span class="self">self</span>.<span class="ident">steep_streets</span>.<span class="ident">is_some</span>(),
);
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">elevation</span> { <span class="kw">if</span> <span class="self">self</span>.<span class="ident">elevation</span> {
<span class="kw">let</span> <span class="ident">name</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_name</span>().<span class="ident">clone</span>(); <span class="kw">let</span> <span class="ident">name</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_name</span>().<span class="ident">clone</span>();
<span class="kw">if</span> <span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">elevation_contours</span>.<span class="ident">key</span>() <span class="op">!</span><span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">name</span>.<span class="ident">clone</span>()) { <span class="kw">if</span> <span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">elevation_contours</span>.<span class="ident">key</span>() <span class="op">!</span><span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">name</span>.<span class="ident">clone</span>()) {
@ -634,14 +575,7 @@
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">zoom_enabled_cache_key</span> <span class="op">!</span><span class="op">=</span> <span class="ident">zoom_enabled_cache_key</span>(<span class="ident">ctx</span>) { <span class="kw">if</span> <span class="self">self</span>.<span class="ident">zoom_enabled_cache_key</span> <span class="op">!</span><span class="op">=</span> <span class="ident">zoom_enabled_cache_key</span>(<span class="ident">ctx</span>) {
<span class="comment">// approriately disable/enable zoom buttons in case user scroll-zoomed</span> <span class="comment">// approriately disable/enable zoom buttons in case user scroll-zoomed</span>
<span class="self">self</span>.<span class="ident">panel</span> <span class="op">=</span> <span class="ident">make_bottom_right_panel</span>( <span class="self">self</span>.<span class="ident">update_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="ident">ctx</span>,
<span class="ident">app</span>,
<span class="self">self</span>.<span class="ident">bike_network_layer</span>.<span class="ident">is_some</span>(),
<span class="self">self</span>.<span class="ident">labels</span>.<span class="ident">is_some</span>(),
<span class="self">self</span>.<span class="ident">elevation</span>,
<span class="self">self</span>.<span class="ident">steep_streets</span>.<span class="ident">is_some</span>(),
);
<span class="self">self</span>.<span class="ident">zoom_enabled_cache_key</span> <span class="op">=</span> <span class="ident">zoom_enabled_cache_key</span>(<span class="ident">ctx</span>); <span class="self">self</span>.<span class="ident">zoom_enabled_cache_key</span> <span class="op">=</span> <span class="ident">zoom_enabled_cache_key</span>(<span class="ident">ctx</span>);
} }
@ -651,7 +585,7 @@
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>) { <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>) {
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">draw</span>(<span class="ident">g</span>); <span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">draw</span>(<span class="ident">g</span>);
<span class="kw">if</span> <span class="ident">g</span>.<span class="ident">canvas</span>.<span class="ident">cam_zoom</span> <span class="op">&lt;</span> <span class="ident">app</span>.<span class="ident">opts</span>.<span class="ident">min_zoom_for_detail</span> { <span class="kw">if</span> <span class="ident">g</span>.<span class="ident">canvas</span>.<span class="ident">cam_zoom</span> <span class="op">&lt;</span> <span class="ident">app</span>.<span class="ident">opts</span>.<span class="ident">min_zoom_for_detail</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="kw-2">ref</span> <span class="ident">n</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">bike_network_layer</span> { <span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="kw-2">ref</span> <span class="ident">n</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">bike_network</span> {
<span class="ident">n</span>.<span class="ident">draw</span>(<span class="ident">g</span>, <span class="ident">app</span>); <span class="ident">n</span>.<span class="ident">draw</span>(<span class="ident">g</span>, <span class="ident">app</span>);
} }
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="kw-2">ref</span> <span class="ident">l</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">labels</span> { <span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="kw-2">ref</span> <span class="ident">l</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">labels</span> {
@ -674,6 +608,123 @@
} }
} }
} }
<span class="kw">fn</span> <span class="ident">update_panel</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>) {
<span class="self">self</span>.<span class="ident">panel</span> <span class="op">=</span> <span class="ident">Panel::new_builder</span>(<span class="ident">Widget::col</span>(<span class="macro">vec!</span>[
<span class="ident">make_zoom_controls</span>(<span class="ident">ctx</span>).<span class="ident">align_right</span>().<span class="ident">padding_right</span>(<span class="number">16</span>),
<span class="self">self</span>.<span class="ident">make_legend</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)
.<span class="ident">padding</span>(<span class="number">16</span>)
.<span class="ident">bg</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">panel_bg</span>),
]))
.<span class="ident">aligned</span>(<span class="ident">HorizontalAlignment::Right</span>, <span class="ident">VerticalAlignment::Bottom</span>)
.<span class="ident">build_custom</span>(<span class="ident">ctx</span>);
}
<span class="kw">fn</span> <span class="ident">make_legend</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Widget</span> {
<span class="ident">Widget::col</span>(<span class="macro">vec!</span>[
<span class="ident">Widget::row</span>(<span class="macro">vec!</span>[
<span class="ident">Image::from_path</span>(<span class="string">&quot;system/assets/tools/layers.svg&quot;</span>)
.<span class="ident">dims</span>(<span class="number">30.0</span>)
.<span class="ident">into_widget</span>(<span class="ident">ctx</span>)
.<span class="ident">centered_vert</span>(),
<span class="ident">Widget::custom_row</span>(<span class="macro">vec!</span>[
<span class="comment">// TODO Looks too close to access restrictions</span>
<span class="ident">legend_item</span>(<span class="ident">ctx</span>, <span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">unzoomed_highway</span>, <span class="string">&quot;highway&quot;</span>),
<span class="ident">legend_item</span>(<span class="ident">ctx</span>, <span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">unzoomed_arterial</span>, <span class="string">&quot;major street&quot;</span>),
<span class="ident">legend_item</span>(<span class="ident">ctx</span>, <span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">unzoomed_residential</span>, <span class="string">&quot;minor street&quot;</span>),
]),
]),
<span class="ident">Widget::custom_row</span>({
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">row</span> <span class="op">=</span> <span class="macro">vec!</span>[<span class="ident">Toggle::checkbox</span>(
<span class="ident">ctx</span>,
<span class="string">&quot;bike network&quot;</span>,
<span class="ident">Key::B</span>,
<span class="self">self</span>.<span class="ident">bike_network</span>.<span class="ident">is_some</span>(),
)];
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">bike_network</span>.<span class="ident">is_some</span>() {
<span class="ident">row</span>.<span class="ident">push</span>(<span class="ident">legend_item</span>(<span class="ident">ctx</span>, <span class="kw-2">*</span><span class="ident">bike_network::DEDICATED_TRAIL</span>, <span class="string">&quot;trail&quot;</span>));
<span class="ident">row</span>.<span class="ident">push</span>(<span class="ident">legend_item</span>(
<span class="ident">ctx</span>,
<span class="kw-2">*</span><span class="ident">bike_network::PROTECTED_BIKE_LANE</span>,
<span class="string">&quot;protected bike lane&quot;</span>,
));
<span class="ident">row</span>.<span class="ident">push</span>(<span class="ident">legend_item</span>(
<span class="ident">ctx</span>,
<span class="kw-2">*</span><span class="ident">bike_network::PAINTED_BIKE_LANE</span>,
<span class="string">&quot;painted bike lane&quot;</span>,
));
<span class="ident">row</span>.<span class="ident">push</span>(<span class="ident">legend_item</span>(<span class="ident">ctx</span>, <span class="kw-2">*</span><span class="ident">bike_network::GREENWAY</span>, <span class="string">&quot;greenway&quot;</span>));
}
<span class="ident">row</span>
}),
<span class="comment">// TODO Distinguish door-zone bike lanes?</span>
<span class="comment">// TODO Call out bike turning boxes?</span>
<span class="comment">// TODO Call out bike signals?</span>
<span class="ident">Toggle::checkbox</span>(<span class="ident">ctx</span>, <span class="string">&quot;road labels&quot;</span>, <span class="ident">Key::L</span>, <span class="self">self</span>.<span class="ident">labels</span>.<span class="ident">is_some</span>()),
<span class="ident">Widget::row</span>(<span class="macro">vec!</span>[
<span class="ident">Toggle::checkbox</span>(<span class="ident">ctx</span>, <span class="string">&quot;elevation&quot;</span>, <span class="ident">Key::E</span>, <span class="self">self</span>.<span class="ident">elevation</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_plain</span>
.<span class="ident">icon</span>(<span class="string">&quot;system/assets/tools/info.svg&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;about the elevation data&quot;</span>)
.<span class="ident">centered_vert</span>(),
<span class="ident">Text::new</span>()
.<span class="ident">into_widget</span>(<span class="ident">ctx</span>)
.<span class="ident">named</span>(<span class="string">&quot;current elevation&quot;</span>)
.<span class="ident">centered_vert</span>(),
]),
<span class="ident">Widget::row</span>(<span class="macro">vec!</span>[
<span class="ident">Toggle::checkbox</span>(<span class="ident">ctx</span>, <span class="string">&quot;steep streets&quot;</span>, <span class="ident">Key::S</span>, <span class="self">self</span>.<span class="ident">steep_streets</span>.<span class="ident">is_some</span>()),
<span class="comment">// A placeholder</span>
<span class="ident">Text::new</span>().<span class="ident">into_widget</span>(<span class="ident">ctx</span>).<span class="ident">named</span>(<span class="string">&quot;steep streets legend&quot;</span>),
]),
<span class="comment">// TODO Probably a collisions layer</span>
])
}
<span class="kw">fn</span> <span class="ident">highlight_road_type</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>, <span class="ident">name</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>) {
<span class="comment">// TODO Button enums would rock</span>
<span class="kw">if</span> <span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;bike network&quot;</span>
<span class="op">|</span><span class="op">|</span> <span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;road labels&quot;</span>
<span class="op">|</span><span class="op">|</span> <span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;elevation&quot;</span>
<span class="op">|</span><span class="op">|</span> <span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;steep streets&quot;</span>
<span class="op">|</span><span class="op">|</span> <span class="ident">name</span>.<span class="ident">starts_with</span>(<span class="string">&quot;about &quot;</span>)
{
<span class="kw">return</span>;
}
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">road_types</span>.<span class="ident">contains_key</span>(<span class="ident">name</span>) {
<span class="kw">return</span>;
}
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">GeomBatch::new</span>();
<span class="kw">for</span> <span class="ident">r</span> <span class="kw">in</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">all_roads</span>() {
<span class="kw">let</span> <span class="ident">rank</span> <span class="op">=</span> <span class="ident">r</span>.<span class="ident">get_rank</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">bike_lane</span> <span class="op">=</span> <span class="bool-val">false</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buffer</span> <span class="op">=</span> <span class="bool-val">false</span>;
<span class="kw">for</span> (<span class="kw">_</span>, <span class="kw">_</span>, <span class="ident">lt</span>) <span class="kw">in</span> <span class="ident">r</span>.<span class="ident">lanes_ltr</span>() {
<span class="kw">if</span> <span class="ident">lt</span> <span class="op">=</span><span class="op">=</span> <span class="ident">LaneType::Biking</span> {
<span class="ident">bike_lane</span> <span class="op">=</span> <span class="bool-val">true</span>;
} <span class="kw">else</span> <span class="kw">if</span> <span class="macro">matches!</span>(<span class="ident">lt</span>, <span class="ident">LaneType::Buffer</span>(<span class="kw">_</span>)) {
<span class="ident">buffer</span> <span class="op">=</span> <span class="bool-val">true</span>;
}
}
<span class="kw">let</span> <span class="ident">show</span> <span class="op">=</span> (<span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;highway&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">rank</span> <span class="op">=</span><span class="op">=</span> <span class="ident">RoadRank::Highway</span>)
<span class="op">|</span><span class="op">|</span> (<span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;major street&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">rank</span> <span class="op">=</span><span class="op">=</span> <span class="ident">RoadRank::Arterial</span>)
<span class="op">|</span><span class="op">|</span> (<span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;minor street&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">rank</span> <span class="op">=</span><span class="op">=</span> <span class="ident">RoadRank::Local</span>)
<span class="op">|</span><span class="op">|</span> (<span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;trail&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">r</span>.<span class="ident">is_cycleway</span>())
<span class="op">|</span><span class="op">|</span> (<span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;protected bike lane&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">bike_lane</span> <span class="op">&amp;&amp;</span> <span class="ident">buffer</span>)
<span class="op">|</span><span class="op">|</span> (<span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;painted bike lane&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">bike_lane</span> <span class="op">&amp;&amp;</span> <span class="op">!</span><span class="ident">buffer</span>)
<span class="op">|</span><span class="op">|</span> (<span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;greenway&quot;</span> <span class="op">&amp;&amp;</span> <span class="ident">bike_network::is_greenway</span>(<span class="ident">r</span>));
<span class="kw">if</span> <span class="ident">show</span> {
<span class="comment">// TODO If it&#39;s a bike element, should probably thicken for the unzoomed scale...</span>
<span class="comment">// the maximum amount?</span>
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">Color::CYAN</span>, <span class="ident">r</span>.<span class="ident">get_thick_polygon</span>(<span class="kw-2">&amp;</span><span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>));
}
}
<span class="self">self</span>.<span class="ident">road_types</span>.<span class="ident">insert</span>(<span class="ident">name</span>.<span class="ident">to_string</span>(), <span class="ident">ctx</span>.<span class="ident">upload</span>(<span class="ident">batch</span>));
}
} }
<span class="kw">fn</span> <span class="ident">make_zoom_controls</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Widget</span> { <span class="kw">fn</span> <span class="ident">make_zoom_controls</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Widget</span> {
@ -712,75 +763,6 @@
]) ])
} }
<span class="kw">fn</span> <span class="ident">make_legend</span>(
<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>,
<span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>,
<span class="ident">bike_network</span>: <span class="ident">bool</span>,
<span class="ident">labels</span>: <span class="ident">bool</span>,
<span class="ident">elevation</span>: <span class="ident">bool</span>,
<span class="ident">steep_streets</span>: <span class="ident">bool</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Widget</span> {
<span class="ident">Widget::col</span>(<span class="macro">vec!</span>[
<span class="ident">Widget::custom_row</span>(<span class="macro">vec!</span>[
<span class="comment">// TODO Looks too close to access restrictions</span>
<span class="ident">legend_item</span>(<span class="ident">ctx</span>, <span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">unzoomed_highway</span>, <span class="string">&quot;highway&quot;</span>),
<span class="ident">legend_item</span>(<span class="ident">ctx</span>, <span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">unzoomed_arterial</span>, <span class="string">&quot;major street&quot;</span>),
<span class="ident">legend_item</span>(<span class="ident">ctx</span>, <span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">unzoomed_residential</span>, <span class="string">&quot;minor street&quot;</span>),
]),
<span class="ident">Widget::custom_row</span>(<span class="macro">vec!</span>[
<span class="ident">Toggle::checkbox</span>(<span class="ident">ctx</span>, <span class="string">&quot;bike network&quot;</span>, <span class="ident">Key::B</span>, <span class="ident">bike_network</span>),
<span class="ident">legend_item</span>(<span class="ident">ctx</span>, <span class="kw-2">*</span><span class="ident">bike_network::DEDICATED_TRAIL</span>, <span class="string">&quot;trail&quot;</span>),
<span class="ident">legend_item</span>(
<span class="ident">ctx</span>,
<span class="kw-2">*</span><span class="ident">bike_network::PROTECTED_BIKE_LANE</span>,
<span class="string">&quot;protected bike lane&quot;</span>,
),
<span class="ident">legend_item</span>(<span class="ident">ctx</span>, <span class="kw-2">*</span><span class="ident">bike_network::PAINTED_BIKE_LANE</span>, <span class="string">&quot;painted bike lane&quot;</span>),
<span class="ident">legend_item</span>(<span class="ident">ctx</span>, <span class="kw-2">*</span><span class="ident">bike_network::GREENWAY</span>, <span class="string">&quot;greenway&quot;</span>),
]),
<span class="comment">// TODO Distinguish door-zone bike lanes?</span>
<span class="comment">// TODO Call out bike turning boxes?</span>
<span class="comment">// TODO Call out bike signals?</span>
<span class="ident">Toggle::checkbox</span>(<span class="ident">ctx</span>, <span class="string">&quot;road labels&quot;</span>, <span class="ident">Key::L</span>, <span class="ident">labels</span>),
<span class="ident">Widget::row</span>(<span class="macro">vec!</span>[
<span class="ident">Toggle::checkbox</span>(<span class="ident">ctx</span>, <span class="string">&quot;elevation&quot;</span>, <span class="ident">Key::E</span>, <span class="ident">elevation</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_plain</span>
.<span class="ident">icon</span>(<span class="string">&quot;system/assets/tools/info.svg&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;about the elevation data&quot;</span>)
.<span class="ident">centered_vert</span>(),
<span class="ident">Text::new</span>()
.<span class="ident">into_widget</span>(<span class="ident">ctx</span>)
.<span class="ident">named</span>(<span class="string">&quot;current elevation&quot;</span>)
.<span class="ident">centered_vert</span>(),
]),
<span class="ident">Widget::row</span>(<span class="macro">vec!</span>[
<span class="ident">Toggle::checkbox</span>(<span class="ident">ctx</span>, <span class="string">&quot;steep streets&quot;</span>, <span class="ident">Key::S</span>, <span class="ident">steep_streets</span>),
<span class="comment">// A placeholder</span>
<span class="ident">Text::new</span>().<span class="ident">into_widget</span>(<span class="ident">ctx</span>).<span class="ident">named</span>(<span class="string">&quot;steep streets legend&quot;</span>),
]),
<span class="comment">// TODO Probably a collisions layer</span>
])
}
<span class="kw">fn</span> <span class="ident">make_bottom_right_panel</span>(
<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>,
<span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>,
<span class="ident">bike_network</span>: <span class="ident">bool</span>,
<span class="ident">labels</span>: <span class="ident">bool</span>,
<span class="ident">elevation</span>: <span class="ident">bool</span>,
<span class="ident">steep_streets</span>: <span class="ident">bool</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Panel</span> {
<span class="ident">Panel::new_builder</span>(<span class="ident">Widget::col</span>(<span class="macro">vec!</span>[
<span class="ident">make_zoom_controls</span>(<span class="ident">ctx</span>).<span class="ident">align_right</span>().<span class="ident">padding_right</span>(<span class="number">16</span>),
<span class="ident">make_legend</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">bike_network</span>, <span class="ident">labels</span>, <span class="ident">elevation</span>, <span class="ident">steep_streets</span>)
.<span class="ident">padding</span>(<span class="number">16</span>)
.<span class="ident">bg</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">panel_bg</span>),
]))
.<span class="ident">aligned</span>(<span class="ident">HorizontalAlignment::Right</span>, <span class="ident">VerticalAlignment::Bottom</span>)
.<span class="ident">build_custom</span>(<span class="ident">ctx</span>)
}
<span class="kw">fn</span> <span class="ident">legend_batch</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">color</span>: <span class="ident">Color</span>, <span class="ident">txt</span>: <span class="ident">Text</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">GeomBatch</span> { <span class="kw">fn</span> <span class="ident">legend_batch</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">color</span>: <span class="ident">Color</span>, <span class="ident">txt</span>: <span class="ident">Text</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">GeomBatch</span> {
<span class="comment">// TODO Height of the &quot;trail&quot; button is slightly too low!</span> <span class="comment">// TODO Height of the &quot;trail&quot; button is slightly too low!</span>
<span class="comment">// Text with padding and a background color</span> <span class="comment">// Text with padding and a background color</span>