This commit is contained in:
dabreegster 2021-01-23 05:27:47 +00:00
parent eb70cf1519
commit 40a20cc92c
94 changed files with 497 additions and 541 deletions

View File

@ -257,8 +257,8 @@ the event and immediately apply the transition. <a href="#method.panel_changed">
</div><h4 id="method.draw-44" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/sandbox/gameplay/play_scenario.rs.html#454-457" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
</div><h4 id="method.draw_baselayer-43" class="method hidden"><code>fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
</div><h4 id="method.on_destroy-43" class="method hidden"><code>fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
</div></div><h3 id="impl-State%3CApp%3E-44" class="impl"><code class="in-band">impl State&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../game/sandbox/gameplay/struct.FinalScore.html" title="struct game::sandbox::gameplay::FinalScore">FinalScore</a></code><a href="#impl-State%3CApp%3E-44" class="anchor"></a><a class="srclink" href="../../src/game/sandbox/gameplay/mod.rs.html#301-372" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event-44" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../src/game/sandbox/gameplay/mod.rs.html#302-365" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
</div><h4 id="method.draw-45" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/sandbox/gameplay/mod.rs.html#367-371" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
</div></div><h3 id="impl-State%3CApp%3E-44" class="impl"><code class="in-band">impl State&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../game/sandbox/gameplay/struct.FinalScore.html" title="struct game::sandbox::gameplay::FinalScore">FinalScore</a></code><a href="#impl-State%3CApp%3E-44" class="anchor"></a><a class="srclink" href="../../src/game/sandbox/gameplay/mod.rs.html#299-370" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event-44" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../src/game/sandbox/gameplay/mod.rs.html#300-363" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
</div><h4 id="method.draw-45" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/sandbox/gameplay/mod.rs.html#365-369" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
</div><h4 id="method.draw_baselayer-44" class="method hidden"><code>fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
</div><h4 id="method.on_destroy-44" class="method hidden"><code>fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
</div></div><h3 id="impl-State%3CApp%3E-45" class="impl"><code class="in-band">impl State&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../game/sandbox/misc_tools/struct.TrafficRecorder.html" title="struct game::sandbox::misc_tools::TrafficRecorder">TrafficRecorder</a></code><a href="#impl-State%3CApp%3E-45" class="anchor"></a><a class="srclink" href="../../src/game/sandbox/misc_tools.rs.html#99-150" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event-45" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../src/game/sandbox/misc_tools.rs.html#100-134" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `simplify` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, simplify"><title>game::devtools::story::simplify - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">devtools</a>::<wbr><a href="index.html">story</a></p><script>window.sidebarCurrent = {name: "simplify", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/devtools/story.rs.html#574-591" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">devtools</a>::<wbr><a href="index.html">story</a>::<wbr><a class="fn" href="">simplify</a></span></h1><pre class="rust fn">fn simplify(raw: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>&gt;) -&gt; <a class="struct" href="../../../geom/ring/struct.Ring.html" title="struct geom::ring::Ring">Ring</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/devtools/story.rs.html#572-589" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">devtools</a>::<wbr><a href="index.html">story</a>::<wbr><a class="fn" href="">simplify</a></span></h1><pre class="rust fn">fn simplify(raw: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>&gt;) -&gt; <a class="struct" href="../../../geom/ring/struct.Ring.html" title="struct geom::ring::Ring">Ring</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `story` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, story"><title>game::devtools::story - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module story</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">devtools</a></p><script>window.sidebarCurrent = {name: "story", ty: "mod", relpath: "../"};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/devtools/story.rs.html#1-591" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">game</a>::<wbr><a href="../index.html">devtools</a>::<wbr><a class="mod" href="">story</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/devtools/story.rs.html#1-589" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">game</a>::<wbr><a href="../index.html">devtools</a>::<wbr><a class="mod" href="">story</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.Lasso.html" title="game::devtools::story::Lasso struct">Lasso</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Marker.html" title="game::devtools::story::Marker struct">Marker</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.RecordedStoryMap.html" title="game::devtools::story::RecordedStoryMap struct">RecordedStoryMap</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.StoryMap.html" title="game::devtools::story::StoryMap struct">StoryMap</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.StoryMapEditor.html" title="game::devtools::story::StoryMapEditor struct">StoryMapEditor</a></td><td class="docblock-short"></td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
<table><tr class="module-item"><td><a class="enum" href="enum.Mode.html" title="game::devtools::story::Mode enum">Mode</a></td><td class="docblock-short"></td></tr></table><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
<table><tr class="module-item"><td><a class="fn" href="fn.make_panel.html" title="game::devtools::story::make_panel fn">make_panel</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.simplify.html" title="game::devtools::story::simplify fn">simplify</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

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

View File

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `gameplay` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, gameplay"><title>game::sandbox::gameplay - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module gameplay</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">sandbox</a></p><script>window.sidebarCurrent = {name: "gameplay", ty: "mod", relpath: "../"};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/sandbox/gameplay/mod.rs.html#1-372" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">game</a>::<wbr><a href="../index.html">sandbox</a>::<wbr><a class="mod" href="">gameplay</a></span></h1><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/sandbox/gameplay/mod.rs.html#1-370" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">game</a>::<wbr><a href="../index.html">sandbox</a>::<wbr><a class="mod" href="">gameplay</a></span></h1><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2>
<table><tr><td><code>pub use self::freeform::<a class="fn" href="../../../game/sandbox/gameplay/freeform/fn.spawn_agents_around.html" title="fn game::sandbox::gameplay::freeform::spawn_agents_around">spawn_agents_around</a>;</code></td></tr><tr><td><code>pub use self::tutorial::<a class="struct" href="../../../game/sandbox/gameplay/tutorial/struct.Tutorial.html" title="struct game::sandbox::gameplay::tutorial::Tutorial">Tutorial</a>;</code></td></tr><tr><td><code>pub use self::tutorial::<a class="struct" href="../../../game/sandbox/gameplay/tutorial/struct.TutorialPointer.html" title="struct game::sandbox::gameplay::tutorial::TutorialPointer">TutorialPointer</a>;</code></td></tr><tr><td><code>pub use self::tutorial::<a class="struct" href="../../../game/sandbox/gameplay/tutorial/struct.TutorialState.html" title="struct game::sandbox::gameplay::tutorial::TutorialState">TutorialState</a>;</code></td></tr></table><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
<table><tr class="module-item"><td><a class="mod" href="commute/index.html" title="game::sandbox::gameplay::commute mod">commute</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="fix_traffic_signals/index.html" title="game::sandbox::gameplay::fix_traffic_signals mod">fix_traffic_signals</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="freeform/index.html" title="game::sandbox::gameplay::freeform mod">freeform</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="play_scenario/index.html" title="game::sandbox::gameplay::play_scenario mod">play_scenario</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="tutorial/index.html" title="game::sandbox::gameplay::tutorial mod">tutorial</a></td><td class="docblock-short"></td></tr></table><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.FinalScore.html" title="game::sandbox::gameplay::FinalScore struct">FinalScore</a></td><td class="docblock-short"></td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>

View File

@ -8,8 +8,8 @@
chose_next: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
chose_back_to_challenges: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
}</pre></div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.panel" class="structfield small-section-header"><a href="#structfield.panel" class="anchor field"></a><code>panel: Panel</code></span><span id="structfield.retry" class="structfield small-section-header"><a href="#structfield.retry" class="anchor field"></a><code>retry: <a class="enum" href="../../../game/sandbox/gameplay/enum.GameplayMode.html" title="enum game::sandbox::gameplay::GameplayMode">GameplayMode</a></code></span><span id="structfield.next_mode" class="structfield small-section-header"><a href="#structfield.next_mode" class="anchor field"></a><code>next_mode: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="../../../game/sandbox/gameplay/enum.GameplayMode.html" title="enum game::sandbox::gameplay::GameplayMode">GameplayMode</a>&gt;</code></span><span id="structfield.chose_next" class="structfield small-section-header"><a href="#structfield.chose_next" class="anchor field"></a><code>chose_next: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span id="structfield.chose_back_to_challenges" class="structfield small-section-header"><a href="#structfield.chose_back_to_challenges" class="anchor field"></a><code>chose_back_to_challenges: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../../game/sandbox/gameplay/struct.FinalScore.html" title="struct game::sandbox::gameplay::FinalScore">FinalScore</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/game/sandbox/gameplay/mod.rs.html#247-299" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;msg: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;mode: <a class="enum" href="../../../game/sandbox/gameplay/enum.GameplayMode.html" title="enum game::sandbox::gameplay::GameplayMode">GameplayMode</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;next_mode: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="../../../game/sandbox/gameplay/enum.GameplayMode.html" title="enum game::sandbox::gameplay::GameplayMode">GameplayMode</a>&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;&gt;</code><a class="srclink" href="../../../src/game/sandbox/gameplay/mod.rs.html#248-298" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-State%3CApp%3E" class="impl"><code class="in-band">impl State&lt;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../../game/sandbox/gameplay/struct.FinalScore.html" title="struct game::sandbox::gameplay::FinalScore">FinalScore</a></code><a href="#impl-State%3CApp%3E" class="anchor"></a><a class="srclink" href="../../../src/game/sandbox/gameplay/mod.rs.html#301-372" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../../src/game/sandbox/gameplay/mod.rs.html#302-365" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
</div><h4 id="method.draw" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../../src/game/sandbox/gameplay/mod.rs.html#367-371" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.panel" class="structfield small-section-header"><a href="#structfield.panel" class="anchor field"></a><code>panel: Panel</code></span><span id="structfield.retry" class="structfield small-section-header"><a href="#structfield.retry" class="anchor field"></a><code>retry: <a class="enum" href="../../../game/sandbox/gameplay/enum.GameplayMode.html" title="enum game::sandbox::gameplay::GameplayMode">GameplayMode</a></code></span><span id="structfield.next_mode" class="structfield small-section-header"><a href="#structfield.next_mode" class="anchor field"></a><code>next_mode: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="../../../game/sandbox/gameplay/enum.GameplayMode.html" title="enum game::sandbox::gameplay::GameplayMode">GameplayMode</a>&gt;</code></span><span id="structfield.chose_next" class="structfield small-section-header"><a href="#structfield.chose_next" class="anchor field"></a><code>chose_next: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span id="structfield.chose_back_to_challenges" class="structfield small-section-header"><a href="#structfield.chose_back_to_challenges" class="anchor field"></a><code>chose_back_to_challenges: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../../game/sandbox/gameplay/struct.FinalScore.html" title="struct game::sandbox::gameplay::FinalScore">FinalScore</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/game/sandbox/gameplay/mod.rs.html#247-297" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;msg: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;mode: <a class="enum" href="../../../game/sandbox/gameplay/enum.GameplayMode.html" title="enum game::sandbox::gameplay::GameplayMode">GameplayMode</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;next_mode: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="../../../game/sandbox/gameplay/enum.GameplayMode.html" title="enum game::sandbox::gameplay::GameplayMode">GameplayMode</a>&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;&gt;</code><a class="srclink" href="../../../src/game/sandbox/gameplay/mod.rs.html#248-296" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-State%3CApp%3E" class="impl"><code class="in-band">impl State&lt;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../../game/sandbox/gameplay/struct.FinalScore.html" title="struct game::sandbox::gameplay::FinalScore">FinalScore</a></code><a href="#impl-State%3CApp%3E" class="anchor"></a><a class="srclink" href="../../../src/game/sandbox/gameplay/mod.rs.html#299-370" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../../src/game/sandbox/gameplay/mod.rs.html#300-363" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
</div><h4 id="method.draw" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../../src/game/sandbox/gameplay/mod.rs.html#365-369" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
</div><h4 id="method.draw_baselayer" class="method hidden"><code>fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
</div><h4 id="method.on_destroy" class="method hidden"><code>fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../../game/sandbox/gameplay/struct.FinalScore.html" title="struct game::sandbox::gameplay::FinalScore">FinalScore</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../../game/sandbox/gameplay/struct.FinalScore.html" title="struct game::sandbox::gameplay::FinalScore">FinalScore</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../../game/sandbox/gameplay/struct.FinalScore.html" title="struct game::sandbox::gameplay::FinalScore">FinalScore</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../../game/sandbox/gameplay/struct.FinalScore.html" title="struct game::sandbox::gameplay::FinalScore">FinalScore</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../../game/sandbox/gameplay/struct.FinalScore.html" title="struct game::sandbox::gameplay::FinalScore">FinalScore</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>

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 `speed` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, speed"><title>game::sandbox::speed - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module speed</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></div><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">sandbox</a></p><script>window.sidebarCurrent = {name: "speed", ty: "mod", relpath: "../"};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/sandbox/speed.rs.html#1-452" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">game</a>::<wbr><a href="../index.html">sandbox</a>::<wbr><a class="mod" href="">speed</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/sandbox/speed.rs.html#1-446" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">game</a>::<wbr><a href="../index.html">sandbox</a>::<wbr><a class="mod" href="">speed</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.SpeedControls.html" title="game::sandbox::speed::SpeedControls struct">SpeedControls</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.TimePanel.html" title="game::sandbox::speed::TimePanel struct">TimePanel</a></td><td class="docblock-short"></td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
<table><tr class="module-item"><td><a class="enum" href="enum.SpeedSetting.html" title="game::sandbox::speed::SpeedSetting enum">SpeedSetting</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `download` fn in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, download"><title>map_gui::tools::updater::download - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">updater</a></p><script>window.sidebarCurrent = {name: "download", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#192-205" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">updater</a>::<wbr><a class="fn" href="">download</a></span></h1><pre class="rust fn">fn download(url: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, local_path: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.37/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_gui";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#188-201" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">updater</a>::<wbr><a class="fn" href="">download</a></span></h1><pre class="rust fn">fn download(url: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, local_path: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.37/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_gui";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `prettyprint_bytes` fn in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, prettyprint_bytes"><title>map_gui::tools::updater::prettyprint_bytes - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">updater</a></p><script>window.sidebarCurrent = {name: "prettyprint_bytes", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#124-134" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">updater</a>::<wbr><a class="fn" href="">prettyprint_bytes</a></span></h1><pre class="rust fn">fn prettyprint_bytes(bytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_gui";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#120-130" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">updater</a>::<wbr><a class="fn" href="">prettyprint_bytes</a></span></h1><pre class="rust fn">fn prettyprint_bytes(bytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_gui";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `size_per_city` fn in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, size_per_city"><title>map_gui::tools::updater::size_per_city - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">updater</a></p><script>window.sidebarCurrent = {name: "size_per_city", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#107-122" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">updater</a>::<wbr><a class="fn" href="">size_per_city</a></span></h1><pre class="rust fn">fn size_per_city(manifest: &amp;<a class="struct" href="../../../abstio/abst_data/struct.Manifest.html" title="struct abstio::abst_data::Manifest">Manifest</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_gui";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#103-118" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">updater</a>::<wbr><a class="fn" href="">size_per_city</a></span></h1><pre class="rust fn">fn size_per_city(manifest: &amp;<a class="struct" href="../../../abstio/abst_data/struct.Manifest.html" title="struct abstio::abst_data::Manifest">Manifest</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_gui";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `sync` fn in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, sync"><title>map_gui::tools::updater::sync - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">updater</a></p><script>window.sidebarCurrent = {name: "sync", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#138-189" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">updater</a>::<wbr><a class="fn" href="">sync</a></span></h1><pre class="rust fn">fn sync(timer: &amp;mut <a class="struct" href="../../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a>&lt;'_&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_gui";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#134-185" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">updater</a>::<wbr><a class="fn" href="">sync</a></span></h1><pre class="rust fn">fn sync(timer: &amp;mut <a class="struct" href="../../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a>&lt;'_&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_gui";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `updater` mod in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, updater"><title>map_gui::tools::updater - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module updater</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#constants">Constants</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a></p><script>window.sidebarCurrent = {name: "updater", ty: "mod", relpath: "../"};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#1-205" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a class="mod" href="">updater</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#1-201" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a class="mod" href="">updater</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.Picker.html" title="map_gui::tools::updater::Picker struct">Picker</a></td><td class="docblock-short"></td></tr></table><h2 id="constants" class="section-header"><a href="#constants">Constants</a></h2>
<table><tr class="module-item"><td><a class="constant" href="constant.NEXT_RELEASE.html" title="map_gui::tools::updater::NEXT_RELEASE constant">NEXT_RELEASE</a></td><td class="docblock-short"></td></tr></table><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
<table><tr class="module-item"><td><a class="fn" href="fn.download.html" title="map_gui::tools::updater::download fn">download</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.prettyprint_bytes.html" title="map_gui::tools::updater::prettyprint_bytes fn">prettyprint_bytes</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.size_per_city.html" title="map_gui::tools::updater::size_per_city fn">size_per_city</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.sync.html" title="map_gui::tools::updater::sync fn">sync</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_gui";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -5,8 +5,8 @@
panel: Panel,
on_load: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A) -&gt; Transition&lt;A&gt;&gt;&gt;,
}</pre></div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.panel" class="structfield small-section-header"><a href="#structfield.panel" class="anchor field"></a><code>panel: Panel</code></span><span id="structfield.on_load" class="structfield small-section-header"><a href="#structfield.on_load" class="anchor field"></a><code>on_load: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A) -&gt; Transition&lt;A&gt;&gt;&gt;</code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl&lt;A:&nbsp;<a class="trait" href="../../../map_gui/trait.AppLike.html" title="trait map_gui::AppLike">AppLike</a> + 'static&gt; <a class="struct" href="../../../map_gui/tools/updater/struct.Picker.html" title="struct map_gui::tools::updater::Picker">Picker</a>&lt;A&gt;</code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#24-62" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;on_load: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A) -&gt; Transition&lt;A&gt;&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;A&gt;&gt;</code><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#25-61" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-State%3CA%3E" class="impl"><code class="in-band">impl&lt;A:&nbsp;<a class="trait" href="../../../map_gui/trait.AppLike.html" title="trait map_gui::AppLike">AppLike</a> + 'static&gt; State&lt;A&gt; for <a class="struct" href="../../../map_gui/tools/updater/struct.Picker.html" title="struct map_gui::tools::updater::Picker">Picker</a>&lt;A&gt;</code><a href="#impl-State%3CA%3E" class="anchor"></a><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#64-104" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A) -&gt; Transition&lt;A&gt;</code><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#65-99" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
</div><h4 id="method.draw" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, _: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>A)</code><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#101-103" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.panel" class="structfield small-section-header"><a href="#structfield.panel" class="anchor field"></a><code>panel: Panel</code></span><span id="structfield.on_load" class="structfield small-section-header"><a href="#structfield.on_load" class="anchor field"></a><code>on_load: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A) -&gt; Transition&lt;A&gt;&gt;&gt;</code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl&lt;A:&nbsp;<a class="trait" href="../../../map_gui/trait.AppLike.html" title="trait map_gui::AppLike">AppLike</a> + 'static&gt; <a class="struct" href="../../../map_gui/tools/updater/struct.Picker.html" title="struct map_gui::tools::updater::Picker">Picker</a>&lt;A&gt;</code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#24-58" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;on_load: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A) -&gt; Transition&lt;A&gt;&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;A&gt;&gt;</code><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#25-57" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-State%3CA%3E" class="impl"><code class="in-band">impl&lt;A:&nbsp;<a class="trait" href="../../../map_gui/trait.AppLike.html" title="trait map_gui::AppLike">AppLike</a> + 'static&gt; State&lt;A&gt; for <a class="struct" href="../../../map_gui/tools/updater/struct.Picker.html" title="struct map_gui::tools::updater::Picker">Picker</a>&lt;A&gt;</code><a href="#impl-State%3CA%3E" class="anchor"></a><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#60-100" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A) -&gt; Transition&lt;A&gt;</code><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#61-95" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
</div><h4 id="method.draw" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, _: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>A)</code><a class="srclink" href="../../../src/map_gui/tools/updater.rs.html#97-99" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
</div><h4 id="method.draw_baselayer" class="method hidden"><code>fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
</div><h4 id="method.on_destroy" class="method hidden"><code>fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl&lt;A&gt; !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../../map_gui/tools/updater/struct.Picker.html" title="struct map_gui::tools::updater::Picker">Picker</a>&lt;A&gt;</code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl&lt;A&gt; !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../../map_gui/tools/updater/struct.Picker.html" title="struct map_gui::tools::updater::Picker">Picker</a>&lt;A&gt;</code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl&lt;A&gt; !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../../map_gui/tools/updater/struct.Picker.html" title="struct map_gui::tools::updater::Picker">Picker</a>&lt;A&gt;</code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl&lt;A&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../../map_gui/tools/updater/struct.Picker.html" title="struct map_gui::tools::updater::Picker">Picker</a>&lt;A&gt;</code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl&lt;A&gt; !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../../map_gui/tools/updater/struct.Picker.html" title="struct map_gui::tools::updater::Picker">Picker</a>&lt;A&gt;</code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>

