mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-25 15:33:44 +03:00
deploy: db115e6fc6
This commit is contained in:
parent
eb70cf1519
commit
40a20cc92c
@ -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>(&self, g: &mut GfxCtx<'_>, app: &<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>(&self) -> 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>(&mut self, &mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
|
||||
</div></div><h3 id="impl-State%3CApp%3E-44" class="impl"><code class="in-band">impl State<<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>> 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>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Transition<<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#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>(&self, g: &mut GfxCtx<'_>, app: &<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<<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>> 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>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Transition<<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#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>(&self, g: &mut GfxCtx<'_>, app: &<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>(&self) -> 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>(&mut self, &mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
|
||||
</div></div><h3 id="impl-State%3CApp%3E-45" class="impl"><code class="in-band">impl State<<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>> 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>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Transition<<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>></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>
|
||||
|
@ -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">☰</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">−</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><<a class="struct" href="../../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>>) -> <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">−</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><<a class="struct" href="../../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>>) -> <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>
|
@ -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">☰</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">−</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">−</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
@ -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">☰</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">−</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: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "Sat, 23 Jan 2021 05:20:12 +0000";</pre><div class="docblock"><p>The built-time in RFC2822, UTC</p>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-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: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "Sat, 23 Jan 2021 05:25:17 +0000";</pre><div class="docblock"><p>The built-time in RFC2822, UTC</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -1,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">☰</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">−</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">−</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>
|
||||
|
@ -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><<a class="enum" href="../../../game/sandbox/gameplay/enum.GameplayMode.html" title="enum game::sandbox::gameplay::GameplayMode">GameplayMode</a>></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> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br> msg: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br> mode: <a class="enum" href="../../../game/sandbox/gameplay/enum.GameplayMode.html" title="enum game::sandbox::gameplay::GameplayMode">GameplayMode</a>, <br> next_mode: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../../../game/sandbox/gameplay/enum.GameplayMode.html" title="enum game::sandbox::gameplay::GameplayMode">GameplayMode</a>><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn State<<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>>></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<<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>> 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>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Transition<<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#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>(&self, g: &mut GfxCtx<'_>, app: &<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><<a class="enum" href="../../../game/sandbox/gameplay/enum.GameplayMode.html" title="enum game::sandbox::gameplay::GameplayMode">GameplayMode</a>></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> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br> msg: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br> mode: <a class="enum" href="../../../game/sandbox/gameplay/enum.GameplayMode.html" title="enum game::sandbox::gameplay::GameplayMode">GameplayMode</a>, <br> next_mode: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../../../game/sandbox/gameplay/enum.GameplayMode.html" title="enum game::sandbox::gameplay::GameplayMode">GameplayMode</a>><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn State<<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>>></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<<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>> 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>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Transition<<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#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>(&self, g: &mut GfxCtx<'_>, app: &<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>(&self) -> DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
|
||||
</div><h4 id="method.on_destroy" class="method hidden"><code>fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&mut self, &mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
|
||||
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../../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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
|
@ -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">☰</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">−</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">−</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
@ -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">☰</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">−</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: &<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>) -> <a class="type" href="https://docs.rs/anyhow/1.0.37/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</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">−</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: &<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>) -> <a class="type" href="https://docs.rs/anyhow/1.0.37/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</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>
|
@ -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">☰</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">−</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>) -> <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">−</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>) -> <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>
|
@ -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">☰</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">−</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: &<a class="struct" href="../../../abstio/abst_data/struct.Manifest.html" title="struct abstio::abst_data::Manifest">Manifest</a>) -> <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><<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>></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">−</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: &<a class="struct" href="../../../abstio/abst_data/struct.Manifest.html" title="struct abstio::abst_data::Manifest">Manifest</a>) -> <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><<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>></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>
|
@ -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">☰</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">−</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: &mut <a class="struct" href="../../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a><'_>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<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">−</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: &mut <a class="struct" href="../../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a><'_>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<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>
|
@ -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">☰</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">−</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">−</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>
|
@ -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><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>A) -> Transition<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.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><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>A) -> Transition<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: <a class="trait" href="../../../map_gui/trait.AppLike.html" title="trait map_gui::AppLike">AppLike</a> + 'static> <a class="struct" href="../../../map_gui/tools/updater/struct.Picker.html" title="struct map_gui::tools::updater::Picker">Picker</a><A></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> ctx: &mut EventCtx<'_>, <br> on_load: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>A) -> Transition<A>><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn State<A>></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<A: <a class="trait" href="../../../map_gui/trait.AppLike.html" title="trait map_gui::AppLike">AppLike</a> + 'static> State<A> for <a class="struct" href="../../../map_gui/tools/updater/struct.Picker.html" title="struct map_gui::tools::updater::Picker">Picker</a><A></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>(&mut self, ctx: &mut EventCtx<'_>, app: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>A) -> Transition<A></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>(&self, g: &mut GfxCtx<'_>, _: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</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><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>A) -> Transition<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: <a class="trait" href="../../../map_gui/trait.AppLike.html" title="trait map_gui::AppLike">AppLike</a> + 'static> <a class="struct" href="../../../map_gui/tools/updater/struct.Picker.html" title="struct map_gui::tools::updater::Picker">Picker</a><A></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> ctx: &mut EventCtx<'_>, <br> on_load: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>A) -> Transition<A>><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn State<A>></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<A: <a class="trait" href="../../../map_gui/trait.AppLike.html" title="trait map_gui::AppLike">AppLike</a> + 'static> State<A> for <a class="struct" href="../../../map_gui/tools/updater/struct.Picker.html" title="struct map_gui::tools::updater::Picker">Picker</a><A></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>(&mut self, ctx: &mut EventCtx<'_>, app: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>A) -> Transition<A></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>(&self, g: &mut GfxCtx<'_>, _: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</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>(&self) -> DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
|
||||
</div><h4 id="method.on_destroy" class="method hidden"><code>fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&mut self, &mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
|
||||
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl<A> !<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><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> !<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><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> !<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><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> <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><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> !<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><A></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
|
File diff suppressed because one or more lines are too long
@ -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">"Search"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Search"</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">"Back"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Back"</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>),
|
||||
]))
|
||||
|
@ -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">"Map:"</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">"change map"</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">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"{}: {}"</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">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"{}: {}"</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">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"businesses: {}"</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">&</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">"Find your perfect home"</span>)
|
||||
.<span class="ident">btn_solid_light_text</span>(<span class="string">"Find your perfect home"</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>[
|
||||
|
@ -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">"Start"</span>)
|
||||
.<span class="ident">btn_solid_light_text</span>(<span class="string">"Start"</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">"Skip cutscene"</span>)
|
||||
.<span class="ident">btn_outline_dark_text</span>(<span class="string">"Skip cutscene"</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'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">"Home"</span>)
|
||||
.<span class="ident">btn_light_back</span>(<span class="string">"Home"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"quit"</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">"Okay"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Okay"</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>()
|
||||
|
@ -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">"Home"</span>)
|
||||
.<span class="ident">btn_light_back</span>(<span class="string">"Home"</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">"back"</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">"Introduction and tutorial"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Introduction and tutorial"</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">&</span><span class="ident">name</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&</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">&</span><span class="ident">stage</span>.<span class="ident">title</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="kw-2">&</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">"Start!"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Start!"</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>),
|
||||
];
|
||||
|
@ -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">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>) <span class="op">-</span><span class="op">></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>
|
||||
|
@ -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">"input"</span>),
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_secondary_light_text</span>(<span class="string">"Go!"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Go!"</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>),
|
||||
]))
|
||||
|
@ -919,56 +919,56 @@
|
||||
<span class="ident">Checkbox</span>::<span class="ident">switch</span>(<span class="ident">ctx</span>, <span class="string">"show route for all agents"</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">"unhide everything"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"unhide everything"</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">"screenshot everything (for leaflet)"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"screenshot everything (for leaflet)"</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">"screenshot all of the everything"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"screenshot all of the everything"</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">"search OSM metadata"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"search OSM metadata"</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">"clear OSM search results"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"clear OSM search results"</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">"save sim state"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"save sim state"</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">"load previous sim state"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"load previous sim state"</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">"load next sim state"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"load next sim state"</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">"pick a savestate to load"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"pick a savestate to load"</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">"find bad traffic signals"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"find bad traffic signals"</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">"find degenerate roads"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"find degenerate roads"</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">"find large intersections"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"find large intersections"</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">"sim internal stats"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"sim internal stats"</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">"blocked-by graph"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"blocked-by graph"</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">"render to GeoJSON"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"render to GeoJSON"</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>),
|
||||
]),
|
||||
|
@ -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">"load KML file"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"load KML file"</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>[
|
||||
|
@ -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">"Change map:"</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">"change map"</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">"edit a polygon"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"edit a polygon"</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">"draw a polygon"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"draw a polygon"</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">"load scenario"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"load scenario"</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">"view KML"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"view KML"</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">"story maps"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"story maps"</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">"collisions"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"collisions"</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> {
|
||||
|
@ -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">"export as an Osmosis polygon filter"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"export as an Osmosis polygon filter"</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>),
|
||||
]))
|
||||
|
@ -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">"popular destinations"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"popular destinations"</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>[
|
||||
|
@ -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">"Story map editor"</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">&</span><span class="ident">story</span>.<span class="ident">name</span>)
|
||||
.<span class="ident">btn_outline_light_popup</span>(<span class="kw-2">&</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">"load"</span>),
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_primary_light_icon</span>(<span class="string">"system/assets/tools/save.svg"</span>)
|
||||
.<span class="ident">btn_solid_light_icon</span>(<span class="string">"system/assets/tools/save.svg"</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">"save"</span>),
|
||||
@ -1106,12 +1104,10 @@
|
||||
<span class="ident">Line</span>(<span class="string">"Editing marker"</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">"delete"</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">"delete"</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">"event"</span>),
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_secondary_light_text</span>(<span class="string">"confirm"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"confirm"</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>),
|
||||
]))
|
||||
|
@ -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">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"Edit {} roads"</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">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"Edit {} roads"</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">"edit roads"</span>),
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_secondary_light_text</span>(<span class="kw-2">&</span><span class="macro">format</span><span class="macro">!</span>(
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="kw-2">&</span><span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"Export {} roads to shared-row"</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">"export roads to shared-row"</span>),
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_secondary_light_text</span>(<span class="string">"export one road to Streetmix"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"export one road to Streetmix"</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">"export list of roads"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"export list of roads"</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">"Cancel"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Cancel"</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">"Finish"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Finish"</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>()
|
||||
|
@ -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">"Finish"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Finish"</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>)
|
||||
|
@ -331,7 +331,7 @@
|
||||
<span class="string">"Type of lane"</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">"reverse direction"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"reverse direction"</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">"Change access restrictions"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Change access restrictions"</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">"Finish"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Finish"</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>),
|
||||
];
|
||||
|
@ -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">"Discard proposal"</span>)
|
||||
.<span class="ident">btn_solid_destructive_text</span>(<span class="string">"Discard proposal"</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">"Cancel"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Cancel"</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">"Save"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Save"</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">"Save"</span>,
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_primary_dark_text</span>(<span class="string">"Save"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Save"</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">"Save"</span>,
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_primary_dark_text</span>(<span class="string">"Save"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Save"</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">"Save"</span>,
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_primary_dark_text</span>(<span class="string">"Save"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Save"</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">&</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">&</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">&</span><span class="ident">name</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="kw-2">&</span><span class="ident">name</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&</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">"Start over with blank proposal"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Start over with blank proposal"</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">&</span><span class="macro">format</span><span class="macro">!</span>(
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&</span><span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"Finish & resume from {}"</span>,
|
||||
<span class="ident">app</span>.<span class="ident">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">&</span><span class="ident">edits</span>.<span class="ident">edits_name</span>)
|
||||
.<span class="ident">btn_outline_light_popup</span>(<span class="kw-2">&</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">"manage proposals"</span>),
|
||||
<span class="string">"autosaved"</span>
|
||||
@ -1769,11 +1769,11 @@
|
||||
<span class="string">"Are you sure you want to discard changes you made?"</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">"Cancel"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Cancel"</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">"Yes, discard"</span>)
|
||||
.<span class="ident">btn_solid_destructive_text</span>(<span class="string">"Yes, discard"</span>)
|
||||
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
|
||||
])
|
||||
.<span class="ident">align_right</span>(),
|
||||
|
@ -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">"freq_mins"</span>),
|
||||
]),
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_primary_dark_text</span>(<span class="string">"Apply"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Apply"</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>),
|
||||
]))
|
||||
|
@ -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">"Stop sign editor"</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">"reset to default"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"reset to default"</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">&</span><span class="ident">ControlStopSign</span>::<span class="ident">new</span>(<span class="kw-2">&</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">"close intersection for construction"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"close intersection for construction"</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">"convert to traffic signal"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"convert to traffic signal"</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">"Finish"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Finish"</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>),
|
||||
]))
|
||||
|
@ -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">"Apply"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Apply"</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>),
|
||||
]))
|
||||
|
@ -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">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">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">></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">"Finish"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Finish"</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">"Preview"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Preview"</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">"Export"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Export"</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">"This will create a JSON file in traffic_signal_data/."</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">"Edit entire signal"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Edit entire signal"</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">"Tune offsets between signals"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Tune offsets between signals"</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">"../widgetry/icons/arrow_up.svg"</span>)
|
||||
.<span class="ident">btn_solid_light_icon</span>(<span class="string">"../widgetry/icons/arrow_up.svg"</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">"../widgetry/icons/arrow_down.svg"</span>)
|
||||
.<span class="ident">btn_solid_light_icon</span>(<span class="string">"../widgetry/icons/arrow_down.svg"</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">></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">"system/assets/tools/trash.svg"</span>)
|
||||
.<span class="ident">btn_solid_destructive_icon</span>(<span class="string">"system/assets/tools/trash.svg"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"delete stage {}"</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">"Add a new stage"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Add a new stage"</span>)
|
||||
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
|
||||
.<span class="ident">centered_horiz</span>(),
|
||||
);
|
||||
|
@ -563,7 +563,7 @@
|
||||
.<span class="ident">named</span>(<span class="string">"offset"</span>),
|
||||
]),
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_primary_dark_text</span>(<span class="string">"Update offset"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Update offset"</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>),
|
||||
]))
|
||||
|
@ -237,7 +237,7 @@
|
||||
<span class="kw">_</span> <span class="op">=</span><span class="op">></span> <span class="macro">format</span><span class="macro">!</span>(<span class="string">"Edit {} signals"</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">&</span><span class="ident">title</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&</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">"edit"</span>)
|
||||
|
@ -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">"Previewing traffic signal"</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">"back to editing"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"back to editing"</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>),
|
||||
]))
|
||||
|
@ -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">"Apply"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Apply"</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">"Cancel"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Cancel"</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>),
|
||||
])
|
||||
|
@ -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">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"rustdoc 1.49.0 (e1884a8e3 2020-12-29)"</span>;
|
||||
<span class="doccomment">/// The built-time in RFC2822, UTC</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"Sat, 23 Jan 2021 05:20:12 +0000"</span>;
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"Sat, 23 Jan 2021 05:25:17 +0000"</span>;
|
||||
<span class="doccomment">/// The target architecture, given by `cfg!(target_arch)`.</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"x86_64"</span>;
|
||||
<span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>
|
||||
|
@ -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">"Open OSM"</span>)
|
||||
.<span class="ident">btn_solid_light_text</span>(<span class="string">"Open OSM"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"open {}"</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">&</span><span class="ident">p</span>.<span class="ident">to_string</span>())
|
||||
.<span class="ident">btn_solid_light_text</span>(<span class="kw-2">&</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>(
|
||||
|
@ -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">"{} ({})"</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">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"Route {}"</span>, <span class="ident">r</span>.<span class="ident">short_name</span>))
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="kw-2">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"Route {}"</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">&</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">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"Serves route {}"</span>, <span class="ident">route</span>.<span class="ident">short_name</span>))
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="kw-2">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"Serves route {}"</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">"Open OSM relation"</span>)
|
||||
.<span class="ident">btn_solid_light_text</span>(<span class="string">"Open OSM relation"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"open {}"</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">&</span><span class="ident">bus</span>.<span class="ident">to_string</span>())
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="kw-2">&</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">"Edit schedule"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Edit schedule"</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">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"edit {}"</span>, <span class="ident">route</span>.<span class="ident">id</span>)),
|
||||
);
|
||||
|
@ -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">"Open in OSM"</span>)
|
||||
.<span class="ident">btn_solid_light_text</span>(<span class="string">"Open in OSM"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"open {}"</span>, <span class="ident">osm_id</span>)),
|
||||
);
|
||||
}
|
||||
|
@ -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">"Open OSM node"</span>)
|
||||
.<span class="ident">btn_solid_light_text</span>(<span class="string">"Open OSM node"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"open {}"</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">"Explore demand across all traffic signals"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Explore demand across all traffic signals"</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">"Where are these agents headed?"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Where are these agents headed?"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"routes across {}"</span>, <span class="ident">id</span>)),
|
||||
);
|
||||
}
|
||||
|
@ -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">"Open OSM way"</span>)
|
||||
.<span class="ident">btn_solid_light_text</span>(<span class="string">"Open OSM way"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"open {}"</span>, <span class="ident">r</span>.<span class="ident">orig_id</span>.<span class="ident">osm_way_id</span>)),
|
||||
);
|
||||
|
||||
|
@ -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">&</span><span class="ident">label</span>, <span class="ident">key</span>)
|
||||
.<span class="ident">btn_solid_light_hotkey</span>(<span class="kw-2">&</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">&</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 "disabled" to denote "currently selected", 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>),
|
||||
|
@ -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">"Open OSM"</span>)
|
||||
.<span class="ident">btn_solid_light_text</span>(<span class="string">"Open OSM"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"open {}"</span>, <span class="ident">pl</span>.<span class="ident">osm_id</span>)),
|
||||
);
|
||||
}
|
||||
|
@ -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">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"Owner of {} (parked)"</span>, <span class="ident">v</span>.<span class="ident">id</span>))
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"Owner of {} (parked)"</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">"{})"</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">&</span><span class="ident">person</span>.<span class="ident">to_string</span>())
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="kw-2">&</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">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"Owned by {}"</span>, <span class="ident">p</span>))
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"Owned by {}"</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>(
|
||||
|
@ -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">"After / "</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">"After / "</span>).<span class="ident">secondary</span>(),
|
||||
|
@ -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">&</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>)
|
||||
};
|
||||
|
@ -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">"Play"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Play"</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">"start game"</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">"Community Proposals"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Community Proposals"</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">"Community Proposals"</span>);
|
||||
<span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>(<span class="string">"See existing ideas for improving traffic"</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">"Community Proposals"</span>),
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_secondary_light_text</span>(<span class="string">"Internal Dev Tools"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Internal Dev Tools"</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">"Internal Dev Tools"</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">"About"</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">"About"</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">"Feedback"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Feedback"</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">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Box</span><span class="op"><</span><span class="ident">dyn</span> <span class="ident">State</span><span class="op"><</span><span class="ident">App</span><span class="op">></span><span class="op">></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">"Home"</span>)
|
||||
.<span class="ident">btn_light_back</span>(<span class="string">"Home"</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">"back"</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">"See full credits"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"See full credits"</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">"Read detailed write-up"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Read detailed write-up"</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">"Try out this proposal"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Try out this proposal"</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">&</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">&</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">&</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">&</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">&</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">"Home"</span>)
|
||||
.<span class="ident">btn_light_back</span>(<span class="string">"Home"</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">"back"</span>)
|
||||
.<span class="ident">align_left</span>()
|
||||
|
@ -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">&</span><span class="ident">name</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="kw-2">&</span><span class="ident">name</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&</span><span class="ident">id</span>.<span class="ident">to_string</span>()),
|
||||
<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"{} boardings, {} alightings, {} currently waiting"</span>,
|
||||
|
@ -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>)
|
||||
|
@ -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">"try again"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"try again"</span>)
|
||||
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
|
||||
]),
|
||||
]))
|
||||
|
@ -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">"Map:"</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">"change map"</span>),
|
||||
<span class="string">"Scenario:"</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">"none"</span>)
|
||||
.<span class="ident">btn_outline_light_popup</span>(<span class="string">"none"</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">"change scenario"</span>),
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_secondary_light_icon_text</span>(<span class="string">"system/assets/tools/pencil.svg"</span>, <span class="string">"Edit map"</span>)
|
||||
.<span class="ident">btn_outline_light_icon_text</span>(<span class="string">"system/assets/tools/pencil.svg"</span>, <span class="string">"Edit map"</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">"edit map"</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">"Start a new trip"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Start a new trip"</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">"Record trips as a scenario"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Record trips as a scenario"</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">&</span><span class="ident">label</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&</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">"Import your own data"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Import your own data"</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">"number"</span>),
|
||||
]),
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_secondary_light_text</span>(<span class="string">"Confirm"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Confirm"</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">"Confirm"</span>,
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_secondary_light_text</span>(<span class="string">"Confirm"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Confirm"</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">"Confirm"</span>,
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_secondary_light_text</span>(<span class="string">"Confirm"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Confirm"</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,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">"system/assets/tools/pencil.svg"</span>, <span class="string">"Edit map"</span>)
|
||||
.<span class="ident">btn_outline_light_icon_text</span>(<span class="string">"system/assets/tools/pencil.svg"</span>, <span class="string">"Edit map"</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">"edit map"</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">"Keep simulating"</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">"Try again"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Keep simulating"</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">"Try again"</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">"Next challenge"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Next challenge"</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">"Back to challenges"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Back to challenges"</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>)
|
||||
|
@ -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">"Map:"</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">"change map"</span>),
|
||||
<span class="string">"Scenario:"</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">&</span><span class="self">self</span>.<span class="ident">scenario_name</span>)
|
||||
.<span class="ident">btn_outline_light_popup</span>(<span class="kw-2">&</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">"change scenario"</span>),
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_secondary_light_icon_text</span>(<span class="string">"system/assets/tools/pencil.svg"</span>, <span class="string">"Edit map"</span>)
|
||||
.<span class="ident">btn_outline_light_icon_text</span>(<span class="string">"system/assets/tools/pencil.svg"</span>, <span class="string">"Edit map"</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">"edit map"</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">"empty"</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">"system/assets/tools/pencil.svg"</span>)
|
||||
.<span class="ident">btn_solid_light_icon</span>(<span class="string">"system/assets/tools/pencil.svg"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"edit traffic patterns"</span>)
|
||||
.<span class="ident">centered_vert</span>(),
|
||||
<span class="macro">format</span><span class="macro">!</span>(<span class="string">"{} modifications to traffic patterns"</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">"system/assets/tools/trash.svg"</span>)
|
||||
.<span class="ident">btn_solid_destructive_icon</span>(<span class="string">"system/assets/tools/trash.svg"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"delete modifier {}"</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">"Change trip mode"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Change trip mode"</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">"Add extra new trips"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Add extra new trips"</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">"repeat_days"</span>),
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_primary_dark_text</span>(<span class="string">"Repeat schedule multiple days"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Repeat schedule multiple days"</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">"Apply"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Apply"</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">"Discard changes"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Discard changes"</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">"Apply"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Apply"</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">"Discard changes"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Discard changes"</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>),
|
||||
])
|
||||
|
@ -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">"next tutorial"</span>),
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_secondary_light_text</span>(<span class="string">"Quit"</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">"Quit"</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">"system/assets/tools/pencil.svg"</span>, <span class="string">"Edit map"</span>)
|
||||
.<span class="ident">btn_outline_light_icon_text</span>(<span class="string">"system/assets/tools/pencil.svg"</span>, <span class="string">"Edit map"</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">"edit map"</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">"Try it"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Try it"</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>),
|
||||
);
|
||||
|
@ -323,7 +323,7 @@
|
||||
<span class="kw">_</span> <span class="op">=</span><span class="op">></span> <span class="macro">format</span><span class="macro">!</span>(<span class="string">"Record {} intersections"</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">&</span><span class="ident">title</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&</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">"record"</span>)
|
||||
|
@ -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">"system/assets/meters/trip_histogram.svg"</span>)
|
||||
.<span class="ident">btn_solid_light_icon</span>(<span class="string">"system/assets/meters/trip_histogram.svg"</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">"more data"</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">"{} trips captured"</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">"Stop"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Stop"</span>)
|
||||
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
|
||||
.<span class="ident">align_right</span>(),
|
||||
]));
|
||||
|
@ -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">"system/assets/speed/triangle.svg"</span>)
|
||||
.<span class="ident">btn_solid_light_icon</span>(<span class="string">"system/assets/speed/triangle.svg"</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">"system/assets/speed/triangle.svg"</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"><</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>))
|
||||
|
@ -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">"Jump to time"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Jump to time"</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">"Jump to delay"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Jump to delay"</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">"Jump to time"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Jump to time"</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">"Jump to delay"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Jump to delay"</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">"text"</span>),
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_primary_dark_text</span>(<span class="string">"stop now"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"stop now"</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">&</span><span class="ident">EventCtx</span>, <span class="ident">target</span>: <span class="ident">Time</span>) <span class="op">-</span><span class="op">></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">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"Jump to {}"</span>, <span class="ident">target</span>.<span class="ident">ampm_tostring</span>()))
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"Jump to {}"</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">"jump to time"</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">&</span><span class="ident">EventCtx</span>, <span class="ident">delay</span>: <span class="ident">Duration</span>) <span class="op">-</span><span class="op">></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">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"Jump to next {} delay"</span>, <span class="ident">delay</span>))
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"Jump to next {} delay"</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">"jump to delay"</span>)
|
||||
.<span class="ident">centered_horiz</span>()
|
||||
|
@ -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">"View uber-turns"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"View uber-turns"</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">"Edit"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Edit"</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">"Detect all clusters"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Detect all clusters"</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">"Preview merged intersection"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Preview merged intersection"</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>),
|
||||
]))
|
||||
|
@ -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">"current info"</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">"quit"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"quit"</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">"export to OSM"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"export to OSM"</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">"preview all intersections"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"preview all intersections"</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>),
|
||||
]),
|
||||
|
@ -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">"Apply"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Apply"</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>(),
|
||||
|
@ -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">&</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">&</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'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">&</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">&</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">&</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">&</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">"Search all maps"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Search all maps"</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">"wasm32"</span>)) {
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_secondary_light_text</span>(<span class="string">"Download more cities"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Download more cities"</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">&</span><span class="ident">name</span>.<span class="ident">describe</span>())
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="kw-2">&</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">&</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>),
|
||||
|
@ -326,7 +326,7 @@
|
||||
)
|
||||
.<span class="ident">named</span>(<span class="string">"street"</span>),
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_secondary_light_text</span>(<span class="string">"Search by business name or address"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Search by business name or address"</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">"bldg"</span>),
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_secondary_light_text</span>(<span class="string">"Search for streets"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Search for streets"</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>),
|
||||
]))
|
||||
|
@ -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">"input"</span>),
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_secondary_light_text</span>(<span class="string">"confirm"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"confirm"</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">"OK"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"OK"</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>),
|
||||
]))
|
||||
|
@ -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">"Sync files"</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">"Sync files"</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>),
|
||||
|
@ -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">"Change map:"</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">"change map"</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">"Search for businesses"</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">"Search for businesses"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Search for businesses"</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">&</span><span class="macro">format</span><span class="macro">!</span>(
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&</span><span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"Open OSM way {}"</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">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"open {}"</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">"Edit OSM way"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Edit OSM way"</span>)
|
||||
.<span class="ident">build_widget</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="kw-2">&</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">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"Open OSM node {}"</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">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"Open OSM node {}"</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">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"open {}"</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">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"Open OSM ID {}"</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">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"Open OSM ID {}"</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">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"open {}"</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">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"Open OSM ID {}"</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">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"Open OSM ID {}"</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">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"open {}"</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">"Hide business search"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Hide business search"</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>),
|
||||
);
|
||||
|
@ -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">"Change map:"</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">"change map"</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">"max 3 days parking (default in Seattle)"</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">"Generate OsmChange file"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Generate OsmChange file"</span>)
|
||||
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
|
||||
<span class="string">"Select a road"</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">named</span>(<span class="string">"info"</span>),
|
||||
]))
|
||||
|
@ -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">"Back to title screen"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Back to title screen"</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">"OK"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"OK"</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>),
|
||||
]))
|
||||
|
@ -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">"Start game"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Start game"</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">"Randomly choose upzones"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Randomly choose upzones"</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">"Clear upzones"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Clear upzones"</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">"Start game"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Start game"</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">"Finish upzoning before playing"</span>)
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Finish upzoning before playing"</span>)
|
||||
.<span class="ident">disabled</span>(<span class="bool-val">true</span>)
|
||||
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
|
||||
},
|
||||
|
@ -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">"system/assets/tools/volume_off.svg"</span>)
|
||||
.<span class="ident">btn_solid_light_icon</span>(<span class="string">"system/assets/tools/volume_off.svg"</span>)
|
||||
.<span class="ident">build</span>(<span class="ident">ctx</span>, <span class="string">"play music"</span>),
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_primary_light_icon</span>(<span class="string">"system/assets/tools/volume_on.svg"</span>)
|
||||
.<span class="ident">btn_solid_light_icon</span>(<span class="string">"system/assets/tools/volume_on.svg"</span>)
|
||||
.<span class="ident">build</span>(<span class="ident">ctx</span>, <span class="string">"mute music"</span>),
|
||||
)
|
||||
.<span class="ident">named</span>(<span class="string">"play music"</span>)
|
||||
|
@ -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">"system/assets/tools/quit.svg"</span>, <span class="string">"Quit"</span>)
|
||||
.<span class="ident">btn_outline_light_icon_text</span>(<span class="string">"system/assets/tools/quit.svg"</span>, <span class="string">"Quit"</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">"quit"</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">"Credits"</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">"Credits"</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>),
|
||||
<span class="string">"Created by Dustin Carlino, Yuwen Li, & Michael Kirk"</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">"Music from various sources"</span>, <span class="string">"https://github.com/dabreegster/abstreet/tree/master/data/system/assets/music/sources.md"</span>),
|
||||
<span class="ident">link</span>(<span class="ident">ctx</span>, <span class="string">"Fonts and icons by various sources"</span>, <span class="string">"https://dabreegster.github.io/abstreet/howto/#data-source-licensing"</span>),
|
||||
<span class="string">"Playtesting by Fridgehaus"</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">"Back"</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">"Back"</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>))
|
||||
}
|
||||
|
@ -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"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="kw">fn</span> <span class="ident">btn_primary_dark</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span>;
|
||||
<span class="kw">fn</span> <span class="ident">btn_primary_dark_text</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span>;
|
||||
<span class="kw">fn</span> <span class="ident">btn_solid_dark_text</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>, <span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>, <span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span>;
|
||||
<span class="kw">fn</span> <span class="ident">btn_secondary_dark_text</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span>;
|
||||
<span class="kw">fn</span> <span class="ident">btn_outline_dark_text</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>,
|
||||
<span class="ident">image_path</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>,
|
||||
<span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>,
|
||||
) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>, <span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span>;
|
||||
<span class="kw">fn</span> <span class="ident">btn_primary_light_text</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span>;
|
||||
<span class="kw">fn</span> <span class="ident">btn_solid_light_text</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>, <span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>, <span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span>;
|
||||
<span class="kw">fn</span> <span class="ident">btn_secondary_light_text</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span>;
|
||||
<span class="kw">fn</span> <span class="ident">btn_outline_light_text</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>,
|
||||
<span class="ident">image_path</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>,
|
||||
<span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>,
|
||||
) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>, <span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span>;
|
||||
<span class="kw">fn</span> <span class="ident">btn_primary_destructive_text</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span>;
|
||||
<span class="kw">fn</span> <span class="ident">btn_solid_destructive_text</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>,
|
||||
<span class="ident">image_path</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>,
|
||||
<span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>,
|
||||
) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span>;
|
||||
<span class="kw">fn</span> <span class="ident">btn_secondary_destructive_text</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span>;
|
||||
<span class="kw">fn</span> <span class="ident">btn_outline_destructive_text</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>, <span class="ident">image_path</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>,
|
||||
<span class="ident">image_path</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>,
|
||||
<span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>,
|
||||
) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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'll return to</span>
|
||||
<span class="kw">fn</span> <span class="ident">btn_back_light</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">title</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="kw">fn</span> <span class="ident">btn_light_back</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">title</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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'll return to</span>
|
||||
<span class="kw">fn</span> <span class="ident">btn_back_dark</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">title</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="kw">fn</span> <span class="ident">btn_dark_back</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">title</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>, <span class="ident">text</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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 ">", suitable for paging to the "next" 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">&</span><span class="self">self</span>, <span class="ident">label</span>: <span class="kw-2">&</span><span class="ident">str</span>, <span class="ident">key</span>: <span class="ident">Key</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span>;
|
||||
<span class="kw">fn</span> <span class="ident">btn_solid_light_hotkey</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">label</span>: <span class="kw-2">&</span><span class="ident">str</span>, <span class="ident">key</span>: <span class="ident">Key</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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"><</span><span class="lifetime">'a</span><span class="op">></span> <span class="ident">StyledButtons</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">&</span><span class="self">self</span>, <span class="ident">label</span>: <span class="kw-2">&</span><span class="ident">str</span>, <span class="ident">key</span>: <span class="ident">Key</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="kw">fn</span> <span class="ident">btn_solid_light_hotkey</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">label</span>: <span class="kw-2">&</span><span class="ident">str</span>, <span class="ident">key</span>: <span class="ident">Key</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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">" - {}"</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">" - {}"</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">" - {}"</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">" - {}"</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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&</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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&</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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&</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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&</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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&</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">&</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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&</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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&</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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&</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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&</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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&</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">&</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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&</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">&</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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&</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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&</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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&</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">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="kw-2">&</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>)
|
||||
}
|
||||
}
|
||||
|
@ -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">"#4C4C4C"</span>),
|
||||
<span class="ident">fg_disabled</span>: <span class="ident">hex</span>(<span class="string">"#4C4C4C"</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">"#4C4C4C"</span>),
|
||||
<span class="ident">fg_disabled</span>: <span class="ident">hex</span>(<span class="string">"#4C4C4C"</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">"#4C4C4C"</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">"#F2F2F2"</span>),
|
||||
<span class="ident">fg_disabled</span>: <span class="ident">hex</span>(<span class="string">"#F2F2F2"</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">"#003046"</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">"#003046"</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">"#F2F2F2"</span>),
|
||||
<span class="ident">fg_disabled</span>: <span class="ident">hex</span>(<span class="string">"#F2F2F2"</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">"#F2F2F2"</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">"#F2F2F2"</span>),
|
||||
<span class="ident">fg_disabled</span>: <span class="ident">hex</span>(<span class="string">"#F2F2F2"</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">"#FF5E5E"</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">"#FF5E5E"</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">"#FF5E5E"</span>),
|
||||
<span class="ident">fg_disabled</span>: <span class="ident">hex</span>(<span class="string">"#FF5E5E"</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>,
|
||||
|
@ -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>[
|
||||
|
@ -378,7 +378,7 @@
|
||||
<span class="kw">fn</span> <span class="ident">make_btn</span>(<span class="ident">ctx</span>: <span class="kw-2">&</span><span class="ident">EventCtx</span>, <span class="ident">label</span>: <span class="kw-2">&</span><span class="ident">str</span>, <span class="ident">tooltip</span>: <span class="kw-2">&</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">></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's dropdown look a little better.</span>
|
||||
<span class="comment">// It's not ideal, but we only use one persistent split in the whole app</span>
|
||||
|
@ -206,7 +206,7 @@
|
||||
<span class="kw">fn</span> <span class="ident">button_builder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span>(<span class="ident">ctx</span>: <span class="kw-2">&</span><span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ButtonBuilder</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></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>)
|
||||
}
|
||||
|
||||
|
@ -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">"tmp"</span>, <span class="kw-2">&</span><span class="ident">col</span>.<span class="ident">name</span>)
|
||||
.<span class="ident">btn_solid_dark_icon_text</span>(<span class="string">"tmp"</span>, <span class="kw-2">&</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">"../../icons/arrow_down.svg"</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">&</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">&</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">&</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">&</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>()
|
||||
}
|
||||
|
@ -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">"Neutral Dark"</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">"Primary"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_primary_dark_text"</span>),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_solid_dark_text</span>(<span class="string">"Primary"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_solid_dark_text"</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">"system/assets/tools/map.svg"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_primary_dark_icon_1"</span>),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_primary_dark_icon</span>(<span class="string">"system/assets/tools/layers.svg"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_primary_dark_icon_2"</span>),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_solid_dark_icon</span>(<span class="string">"system/assets/tools/map.svg"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_solid_dark_icon_1"</span>),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_solid_dark_icon</span>(<span class="string">"system/assets/tools/layers.svg"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_solid_dark_icon_2"</span>),
|
||||
]),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_primary_dark_icon_text</span>(<span class="string">"system/assets/tools/location.svg"</span>, <span class="string">"Primary"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_primary_dark_icon_text"</span>),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_secondary_dark_text</span>(<span class="string">"Secondary"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_secondary_dark_text"</span>),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_solid_dark_icon_text</span>(<span class="string">"system/assets/tools/location.svg"</span>, <span class="string">"Primary"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_solid_dark_icon_text"</span>),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_outline_dark_text</span>(<span class="string">"Secondary"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_outline_dark_text"</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">"system/assets/tools/map.svg"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_secondary_dark_icon_1"</span>),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_secondary_dark_icon</span>(<span class="string">"system/assets/tools/layers.svg"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_secondary_dark_icon_2"</span>),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_outline_dark_icon</span>(<span class="string">"system/assets/tools/map.svg"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_outline_dark_icon_1"</span>),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_outline_dark_icon</span>(<span class="string">"system/assets/tools/layers.svg"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_outline_dark_icon_2"</span>),
|
||||
]),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_secondary_dark_icon_text</span>(<span class="string">"system/assets/tools/home.svg"</span>, <span class="string">"Secondary"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_secondary_dark_icon_text"</span>),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_outline_dark_icon_text</span>(<span class="string">"system/assets/tools/home.svg"</span>, <span class="string">"Secondary"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_outline_dark_icon_text"</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">"Neutral Light"</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">"Primary"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_primary_light_text"</span>),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_solid_light_text</span>(<span class="string">"Primary"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_solid_light_text"</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">"system/assets/tools/home.svg"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_primary_light_icon_1"</span>),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_primary_light_icon</span>(<span class="string">"system/assets/tools/location.svg"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_primary_light_icon_2"</span>),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_solid_light_icon</span>(<span class="string">"system/assets/tools/home.svg"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_solid_light_icon_1"</span>),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_solid_light_icon</span>(<span class="string">"system/assets/tools/location.svg"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_solid_light_icon_2"</span>),
|
||||
]),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_primary_light_icon_text</span>(<span class="string">"system/assets/tools/map.svg"</span>, <span class="string">"Primary"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_primary_light_icon_text"</span>),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_secondary_light_text</span>(<span class="string">"Secondary"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_secondary_light_text"</span>),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_solid_light_icon_text</span>(<span class="string">"system/assets/tools/map.svg"</span>, <span class="string">"Primary"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_solid_light_icon_text"</span>),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_outline_light_text</span>(<span class="string">"Secondary"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_outline_light_text"</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">"system/assets/tools/home.svg"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_secondary_light_icon_1"</span>),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_secondary_light_icon</span>(<span class="string">"system/assets/tools/location.svg"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_secondary_light_icon_2"</span>),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_outline_light_icon</span>(<span class="string">"system/assets/tools/home.svg"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_outline_light_icon_1"</span>),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_outline_light_icon</span>(<span class="string">"system/assets/tools/location.svg"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_outline_light_icon_2"</span>),
|
||||
]),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_secondary_light_icon_text</span>(<span class="string">"system/assets/tools/layers.svg"</span>, <span class="string">"Secondary"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_secondary_light_icon_text"</span>),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_outline_light_icon_text</span>(<span class="string">"system/assets/tools/layers.svg"</span>, <span class="string">"Secondary"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_outline_light_icon_text"</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">"system/assets/tools/layers.svg"</span>)
|
||||
<span class="ident">btn</span>.<span class="ident">btn_solid_light_icon</span>(<span class="string">"system/assets/tools/layers.svg"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_height_icon"</span>),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_primary_light_text</span>(<span class="string">"text"</span>)
|
||||
<span class="ident">btn</span>.<span class="ident">btn_solid_light_text</span>(<span class="string">"text"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_height_text"</span>),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_secondary_light_icon_text</span>(<span class="string">"system/assets/tools/layers.svg"</span>, <span class="string">"icon+text"</span>)
|
||||
<span class="ident">btn</span>.<span class="ident">btn_outline_light_icon_text</span>(<span class="string">"system/assets/tools/layers.svg"</span>, <span class="string">"icon+text"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_height_icon_text"</span>),
|
||||
<span class="ident">btn</span>.<span class="ident">btn_popup_light</span>(<span class="string">"popup"</span>)
|
||||
<span class="ident">btn</span>.<span class="ident">btn_outline_light_popup</span>(<span class="string">"popup"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_height_popup"</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">"New faces"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"New faces"</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">"generate new faces"</span>),
|
||||
<span class="ident">Checkbox</span>::<span class="ident">switch</span>(<span class="ident">ctx</span>, <span class="string">"Draw scrollable canvas"</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">"Pause"</span>)
|
||||
.<span class="ident">btn_solid_light_text</span>(<span class="string">"Pause"</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">"pause the stopwatch"</span>),
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_primary_light_text</span>(<span class="string">"Resume"</span>)
|
||||
.<span class="ident">btn_solid_light_text</span>(<span class="string">"Resume"</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">"resume the stopwatch"</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">"Reset Timer"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Reset Timer"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"reset the stopwatch"</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">"Apply"</span>)
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"Apply"</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"apply"</span>),
|
||||
])
|
||||
.<span class="ident">margin_above</span>(<span class="number">30</span>),
|
||||
|
File diff suppressed because one or more lines are too long
@ -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">☰</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">−</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<'a>(<br> builder: <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a><'a>, <br> title: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -> <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a><'a></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">−</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<'a>(<br> builder: <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a><'a>, <br> title: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -> <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a><'a></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>
|
@ -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">☰</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">−</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<'a>(builder: <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a><'a>) -> <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a><'a></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">−</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<'a>(builder: <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a><'a>) -> <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a><'a></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>
|
@ -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">☰</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">−</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<'a>(builder: <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a><'a>) -> <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a><'a></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">−</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<'a>(builder: <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a><'a>) -> <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a><'a></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>
|
@ -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">☰</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">−</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<'a>(color_scheme: &<a class="struct" href="../../../widgetry/style/struct.ButtonStyle.html" title="struct widgetry::style::ButtonStyle">ButtonStyle</a>) -> <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a><'a></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">−</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<'a>(color_scheme: &<a class="struct" href="../../../widgetry/style/struct.ButtonStyle.html" title="struct widgetry::style::ButtonStyle">ButtonStyle</a>) -> <a class="struct" href="../../../widgetry/struct.ButtonBuilder.html" title="struct widgetry::ButtonBuilder">ButtonBuilder</a><'a></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>
|
@ -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">☰</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">−</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">−</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
Loading…
Reference in New Issue
Block a user