File diff suppressed because one or more lines are too long

View File

@ -235,7 +235,7 @@
)
.<span class="ident">flex_wrap</span>(<span class="ident">ctx</span>, <span class="ident">Percent</span>::<span class="ident">int</span>(<span class="number">50</span>)),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Search&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Search&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
]))
@ -353,7 +353,7 @@
)
.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Back&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Back&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Escape</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
]))

View File

@ -846,7 +846,7 @@
<span class="ident">rows</span>.<span class="ident">push</span>(<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="string">&quot;Map:&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_popup_light</span>(<span class="ident">nice_map_name</span>(<span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_name</span>()))
.<span class="ident">btn_outline_light_popup</span>(<span class="ident">nice_map_name</span>(<span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_name</span>()))
.<span class="ident">hotkey</span>(<span class="ident">lctrl</span>(<span class="ident">Key</span>::<span class="ident">L</span>))
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;change map&quot;</span>),
]));
@ -887,7 +887,7 @@
<span class="kw">for</span> (<span class="ident">amenity</span>, <span class="ident">buildings</span>) <span class="kw">in</span> <span class="ident">isochrone</span>.<span class="ident">amenities_reachable</span>.<span class="ident">borrow</span>() {
<span class="ident">rows</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;{}: {}&quot;</span>, <span class="ident">amenity</span>, <span class="ident">buildings</span>.<span class="ident">len</span>()))
.<span class="ident">btn_outline_light_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;{}: {}&quot;</span>, <span class="ident">amenity</span>, <span class="ident">buildings</span>.<span class="ident">len</span>()))
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;businesses: {}&quot;</span>, <span class="ident">amenity</span>)),
);
}
@ -898,7 +898,7 @@
<span class="ident">rows</span>.<span class="ident">push</span>(<span class="ident">options_to_controls</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="ident">isochrone</span>.<span class="ident">options</span>));
<span class="ident">rows</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_light_text</span>(<span class="string">&quot;Find your perfect home&quot;</span>)
.<span class="ident">btn_solid_light_text</span>(<span class="string">&quot;Find your perfect home&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
);
<span class="ident">rows</span>.<span class="ident">push</span>(<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[

View File

@ -459,7 +459,7 @@
<span class="ident">Widget</span>::<span class="ident">custom_col</span>(<span class="macro">vec</span><span class="macro">!</span>[
(<span class="ident">make_task</span>)(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_light_text</span>(<span class="string">&quot;Start&quot;</span>)
.<span class="ident">btn_solid_light_text</span>(<span class="string">&quot;Start&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
.<span class="ident">centered_horiz</span>()
@ -518,7 +518,7 @@
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">prev</span>.<span class="ident">margin_right</span>(<span class="number">40</span>), <span class="ident">next</span>]).<span class="ident">centered_horiz</span>(),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_dark_text</span>(<span class="string">&quot;Skip cutscene&quot;</span>)
.<span class="ident">btn_outline_dark_text</span>(<span class="string">&quot;Skip cutscene&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
.<span class="ident">centered_horiz</span>(),
])
@ -530,7 +530,7 @@
<span class="comment">// TODO Can&#39;t get this to alignment to work</span>
<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_back_light</span>(<span class="string">&quot;Home&quot;</span>)
.<span class="ident">btn_light_back</span>(<span class="string">&quot;Home&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;quit&quot;</span>)
.<span class="ident">margin_right</span>(<span class="number">100</span>),
<span class="ident">Line</span>(<span class="ident">name</span>).<span class="ident">big_heading_styled</span>().<span class="ident">draw</span>(<span class="ident">ctx</span>),
@ -559,7 +559,7 @@
<span class="ident">Widget</span>::<span class="ident">custom_col</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">contents</span>,
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Okay&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Okay&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">hotkeys</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">Key</span>::<span class="ident">Escape</span>, <span class="ident">Key</span>::<span class="ident">Space</span>, <span class="ident">Key</span>::<span class="ident">Enter</span>]))
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
.<span class="ident">centered_horiz</span>()

View File

@ -441,7 +441,7 @@
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">links</span> <span class="op">=</span> <span class="ident">BTreeMap</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">master_col</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_back_light</span>(<span class="string">&quot;Home&quot;</span>)
.<span class="ident">btn_light_back</span>(<span class="string">&quot;Home&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Escape</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;back&quot;</span>)
.<span class="ident">align_left</span>(),
@ -452,7 +452,7 @@
.<span class="ident">draw</span>(<span class="ident">ctx</span>)
.<span class="ident">centered_horiz</span>(),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Introduction and tutorial&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Introduction and tutorial&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
.<span class="ident">centered_horiz</span>()
.<span class="ident">bg</span>(<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">panel_bg</span>)
@ -469,7 +469,7 @@
.<span class="ident">unwrap_or</span>(<span class="bool-val">false</span>);
<span class="ident">flex_row</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="kw-2">&amp;</span><span class="ident">name</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&amp;</span><span class="ident">name</span>)
.<span class="ident">disabled</span>(<span class="ident">is_current_stage</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">NUM_KEYS</span>[<span class="ident">idx</span>])
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
@ -497,7 +497,7 @@
{
<span class="ident">col</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="kw-2">&amp;</span><span class="ident">stage</span>.<span class="ident">title</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="kw-2">&amp;</span><span class="ident">stage</span>.<span class="ident">title</span>)
.<span class="ident">disabled</span>(<span class="ident">current</span> <span class="op">=</span><span class="op">=</span> <span class="ident">idx</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
);
@ -523,7 +523,7 @@
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">inner_col</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">txt</span>.<span class="ident">draw</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Start!&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Start!&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
];

View File

@ -234,7 +234,7 @@
<span class="kw">fn</span> <span class="ident">make_tool_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="op">-</span><span class="op">&gt;</span> <span class="ident">Widget</span> {
<span class="kw">let</span> <span class="ident">buttons</span> <span class="op">=</span> <span class="ident">ctx</span>
.<span class="ident">style</span>()
.<span class="ident">btn_primary_light</span>()
.<span class="ident">btn_solid_light</span>()
.<span class="ident">image_dims</span>(<span class="ident">ScreenDims</span>::<span class="ident">square</span>(<span class="number">20.0</span>))
<span class="comment">// the default transparent button background is jarring for these buttons which are floating</span>
<span class="comment">// in a transparent panel.</span>

View File

@ -398,7 +398,7 @@
.<span class="ident">draw</span>(<span class="ident">ctx</span>),
<span class="ident">Widget</span>::<span class="ident">text_entry</span>(<span class="ident">ctx</span>, <span class="ident">String</span>::<span class="ident">new</span>(), <span class="bool-val">true</span>).<span class="ident">named</span>(<span class="string">&quot;input&quot;</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Go!&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Go!&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
]))

View File

@ -919,56 +919,56 @@
<span class="ident">Checkbox</span>::<span class="ident">switch</span>(<span class="ident">ctx</span>, <span class="string">&quot;show route for all agents&quot;</span>, <span class="ident">Key</span>::<span class="ident">R</span>, <span class="bool-val">false</span>),
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;unhide everything&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;unhide everything&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">lctrl</span>(<span class="ident">Key</span>::<span class="ident">H</span>))
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;screenshot everything (for leaflet)&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;screenshot everything (for leaflet)&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;screenshot all of the everything&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;screenshot all of the everything&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;search OSM metadata&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;search OSM metadata&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Slash</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;clear OSM search results&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;clear OSM search results&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Slash</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;save sim state&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;save sim state&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">O</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;load previous sim state&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;load previous sim state&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Y</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;load next sim state&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;load next sim state&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">U</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;pick a savestate to load&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;pick a savestate to load&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;find bad traffic signals&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;find bad traffic signals&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;find degenerate roads&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;find degenerate roads&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;find large intersections&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;find large intersections&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;sim internal stats&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;sim internal stats&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;blocked-by graph&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;blocked-by graph&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">B</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;render to GeoJSON&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;render to GeoJSON&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">G</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
]),

View File

@ -498,7 +498,7 @@
)
.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;load KML file&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;load KML file&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">lctrl</span>(<span class="ident">Key</span>::<span class="ident">L</span>))
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[

View File

@ -213,29 +213,29 @@
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="string">&quot;Change map:&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_popup_light</span>(<span class="ident">nice_map_name</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">btn_outline_light_popup</span>(<span class="ident">nice_map_name</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">hotkey</span>(<span class="ident">lctrl</span>(<span class="ident">Key</span>::<span class="ident">L</span>))
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;change map&quot;</span>),
]),
<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;edit a polygon&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;edit a polygon&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">E</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;draw a polygon&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;draw a polygon&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">P</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;load scenario&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;load scenario&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">W</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;view KML&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;view KML&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">K</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;story maps&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;story maps&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">S</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="kw">if</span> <span class="ident">abstio</span>::<span class="ident">file_exists</span>(<span class="ident">abstio</span>::<span class="ident">path</span>(<span class="macro">format</span><span class="macro">!</span>(
@ -243,7 +243,7 @@
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_city_name</span>()
))) {
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;collisions&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;collisions&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">C</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
} <span class="kw">else</span> {

View File

@ -184,7 +184,7 @@
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_close_widget</span>(<span class="ident">ctx</span>),
]),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;export as an Osmosis polygon filter&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;export as an Osmosis polygon filter&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">X</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
]))

View File

@ -180,7 +180,7 @@
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_close_widget</span>(<span class="ident">ctx</span>),
]),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;popular destinations&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;popular destinations&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">D</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">Text</span>::<span class="ident">from_multiline</span>(<span class="macro">vec</span><span class="macro">!</span>[

View File

@ -590,8 +590,6 @@
<span id="587">587</span>
<span id="588">588</span>
<span id="589">589</span>
<span id="590">590</span>
<span id="591">591</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">serde</span>::{<span class="ident">Deserialize</span>, <span class="ident">Serialize</span>};
@ -908,11 +906,11 @@
<span class="ident">Line</span>(<span class="string">&quot;Story map editor&quot;</span>).<span class="ident">small_heading</span>().<span class="ident">draw</span>(<span class="ident">ctx</span>),
<span class="ident">Widget</span>::<span class="ident">vert_separator</span>(<span class="ident">ctx</span>, <span class="number">30.0</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_popup_light</span>(<span class="kw-2">&amp;</span><span class="ident">story</span>.<span class="ident">name</span>)
.<span class="ident">btn_outline_light_popup</span>(<span class="kw-2">&amp;</span><span class="ident">story</span>.<span class="ident">name</span>)
.<span class="ident">hotkey</span>(<span class="ident">lctrl</span>(<span class="ident">Key</span>::<span class="ident">L</span>))
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;load&quot;</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_light_icon</span>(<span class="string">&quot;system/assets/tools/save.svg&quot;</span>)
.<span class="ident">btn_solid_light_icon</span>(<span class="string">&quot;system/assets/tools/save.svg&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">lctrl</span>(<span class="ident">Key</span>::<span class="ident">S</span>))
.<span class="ident">disabled</span>(<span class="op">!</span><span class="ident">dirty</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;save&quot;</span>),
@ -1106,12 +1104,10 @@
<span class="ident">Line</span>(<span class="string">&quot;Editing marker&quot;</span>).<span class="ident">small_heading</span>().<span class="ident">draw</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_close_widget</span>(<span class="ident">ctx</span>),
]),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;delete&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;delete&quot;</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">Widget</span>::<span class="ident">text_entry</span>(<span class="ident">ctx</span>, <span class="self">self</span>.<span class="ident">event</span>.<span class="ident">clone</span>(), <span class="bool-val">true</span>).<span class="ident">named</span>(<span class="string">&quot;event&quot;</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;confirm&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;confirm&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
]))

View File

@ -411,24 +411,24 @@
<span class="ident">selector</span>.<span class="ident">make_controls</span>(<span class="ident">ctx</span>),
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Edit {} roads&quot;</span>, <span class="ident">selector</span>.<span class="ident">roads</span>.<span class="ident">len</span>()))
.<span class="ident">btn_outline_light_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Edit {} roads&quot;</span>, <span class="ident">selector</span>.<span class="ident">roads</span>.<span class="ident">len</span>()))
.<span class="ident">disabled</span>(<span class="ident">selector</span>.<span class="ident">roads</span>.<span class="ident">is_empty</span>())
.<span class="ident">hotkey</span>(<span class="ident">hotkeys</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">Key</span>::<span class="ident">E</span>, <span class="ident">Key</span>::<span class="ident">Enter</span>]))
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;edit roads&quot;</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(
.<span class="ident">btn_outline_light_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(
<span class="string">&quot;Export {} roads to shared-row&quot;</span>,
<span class="ident">selector</span>.<span class="ident">roads</span>.<span class="ident">len</span>()
))
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;export roads to shared-row&quot;</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;export one road to Streetmix&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;export one road to Streetmix&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;export list of roads&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;export list of roads&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Cancel&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Cancel&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Escape</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
])
@ -546,7 +546,7 @@
},
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Finish&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Finish&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()

View File

@ -129,7 +129,7 @@
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">ClusterTrafficSignalEditor</span> {
<span class="ident">panel</span>: <span class="ident">Panel</span>::<span class="ident">new</span>(<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">ctx</span>
.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Finish&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Finish&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Escape</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)]))
.<span class="ident">aligned</span>(<span class="ident">HorizontalAlignment</span>::<span class="ident">Center</span>, <span class="ident">VerticalAlignment</span>::<span class="ident">Top</span>)

View File

@ -331,7 +331,7 @@
<span class="string">&quot;Type of lane&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="ident">row</span>).<span class="ident">centered</span>(),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;reverse direction&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;reverse direction&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">F</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
{
@ -348,11 +348,11 @@
])
},
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Change access restrictions&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Change access restrictions&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">A</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Finish&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Finish&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Escape</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
];

View File

@ -1310,21 +1310,21 @@
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="kw">if</span> <span class="ident">discard</span> {
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_destructive_text</span>(<span class="string">&quot;Discard proposal&quot;</span>)
.<span class="ident">btn_solid_destructive_text</span>(<span class="string">&quot;Discard proposal&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
} <span class="kw">else</span> {
<span class="ident">Widget</span>::<span class="ident">nothing</span>()
},
<span class="kw">if</span> <span class="ident">cancel</span>.<span class="ident">is_some</span>() {
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Cancel&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Cancel&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Escape</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
} <span class="kw">else</span> {
<span class="ident">Widget</span>::<span class="ident">nothing</span>()
},
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Save&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Save&quot;</span>)
.<span class="ident">disabled</span>(<span class="bool-val">true</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
])
@ -1345,7 +1345,7 @@
<span class="ident">ctx</span>,
<span class="string">&quot;Save&quot;</span>,
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Save&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Save&quot;</span>)
.<span class="ident">disabled</span>(<span class="bool-val">true</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
);
@ -1358,7 +1358,7 @@
<span class="ident">ctx</span>,
<span class="string">&quot;Save&quot;</span>,
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Save&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Save&quot;</span>)
.<span class="ident">disabled</span>(<span class="bool-val">true</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
);
@ -1374,7 +1374,7 @@
<span class="ident">ctx</span>,
<span class="string">&quot;Save&quot;</span>,
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Save&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Save&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
);
@ -1451,7 +1451,7 @@
<span class="kw">if</span> <span class="ident">MapEdits</span>::<span class="ident">load</span>(<span class="kw-2">&amp;</span><span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>, <span class="ident">path</span>.<span class="ident">clone</span>(), <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">Timer</span>::<span class="ident">throwaway</span>()).<span class="ident">is_ok</span>() {
<span class="ident">proposals</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="kw-2">&amp;</span><span class="ident">name</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="kw-2">&amp;</span><span class="ident">name</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="ident">path</span>),
);
}
@ -1465,7 +1465,7 @@
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_close_widget</span>(<span class="ident">ctx</span>),
]),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Start over with blank proposal&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Start over with blank proposal&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="ident">your_edits</span>), <span class="ident">Widget</span>::<span class="ident">col</span>(<span class="ident">proposals</span>)]).<span class="ident">evenly_spaced</span>(),
]))
@ -1554,7 +1554,7 @@
.<span class="ident">draw</span>(<span class="ident">ctx</span>)
.<span class="ident">centered_horiz</span>(),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(
.<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(
<span class="string">&quot;Finish &amp; resume from {}&quot;</span>,
<span class="ident">app</span>.<span class="ident">primary</span>
.<span class="ident">suspended_sim</span>
@ -1684,7 +1684,7 @@
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">col</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_popup_light</span>(<span class="kw-2">&amp;</span><span class="ident">edits</span>.<span class="ident">edits_name</span>)
.<span class="ident">btn_outline_light_popup</span>(<span class="kw-2">&amp;</span><span class="ident">edits</span>.<span class="ident">edits_name</span>)
.<span class="ident">hotkey</span>(<span class="ident">lctrl</span>(<span class="ident">Key</span>::<span class="ident">P</span>))
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;manage proposals&quot;</span>),
<span class="string">&quot;autosaved&quot;</span>
@ -1769,11 +1769,11 @@
<span class="string">&quot;Are you sure you want to discard changes you made?&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Cancel&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Cancel&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Escape</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_destructive_text</span>(<span class="string">&quot;Yes, discard&quot;</span>)
.<span class="ident">btn_solid_destructive_text</span>(<span class="string">&quot;Yes, discard&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
])
.<span class="ident">align_right</span>(),

View File

@ -121,7 +121,7 @@
<span class="ident">Spinner</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, (<span class="number">1</span>, <span class="number">120</span>), <span class="number">60</span>).<span class="ident">named</span>(<span class="string">&quot;freq_mins&quot;</span>),
]),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Apply&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Apply&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
]))

View File

@ -285,7 +285,7 @@
<span class="kw">let</span> <span class="ident">panel</span> <span class="op">=</span> <span class="ident">Panel</span>::<span class="ident">new</span>(<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Line</span>(<span class="string">&quot;Stop sign editor&quot;</span>).<span class="ident">small_heading</span>().<span class="ident">draw</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;reset to default&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;reset to default&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">R</span>)
.<span class="ident">disabled</span>(
<span class="kw-2">&amp;</span><span class="ident">ControlStopSign</span>::<span class="ident">new</span>(<span class="kw-2">&amp;</span><span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>, <span class="ident">id</span>)
@ -293,14 +293,14 @@
)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;close intersection for construction&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;close intersection for construction&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">C</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;convert to traffic signal&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;convert to traffic signal&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Finish&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Finish&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Escape</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
]))

View File

@ -396,7 +396,7 @@
.<span class="ident">secondary</span>()
.<span class="ident">draw</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Apply&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Apply&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
]))

View File

@ -1431,11 +1431,11 @@
<span class="kw">fn</span> <span class="ident">make_top_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">can_undo</span>: <span class="ident">bool</span>, <span class="ident">can_redo</span>: <span class="ident">bool</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Panel</span> {
<span class="kw">let</span> <span class="ident">row</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Finish&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Finish&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Preview&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Preview&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">lctrl</span>(<span class="ident">Key</span>::<span class="ident">P</span>))
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
(<span class="kw">if</span> <span class="ident">can_undo</span> {
@ -1483,7 +1483,7 @@
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="ident">row</span>),
<span class="kw">if</span> <span class="ident">app</span>.<span class="ident">opts</span>.<span class="ident">dev</span> {
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Export&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Export&quot;</span>)
.<span class="ident">tooltip</span>(<span class="ident">Text</span>::<span class="ident">from_multiline</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Line</span>(<span class="string">&quot;This will create a JSON file in traffic_signal_data/.&quot;</span>).<span class="ident">small</span>(),
<span class="ident">Line</span>(
@ -1556,14 +1556,14 @@
<span class="kw">if</span> <span class="ident">members</span>.<span class="ident">len</span>() <span class="op">=</span><span class="op">=</span> <span class="number">1</span> {
<span class="ident">col</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Edit entire signal&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Edit entire signal&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">E</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
);
} <span class="kw">else</span> {
<span class="ident">col</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Tune offsets between signals&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Tune offsets between signals&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">O</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
);
@ -1581,12 +1581,12 @@
<span class="kw">let</span> <span class="ident">up_button</span> <span class="op">=</span> <span class="ident">ctx</span>
.<span class="ident">style</span>()
.<span class="ident">btn_primary_light_icon</span>(<span class="string">&quot;../widgetry/icons/arrow_up.svg&quot;</span>)
.<span class="ident">btn_solid_light_icon</span>(<span class="string">&quot;../widgetry/icons/arrow_up.svg&quot;</span>)
.<span class="ident">disabled</span>(<span class="ident">idx</span> <span class="op">=</span><span class="op">=</span> <span class="number">0</span>);
<span class="kw">let</span> <span class="ident">down_button</span> <span class="op">=</span> <span class="ident">ctx</span>
.<span class="ident">style</span>()
.<span class="ident">btn_primary_light_icon</span>(<span class="string">&quot;../widgetry/icons/arrow_down.svg&quot;</span>)
.<span class="ident">btn_solid_light_icon</span>(<span class="string">&quot;../widgetry/icons/arrow_down.svg&quot;</span>)
.<span class="ident">disabled</span>(<span class="ident">idx</span> <span class="op">=</span><span class="op">=</span> <span class="ident">canonical_signal</span>.<span class="ident">stages</span>.<span class="ident">len</span>() <span class="op">-</span> <span class="number">1</span>);
<span class="kw">let</span> <span class="ident">stage_controls</span> <span class="op">=</span> <span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
@ -1622,7 +1622,7 @@
},
<span class="kw">if</span> <span class="ident">canonical_signal</span>.<span class="ident">stages</span>.<span class="ident">len</span>() <span class="op">&gt;</span> <span class="number">1</span> {
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_destructive_icon</span>(<span class="string">&quot;system/assets/tools/trash.svg&quot;</span>)
.<span class="ident">btn_solid_destructive_icon</span>(<span class="string">&quot;system/assets/tools/trash.svg&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;delete stage {}&quot;</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>))
.<span class="ident">align_right</span>()
} <span class="kw">else</span> {
@ -1643,7 +1643,7 @@
<span class="ident">col</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Add a new stage&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Add a new stage&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
.<span class="ident">centered_horiz</span>(),
);

View File

@ -563,7 +563,7 @@
.<span class="ident">named</span>(<span class="string">&quot;offset&quot;</span>),
]),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Update offset&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Update offset&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
]))

View File

@ -237,7 +237,7 @@
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Edit {} signals&quot;</span>, <span class="ident">num</span>),
};
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="kw-2">&amp;</span><span class="ident">title</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&amp;</span><span class="ident">title</span>)
.<span class="ident">disabled</span>(<span class="ident">num</span> <span class="op">=</span><span class="op">=</span> <span class="number">0</span>)
.<span class="ident">hotkey</span>(<span class="ident">hotkeys</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">Key</span>::<span class="ident">Enter</span>, <span class="ident">Key</span>::<span class="ident">E</span>]))
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;edit&quot;</span>)

View File

@ -154,7 +154,7 @@
<span class="ident">panel</span>: <span class="ident">Panel</span>::<span class="ident">new</span>(<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="string">&quot;Previewing traffic signal&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;back to editing&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;back to editing&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Escape</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
]))

View File

@ -298,11 +298,11 @@
]),
<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Apply&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Apply&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Cancel&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Cancel&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Escape</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
])

View File

@ -122,7 +122,7 @@
<span class="doccomment">/// The output of `rustdoc -V`</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;rustdoc 1.49.0 (e1884a8e3 2020-12-29)&quot;</span>;
<span class="doccomment">/// The built-time in RFC2822, UTC</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Sat, 23 Jan 2021 05:20:12 +0000&quot;</span>;
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Sat, 23 Jan 2021 05:25:17 +0000&quot;</span>;
<span class="doccomment">/// The target architecture, given by `cfg!(target_arch)`.</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;x86_64&quot;</span>;
<span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>

View File

@ -385,7 +385,7 @@
<span class="kw">if</span> <span class="ident">app</span>.<span class="ident">opts</span>.<span class="ident">dev</span> {
<span class="ident">rows</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_light_text</span>(<span class="string">&quot;Open OSM&quot;</span>)
.<span class="ident">btn_solid_light_text</span>(<span class="string">&quot;Open OSM&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;open {}&quot;</span>, <span class="ident">b</span>.<span class="ident">orig_id</span>)),
);
@ -434,7 +434,7 @@
.<span class="ident">insert</span>(<span class="ident">p</span>.<span class="ident">to_string</span>(), <span class="ident">Tab</span>::<span class="ident">PersonTrips</span>(<span class="ident">p</span>, <span class="ident">BTreeMap</span>::<span class="ident">new</span>()));
<span class="kw">let</span> <span class="ident">widget</span> <span class="op">=</span> <span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_light_text</span>(<span class="kw-2">&amp;</span><span class="ident">p</span>.<span class="ident">to_string</span>())
.<span class="ident">btn_solid_light_text</span>(<span class="kw-2">&amp;</span><span class="ident">p</span>.<span class="ident">to_string</span>())
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>((<span class="ident">t</span>, <span class="ident">mode</span>)) <span class="op">=</span> <span class="ident">next_trip</span> {
<span class="macro">format</span><span class="macro">!</span>(

View File

@ -431,7 +431,7 @@
<span class="kw">let</span> <span class="ident">label</span> <span class="op">=</span> <span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;{} ({})&quot;</span>, <span class="ident">r</span>.<span class="ident">full_name</span>, <span class="ident">r</span>.<span class="ident">id</span>);
<span class="ident">rows</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Route {}&quot;</span>, <span class="ident">r</span>.<span class="ident">short_name</span>))
.<span class="ident">btn_outline_light_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Route {}&quot;</span>, <span class="ident">r</span>.<span class="ident">short_name</span>))
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="ident">label</span>),
);
<span class="ident">details</span>.<span class="ident">hyperlinks</span>.<span class="ident">insert</span>(<span class="ident">label</span>, <span class="ident">Tab</span>::<span class="ident">BusRoute</span>(<span class="ident">r</span>.<span class="ident">id</span>));
@ -511,7 +511,7 @@
<span class="ident">rows</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Serves route {}&quot;</span>, <span class="ident">route</span>.<span class="ident">short_name</span>))
.<span class="ident">btn_outline_light_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Serves route {}&quot;</span>, <span class="ident">route</span>.<span class="ident">short_name</span>))
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
);
<span class="ident">details</span>.<span class="ident">hyperlinks</span>.<span class="ident">insert</span>(
@ -588,7 +588,7 @@
<span class="kw">if</span> <span class="ident">app</span>.<span class="ident">opts</span>.<span class="ident">dev</span> {
<span class="ident">rows</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_light_text</span>(<span class="string">&quot;Open OSM relation&quot;</span>)
.<span class="ident">btn_solid_light_text</span>(<span class="string">&quot;Open OSM relation&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;open {}&quot;</span>, <span class="ident">route</span>.<span class="ident">osm_rel_id</span>)),
);
}
@ -601,7 +601,7 @@
<span class="kw">for</span> (<span class="ident">bus</span>, <span class="kw">_</span>, <span class="kw">_</span>, <span class="ident">pt</span>) <span class="kw">in</span> <span class="ident">buses</span> {
<span class="ident">rows</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="kw-2">&amp;</span><span class="ident">bus</span>.<span class="ident">to_string</span>())
.<span class="ident">btn_outline_light_text</span>(<span class="kw-2">&amp;</span><span class="ident">bus</span>.<span class="ident">to_string</span>())
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
);
<span class="ident">details</span>
@ -700,7 +700,7 @@
{
<span class="ident">rows</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Edit schedule&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Edit schedule&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">E</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;edit {}&quot;</span>, <span class="ident">route</span>.<span class="ident">id</span>)),
);

View File

@ -56,7 +56,7 @@
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">osm_id</span>) <span class="op">=</span> <span class="ident">area</span>.<span class="ident">osm_id</span> {
<span class="ident">rows</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_light_text</span>(<span class="string">&quot;Open in OSM&quot;</span>)
.<span class="ident">btn_solid_light_text</span>(<span class="string">&quot;Open in OSM&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;open {}&quot;</span>, <span class="ident">osm_id</span>)),
);
}

View File

@ -475,7 +475,7 @@
<span class="kw">if</span> <span class="ident">app</span>.<span class="ident">opts</span>.<span class="ident">dev</span> {
<span class="ident">rows</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_light_text</span>(<span class="string">&quot;Open OSM node&quot;</span>)
.<span class="ident">btn_solid_light_text</span>(<span class="string">&quot;Open OSM node&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;open {}&quot;</span>, <span class="ident">i</span>.<span class="ident">orig_id</span>)),
);
}
@ -654,13 +654,13 @@
);
<span class="ident">rows</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Explore demand across all traffic signals&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Explore demand across all traffic signals&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
);
<span class="kw">if</span> <span class="ident">app</span>.<span class="ident">opts</span>.<span class="ident">dev</span> {
<span class="ident">rows</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Where are these agents headed?&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Where are these agents headed?&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;routes across {}&quot;</span>, <span class="ident">id</span>)),
);
}

View File

@ -439,7 +439,7 @@
<span class="ident">rows</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_light_text</span>(<span class="string">&quot;Open OSM way&quot;</span>)
.<span class="ident">btn_solid_light_text</span>(<span class="string">&quot;Open OSM way&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;open {}&quot;</span>, <span class="ident">r</span>.<span class="ident">orig_id</span>.<span class="ident">osm_way_id</span>)),
);

View File

@ -1195,7 +1195,7 @@
<span class="ident">cached_actions</span>.<span class="ident">push</span>(<span class="ident">key</span>);
<span class="kw">let</span> <span class="ident">button</span> <span class="op">=</span> <span class="ident">ctx</span>
.<span class="ident">style</span>()
.<span class="ident">btn_hotkey_light</span>(<span class="kw-2">&amp;</span><span class="ident">label</span>, <span class="ident">key</span>)
.<span class="ident">btn_solid_light_hotkey</span>(<span class="kw-2">&amp;</span><span class="ident">label</span>, <span class="ident">key</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="ident">label</span>);
<span class="ident">col</span>.<span class="ident">push</span>(<span class="ident">button</span>);
}
@ -1516,22 +1516,22 @@
<span class="kw">for</span> (<span class="ident">name</span>, <span class="ident">link</span>) <span class="kw">in</span> <span class="ident">tabs</span> {
<span class="ident">row</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="ident">name</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="ident">name</span>)
<span class="comment">// We use &quot;disabled&quot; to denote &quot;currently selected&quot;, but we want to style it like</span>
<span class="comment">// normal</span>
.<span class="ident">disabled</span>(<span class="ident">current_tab</span>.<span class="ident">variant</span>() <span class="op">=</span><span class="op">=</span> <span class="ident">link</span>.<span class="ident">variant</span>())
.<span class="ident">bg_color</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_primary_dark</span>.<span class="ident">bg</span>, <span class="ident">ControlState</span>::<span class="ident">Disabled</span>)
.<span class="ident">label_color</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_primary_dark</span>.<span class="ident">fg</span>, <span class="ident">ControlState</span>::<span class="ident">Disabled</span>)
.<span class="ident">bg_color</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_solid_dark</span>.<span class="ident">bg</span>, <span class="ident">ControlState</span>::<span class="ident">Disabled</span>)
.<span class="ident">label_color</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_solid_dark</span>.<span class="ident">fg</span>, <span class="ident">ControlState</span>::<span class="ident">Disabled</span>)
.<span class="ident">outline</span>(
<span class="number">2.0</span>,
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_primary_dark</span>.<span class="ident">bg_hover</span>,
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_solid_dark</span>.<span class="ident">bg_hover</span>,
<span class="ident">ControlState</span>::<span class="ident">Disabled</span>,
)
<span class="comment">// Hide the hit area for selectable tabs unless hovered</span>
.<span class="ident">bg_color</span>(<span class="ident">Color</span>::<span class="ident">CLEAR</span>, <span class="ident">ControlState</span>::<span class="ident">Default</span>)
.<span class="ident">outline</span>(<span class="number">0.0</span>, <span class="ident">Color</span>::<span class="ident">CLEAR</span>, <span class="ident">ControlState</span>::<span class="ident">Default</span>)
.<span class="ident">bg_color</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_primary_dark</span>.<span class="ident">bg</span>.<span class="ident">alpha</span>(<span class="number">0.6</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_solid_dark</span>.<span class="ident">bg</span>.<span class="ident">alpha</span>(<span class="number">0.6</span>),
<span class="ident">ControlState</span>::<span class="ident">Hovered</span>,
)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),

View File

@ -140,7 +140,7 @@
<span class="kw">if</span> <span class="ident">app</span>.<span class="ident">opts</span>.<span class="ident">dev</span> {
<span class="ident">rows</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_light_text</span>(<span class="string">&quot;Open OSM&quot;</span>)
.<span class="ident">btn_solid_light_text</span>(<span class="string">&quot;Open OSM&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;open {}&quot;</span>, <span class="ident">pl</span>.<span class="ident">osm_id</span>)),
);
}

View File

@ -889,7 +889,7 @@
.<span class="ident">to_geom</span>(<span class="ident">ctx</span>, <span class="prelude-val">Some</span>(<span class="number">0.3</span>));
<span class="ident">rows</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_light</span>()
.<span class="ident">btn_solid_light</span>()
.<span class="ident">custom_batch</span>(<span class="ident">row_btn</span>.<span class="ident">clone</span>(), <span class="ident">ControlState</span>::<span class="ident">Default</span>)
.<span class="ident">custom_batch</span>(
<span class="ident">row_btn</span>.<span class="ident">color</span>(<span class="ident">RewriteColor</span>::<span class="ident">Change</span>(<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">inner_panel</span>, <span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">hovering</span>)),
@ -1005,7 +1005,7 @@
<span class="kw">if</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">sim</span>.<span class="ident">lookup_parked_car</span>(<span class="ident">v</span>.<span class="ident">id</span>).<span class="ident">is_some</span>() {
<span class="ident">rows</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Owner of {} (parked)&quot;</span>, <span class="ident">v</span>.<span class="ident">id</span>))
.<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Owner of {} (parked)&quot;</span>, <span class="ident">v</span>.<span class="ident">id</span>))
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
);
<span class="ident">details</span>
@ -1129,7 +1129,7 @@
<span class="ident">rows</span>.<span class="ident">push</span>(<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;{})&quot;</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>).<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">centered_vert</span>(),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="kw-2">&amp;</span><span class="ident">person</span>.<span class="ident">to_string</span>())
.<span class="ident">btn_outline_light_text</span>(<span class="kw-2">&amp;</span><span class="ident">person</span>.<span class="ident">to_string</span>())
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
]));
<span class="ident">details</span>.<span class="ident">hyperlinks</span>.<span class="ident">insert</span>(
@ -1188,7 +1188,7 @@
<span class="kw">let</span> <span class="ident">p</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">sim</span>.<span class="ident">get_owner_of_car</span>(<span class="ident">id</span>).<span class="ident">unwrap</span>();
<span class="ident">rows</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Owned by {}&quot;</span>, <span class="ident">p</span>))
.<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Owned by {}&quot;</span>, <span class="ident">p</span>))
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
);
<span class="ident">details</span>.<span class="ident">hyperlinks</span>.<span class="ident">insert</span>(

View File

@ -1169,7 +1169,7 @@
);
<span class="ident">col</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_light</span>()
.<span class="ident">btn_solid_light</span>()
.<span class="ident">label_styled_text</span>(
<span class="ident">Text</span>::<span class="ident">from_all</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Line</span>(<span class="string">&quot;After / &quot;</span>),
@ -1190,7 +1190,7 @@
);
<span class="ident">col</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_light</span>()
.<span class="ident">btn_solid_light</span>()
.<span class="ident">label_styled_text</span>(
<span class="ident">Text</span>::<span class="ident">from_all</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Line</span>(<span class="string">&quot;After / &quot;</span>).<span class="ident">secondary</span>(),

View File

@ -357,7 +357,7 @@
};
<span class="kw">let</span> <span class="ident">btn</span> <span class="op">=</span> <span class="op">|</span><span class="ident">name</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>, <span class="ident">key</span><span class="op">|</span> {
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_hotkey_light</span>(<span class="ident">name</span>, <span class="ident">key</span>)
.<span class="ident">btn_solid_light_hotkey</span>(<span class="ident">name</span>, <span class="ident">key</span>)
.<span class="ident">disabled</span>(<span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="ident">current</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="ident">name</span>)
};

View File

@ -635,7 +635,7 @@
<span class="comment">// TODO that nicer font</span>
<span class="comment">// TODO Any key</span>
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Play&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Play&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">hotkeys</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">Key</span>::<span class="ident">Space</span>, <span class="ident">Key</span>::<span class="ident">Enter</span>]))
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;start game&quot;</span>),
])
@ -689,7 +689,7 @@
<span class="ident">Widget</span>::<span class="ident">row</span>({
<span class="kw">let</span> <span class="ident">btn_builder</span> <span class="op">=</span> <span class="ident">ctx</span>
.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark</span>()
.<span class="ident">btn_solid_dark</span>()
.<span class="ident">image_dims</span>(<span class="ident">ScreenDims</span>::<span class="ident">new</span>(<span class="number">200.0</span>, <span class="number">100.0</span>))
.<span class="ident">font_size</span>(<span class="number">40</span>)
.<span class="ident">font</span>(<span class="ident">Font</span>::<span class="ident">OverpassBold</span>)
@ -743,7 +743,7 @@
.<span class="ident">centered</span>(),
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Community Proposals&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Community Proposals&quot;</span>)
.<span class="ident">tooltip</span>({
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">txt</span> <span class="op">=</span> <span class="ident">Text</span>::<span class="ident">tooltip</span>(<span class="ident">ctx</span>, <span class="ident">Key</span>::<span class="ident">P</span>, <span class="string">&quot;Community Proposals&quot;</span>);
<span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>(<span class="string">&quot;See existing ideas for improving traffic&quot;</span>).<span class="ident">small</span>());
@ -752,16 +752,16 @@
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">P</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;Community Proposals&quot;</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Internal Dev Tools&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Internal Dev Tools&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">D</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;Internal Dev Tools&quot;</span>),
])
.<span class="ident">centered</span>(),
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;About&quot;</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;About&quot;</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Feedback&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Feedback&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
]),
<span class="ident">built_info</span>::<span class="ident">time</span>().<span class="ident">draw</span>(<span class="ident">ctx</span>),
@ -844,7 +844,7 @@
<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">Box</span><span class="op">&lt;</span><span class="ident">dyn</span> <span class="ident">State</span><span class="op">&lt;</span><span class="ident">App</span><span class="op">&gt;</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">col</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_back_light</span>(<span class="string">&quot;Home&quot;</span>)
.<span class="ident">btn_light_back</span>(<span class="string">&quot;Home&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Escape</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;back&quot;</span>)
.<span class="ident">align_left</span>(),
@ -878,7 +878,7 @@
.<span class="ident">padding</span>(<span class="number">16</span>)
},
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;See full credits&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;See full credits&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
.<span class="ident">centered_horiz</span>(),
];
@ -952,20 +952,20 @@
<span class="kw">if</span> <span class="ident">edits</span>.<span class="ident">proposal_link</span>.<span class="ident">is_some</span>() {
<span class="ident">current_tab</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Read detailed write-up&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Read detailed write-up&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
.<span class="ident">margin_below</span>(<span class="number">10</span>),
);
}
<span class="ident">current_tab</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Try out this proposal&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Try out this proposal&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
);
<span class="ident">buttons</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="kw-2">&amp;</span><span class="ident">edits</span>.<span class="ident">proposal_description</span>[<span class="number">0</span>])
.<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&amp;</span><span class="ident">edits</span>.<span class="ident">proposal_description</span>[<span class="number">0</span>])
.<span class="ident">disabled</span>(<span class="bool-val">true</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
.<span class="ident">margin_below</span>(<span class="number">10</span>),
@ -973,7 +973,7 @@
} <span class="kw">else</span> {
<span class="ident">buttons</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="kw-2">&amp;</span><span class="ident">edits</span>.<span class="ident">proposal_description</span>[<span class="number">0</span>])
.<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&amp;</span><span class="ident">edits</span>.<span class="ident">proposal_description</span>[<span class="number">0</span>])
.<span class="ident">no_tooltip</span>()
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="ident">name</span>)
.<span class="ident">margin_below</span>(<span class="number">10</span>),
@ -1002,7 +1002,7 @@
<span class="ident">proposals</span>,
<span class="ident">panel</span>: <span class="ident">Panel</span>::<span class="ident">new</span>(<span class="ident">Widget</span>::<span class="ident">custom_col</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_back_light</span>(<span class="string">&quot;Home&quot;</span>)
.<span class="ident">btn_light_back</span>(<span class="string">&quot;Home&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Escape</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;back&quot;</span>)
.<span class="ident">align_left</span>()

View File

@ -431,7 +431,7 @@
.<span class="ident">map</span>(<span class="op">|</span>(<span class="ident">boardings</span>, <span class="ident">alightings</span>, <span class="ident">waiting</span>, <span class="ident">name</span>, <span class="ident">id</span>)<span class="op">|</span> {
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="kw-2">&amp;</span><span class="ident">name</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="kw-2">&amp;</span><span class="ident">name</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="ident">id</span>.<span class="ident">to_string</span>()),
<span class="macro">format</span><span class="macro">!</span>(
<span class="string">&quot;{} boardings, {} alightings, {} currently waiting&quot;</span>,

View File

@ -1278,11 +1278,11 @@
<span class="kw">let</span> <span class="ident">total</span> <span class="op">=</span> <span class="ident">finished</span> <span class="op">+</span> <span class="ident">cancelled</span> <span class="op">+</span> <span class="ident">unfinished</span>;
<span class="kw">let</span> <span class="ident">btn</span> <span class="op">=</span> <span class="op">|</span><span class="ident">dash</span>, <span class="ident">action</span>, <span class="ident">label</span><span class="op">|</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">button</span> <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_primary_light_text</span>(<span class="ident">label</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">button</span> <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_solid_light_text</span>(<span class="ident">label</span>);
<span class="kw">if</span> <span class="ident">dash</span> <span class="op">=</span><span class="op">=</span> <span class="ident">tab</span> {
<span class="ident">button</span> <span class="op">=</span> <span class="ident">button</span>
.<span class="ident">disabled</span>(<span class="bool-val">true</span>)
.<span class="ident">bg_color</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_primary_light</span>.<span class="ident">bg</span>, <span class="ident">ControlState</span>::<span class="ident">Disabled</span>)
.<span class="ident">bg_color</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_solid_light</span>.<span class="ident">bg</span>, <span class="ident">ControlState</span>::<span class="ident">Disabled</span>)
.<span class="ident">label_styled_text</span>(<span class="ident">Text</span>::<span class="ident">from</span>(<span class="ident">Line</span>(<span class="ident">label</span>).<span class="ident">underlined</span>()), <span class="ident">ControlState</span>::<span class="ident">Default</span>)
}
<span class="ident">button</span>.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="ident">action</span>)

View File

@ -674,7 +674,7 @@
.<span class="ident">draw</span>(<span class="ident">ctx</span>)
.<span class="ident">centered_vert</span>(),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;try again&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;try again&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
]),
]))

View File

@ -706,26 +706,26 @@
<span class="ident">Widget</span>::<span class="ident">vert_separator</span>(<span class="ident">ctx</span>, <span class="number">50.0</span>),
<span class="string">&quot;Map:&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_popup_light</span>(<span class="ident">nice_map_name</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">btn_outline_light_popup</span>(<span class="ident">nice_map_name</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">hotkey</span>(<span class="ident">lctrl</span>(<span class="ident">Key</span>::<span class="ident">L</span>))
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;change map&quot;</span>),
<span class="string">&quot;Scenario:&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_popup_light</span>(<span class="string">&quot;none&quot;</span>)
.<span class="ident">btn_outline_light_popup</span>(<span class="string">&quot;none&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">S</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;change scenario&quot;</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_icon_text</span>(<span class="string">&quot;system/assets/tools/pencil.svg&quot;</span>, <span class="string">&quot;Edit map&quot;</span>)
.<span class="ident">btn_outline_light_icon_text</span>(<span class="string">&quot;system/assets/tools/pencil.svg&quot;</span>, <span class="string">&quot;Edit map&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">lctrl</span>(<span class="ident">Key</span>::<span class="ident">E</span>))
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;edit map&quot;</span>),
])
.<span class="ident">centered</span>(),
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Start a new trip&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Start a new trip&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Record trips as a scenario&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Record trips as a scenario&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
])
.<span class="ident">centered</span>(),
@ -805,7 +805,7 @@
<span class="kw">for</span> (<span class="ident">name</span>, <span class="ident">label</span>, <span class="ident">description</span>) <span class="kw">in</span> <span class="ident">choices</span> {
<span class="kw">let</span> <span class="ident">btn</span> <span class="op">=</span> <span class="ident">ctx</span>
.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="kw-2">&amp;</span><span class="ident">label</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&amp;</span><span class="ident">label</span>)
.<span class="ident">disabled</span>(<span class="ident">name</span> <span class="op">=</span><span class="op">=</span> <span class="ident">current_scenario</span>);
<span class="ident">col</span>.<span class="ident">push</span>(
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
@ -820,7 +820,7 @@
}
<span class="ident">col</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Import your own data&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Import your own data&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
);
@ -901,7 +901,7 @@
<span class="ident">Spinner</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, (<span class="number">1</span>, <span class="number">1000</span>), <span class="number">1</span>).<span class="ident">named</span>(<span class="string">&quot;number&quot;</span>),
]),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Confirm&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Confirm&quot;</span>)
.<span class="ident">disabled</span>(<span class="bool-val">true</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
]))
@ -987,7 +987,7 @@
<span class="ident">ctx</span>,
<span class="string">&quot;Confirm&quot;</span>,
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Confirm&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Confirm&quot;</span>)
.<span class="ident">disabled</span>(<span class="bool-val">true</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
);
@ -1063,7 +1063,7 @@
<span class="ident">ctx</span>,
<span class="string">&quot;Confirm&quot;</span>,
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Confirm&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Confirm&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
);

View File

@ -371,8 +371,6 @@
<span id="368">368</span>
<span id="369">369</span>
<span id="370">370</span>
<span id="371">371</span>
<span id="372">372</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">core</span>::<span class="ident">future</span>::<span class="ident">Future</span>;
<span class="kw">use</span> <span class="ident">core</span>::<span class="ident">pin</span>::<span class="ident">Pin</span>;
@ -603,7 +601,7 @@
.<span class="ident">centered_vert</span>(),
<span class="ident">Widget</span>::<span class="ident">vert_separator</span>(<span class="ident">ctx</span>, <span class="number">50.0</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_icon_text</span>(<span class="string">&quot;system/assets/tools/pencil.svg&quot;</span>, <span class="string">&quot;Edit map&quot;</span>)
.<span class="ident">btn_outline_light_icon_text</span>(<span class="string">&quot;system/assets/tools/pencil.svg&quot;</span>, <span class="string">&quot;Edit map&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">lctrl</span>(<span class="ident">Key</span>::<span class="ident">E</span>))
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;edit map&quot;</span>)
.<span class="ident">centered_vert</span>(),
@ -644,20 +642,18 @@
<span class="ident">msg</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
<span class="comment">// TODO Adjust wording</span>
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Keep simulating&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Try again&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Keep simulating&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Try again&quot;</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="kw">if</span> <span class="ident">next_mode</span>.<span class="ident">is_some</span>() {
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Next challenge&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Next challenge&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
} <span class="kw">else</span> {
<span class="ident">Widget</span>::<span class="ident">nothing</span>()
},
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Back to challenges&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Back to challenges&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
])
.<span class="ident">outline</span>(<span class="number">10.0</span>, <span class="ident">Color</span>::<span class="ident">BLACK</span>)

View File

@ -578,16 +578,16 @@
<span class="ident">Widget</span>::<span class="ident">vert_separator</span>(<span class="ident">ctx</span>, <span class="number">50.0</span>),
<span class="string">&quot;Map:&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_popup_light</span>(<span class="ident">nice_map_name</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">btn_outline_light_popup</span>(<span class="ident">nice_map_name</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">hotkey</span>(<span class="ident">lctrl</span>(<span class="ident">Key</span>::<span class="ident">L</span>))
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;change map&quot;</span>),
<span class="string">&quot;Scenario:&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_popup_light</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">scenario_name</span>)
.<span class="ident">btn_outline_light_popup</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">scenario_name</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">S</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;change scenario&quot;</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_icon_text</span>(<span class="string">&quot;system/assets/tools/pencil.svg&quot;</span>, <span class="string">&quot;Edit map&quot;</span>)
.<span class="ident">btn_outline_light_icon_text</span>(<span class="string">&quot;system/assets/tools/pencil.svg&quot;</span>, <span class="string">&quot;Edit map&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">lctrl</span>(<span class="ident">Key</span>::<span class="ident">E</span>))
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;edit map&quot;</span>),
])
@ -595,7 +595,7 @@
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">scenario_name</span> <span class="op">!</span><span class="op">=</span> <span class="string">&quot;empty&quot;</span> {
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_light_icon</span>(<span class="string">&quot;system/assets/tools/pencil.svg&quot;</span>)
.<span class="ident">btn_solid_light_icon</span>(<span class="string">&quot;system/assets/tools/pencil.svg&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;edit traffic patterns&quot;</span>)
.<span class="ident">centered_vert</span>(),
<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;{} modifications to traffic patterns&quot;</span>, <span class="self">self</span>.<span class="ident">modifiers</span>.<span class="ident">len</span>())
@ -645,7 +645,7 @@
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">m</span>.<span class="ident">describe</span>().<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">centered_vert</span>(),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_destructive_icon</span>(<span class="string">&quot;system/assets/tools/trash.svg&quot;</span>)
.<span class="ident">btn_solid_destructive_icon</span>(<span class="string">&quot;system/assets/tools/trash.svg&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;delete modifier {}&quot;</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>))
.<span class="ident">align_right</span>(),
])
@ -655,29 +655,29 @@
}
<span class="ident">rows</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Change trip mode&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Change trip mode&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
);
<span class="ident">rows</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Add extra new trips&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Add extra new trips&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
);
<span class="ident">rows</span>.<span class="ident">push</span>(<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Spinner</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, (<span class="number">2</span>, <span class="number">14</span>), <span class="number">2</span>).<span class="ident">named</span>(<span class="string">&quot;repeat_days&quot;</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Repeat schedule multiple days&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Repeat schedule multiple days&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
]));
<span class="ident">rows</span>.<span class="ident">push</span>(<span class="ident">Widget</span>::<span class="ident">horiz_separator</span>(<span class="ident">ctx</span>, <span class="number">0.5</span>));
<span class="ident">rows</span>.<span class="ident">push</span>(
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Apply&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Apply&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Discard changes&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Discard changes&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Escape</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
])
@ -836,11 +836,11 @@
]),
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Apply&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Apply&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Discard changes&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Discard changes&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Escape</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
])

View File

@ -2158,7 +2158,7 @@
.<span class="ident">btn_prev</span>()
.<span class="ident">disabled</span>(<span class="self">self</span>.<span class="ident">current</span>.<span class="ident">stage</span> <span class="op">=</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">stages</span>.<span class="ident">len</span>() <span class="op">-</span> <span class="number">1</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;next tutorial&quot;</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Quit&quot;</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Quit&quot;</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>),
])
.<span class="ident">centered</span>()];
{
@ -2188,7 +2188,7 @@
<span class="kw">if</span> <span class="ident">edit_map</span> {
<span class="ident">col</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_icon_text</span>(<span class="string">&quot;system/assets/tools/pencil.svg&quot;</span>, <span class="string">&quot;Edit map&quot;</span>)
.<span class="ident">btn_outline_light_icon_text</span>(<span class="string">&quot;system/assets/tools/pencil.svg&quot;</span>, <span class="string">&quot;Edit map&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">lctrl</span>(<span class="ident">Key</span>::<span class="ident">E</span>))
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;edit map&quot;</span>),
);
@ -2249,7 +2249,7 @@
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">current</span>.<span class="ident">part</span> <span class="op">=</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">stage</span>().<span class="ident">messages</span>.<span class="ident">len</span>() <span class="op">-</span> <span class="number">1</span> {
<span class="ident">controls</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Try it&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Try it&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">hotkeys</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">Key</span>::<span class="ident">RightArrow</span>, <span class="ident">Key</span>::<span class="ident">Space</span>, <span class="ident">Key</span>::<span class="ident">Enter</span>]))
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
);

View File

@ -323,7 +323,7 @@
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Record {} intersections&quot;</span>, <span class="ident">num</span>),
};
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="kw-2">&amp;</span><span class="ident">title</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&amp;</span><span class="ident">title</span>)
.<span class="ident">disabled</span>(<span class="ident">num</span> <span class="op">=</span><span class="op">=</span> <span class="number">0</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;record&quot;</span>)

View File

@ -1377,7 +1377,7 @@
<span class="ident">Widget</span>::<span class="ident">nothing</span>()
},
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_light_icon</span>(<span class="string">&quot;system/assets/meters/trip_histogram.svg&quot;</span>)
.<span class="ident">btn_solid_light_icon</span>(<span class="string">&quot;system/assets/meters/trip_histogram.svg&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Q</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;more data&quot;</span>)
.<span class="ident">align_right</span>(),
@ -1397,7 +1397,7 @@
.<span class="ident">centered_vert</span>(),
<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;{} trips captured&quot;</span>, <span class="ident">prettyprint_usize</span>(<span class="ident">n</span>)).<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Stop&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Stop&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
.<span class="ident">align_right</span>(),
]));

View File

@ -447,12 +447,6 @@
<span id="444">444</span>
<span id="445">445</span>
<span id="446">446</span>
<span id="447">447</span>
<span id="448">448</span>
<span id="449">449</span>
<span id="450">450</span>
<span id="451">451</span>
<span id="452">452</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Duration</span>, <span class="ident">Polygon</span>, <span class="ident">Time</span>};
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">tools</span>::<span class="ident">PopupMsg</span>;
@ -504,7 +498,7 @@
<span class="ident">row</span>.<span class="ident">push</span>({
<span class="kw">let</span> <span class="ident">button</span> <span class="op">=</span> <span class="ident">ctx</span>
.<span class="ident">style</span>()
.<span class="ident">btn_primary_light_icon</span>(<span class="string">&quot;system/assets/speed/triangle.svg&quot;</span>)
.<span class="ident">btn_solid_light_icon</span>(<span class="string">&quot;system/assets/speed/triangle.svg&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Space</span>);
<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="kw">if</span> <span class="self">self</span>.<span class="ident">paused</span> {
@ -536,10 +530,7 @@
.<span class="ident">btn_plain_light</span>()
.<span class="ident">image_path</span>(<span class="string">&quot;system/assets/speed/triangle.svg&quot;</span>)
.<span class="ident">image_dims</span>(<span class="ident">ScreenDims</span>::<span class="ident">new</span>(<span class="number">16.0</span>, <span class="number">26.0</span>))
.<span class="ident">bg_color</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_primary_light</span>.<span class="ident">bg_hover</span>,
<span class="ident">ControlState</span>::<span class="ident">Hovered</span>,
)
.<span class="ident">bg_color</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_solid_light</span>.<span class="ident">bg_hover</span>, <span class="ident">ControlState</span>::<span class="ident">Hovered</span>)
.<span class="ident">tooltip</span>(<span class="ident">txt</span>)
.<span class="ident">padding</span>(<span class="ident">EdgeInsets</span> {
<span class="ident">top</span>: <span class="number">8.0</span>,
@ -557,7 +548,7 @@
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">setting</span> <span class="op">&lt;</span> <span class="ident">s</span> {
<span class="ident">triangle_btn</span> <span class="op">=</span> <span class="ident">triangle_btn</span>.<span class="ident">image_color</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_secondary_light</span>.<span class="ident">fg_disabled</span>,
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_outline_light</span>.<span class="ident">fg_disabled</span>,
<span class="ident">ControlState</span>::<span class="ident">Default</span>,
)
}
@ -567,8 +558,8 @@
.<span class="ident">collect</span>(),
)
<span class="comment">// Inner buttons, styled as one composite button w/ background/border</span>
.<span class="ident">bg</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_primary_light</span>.<span class="ident">bg</span>)
.<span class="ident">outline</span>(<span class="number">2.0</span>, <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_primary_light</span>.<span class="ident">outline</span>)
.<span class="ident">bg</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_solid_light</span>.<span class="ident">bg</span>)
.<span class="ident">outline</span>(<span class="number">2.0</span>, <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_solid_light</span>.<span class="ident">outline</span>)
.<span class="ident">margin_right</span>(<span class="number">16</span>),
);
@ -593,10 +584,7 @@
<span class="kw">let</span> <span class="ident">buttons</span> <span class="op">=</span> <span class="ident">ctx</span>
.<span class="ident">style</span>()
.<span class="ident">btn_plain_light</span>()
.<span class="ident">bg_color</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_primary_light</span>.<span class="ident">bg_hover</span>,
<span class="ident">ControlState</span>::<span class="ident">Hovered</span>,
)
.<span class="ident">bg_color</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_solid_light</span>.<span class="ident">bg_hover</span>, <span class="ident">ControlState</span>::<span class="ident">Hovered</span>)
.<span class="ident">image_dims</span>(<span class="ident">ScreenDims</span>::<span class="ident">square</span>(<span class="number">20.0</span>));
<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">buttons</span>
@ -613,8 +601,8 @@
])
}
<span class="comment">// Inner buttons, styled as one composite button w/ background/border</span>
.<span class="ident">bg</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_primary_light</span>.<span class="ident">bg</span>)
.<span class="ident">outline</span>(<span class="number">2.0</span>, <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_primary_light</span>.<span class="ident">outline</span>),
.<span class="ident">bg</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_solid_light</span>.<span class="ident">bg</span>)
.<span class="ident">outline</span>(<span class="number">2.0</span>, <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_solid_light</span>.<span class="ident">outline</span>),
);
<span class="self">self</span>.<span class="ident">panel</span> <span class="op">=</span> <span class="ident">Panel</span>::<span class="ident">new</span>(<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="ident">row</span>))

View File

@ -532,11 +532,11 @@
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_close_widget</span>(<span class="ident">ctx</span>),
<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Jump to time&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Jump to time&quot;</span>)
.<span class="ident">disabled</span>(<span class="bool-val">true</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Jump to delay&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Jump to delay&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">D</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
])
@ -667,11 +667,11 @@
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_close_widget</span>(<span class="ident">ctx</span>),
<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Jump to time&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Jump to time&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">T</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Jump to delay&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Jump to delay&quot;</span>)
.<span class="ident">disabled</span>(<span class="bool-val">true</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
])
@ -792,7 +792,7 @@
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Text</span>::<span class="ident">new</span>().<span class="ident">draw</span>(<span class="ident">ctx</span>).<span class="ident">named</span>(<span class="string">&quot;text&quot;</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;stop now&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;stop now&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Escape</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
.<span class="ident">centered_horiz</span>(),
@ -971,7 +971,7 @@
<span class="kw">fn</span> <span class="ident">build_jump_to_time_btn</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="ident">EventCtx</span>, <span class="ident">target</span>: <span class="ident">Time</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Widget</span> {
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Jump to {}&quot;</span>, <span class="ident">target</span>.<span class="ident">ampm_tostring</span>()))
.<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Jump to {}&quot;</span>, <span class="ident">target</span>.<span class="ident">ampm_tostring</span>()))
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;jump to time&quot;</span>)
.<span class="ident">centered_horiz</span>()
@ -980,7 +980,7 @@
<span class="kw">fn</span> <span class="ident">build_jump_to_delay_button</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="ident">EventCtx</span>, <span class="ident">delay</span>: <span class="ident">Duration</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Widget</span> {
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Jump to next {} delay&quot;</span>, <span class="ident">delay</span>))
.<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Jump to next {} delay&quot;</span>, <span class="ident">delay</span>))
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;jump to delay&quot;</span>)
.<span class="ident">centered_horiz</span>()

View File

@ -384,19 +384,19 @@
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_close_widget</span>(<span class="ident">ctx</span>),
]),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;View uber-turns&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;View uber-turns&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Edit&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Edit&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">E</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Detect all clusters&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Detect all clusters&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">D</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Preview merged intersection&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Preview merged intersection&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">P</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
]))

View File

@ -459,14 +459,14 @@
<span class="ident">Text</span>::<span class="ident">new</span>().<span class="ident">draw</span>(<span class="ident">ctx</span>).<span class="ident">named</span>(<span class="string">&quot;current info&quot;</span>),
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;quit&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;quit&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Escape</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;export to OSM&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;export to OSM&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;preview all intersections&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;preview all intersections&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">G</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
]),

View File

@ -636,7 +636,7 @@
.<span class="ident">bg</span>(<span class="ident">app</span>.<span class="ident">cs</span>().<span class="ident">section_bg</span>)
.<span class="ident">padding</span>(<span class="number">8</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Apply&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Apply&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
.<span class="ident">centered_horiz</span>(),

View File

@ -409,7 +409,7 @@
<span class="kw">let</span> <span class="ident">btn</span> <span class="op">=</span> <span class="ident">ctx</span>
.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="ident">nice_map_name</span>(<span class="kw-2">&amp;</span><span class="ident">name</span>))
.<span class="ident">btn_outline_light_text</span>(<span class="ident">nice_map_name</span>(<span class="kw-2">&amp;</span><span class="ident">name</span>))
.<span class="ident">label_color</span>(<span class="ident">color</span>, <span class="ident">ControlState</span>::<span class="ident">Default</span>)
.<span class="ident">no_tooltip</span>();
@ -434,7 +434,7 @@
<span class="kw">continue</span>;
}
<span class="comment">// If there&#39;s only one map in the city, make the button directly load it.</span>
<span class="kw">let</span> <span class="ident">button</span> <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_secondary_light_text</span>(<span class="kw-2">&amp;</span><span class="ident">city</span>);
<span class="kw">let</span> <span class="ident">button</span> <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_outline_light_text</span>(<span class="kw-2">&amp;</span><span class="ident">city</span>);
<span class="kw">let</span> <span class="ident">maps</span> <span class="op">=</span> <span class="ident">MapName</span>::<span class="ident">list_all_maps_in_city</span>(<span class="kw-2">&amp;</span><span class="ident">city</span>);
<span class="kw">if</span> <span class="ident">maps</span>.<span class="ident">len</span>() <span class="op">=</span><span class="op">=</span> <span class="number">1</span> {
<span class="ident">other_cities</span>.<span class="ident">push</span>(<span class="ident">button</span>.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="ident">maps</span>[<span class="number">0</span>].<span class="ident">path</span>()));
@ -444,7 +444,7 @@
}
<span class="ident">other_cities</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Search all maps&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Search all maps&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Tab</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
);
@ -481,7 +481,7 @@
]),
<span class="kw">if</span> <span class="macro">cfg</span><span class="macro">!</span>(<span class="ident">not</span>(<span class="ident">target_arch</span> <span class="op">=</span> <span class="string">&quot;wasm32&quot;</span>)) {
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Download more cities&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Download more cities&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
} <span class="kw">else</span> {
<span class="ident">Widget</span>::<span class="ident">nothing</span>()
@ -619,7 +619,7 @@
<span class="kw">for</span> <span class="ident">name</span> <span class="kw">in</span> <span class="ident">MapName</span>::<span class="ident">list_all_maps</span>() {
<span class="ident">buttons</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="kw-2">&amp;</span><span class="ident">name</span>.<span class="ident">describe</span>())
.<span class="ident">btn_outline_light_text</span>(<span class="kw-2">&amp;</span><span class="ident">name</span>.<span class="ident">describe</span>())
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="ident">name</span>.<span class="ident">path</span>())
.<span class="ident">margin_right</span>(<span class="number">10</span>)
.<span class="ident">margin_below</span>(<span class="number">10</span>),

View File

@ -326,7 +326,7 @@
)
.<span class="ident">named</span>(<span class="string">&quot;street&quot;</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Search by business name or address&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Search by business name or address&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Tab</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
]))
@ -533,7 +533,7 @@
)
.<span class="ident">named</span>(<span class="string">&quot;bldg&quot;</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Search for streets&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Search for streets&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Tab</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
]))

View File

@ -293,7 +293,7 @@
]),
<span class="ident">Widget</span>::<span class="ident">text_entry</span>(<span class="ident">ctx</span>, <span class="ident">String</span>::<span class="ident">new</span>(), <span class="bool-val">true</span>).<span class="ident">named</span>(<span class="string">&quot;input&quot;</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;confirm&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;confirm&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
]))
@ -371,7 +371,7 @@
<span class="ident">panel</span>: <span class="ident">Panel</span>::<span class="ident">new</span>(<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">txt</span>.<span class="ident">draw</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;OK&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;OK&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">hotkeys</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">Key</span>::<span class="ident">Enter</span>, <span class="ident">Key</span>::<span class="ident">Escape</span>]))
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
]))

View File

@ -202,10 +202,6 @@
<span id="199">199</span>
<span id="200">200</span>
<span id="201">201</span>
<span id="202">202</span>
<span id="203">203</span>
<span id="204">204</span>
<span id="205">205</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">BTreeMap</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">fs</span>::<span class="ident">File</span>;
@ -257,11 +253,7 @@
<span class="ident">prettyprint_bytes</span>(<span class="ident">bytes</span>).<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">centered_vert</span>(),
]));
}
<span class="ident">col</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Sync files&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
);
<span class="ident">col</span>.<span class="ident">push</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Sync files&quot;</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>));
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">Picker</span> {
<span class="ident">panel</span>: <span class="ident">Panel</span>::<span class="ident">new</span>(<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="ident">col</span>)).<span class="ident">build</span>(<span class="ident">ctx</span>),

View File

@ -537,7 +537,7 @@
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="string">&quot;Change map:&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_popup_light</span>(<span class="ident">nice_map_name</span>(<span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_name</span>()))
.<span class="ident">btn_outline_light_popup</span>(<span class="ident">nice_map_name</span>(<span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_name</span>()))
.<span class="ident">hotkey</span>(<span class="ident">lctrl</span>(<span class="ident">Key</span>::<span class="ident">L</span>))
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;change map&quot;</span>),
]),
@ -558,7 +558,7 @@
<span class="ident">biz_search_panel</span>.<span class="ident">unwrap_or_else</span>(<span class="op">|</span><span class="op">|</span> <span class="ident">b</span>.<span class="ident">render</span>(<span class="ident">ctx</span>).<span class="ident">named</span>(<span class="string">&quot;Search for businesses&quot;</span>))
} <span class="kw">else</span> {
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Search for businesses&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Search for businesses&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Tab</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
},
@ -582,13 +582,13 @@
<span class="ident">col</span>.<span class="ident">push</span>(
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(
.<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(
<span class="string">&quot;Open OSM way {}&quot;</span>,
<span class="ident">r</span>.<span class="ident">orig_id</span>.<span class="ident">osm_way_id</span>.<span class="number">0</span>
))
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;open {}&quot;</span>, <span class="ident">r</span>.<span class="ident">orig_id</span>.<span class="ident">osm_way_id</span>)),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Edit OSM way&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Edit OSM way&quot;</span>)
.<span class="ident">build_widget</span>(
<span class="ident">ctx</span>,
<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(
@ -628,7 +628,7 @@
<span class="kw">let</span> <span class="ident">i</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_i</span>(<span class="ident">i</span>);
<span class="ident">col</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Open OSM node {}&quot;</span>, <span class="ident">i</span>.<span class="ident">orig_id</span>.<span class="number">0</span>))
.<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Open OSM node {}&quot;</span>, <span class="ident">i</span>.<span class="ident">orig_id</span>.<span class="number">0</span>))
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;open {}&quot;</span>, <span class="ident">i</span>.<span class="ident">orig_id</span>)),
);
}
@ -636,7 +636,7 @@
<span class="kw">let</span> <span class="ident">b</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="ident">b</span>);
<span class="ident">col</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Open OSM ID {}&quot;</span>, <span class="ident">b</span>.<span class="ident">orig_id</span>.<span class="ident">inner</span>()))
.<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Open OSM ID {}&quot;</span>, <span class="ident">b</span>.<span class="ident">orig_id</span>.<span class="ident">inner</span>()))
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;open {}&quot;</span>, <span class="ident">b</span>.<span class="ident">orig_id</span>)),
);
@ -684,7 +684,7 @@
<span class="kw">let</span> <span class="ident">pl</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_pl</span>(<span class="ident">pl</span>);
<span class="ident">col</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Open OSM ID {}&quot;</span>, <span class="ident">pl</span>.<span class="ident">osm_id</span>.<span class="ident">inner</span>()))
.<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Open OSM ID {}&quot;</span>, <span class="ident">pl</span>.<span class="ident">osm_id</span>.<span class="ident">inner</span>()))
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;open {}&quot;</span>, <span class="ident">pl</span>.<span class="ident">osm_id</span>)),
);
@ -931,7 +931,7 @@
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">col</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="ident">col</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Hide business search&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Hide business search&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Tab</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
);

View File

@ -822,7 +822,7 @@
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="string">&quot;Change map:&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_popup_light</span>(<span class="ident">nice_map_name</span>(<span class="ident">map</span>.<span class="ident">get_name</span>()))
.<span class="ident">btn_outline_light_popup</span>(<span class="ident">nice_map_name</span>(<span class="ident">map</span>.<span class="ident">get_name</span>()))
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;change map&quot;</span>),
]),
<span class="macro">format</span><span class="macro">!</span>(
@ -867,7 +867,7 @@
]),
<span class="ident">Checkbox</span>::<span class="ident">checkbox</span>(<span class="ident">ctx</span>, <span class="string">&quot;max 3 days parking (default in Seattle)&quot;</span>, <span class="prelude-val">None</span>, <span class="bool-val">false</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Generate OsmChange file&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Generate OsmChange file&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="string">&quot;Select a road&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">named</span>(<span class="string">&quot;info&quot;</span>),
]))

View File

@ -356,7 +356,7 @@
<span class="kw">let</span> <span class="ident">panel</span> <span class="op">=</span> <span class="ident">Panel</span>::<span class="ident">new</span>(<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">txt</span>.<span class="ident">draw</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Back to title screen&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Back to title screen&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
@ -457,7 +457,7 @@
<span class="ident">Panel</span>::<span class="ident">new</span>(<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">txt</span>.<span class="ident">draw</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;OK&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;OK&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
]))

View File

@ -680,7 +680,7 @@
<span class="kw">if</span> <span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">upzones_unlocked</span> <span class="op">=</span><span class="op">=</span> <span class="number">0</span> {
<span class="kw">return</span> <span class="ident">Panel</span>::<span class="ident">new</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Start game&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Start game&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
.<span class="ident">container</span>(),
@ -712,23 +712,23 @@
]),
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Randomly choose upzones&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Randomly choose upzones&quot;</span>)
.<span class="ident">disabled</span>(<span class="ident">num_picked</span> <span class="op">=</span><span class="op">=</span> <span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">upzones_unlocked</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Clear upzones&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Clear upzones&quot;</span>)
.<span class="ident">disabled</span>(<span class="ident">num_picked</span> <span class="op">=</span><span class="op">=</span> <span class="number">0</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
.<span class="ident">align_right</span>(),
]),
<span class="kw">if</span> <span class="ident">num_picked</span> <span class="op">=</span><span class="op">=</span> <span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">upzones_unlocked</span> {
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Start game&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Start game&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
} <span class="kw">else</span> {
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Finish upzoning before playing&quot;</span>)
.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Finish upzoning before playing&quot;</span>)
.<span class="ident">disabled</span>(<span class="bool-val">true</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
},

View File

@ -285,10 +285,10 @@
<span class="ident">Checkbox</span>::<span class="ident">new</span>(
<span class="ident">play_music</span>,
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_light_icon</span>(<span class="string">&quot;system/assets/tools/volume_off.svg&quot;</span>)
.<span class="ident">btn_solid_light_icon</span>(<span class="string">&quot;system/assets/tools/volume_off.svg&quot;</span>)
.<span class="ident">build</span>(<span class="ident">ctx</span>, <span class="string">&quot;play music&quot;</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_light_icon</span>(<span class="string">&quot;system/assets/tools/volume_on.svg&quot;</span>)
.<span class="ident">btn_solid_light_icon</span>(<span class="string">&quot;system/assets/tools/volume_on.svg&quot;</span>)
.<span class="ident">build</span>(<span class="ident">ctx</span>, <span class="string">&quot;mute music&quot;</span>),
)
.<span class="ident">named</span>(<span class="string">&quot;play music&quot;</span>)

View File

@ -247,7 +247,7 @@
<span class="ident">SimpleState</span>::<span class="ident">new</span>(
<span class="ident">Panel</span>::<span class="ident">new</span>(<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_icon_text</span>(<span class="string">&quot;system/assets/tools/quit.svg&quot;</span>, <span class="string">&quot;Quit&quot;</span>)
.<span class="ident">btn_outline_light_icon_text</span>(<span class="string">&quot;system/assets/tools/quit.svg&quot;</span>, <span class="string">&quot;Quit&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Escape</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;quit&quot;</span>)
.<span class="ident">align_right</span>()
@ -277,7 +277,7 @@
.<span class="ident">centered_horiz</span>(),
<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="ident">level_buttons</span>).<span class="ident">flex_wrap</span>(<span class="ident">ctx</span>, <span class="ident">Percent</span>::<span class="ident">int</span>(<span class="number">80</span>)),
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_primary_light_text</span>(<span class="string">&quot;Credits&quot;</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_solid_light_text</span>(<span class="string">&quot;Credits&quot;</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>),
<span class="string">&quot;Created by Dustin Carlino, Yuwen Li, &amp; Michael Kirk&quot;</span>
.<span class="ident">draw_text</span>(<span class="ident">ctx</span>)
.<span class="ident">container</span>()
@ -404,7 +404,7 @@
<span class="ident">link</span>(<span class="ident">ctx</span>, <span class="string">&quot;Music from various sources&quot;</span>, <span class="string">&quot;https://github.com/dabreegster/abstreet/tree/master/data/system/assets/music/sources.md&quot;</span>),
<span class="ident">link</span>(<span class="ident">ctx</span>, <span class="string">&quot;Fonts and icons by various sources&quot;</span>, <span class="string">&quot;https://dabreegster.github.io/abstreet/howto/#data-source-licensing&quot;</span>),
<span class="string">&quot;Playtesting by Fridgehaus&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Back&quot;</span>).<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>).<span class="ident">centered_horiz</span>(),
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Back&quot;</span>).<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Enter</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>).<span class="ident">centered_horiz</span>(),
]))
.<span class="ident">build</span>(<span class="ident">ctx</span>), <span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">Credits</span>))
}

View File

@ -307,14 +307,6 @@
<span id="304">304</span>
<span id="305">305</span>
<span id="306">306</span>
<span id="307">307</span>
<span id="308">308</span>
<span id="309">309</span>
<span id="310">310</span>
<span id="311">311</span>
<span id="312">312</span>
<span id="313">313</span>
<span id="314">314</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="kw">super</span>::<span class="ident">ButtonStyle</span>;
<span class="kw">use</span> <span class="kw">crate</span>::{
@ -322,65 +314,57 @@
};
<span class="kw">pub</span> <span class="kw">trait</span> <span class="ident">StyledButtons</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="kw">fn</span> <span class="ident">btn_primary_dark</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span>;
<span class="kw">fn</span> <span class="ident">btn_primary_dark_text</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_primary_dark</span>().<span class="ident">label_text</span>(<span class="ident">text</span>)
<span class="kw">fn</span> <span class="ident">btn_solid_dark</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span>;
<span class="kw">fn</span> <span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_solid_dark</span>().<span class="ident">label_text</span>(<span class="ident">text</span>)
}
<span class="kw">fn</span> <span class="ident">btn_primary_dark_icon</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="ident">icon_button</span>(<span class="self">self</span>.<span class="ident">btn_primary_dark</span>().<span class="ident">image_path</span>(<span class="ident">image_path</span>))
<span class="kw">fn</span> <span class="ident">btn_solid_dark_icon</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="ident">icon_button</span>(<span class="self">self</span>.<span class="ident">btn_solid_dark</span>().<span class="ident">image_path</span>(<span class="ident">image_path</span>))
}
<span class="kw">fn</span> <span class="ident">btn_primary_dark_icon_text</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>, <span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_primary_dark</span>()
<span class="kw">fn</span> <span class="ident">btn_solid_dark_icon_text</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>, <span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_solid_dark</span>()
.<span class="ident">label_text</span>(<span class="ident">text</span>)
.<span class="ident">image_path</span>(<span class="ident">image_path</span>)
.<span class="ident">image_dims</span>(<span class="ident">ScreenDims</span>::<span class="ident">square</span>(<span class="number">18.0</span>))
}
<span class="kw">fn</span> <span class="ident">btn_secondary_dark</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span>;
<span class="kw">fn</span> <span class="ident">btn_secondary_dark_text</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_secondary_dark</span>().<span class="ident">label_text</span>(<span class="ident">text</span>)
<span class="kw">fn</span> <span class="ident">btn_outline_dark</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span>;
<span class="kw">fn</span> <span class="ident">btn_outline_dark_text</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_outline_dark</span>().<span class="ident">label_text</span>(<span class="ident">text</span>)
}
<span class="kw">fn</span> <span class="ident">btn_secondary_dark_icon</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="ident">icon_button</span>(<span class="self">self</span>.<span class="ident">btn_secondary_dark</span>().<span class="ident">image_path</span>(<span class="ident">image_path</span>))
<span class="kw">fn</span> <span class="ident">btn_outline_dark_icon</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="ident">icon_button</span>(<span class="self">self</span>.<span class="ident">btn_outline_dark</span>().<span class="ident">image_path</span>(<span class="ident">image_path</span>))
}
<span class="kw">fn</span> <span class="ident">btn_secondary_dark_icon_text</span>(
<span class="kw-2">&amp;</span><span class="self">self</span>,
<span class="ident">image_path</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>,
<span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_secondary_dark</span>()
<span class="kw">fn</span> <span class="ident">btn_outline_dark_icon_text</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>, <span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_outline_dark</span>()
.<span class="ident">label_text</span>(<span class="ident">text</span>)
.<span class="ident">image_path</span>(<span class="ident">image_path</span>)
.<span class="ident">image_dims</span>(<span class="ident">ScreenDims</span>::<span class="ident">square</span>(<span class="number">18.0</span>))
}
<span class="kw">fn</span> <span class="ident">btn_primary_light</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span>;
<span class="kw">fn</span> <span class="ident">btn_primary_light_text</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_primary_light</span>().<span class="ident">label_text</span>(<span class="ident">text</span>)
<span class="kw">fn</span> <span class="ident">btn_solid_light</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span>;
<span class="kw">fn</span> <span class="ident">btn_solid_light_text</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_solid_light</span>().<span class="ident">label_text</span>(<span class="ident">text</span>)
}
<span class="kw">fn</span> <span class="ident">btn_primary_light_icon</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="ident">icon_button</span>(<span class="self">self</span>.<span class="ident">btn_primary_light</span>().<span class="ident">image_path</span>(<span class="ident">image_path</span>))
<span class="kw">fn</span> <span class="ident">btn_solid_light_icon</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="ident">icon_button</span>(<span class="self">self</span>.<span class="ident">btn_solid_light</span>().<span class="ident">image_path</span>(<span class="ident">image_path</span>))
}
<span class="kw">fn</span> <span class="ident">btn_primary_light_icon_text</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>, <span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_primary_light</span>()
<span class="kw">fn</span> <span class="ident">btn_solid_light_icon_text</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>, <span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_solid_light</span>()
.<span class="ident">label_text</span>(<span class="ident">text</span>)
.<span class="ident">image_path</span>(<span class="ident">image_path</span>)
.<span class="ident">image_dims</span>(<span class="ident">ScreenDims</span>::<span class="ident">square</span>(<span class="number">18.0</span>))
}
<span class="kw">fn</span> <span class="ident">btn_secondary_light</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span>;
<span class="kw">fn</span> <span class="ident">btn_secondary_light_text</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_secondary_light</span>().<span class="ident">label_text</span>(<span class="ident">text</span>)
<span class="kw">fn</span> <span class="ident">btn_outline_light</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span>;
<span class="kw">fn</span> <span class="ident">btn_outline_light_text</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_outline_light</span>().<span class="ident">label_text</span>(<span class="ident">text</span>)
}
<span class="kw">fn</span> <span class="ident">btn_secondary_light_icon</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="ident">icon_button</span>(<span class="self">self</span>.<span class="ident">btn_secondary_light</span>().<span class="ident">image_path</span>(<span class="ident">image_path</span>))
<span class="kw">fn</span> <span class="ident">btn_outline_light_icon</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="ident">icon_button</span>(<span class="self">self</span>.<span class="ident">btn_outline_light</span>().<span class="ident">image_path</span>(<span class="ident">image_path</span>))
}
<span class="kw">fn</span> <span class="ident">btn_secondary_light_icon_text</span>(
<span class="kw-2">&amp;</span><span class="self">self</span>,
<span class="ident">image_path</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>,
<span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_secondary_light</span>()
<span class="kw">fn</span> <span class="ident">btn_outline_light_icon_text</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>, <span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_outline_light</span>()
.<span class="ident">label_text</span>(<span class="ident">text</span>)
.<span class="ident">image_path</span>(<span class="ident">image_path</span>)
.<span class="ident">image_dims</span>(<span class="ident">ScreenDims</span>::<span class="ident">square</span>(<span class="number">18.0</span>))
@ -425,37 +409,37 @@
<span class="ident">icon_button</span>(<span class="self">self</span>.<span class="ident">btn_plain_destructive</span>().<span class="ident">image_path</span>(<span class="ident">image_path</span>))
}
<span class="kw">fn</span> <span class="ident">btn_primary_destructive</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span>;
<span class="kw">fn</span> <span class="ident">btn_primary_destructive_text</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_primary_destructive</span>().<span class="ident">label_text</span>(<span class="ident">text</span>)
<span class="kw">fn</span> <span class="ident">btn_solid_destructive</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span>;
<span class="kw">fn</span> <span class="ident">btn_solid_destructive_text</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_solid_destructive</span>().<span class="ident">label_text</span>(<span class="ident">text</span>)
}
<span class="kw">fn</span> <span class="ident">btn_primary_destructive_icon</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="ident">icon_button</span>(<span class="self">self</span>.<span class="ident">btn_primary_destructive</span>().<span class="ident">image_path</span>(<span class="ident">image_path</span>))
<span class="kw">fn</span> <span class="ident">btn_solid_destructive_icon</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="ident">icon_button</span>(<span class="self">self</span>.<span class="ident">btn_solid_destructive</span>().<span class="ident">image_path</span>(<span class="ident">image_path</span>))
}
<span class="kw">fn</span> <span class="ident">btn_primary_destructive_icon_text</span>(
<span class="kw">fn</span> <span class="ident">btn_solid_destructive_icon_text</span>(
<span class="kw-2">&amp;</span><span class="self">self</span>,
<span class="ident">image_path</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>,
<span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_primary_destructive</span>()
<span class="self">self</span>.<span class="ident">btn_solid_destructive</span>()
.<span class="ident">label_text</span>(<span class="ident">text</span>)
.<span class="ident">image_path</span>(<span class="ident">image_path</span>)
.<span class="ident">image_dims</span>(<span class="ident">ScreenDims</span>::<span class="ident">square</span>(<span class="number">18.0</span>))
}
<span class="kw">fn</span> <span class="ident">btn_secondary_destructive</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span>;
<span class="kw">fn</span> <span class="ident">btn_secondary_destructive_text</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_secondary_destructive</span>().<span class="ident">label_text</span>(<span class="ident">text</span>)
<span class="kw">fn</span> <span class="ident">btn_outline_destructive</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span>;
<span class="kw">fn</span> <span class="ident">btn_outline_destructive_text</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_outline_destructive</span>().<span class="ident">label_text</span>(<span class="ident">text</span>)
}
<span class="kw">fn</span> <span class="ident">btn_secondary_destructive_icon</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="ident">icon_button</span>(<span class="self">self</span>.<span class="ident">btn_secondary_destructive</span>().<span class="ident">image_path</span>(<span class="ident">image_path</span>))
<span class="kw">fn</span> <span class="ident">btn_outline_destructive_icon</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="ident">icon_button</span>(<span class="self">self</span>.<span class="ident">btn_outline_destructive</span>().<span class="ident">image_path</span>(<span class="ident">image_path</span>))
}
<span class="kw">fn</span> <span class="ident">btn_secondary_destructive_icon_text</span>(
<span class="kw">fn</span> <span class="ident">btn_outline_destructive_icon_text</span>(
<span class="kw-2">&amp;</span><span class="self">self</span>,
<span class="ident">image_path</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>,
<span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_secondary_destructive</span>()
<span class="self">self</span>.<span class="ident">btn_outline_destructive</span>()
.<span class="ident">label_text</span>(<span class="ident">text</span>)
.<span class="ident">image_path</span>(<span class="ident">image_path</span>)
.<span class="ident">image_dims</span>(<span class="ident">ScreenDims</span>::<span class="ident">square</span>(<span class="number">18.0</span>))
@ -464,37 +448,37 @@
<span class="comment">// Specific UI Elements</span>
<span class="doccomment">/// title: name of previous screen, which you&#39;ll return to</span>
<span class="kw">fn</span> <span class="ident">btn_back_light</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">title</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="kw">fn</span> <span class="ident">btn_light_back</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">title</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="ident">back_button</span>(<span class="self">self</span>.<span class="ident">btn_plain_light</span>(), <span class="ident">title</span>)
}
<span class="doccomment">/// title: name of previous screen, which you&#39;ll return to</span>
<span class="kw">fn</span> <span class="ident">btn_back_dark</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">title</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="kw">fn</span> <span class="ident">btn_dark_back</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">title</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="ident">back_button</span>(<span class="self">self</span>.<span class="ident">btn_plain_dark</span>(), <span class="ident">title</span>)
}
<span class="kw">fn</span> <span class="ident">btn_primary_light_dropdown</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="ident">dropdown_button</span>(<span class="self">self</span>.<span class="ident">btn_primary_light</span>())
<span class="kw">fn</span> <span class="ident">btn_solid_light_dropdown</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="ident">dropdown_button</span>(<span class="self">self</span>.<span class="ident">btn_solid_light</span>())
}
<span class="kw">fn</span> <span class="ident">btn_secondary_light_dropdown</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="ident">dropdown_button</span>(<span class="self">self</span>.<span class="ident">btn_secondary_light</span>())
<span class="kw">fn</span> <span class="ident">btn_outline_light_dropdown</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="ident">dropdown_button</span>(<span class="self">self</span>.<span class="ident">btn_outline_light</span>())
}
<span class="kw">fn</span> <span class="ident">btn_primary_dark_dropdown</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="ident">dropdown_button</span>(<span class="self">self</span>.<span class="ident">btn_primary_dark</span>())
<span class="kw">fn</span> <span class="ident">btn_solid_dark_dropdown</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="ident">dropdown_button</span>(<span class="self">self</span>.<span class="ident">btn_solid_dark</span>())
}
<span class="kw">fn</span> <span class="ident">btn_secondary_dark_dropdown</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="ident">dropdown_button</span>(<span class="self">self</span>.<span class="ident">btn_secondary_dark</span>())
<span class="kw">fn</span> <span class="ident">btn_outline_dark_dropdown</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="ident">dropdown_button</span>(<span class="self">self</span>.<span class="ident">btn_outline_dark</span>())
}
<span class="kw">fn</span> <span class="ident">btn_popup_light</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_secondary_light_dropdown</span>().<span class="ident">label_text</span>(<span class="ident">text</span>)
<span class="kw">fn</span> <span class="ident">btn_outline_light_popup</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_outline_light_dropdown</span>().<span class="ident">label_text</span>(<span class="ident">text</span>)
}
<span class="kw">fn</span> <span class="ident">btn_popup_dark</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_secondary_dark_dropdown</span>().<span class="ident">label_text</span>(<span class="ident">text</span>)
<span class="kw">fn</span> <span class="ident">btn_outline_dark_popup</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">btn_outline_dark_dropdown</span>().<span class="ident">label_text</span>(<span class="ident">text</span>)
}
<span class="doccomment">/// A right facing caret, like &quot;&gt;&quot;, suitable for paging to the &quot;next&quot; set of results</span>
@ -522,17 +506,17 @@
}
<span class="doccomment">/// A button which renders its hotkey for discoverability along with its label.</span>
<span class="kw">fn</span> <span class="ident">btn_hotkey_light</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">label</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>, <span class="ident">key</span>: <span class="ident">Key</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span>;
<span class="kw">fn</span> <span class="ident">btn_solid_light_hotkey</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">label</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>, <span class="ident">key</span>: <span class="ident">Key</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span>;
}
<span class="kw">use</span> <span class="kw">crate</span>::{<span class="ident">Key</span>, <span class="ident">Line</span>, <span class="ident">Text</span>};
<span class="kw">impl</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> <span class="ident">StyledButtons</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> <span class="kw">for</span> <span class="ident">Style</span> {
<span class="kw">fn</span> <span class="ident">btn_hotkey_light</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">label</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>, <span class="ident">key</span>: <span class="ident">Key</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="kw">fn</span> <span class="ident">btn_solid_light_hotkey</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">label</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>, <span class="ident">key</span>: <span class="ident">Key</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">default</span> <span class="op">=</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">txt</span> <span class="op">=</span> <span class="ident">Text</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="ident">key_txt</span> <span class="op">=</span> <span class="ident">Line</span>(<span class="ident">key</span>.<span class="ident">describe</span>()).<span class="ident">fg</span>(<span class="self">self</span>.<span class="ident">hotkey_color</span>);
<span class="ident">txt</span>.<span class="ident">append</span>(<span class="ident">key_txt</span>);
<span class="kw">let</span> <span class="ident">label_text</span> <span class="op">=</span> <span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot; - {}&quot;</span>, <span class="ident">label</span>)).<span class="ident">fg</span>(<span class="self">self</span>.<span class="ident">btn_primary_light</span>.<span class="ident">fg</span>);
<span class="kw">let</span> <span class="ident">label_text</span> <span class="op">=</span> <span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot; - {}&quot;</span>, <span class="ident">label</span>)).<span class="ident">fg</span>(<span class="self">self</span>.<span class="ident">btn_solid_light</span>.<span class="ident">fg</span>);
<span class="ident">txt</span>.<span class="ident">append</span>(<span class="ident">label_text</span>);
<span class="ident">txt</span>
};
@ -541,59 +525,59 @@
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">txt</span> <span class="op">=</span> <span class="ident">Text</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="ident">key_txt</span> <span class="op">=</span> <span class="ident">Line</span>(<span class="ident">key</span>.<span class="ident">describe</span>()).<span class="ident">fg</span>(<span class="self">self</span>.<span class="ident">hotkey_color</span>.<span class="ident">alpha</span>(<span class="number">0.3</span>));
<span class="ident">txt</span>.<span class="ident">append</span>(<span class="ident">key_txt</span>);
<span class="kw">let</span> <span class="ident">label_text</span> <span class="op">=</span> <span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot; - {}&quot;</span>, <span class="ident">label</span>)).<span class="ident">fg</span>(<span class="self">self</span>.<span class="ident">btn_primary_light</span>.<span class="ident">fg_disabled</span>);
<span class="kw">let</span> <span class="ident">label_text</span> <span class="op">=</span> <span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot; - {}&quot;</span>, <span class="ident">label</span>)).<span class="ident">fg</span>(<span class="self">self</span>.<span class="ident">btn_solid_light</span>.<span class="ident">fg_disabled</span>);
<span class="ident">txt</span>.<span class="ident">append</span>(<span class="ident">label_text</span>);
<span class="ident">txt</span>
};
<span class="self">self</span>.<span class="ident">btn_primary_light</span>()
<span class="self">self</span>.<span class="ident">btn_solid_light</span>()
.<span class="ident">label_styled_text</span>(<span class="ident">default</span>, <span class="ident">ControlState</span>::<span class="ident">Default</span>)
.<span class="ident">label_styled_text</span>(<span class="ident">disabled</span>, <span class="ident">ControlState</span>::<span class="ident">Disabled</span>)
.<span class="ident">hotkey</span>(<span class="ident">key</span>)
}
<span class="kw">fn</span> <span class="ident">btn_primary_dark</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">btn_primary_dark</span>;
<span class="kw">fn</span> <span class="ident">btn_solid_dark</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">btn_solid_dark</span>;
<span class="ident">plain_builder</span>(<span class="ident">colors</span>).<span class="ident">outline</span>(<span class="number">2.0</span>, <span class="ident">colors</span>.<span class="ident">outline</span>, <span class="ident">ControlState</span>::<span class="ident">Default</span>)
}
<span class="kw">fn</span> <span class="ident">btn_secondary_dark</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">btn_secondary_dark</span>;
<span class="kw">fn</span> <span class="ident">btn_outline_dark</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">btn_outline_dark</span>;
<span class="ident">plain_builder</span>(<span class="ident">colors</span>).<span class="ident">outline</span>(<span class="number">2.0</span>, <span class="ident">colors</span>.<span class="ident">outline</span>, <span class="ident">ControlState</span>::<span class="ident">Default</span>)
}
<span class="kw">fn</span> <span class="ident">btn_plain_dark</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">btn_secondary_dark</span>;
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">btn_outline_dark</span>;
<span class="ident">plain_builder</span>(<span class="ident">colors</span>)
}
<span class="kw">fn</span> <span class="ident">btn_primary_light</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">btn_primary_light</span>;
<span class="kw">fn</span> <span class="ident">btn_solid_light</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">btn_solid_light</span>;
<span class="ident">plain_builder</span>(<span class="ident">colors</span>).<span class="ident">outline</span>(<span class="number">2.0</span>, <span class="ident">colors</span>.<span class="ident">outline</span>, <span class="ident">ControlState</span>::<span class="ident">Default</span>)
}
<span class="kw">fn</span> <span class="ident">btn_secondary_light</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">btn_secondary_light</span>;
<span class="kw">fn</span> <span class="ident">btn_outline_light</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">btn_outline_light</span>;
<span class="ident">plain_builder</span>(<span class="ident">colors</span>).<span class="ident">outline</span>(<span class="number">2.0</span>, <span class="ident">colors</span>.<span class="ident">outline</span>, <span class="ident">ControlState</span>::<span class="ident">Default</span>)
}
<span class="kw">fn</span> <span class="ident">btn_plain_light</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">btn_secondary_light</span>;
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">btn_outline_light</span>;
<span class="ident">plain_builder</span>(<span class="ident">colors</span>)
}
<span class="kw">fn</span> <span class="ident">btn_plain_destructive</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">btn_secondary_destructive</span>;
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">btn_outline_destructive</span>;
<span class="ident">plain_builder</span>(<span class="ident">colors</span>)
}
<span class="kw">fn</span> <span class="ident">btn_primary_destructive</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">btn_primary_destructive</span>;
<span class="kw">fn</span> <span class="ident">btn_solid_destructive</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">btn_solid_destructive</span>;
<span class="ident">plain_builder</span>(<span class="ident">colors</span>).<span class="ident">outline</span>(<span class="number">2.0</span>, <span class="ident">colors</span>.<span class="ident">outline</span>, <span class="ident">ControlState</span>::<span class="ident">Default</span>)
}
<span class="kw">fn</span> <span class="ident">btn_secondary_destructive</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">btn_secondary_destructive</span>;
<span class="kw">fn</span> <span class="ident">btn_outline_destructive</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">btn_outline_destructive</span>;
<span class="ident">plain_builder</span>(<span class="ident">colors</span>).<span class="ident">outline</span>(<span class="number">2.0</span>, <span class="ident">colors</span>.<span class="ident">outline</span>, <span class="ident">ControlState</span>::<span class="ident">Default</span>)
}
}

View File

@ -111,12 +111,12 @@
<span class="kw">pub</span> <span class="ident">hotkey_color</span>: <span class="ident">Color</span>,
<span class="kw">pub</span> <span class="ident">hovering_color</span>: <span class="ident">Color</span>,
<span class="kw">pub</span> <span class="ident">loading_tips</span>: <span class="ident">Text</span>,
<span class="kw">pub</span> <span class="ident">btn_primary_dark</span>: <span class="ident">ButtonStyle</span>,
<span class="kw">pub</span> <span class="ident">btn_secondary_dark</span>: <span class="ident">ButtonStyle</span>,
<span class="kw">pub</span> <span class="ident">btn_primary_light</span>: <span class="ident">ButtonStyle</span>,
<span class="kw">pub</span> <span class="ident">btn_secondary_light</span>: <span class="ident">ButtonStyle</span>,
<span class="kw">pub</span> <span class="ident">btn_primary_destructive</span>: <span class="ident">ButtonStyle</span>,
<span class="kw">pub</span> <span class="ident">btn_secondary_destructive</span>: <span class="ident">ButtonStyle</span>,
<span class="kw">pub</span> <span class="ident">btn_solid_dark</span>: <span class="ident">ButtonStyle</span>,
<span class="kw">pub</span> <span class="ident">btn_outline_dark</span>: <span class="ident">ButtonStyle</span>,
<span class="kw">pub</span> <span class="ident">btn_solid_light</span>: <span class="ident">ButtonStyle</span>,
<span class="kw">pub</span> <span class="ident">btn_outline_light</span>: <span class="ident">ButtonStyle</span>,
<span class="kw">pub</span> <span class="ident">btn_solid_destructive</span>: <span class="ident">ButtonStyle</span>,
<span class="kw">pub</span> <span class="ident">btn_outline_destructive</span>: <span class="ident">ButtonStyle</span>,
}
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>)]</span>
@ -140,7 +140,7 @@
<span class="ident">loading_tips</span>: <span class="ident">Text</span>::<span class="ident">new</span>(),
<span class="comment">// Buttons</span>
<span class="ident">btn_primary_dark</span>: <span class="ident">ButtonStyle</span> {
<span class="ident">btn_solid_dark</span>: <span class="ident">ButtonStyle</span> {
<span class="ident">fg</span>: <span class="ident">hex</span>(<span class="string">&quot;#4C4C4C&quot;</span>),
<span class="ident">fg_disabled</span>: <span class="ident">hex</span>(<span class="string">&quot;#4C4C4C&quot;</span>).<span class="ident">alpha</span>(<span class="number">0.3</span>),
<span class="ident">bg</span>: <span class="ident">Color</span>::<span class="ident">WHITE</span>.<span class="ident">alpha</span>(<span class="number">0.8</span>),
@ -148,7 +148,7 @@
<span class="ident">bg_disabled</span>: <span class="ident">Color</span>::<span class="ident">grey</span>(<span class="number">0.6</span>),
<span class="ident">outline</span>: <span class="ident">Color</span>::<span class="ident">WHITE</span>.<span class="ident">alpha</span>(<span class="number">0.6</span>),
},
<span class="ident">btn_secondary_dark</span>: <span class="ident">ButtonStyle</span> {
<span class="ident">btn_outline_dark</span>: <span class="ident">ButtonStyle</span> {
<span class="ident">fg</span>: <span class="ident">hex</span>(<span class="string">&quot;#4C4C4C&quot;</span>),
<span class="ident">fg_disabled</span>: <span class="ident">hex</span>(<span class="string">&quot;#4C4C4C&quot;</span>).<span class="ident">alpha</span>(<span class="number">0.3</span>),
<span class="ident">bg</span>: <span class="ident">Color</span>::<span class="ident">CLEAR</span>,
@ -156,7 +156,7 @@
<span class="ident">bg_disabled</span>: <span class="ident">Color</span>::<span class="ident">grey</span>(<span class="number">0.8</span>),
<span class="ident">outline</span>: <span class="ident">hex</span>(<span class="string">&quot;#4C4C4C&quot;</span>),
},
<span class="ident">btn_primary_light</span>: <span class="ident">ButtonStyle</span> {
<span class="ident">btn_solid_light</span>: <span class="ident">ButtonStyle</span> {
<span class="ident">fg</span>: <span class="ident">hex</span>(<span class="string">&quot;#F2F2F2&quot;</span>),
<span class="ident">fg_disabled</span>: <span class="ident">hex</span>(<span class="string">&quot;#F2F2F2&quot;</span>).<span class="ident">alpha</span>(<span class="number">0.3</span>),
<span class="ident">bg</span>: <span class="ident">hex</span>(<span class="string">&quot;#003046&quot;</span>).<span class="ident">alpha</span>(<span class="number">0.8</span>),
@ -164,7 +164,7 @@
<span class="ident">bg_disabled</span>: <span class="ident">Color</span>::<span class="ident">grey</span>(<span class="number">0.1</span>),
<span class="ident">outline</span>: <span class="ident">hex</span>(<span class="string">&quot;#003046&quot;</span>).<span class="ident">alpha</span>(<span class="number">0.6</span>),
},
<span class="ident">btn_secondary_light</span>: <span class="ident">ButtonStyle</span> {
<span class="ident">btn_outline_light</span>: <span class="ident">ButtonStyle</span> {
<span class="ident">fg</span>: <span class="ident">hex</span>(<span class="string">&quot;#F2F2F2&quot;</span>),
<span class="ident">fg_disabled</span>: <span class="ident">hex</span>(<span class="string">&quot;#F2F2F2&quot;</span>).<span class="ident">alpha</span>(<span class="number">0.3</span>),
<span class="ident">bg</span>: <span class="ident">Color</span>::<span class="ident">CLEAR</span>,
@ -172,7 +172,7 @@
<span class="ident">bg_disabled</span>: <span class="ident">Color</span>::<span class="ident">grey</span>(<span class="number">0.5</span>),
<span class="ident">outline</span>: <span class="ident">hex</span>(<span class="string">&quot;#F2F2F2&quot;</span>),
},
<span class="ident">btn_primary_destructive</span>: <span class="ident">ButtonStyle</span> {
<span class="ident">btn_solid_destructive</span>: <span class="ident">ButtonStyle</span> {
<span class="ident">fg</span>: <span class="ident">hex</span>(<span class="string">&quot;#F2F2F2&quot;</span>),
<span class="ident">fg_disabled</span>: <span class="ident">hex</span>(<span class="string">&quot;#F2F2F2&quot;</span>).<span class="ident">alpha</span>(<span class="number">0.3</span>),
<span class="ident">bg</span>: <span class="ident">hex</span>(<span class="string">&quot;#FF5E5E&quot;</span>).<span class="ident">alpha</span>(<span class="number">0.8</span>),
@ -180,7 +180,7 @@
<span class="ident">bg_disabled</span>: <span class="ident">Color</span>::<span class="ident">grey</span>(<span class="number">0.1</span>),
<span class="ident">outline</span>: <span class="ident">hex</span>(<span class="string">&quot;#FF5E5E&quot;</span>).<span class="ident">alpha</span>(<span class="number">0.6</span>),
},
<span class="ident">btn_secondary_destructive</span>: <span class="ident">ButtonStyle</span> {
<span class="ident">btn_outline_destructive</span>: <span class="ident">ButtonStyle</span> {
<span class="ident">fg</span>: <span class="ident">hex</span>(<span class="string">&quot;#FF5E5E&quot;</span>),
<span class="ident">fg_disabled</span>: <span class="ident">hex</span>(<span class="string">&quot;#FF5E5E&quot;</span>).<span class="ident">alpha</span>(<span class="number">0.3</span>),
<span class="ident">bg</span>: <span class="ident">Color</span>::<span class="ident">CLEAR</span>,

View File

@ -310,15 +310,15 @@
.<span class="ident">style</span>()
.<span class="ident">btn_plain_light</span>()
.<span class="ident">image_color</span>(
<span class="ident">RewriteColor</span>::<span class="ident">Change</span>(<span class="ident">Color</span>::<span class="ident">BLACK</span>, <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_primary_light</span>.<span class="ident">bg</span>),
<span class="ident">RewriteColor</span>::<span class="ident">Change</span>(<span class="ident">Color</span>::<span class="ident">BLACK</span>, <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_solid_light</span>.<span class="ident">bg</span>),
<span class="ident">ControlState</span>::<span class="ident">Default</span>,
)
.<span class="ident">image_color</span>(
<span class="ident">RewriteColor</span>::<span class="ident">Change</span>(<span class="ident">Color</span>::<span class="ident">BLACK</span>, <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_primary_light</span>.<span class="ident">bg_hover</span>),
<span class="ident">RewriteColor</span>::<span class="ident">Change</span>(<span class="ident">Color</span>::<span class="ident">BLACK</span>, <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_solid_light</span>.<span class="ident">bg_hover</span>),
<span class="ident">ControlState</span>::<span class="ident">Hovered</span>,
)
.<span class="ident">image_color</span>(
<span class="ident">RewriteColor</span>::<span class="ident">Change</span>(<span class="ident">Color</span>::<span class="ident">BLACK</span>, <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_primary_light</span>.<span class="ident">bg_disabled</span>),
<span class="ident">RewriteColor</span>::<span class="ident">Change</span>(<span class="ident">Color</span>::<span class="ident">BLACK</span>, <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_solid_light</span>.<span class="ident">bg_disabled</span>),
<span class="ident">ControlState</span>::<span class="ident">Disabled</span>,
)
.<span class="ident">label_text</span>(<span class="ident">label</span>)
@ -353,15 +353,15 @@
.<span class="ident">style</span>()
.<span class="ident">btn_plain_light</span>()
.<span class="ident">image_color</span>(
<span class="ident">RewriteColor</span>::<span class="ident">Change</span>(<span class="ident">Color</span>::<span class="ident">BLACK</span>, <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_primary_light</span>.<span class="ident">bg</span>),
<span class="ident">RewriteColor</span>::<span class="ident">Change</span>(<span class="ident">Color</span>::<span class="ident">BLACK</span>, <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_solid_light</span>.<span class="ident">bg</span>),
<span class="ident">ControlState</span>::<span class="ident">Default</span>,
)
.<span class="ident">image_color</span>(
<span class="ident">RewriteColor</span>::<span class="ident">Change</span>(<span class="ident">Color</span>::<span class="ident">BLACK</span>, <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_primary_light</span>.<span class="ident">bg_hover</span>),
<span class="ident">RewriteColor</span>::<span class="ident">Change</span>(<span class="ident">Color</span>::<span class="ident">BLACK</span>, <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_solid_light</span>.<span class="ident">bg_hover</span>),
<span class="ident">ControlState</span>::<span class="ident">Hovered</span>,
)
.<span class="ident">image_color</span>(
<span class="ident">RewriteColor</span>::<span class="ident">Change</span>(<span class="ident">Color</span>::<span class="ident">BLACK</span>, <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_primary_light</span>.<span class="ident">bg_disabled</span>),
<span class="ident">RewriteColor</span>::<span class="ident">Change</span>(<span class="ident">Color</span>::<span class="ident">BLACK</span>, <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_solid_light</span>.<span class="ident">bg_disabled</span>),
<span class="ident">ControlState</span>::<span class="ident">Disabled</span>,
)
.<span class="ident">label_styled_text</span>(<span class="ident">Text</span>::<span class="ident">from_all</span>(<span class="ident">spans</span>), <span class="ident">ControlState</span>::<span class="ident">Default</span>)
@ -447,7 +447,7 @@
})
<span class="comment">// TODO: make these clickable. Currently they would explode due to re-use of an action</span>
.<span class="ident">disabled</span>(<span class="bool-val">true</span>)
.<span class="ident">label_color</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_secondary_light</span>.<span class="ident">fg</span>, <span class="ident">ControlState</span>::<span class="ident">Disabled</span>)
.<span class="ident">label_color</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_outline_light</span>.<span class="ident">fg</span>, <span class="ident">ControlState</span>::<span class="ident">Disabled</span>)
.<span class="ident">bg_color</span>(<span class="ident">Color</span>::<span class="ident">CLEAR</span>, <span class="ident">ControlState</span>::<span class="ident">Disabled</span>);
<span class="kw">let</span> <span class="ident">right_text_button</span> <span class="op">=</span> <span class="ident">left_text_button</span>.<span class="ident">clone</span>().<span class="ident">label_text</span>(<span class="ident">right_label</span>);
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[

View File

@ -378,7 +378,7 @@
<span class="kw">fn</span> <span class="ident">make_btn</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="ident">EventCtx</span>, <span class="ident">label</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>, <span class="ident">tooltip</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>, <span class="ident">is_persisten_split</span>: <span class="ident">bool</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Button</span> {
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">StyledButtons</span>;
<span class="comment">// If we want to make Dropdown configurable, pass in or expose its button builder?</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">builder</span> <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_primary_light_dropdown</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">builder</span> <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_solid_light_dropdown</span>();
<span class="kw">if</span> <span class="ident">is_persisten_split</span> {
<span class="comment">// Quick hacks to make PersistentSplit&#39;s dropdown look a little better.</span>
<span class="comment">// It&#39;s not ideal, but we only use one persistent split in the whole app</span>

View File

@ -206,7 +206,7 @@
<span class="kw">fn</span> <span class="ident">button_builder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ButtonBuilder</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
<span class="kw">use</span> <span class="kw">crate</span>::{<span class="ident">ControlState</span>, <span class="ident">StyledButtons</span>};
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_light</span>()
.<span class="ident">btn_solid_light</span>()
.<span class="ident">outline</span>(<span class="number">0.0</span>, <span class="ident">Color</span>::<span class="ident">CLEAR</span>, <span class="ident">ControlState</span>::<span class="ident">Default</span>)
}

View File

@ -379,7 +379,7 @@
.<span class="ident">map</span>(<span class="op">|</span><span class="ident">col</span><span class="op">|</span> {
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">sort_by</span> <span class="op">=</span><span class="op">=</span> <span class="ident">col</span>.<span class="ident">name</span> {
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_dark_icon_text</span>(<span class="string">&quot;tmp&quot;</span>, <span class="kw-2">&amp;</span><span class="ident">col</span>.<span class="ident">name</span>)
.<span class="ident">btn_solid_dark_icon_text</span>(<span class="string">&quot;tmp&quot;</span>, <span class="kw-2">&amp;</span><span class="ident">col</span>.<span class="ident">name</span>)
.<span class="ident">image_bytes</span>(<span class="kw">if</span> <span class="self">self</span>.<span class="ident">descending</span> {
<span class="macro">include_labeled_bytes</span><span class="macro">!</span>(<span class="string">&quot;../../icons/arrow_down.svg&quot;</span>)
} <span class="kw">else</span> {
@ -388,7 +388,7 @@
.<span class="ident">label_first</span>()
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="ident">col</span>.<span class="ident">name</span>)
} <span class="kw">else</span> <span class="kw">if</span> <span class="kw">let</span> <span class="ident">Col</span>::<span class="ident">Sortable</span>(<span class="kw">_</span>) <span class="op">=</span> <span class="ident">col</span>.<span class="ident">col</span> {
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_primary_dark_text</span>(<span class="kw-2">&amp;</span><span class="ident">col</span>.<span class="ident">name</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>)
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&amp;</span><span class="ident">col</span>.<span class="ident">name</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>)
} <span class="kw">else</span> {
<span class="ident">Line</span>(<span class="kw-2">&amp;</span><span class="ident">col</span>.<span class="ident">name</span>).<span class="ident">draw</span>(<span class="ident">ctx</span>).<span class="ident">centered_vert</span>()
}

View File

@ -796,49 +796,49 @@
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Text</span>::<span class="ident">from</span>(<span class="ident">Line</span>(<span class="string">&quot;Neutral Dark&quot;</span>)).<span class="ident">bg</span>(<span class="ident">Color</span>::<span class="ident">CLEAR</span>).<span class="ident">draw</span>(<span class="ident">ctx</span>),
<span class="ident">btn</span>.<span class="ident">btn_primary_dark_text</span>(<span class="string">&quot;Primary&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_primary_dark_text&quot;</span>),
<span class="ident">btn</span>.<span class="ident">btn_solid_dark_text</span>(<span class="string">&quot;Primary&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_solid_dark_text&quot;</span>),
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">btn</span>.<span class="ident">btn_primary_dark_icon</span>(<span class="string">&quot;system/assets/tools/map.svg&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_primary_dark_icon_1&quot;</span>),
<span class="ident">btn</span>.<span class="ident">btn_primary_dark_icon</span>(<span class="string">&quot;system/assets/tools/layers.svg&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_primary_dark_icon_2&quot;</span>),
<span class="ident">btn</span>.<span class="ident">btn_solid_dark_icon</span>(<span class="string">&quot;system/assets/tools/map.svg&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_solid_dark_icon_1&quot;</span>),
<span class="ident">btn</span>.<span class="ident">btn_solid_dark_icon</span>(<span class="string">&quot;system/assets/tools/layers.svg&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_solid_dark_icon_2&quot;</span>),
]),
<span class="ident">btn</span>.<span class="ident">btn_primary_dark_icon_text</span>(<span class="string">&quot;system/assets/tools/location.svg&quot;</span>, <span class="string">&quot;Primary&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_primary_dark_icon_text&quot;</span>),
<span class="ident">btn</span>.<span class="ident">btn_secondary_dark_text</span>(<span class="string">&quot;Secondary&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_secondary_dark_text&quot;</span>),
<span class="ident">btn</span>.<span class="ident">btn_solid_dark_icon_text</span>(<span class="string">&quot;system/assets/tools/location.svg&quot;</span>, <span class="string">&quot;Primary&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_solid_dark_icon_text&quot;</span>),
<span class="ident">btn</span>.<span class="ident">btn_outline_dark_text</span>(<span class="string">&quot;Secondary&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_outline_dark_text&quot;</span>),
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">btn</span>.<span class="ident">btn_secondary_dark_icon</span>(<span class="string">&quot;system/assets/tools/map.svg&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_secondary_dark_icon_1&quot;</span>),
<span class="ident">btn</span>.<span class="ident">btn_secondary_dark_icon</span>(<span class="string">&quot;system/assets/tools/layers.svg&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_secondary_dark_icon_2&quot;</span>),
<span class="ident">btn</span>.<span class="ident">btn_outline_dark_icon</span>(<span class="string">&quot;system/assets/tools/map.svg&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_outline_dark_icon_1&quot;</span>),
<span class="ident">btn</span>.<span class="ident">btn_outline_dark_icon</span>(<span class="string">&quot;system/assets/tools/layers.svg&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_outline_dark_icon_2&quot;</span>),
]),
<span class="ident">btn</span>.<span class="ident">btn_secondary_dark_icon_text</span>(<span class="string">&quot;system/assets/tools/home.svg&quot;</span>, <span class="string">&quot;Secondary&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_secondary_dark_icon_text&quot;</span>),
<span class="ident">btn</span>.<span class="ident">btn_outline_dark_icon_text</span>(<span class="string">&quot;system/assets/tools/home.svg&quot;</span>, <span class="string">&quot;Secondary&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_outline_dark_icon_text&quot;</span>),
]),
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Text</span>::<span class="ident">from</span>(<span class="ident">Line</span>(<span class="string">&quot;Neutral Light&quot;</span>)).<span class="ident">bg</span>(<span class="ident">Color</span>::<span class="ident">CLEAR</span>).<span class="ident">draw</span>(<span class="ident">ctx</span>),
<span class="ident">btn</span>.<span class="ident">btn_primary_light_text</span>(<span class="string">&quot;Primary&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_primary_light_text&quot;</span>),
<span class="ident">btn</span>.<span class="ident">btn_solid_light_text</span>(<span class="string">&quot;Primary&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_solid_light_text&quot;</span>),
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">btn</span>.<span class="ident">btn_primary_light_icon</span>(<span class="string">&quot;system/assets/tools/home.svg&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_primary_light_icon_1&quot;</span>),
<span class="ident">btn</span>.<span class="ident">btn_primary_light_icon</span>(<span class="string">&quot;system/assets/tools/location.svg&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_primary_light_icon_2&quot;</span>),
<span class="ident">btn</span>.<span class="ident">btn_solid_light_icon</span>(<span class="string">&quot;system/assets/tools/home.svg&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_solid_light_icon_1&quot;</span>),
<span class="ident">btn</span>.<span class="ident">btn_solid_light_icon</span>(<span class="string">&quot;system/assets/tools/location.svg&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_solid_light_icon_2&quot;</span>),
]),
<span class="ident">btn</span>.<span class="ident">btn_primary_light_icon_text</span>(<span class="string">&quot;system/assets/tools/map.svg&quot;</span>, <span class="string">&quot;Primary&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_primary_light_icon_text&quot;</span>),
<span class="ident">btn</span>.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Secondary&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_secondary_light_text&quot;</span>),
<span class="ident">btn</span>.<span class="ident">btn_solid_light_icon_text</span>(<span class="string">&quot;system/assets/tools/map.svg&quot;</span>, <span class="string">&quot;Primary&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_solid_light_icon_text&quot;</span>),
<span class="ident">btn</span>.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Secondary&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_outline_light_text&quot;</span>),
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">btn</span>.<span class="ident">btn_secondary_light_icon</span>(<span class="string">&quot;system/assets/tools/home.svg&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_secondary_light_icon_1&quot;</span>),
<span class="ident">btn</span>.<span class="ident">btn_secondary_light_icon</span>(<span class="string">&quot;system/assets/tools/location.svg&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_secondary_light_icon_2&quot;</span>),
<span class="ident">btn</span>.<span class="ident">btn_outline_light_icon</span>(<span class="string">&quot;system/assets/tools/home.svg&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_outline_light_icon_1&quot;</span>),
<span class="ident">btn</span>.<span class="ident">btn_outline_light_icon</span>(<span class="string">&quot;system/assets/tools/location.svg&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_outline_light_icon_2&quot;</span>),
]),
<span class="ident">btn</span>.<span class="ident">btn_secondary_light_icon_text</span>(<span class="string">&quot;system/assets/tools/layers.svg&quot;</span>, <span class="string">&quot;Secondary&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_secondary_light_icon_text&quot;</span>),
<span class="ident">btn</span>.<span class="ident">btn_outline_light_icon_text</span>(<span class="string">&quot;system/assets/tools/layers.svg&quot;</span>, <span class="string">&quot;Secondary&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_outline_light_icon_text&quot;</span>),
]),
]),
<span class="ident">Text</span>::<span class="ident">from</span>(
@ -848,13 +848,13 @@
)
.<span class="ident">draw</span>(<span class="ident">ctx</span>),
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">btn</span>.<span class="ident">btn_primary_light_icon</span>(<span class="string">&quot;system/assets/tools/layers.svg&quot;</span>)
<span class="ident">btn</span>.<span class="ident">btn_solid_light_icon</span>(<span class="string">&quot;system/assets/tools/layers.svg&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_height_icon&quot;</span>),
<span class="ident">btn</span>.<span class="ident">btn_primary_light_text</span>(<span class="string">&quot;text&quot;</span>)
<span class="ident">btn</span>.<span class="ident">btn_solid_light_text</span>(<span class="string">&quot;text&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_height_text&quot;</span>),
<span class="ident">btn</span>.<span class="ident">btn_secondary_light_icon_text</span>(<span class="string">&quot;system/assets/tools/layers.svg&quot;</span>, <span class="string">&quot;icon+text&quot;</span>)
<span class="ident">btn</span>.<span class="ident">btn_outline_light_icon_text</span>(<span class="string">&quot;system/assets/tools/layers.svg&quot;</span>, <span class="string">&quot;icon+text&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_height_icon_text&quot;</span>),
<span class="ident">btn</span>.<span class="ident">btn_popup_light</span>(<span class="string">&quot;popup&quot;</span>)
<span class="ident">btn</span>.<span class="ident">btn_outline_light_popup</span>(<span class="string">&quot;popup&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;btn_height_popup&quot;</span>),
<span class="ident">widgetry</span>::<span class="ident">Spinner</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, (<span class="number">0</span>, <span class="number">11</span>), <span class="number">1</span>),
]),
@ -862,7 +862,7 @@
<span class="ident">widgetry</span>::<span class="ident">Spinner</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, (<span class="number">0</span>, <span class="number">11</span>), <span class="number">1</span>),
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;New faces&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;New faces&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">F</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;generate new faces&quot;</span>),
<span class="ident">Checkbox</span>::<span class="ident">switch</span>(<span class="ident">ctx</span>, <span class="string">&quot;Draw scrollable canvas&quot;</span>, <span class="prelude-val">None</span>, <span class="bool-val">true</span>),
@ -876,11 +876,11 @@
<span class="ident">Checkbox</span>::<span class="ident">new</span>(
<span class="bool-val">false</span>,
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_light_text</span>(<span class="string">&quot;Pause&quot;</span>)
.<span class="ident">btn_solid_light_text</span>(<span class="string">&quot;Pause&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Space</span>)
.<span class="ident">build</span>(<span class="ident">ctx</span>, <span class="string">&quot;pause the stopwatch&quot;</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_primary_light_text</span>(<span class="string">&quot;Resume&quot;</span>)
.<span class="ident">btn_solid_light_text</span>(<span class="string">&quot;Resume&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Space</span>)
.<span class="ident">build</span>(<span class="ident">ctx</span>, <span class="string">&quot;resume the stopwatch&quot;</span>),
)
@ -896,7 +896,7 @@
],
),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Reset Timer&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Reset Timer&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;reset the stopwatch&quot;</span>),
])
.<span class="ident">evenly_spaced</span>(),
@ -935,7 +935,7 @@
],
),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_secondary_light_text</span>(<span class="string">&quot;Apply&quot;</span>)
.<span class="ident">btn_outline_light_text</span>(<span class="string">&quot;Apply&quot;</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;apply&quot;</span>),
])
.<span class="ident">margin_above</span>(<span class="number">30</span>),

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `back_button` fn in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, back_button"><title>widgetry::style::buttons::back_button - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">style</a>::<wbr><a href="index.html">buttons</a></p><script>window.sidebarCurrent = {name: "back_button", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/widgetry/style/buttons.rs.html#299-306" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">style</a>::<wbr><a href="index.html">buttons</a>::<wbr><a class="fn" href="">back_button</a></span></h1><pre class="rust fn">fn back_button&lt;'a&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;builder: <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a>&lt;'a&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;title: &amp;'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a>&lt;'a&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "widgetry";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/widgetry/style/buttons.rs.html#291-298" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">style</a>::<wbr><a href="index.html">buttons</a>::<wbr><a class="fn" href="">back_button</a></span></h1><pre class="rust fn">fn back_button&lt;'a&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;builder: <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a>&lt;'a&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;title: &amp;'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a>&lt;'a&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "widgetry";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `dropdown_button` fn in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, dropdown_button"><title>widgetry::style::buttons::dropdown_button - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">style</a>::<wbr><a href="index.html">buttons</a></p><script>window.sidebarCurrent = {name: "dropdown_button", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/widgetry/style/buttons.rs.html#308-314" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">style</a>::<wbr><a href="index.html">buttons</a>::<wbr><a class="fn" href="">dropdown_button</a></span></h1><pre class="rust fn">fn dropdown_button&lt;'a&gt;(builder: <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a>&lt;'a&gt;) -&gt; <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a>&lt;'a&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "widgetry";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/widgetry/style/buttons.rs.html#300-306" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">style</a>::<wbr><a href="index.html">buttons</a>::<wbr><a class="fn" href="">dropdown_button</a></span></h1><pre class="rust fn">fn dropdown_button&lt;'a&gt;(builder: <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a>&lt;'a&gt;) -&gt; <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a>&lt;'a&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "widgetry";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `icon_button` fn in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, icon_button"><title>widgetry::style::buttons::icon_button - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">style</a>::<wbr><a href="index.html">buttons</a></p><script>window.sidebarCurrent = {name: "icon_button", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/widgetry/style/buttons.rs.html#295-297" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">style</a>::<wbr><a href="index.html">buttons</a>::<wbr><a class="fn" href="">icon_button</a></span></h1><pre class="rust fn">fn icon_button&lt;'a&gt;(builder: <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a>&lt;'a&gt;) -&gt; <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a>&lt;'a&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "widgetry";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/widgetry/style/buttons.rs.html#287-289" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">style</a>::<wbr><a href="index.html">buttons</a>::<wbr><a class="fn" href="">icon_button</a></span></h1><pre class="rust fn">fn icon_button&lt;'a&gt;(builder: <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a>&lt;'a&gt;) -&gt; <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a>&lt;'a&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "widgetry";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `plain_builder` fn in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, plain_builder"><title>widgetry::style::buttons::plain_builder - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">style</a>::<wbr><a href="index.html">buttons</a></p><script>window.sidebarCurrent = {name: "plain_builder", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/widgetry/style/buttons.rs.html#283-292" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">style</a>::<wbr><a href="index.html">buttons</a>::<wbr><a class="fn" href="">plain_builder</a></span></h1><pre class="rust fn">fn plain_builder&lt;'a&gt;(color_scheme: &amp;<a class="struct" href="../../../widgetry/style/struct.ButtonStyle.html" title="struct widgetry::style::ButtonStyle">ButtonStyle</a>) -&gt; <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a>&lt;'a&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "widgetry";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/widgetry/style/buttons.rs.html#275-284" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">style</a>::<wbr><a href="index.html">buttons</a>::<wbr><a class="fn" href="">plain_builder</a></span></h1><pre class="rust fn">fn plain_builder&lt;'a&gt;(color_scheme: &amp;<a class="struct" href="../../../widgetry/style/struct.ButtonStyle.html" title="struct widgetry::style::ButtonStyle">ButtonStyle</a>) -&gt; <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a>&lt;'a&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "widgetry";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `buttons` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, buttons"><title>widgetry::style::buttons - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module buttons</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">style</a></p><script>window.sidebarCurrent = {name: "buttons", ty: "mod", relpath: "../"};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/widgetry/style/buttons.rs.html#1-314" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">style</a>::<wbr><a class="mod" href="">buttons</a></span></h1><h2 id="traits" class="section-header"><a href="#traits">Traits</a></h2>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/widgetry/style/buttons.rs.html#1-306" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">style</a>::<wbr><a class="mod" href="">buttons</a></span></h1><h2 id="traits" class="section-header"><a href="#traits">Traits</a></h2>
<table><tr class="module-item"><td><a class="trait" href="trait.StyledButtons.html" title="widgetry::style::buttons::StyledButtons trait">StyledButtons</a></td><td class="docblock-short"></td></tr></table><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
<table><tr class="module-item"><td><a class="fn" href="fn.back_button.html" title="widgetry::style::buttons::back_button fn">back_button</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.dropdown_button.html" title="widgetry::style::buttons::dropdown_button fn">dropdown_button</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.icon_button.html" title="widgetry::style::buttons::icon_button fn">icon_button</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.plain_builder.html" title="widgetry::style::buttons::plain_builder fn">plain_builder</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "widgetry";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long