mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-25 07:25:47 +03:00
deploy: 87a1a3f027
This commit is contained in:
parent
595bed1507
commit
4f48024017
@ -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><button type="button" class="help-button">?</button>
|
||||
<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-a95c4551e63dceca/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, 27 Feb 2021 22:58:33 +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-a95c4551e63dceca/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, 27 Feb 2021 23:35:35 +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 `minimap` mod in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, minimap"><title>map_gui::tools::minimap - 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 minimap</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#traits">Traits</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: "minimap", 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><button type="button" class="help-button">?</button>
|
||||
<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/minimap.rs.html#1-459" 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="">minimap</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/minimap.rs.html#1-463" 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="">minimap</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.Minimap.html" title="map_gui::tools::minimap::Minimap struct">Minimap</a></td><td class="docblock-short"></td></tr></table><h2 id="traits" class="section-header"><a href="#traits">Traits</a></h2>
|
||||
<table><tr class="module-item"><td><a class="trait" href="trait.MinimapControls.html" title="map_gui::tools::minimap::MinimapControls trait">MinimapControls</a></td><td class="docblock-short"><p>Customize the appearance and behavior of a minimap.</p>
|
||||
</td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_gui";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -661,7 +661,7 @@
|
||||
<span class="kw">if</span> <span class="ident">mode</span> <span class="op">=</span><span class="op">=</span> <span class="ident">TripMode</span>::<span class="ident">Drive</span> <span class="op">|</span><span class="op">|</span> <span class="ident">mode</span> <span class="op">=</span><span class="op">=</span> <span class="ident">TripMode</span>::<span class="ident">Bike</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="string">"Unprotected turn penalty:"</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">margin_right</span>(<span class="number">20</span>),
|
||||
<span class="ident">Spinner</span>::<span class="ident">new</span>(
|
||||
<span class="ident">Spinner</span>::<span class="ident">widget</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
(<span class="number">1</span>, <span class="number">100</span>),
|
||||
(<span class="ident">params</span>.<span class="ident">unprotected_turn_penalty</span> <span class="op">*</span> <span class="number">10.0</span>) <span class="kw">as</span> <span class="ident">isize</span>,
|
||||
@ -673,17 +673,17 @@
|
||||
<span class="comment">// TODO Spinners that natively understand a floating point range with a given precision</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="string">"Bike lane penalty:"</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">margin_right</span>(<span class="number">20</span>),
|
||||
<span class="ident">Spinner</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, (<span class="number">0</span>, <span class="number">20</span>), (<span class="ident">params</span>.<span class="ident">bike_lane_penalty</span> <span class="op">*</span> <span class="number">10.0</span>) <span class="kw">as</span> <span class="ident">isize</span>)
|
||||
<span class="ident">Spinner</span>::<span class="ident">widget</span>(<span class="ident">ctx</span>, (<span class="number">0</span>, <span class="number">20</span>), (<span class="ident">params</span>.<span class="ident">bike_lane_penalty</span> <span class="op">*</span> <span class="number">10.0</span>) <span class="kw">as</span> <span class="ident">isize</span>)
|
||||
.<span class="ident">named</span>(<span class="string">"bike lane penalty"</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="string">"Bus lane penalty:"</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">margin_right</span>(<span class="number">20</span>),
|
||||
<span class="ident">Spinner</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, (<span class="number">0</span>, <span class="number">20</span>), (<span class="ident">params</span>.<span class="ident">bus_lane_penalty</span> <span class="op">*</span> <span class="number">10.0</span>) <span class="kw">as</span> <span class="ident">isize</span>)
|
||||
<span class="ident">Spinner</span>::<span class="ident">widget</span>(<span class="ident">ctx</span>, (<span class="number">0</span>, <span class="number">20</span>), (<span class="ident">params</span>.<span class="ident">bus_lane_penalty</span> <span class="op">*</span> <span class="number">10.0</span>) <span class="kw">as</span> <span class="ident">isize</span>)
|
||||
.<span class="ident">named</span>(<span class="string">"bus lane penalty"</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="string">"Driving lane penalty:"</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">margin_right</span>(<span class="number">20</span>),
|
||||
<span class="ident">Spinner</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, (<span class="number">0</span>, <span class="number">20</span>), (<span class="ident">params</span>.<span class="ident">driving_lane_penalty</span> <span class="op">*</span> <span class="number">10.0</span>) <span class="kw">as</span> <span class="ident">isize</span>)
|
||||
<span class="ident">Spinner</span>::<span class="ident">widget</span>(<span class="ident">ctx</span>, (<span class="number">0</span>, <span class="number">20</span>), (<span class="ident">params</span>.<span class="ident">driving_lane_penalty</span> <span class="op">*</span> <span class="number">10.0</span>) <span class="kw">as</span> <span class="ident">isize</span>)
|
||||
.<span class="ident">named</span>(<span class="string">"driving lane penalty"</span>),
|
||||
]));
|
||||
}
|
||||
|
@ -118,7 +118,7 @@
|
||||
<span class="comment">// TODO This UI needs design, just something to start plumbing the edits</span>
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="string">"Frequency in minutes"</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
|
||||
<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">Spinner</span>::<span class="ident">widget</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_solid_primary_text</span>(<span class="string">"Apply"</span>)
|
||||
|
@ -333,7 +333,7 @@
|
||||
]),
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="string">"Seconds:"</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">centered_vert</span>(),
|
||||
<span class="ident">Spinner</span>::<span class="ident">new</span>(
|
||||
<span class="ident">Spinner</span>::<span class="ident">widget</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
(
|
||||
<span class="ident">signal</span>.<span class="ident">get_min_crossing_time</span>(<span class="ident">idx</span>).<span class="ident">inner_seconds</span>() <span class="kw">as</span> <span class="ident">isize</span>,
|
||||
@ -365,7 +365,7 @@
|
||||
.<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="string">"Seconds:"</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">centered_vert</span>(),
|
||||
<span class="ident">Spinner</span>::<span class="ident">new</span>(
|
||||
<span class="ident">Spinner</span>::<span class="ident">widget</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
(<span class="number">1</span>, <span class="number">300</span>),
|
||||
<span class="kw">match</span> <span class="ident">signal</span>.<span class="ident">stages</span>[<span class="ident">idx</span>].<span class="ident">stage_type</span> {
|
||||
@ -382,7 +382,7 @@
|
||||
.<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="string">"Seconds:"</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">centered_vert</span>(),
|
||||
<span class="ident">Spinner</span>::<span class="ident">new</span>(
|
||||
<span class="ident">Spinner</span>::<span class="ident">widget</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
(<span class="number">1</span>, <span class="number">300</span>),
|
||||
<span class="kw">match</span> <span class="ident">signal</span>.<span class="ident">stages</span>[<span class="ident">idx</span>].<span class="ident">stage_type</span> {
|
||||
|
@ -559,7 +559,7 @@
|
||||
.<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="string">"Offset (seconds):"</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
|
||||
<span class="ident">Spinner</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, (<span class="number">0</span>, <span class="number">90</span>), (<span class="ident">offset2</span> <span class="op">-</span> <span class="ident">offset1</span>).<span class="ident">inner_seconds</span>() <span class="kw">as</span> <span class="ident">isize</span>)
|
||||
<span class="ident">Spinner</span>::<span class="ident">widget</span>(<span class="ident">ctx</span>, (<span class="number">0</span>, <span class="number">90</span>), (<span class="ident">offset2</span> <span class="op">-</span> <span class="ident">offset1</span>).<span class="ident">inner_seconds</span>() <span class="kw">as</span> <span class="ident">isize</span>)
|
||||
.<span class="ident">named</span>(<span class="string">"offset"</span>),
|
||||
]),
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
|
@ -293,7 +293,7 @@
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="string">"Limit the number of vehicles passing through per hour (0 = unlimited):"</span>
|
||||
.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
|
||||
<span class="ident">Spinner</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, (<span class="number">0</span>, <span class="number">1000</span>), <span class="ident">cap_vehicles_per_hour</span>.<span class="ident">unwrap_or</span>(<span class="number">0</span>) <span class="kw">as</span> <span class="ident">isize</span>)
|
||||
<span class="ident">Spinner</span>::<span class="ident">widget</span>(<span class="ident">ctx</span>, (<span class="number">0</span>, <span class="number">1000</span>), <span class="ident">cap_vehicles_per_hour</span>.<span class="ident">unwrap_or</span>(<span class="number">0</span>) <span class="kw">as</span> <span class="ident">isize</span>)
|
||||
.<span class="ident">named</span>(<span class="string">"cap_vehicles"</span>),
|
||||
]),
|
||||
<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</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.50.0 (cb75ad5db 2021-02-10)"</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, 27 Feb 2021 22:58:33 +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, 27 Feb 2021 23:35:35 +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>
|
||||
|
@ -310,7 +310,7 @@
|
||||
.<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="string">"Hour:"</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
|
||||
<span class="ident">Spinner</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, (<span class="number">0</span>, <span class="number">24</span>), <span class="number">7</span>).<span class="ident">named</span>(<span class="string">"hour"</span>),
|
||||
<span class="ident">Spinner</span>::<span class="ident">widget</span>(<span class="ident">ctx</span>, (<span class="number">0</span>, <span class="number">24</span>), <span class="number">7</span>).<span class="ident">named</span>(<span class="string">"hour"</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>)
|
||||
@ -365,11 +365,11 @@
|
||||
<span class="kw">_</span> <span class="op">=</span><span class="op">></span> {}
|
||||
}
|
||||
<span class="kw">if</span> <span class="ident">ctx</span>.<span class="ident">input</span>.<span class="ident">pressed</span>(<span class="ident">Key</span>::<span class="ident">LeftArrow</span>) {
|
||||
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">modify_spinner</span>(<span class="string">"hour"</span>, <span class="op">-</span><span class="number">1</span>);
|
||||
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">modify_spinner</span>(<span class="ident">ctx</span>, <span class="string">"hour"</span>, <span class="op">-</span><span class="number">1</span>);
|
||||
<span class="ident">changed</span> <span class="op">=</span> <span class="bool-val">true</span>;
|
||||
}
|
||||
<span class="kw">if</span> <span class="ident">ctx</span>.<span class="ident">input</span>.<span class="ident">pressed</span>(<span class="ident">Key</span>::<span class="ident">RightArrow</span>) {
|
||||
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">modify_spinner</span>(<span class="string">"hour"</span>, <span class="number">1</span>);
|
||||
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">modify_spinner</span>(<span class="ident">ctx</span>, <span class="string">"hour"</span>, <span class="number">1</span>);
|
||||
<span class="ident">changed</span> <span class="op">=</span> <span class="bool-val">true</span>;
|
||||
}
|
||||
<span class="kw">if</span> <span class="ident">changed</span> {
|
||||
|
@ -940,7 +940,7 @@
|
||||
]),
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="string">"Number of trips:"</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
|
||||
<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">Spinner</span>::<span class="ident">widget</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_solid_primary_text</span>(<span class="string">"Confirm"</span>)
|
||||
|
@ -695,7 +695,7 @@
|
||||
.<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">Spinner</span>::<span class="ident">widget</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_outline_text</span>(<span class="string">"Repeat schedule multiple days"</span>)
|
||||
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
|
||||
@ -841,7 +841,7 @@
|
||||
<span class="string">"Percent of people to modify:"</span>
|
||||
.<span class="ident">draw_text</span>(<span class="ident">ctx</span>)
|
||||
.<span class="ident">centered_vert</span>(),
|
||||
<span class="ident">Spinner</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, (<span class="number">1</span>, <span class="number">100</span>), <span class="number">50</span>).<span class="ident">named</span>(<span class="string">"pct_ppl"</span>),
|
||||
<span class="ident">Spinner</span>::<span class="ident">widget</span>(<span class="ident">ctx</span>, (<span class="number">1</span>, <span class="number">100</span>), <span class="number">50</span>).<span class="ident">named</span>(<span class="string">"pct_ppl"</span>),
|
||||
]),
|
||||
<span class="string">"Types of trips to convert:"</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
|
||||
<span class="ident">checkbox_per_mode</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="kw-2">&</span><span class="macro">btreeset</span><span class="macro">!</span> { <span class="ident">TripMode</span>::<span class="ident">Drive</span> }),
|
||||
|
@ -238,7 +238,7 @@
|
||||
<span class="kw">let</span> <span class="ident">controls</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">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="string">"lanes:forward"</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">margin_right</span>(<span class="number">20</span>),
|
||||
<span class="ident">Spinner</span>::<span class="ident">new</span>(
|
||||
<span class="ident">Spinner</span>::<span class="ident">widget</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
(<span class="number">1</span>, <span class="number">5</span>),
|
||||
<span class="ident">road</span>.<span class="ident">osm_tags</span>
|
||||
@ -250,7 +250,7 @@
|
||||
]),
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="string">"lanes:backward"</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">margin_right</span>(<span class="number">20</span>),
|
||||
<span class="ident">Spinner</span>::<span class="ident">new</span>(
|
||||
<span class="ident">Spinner</span>::<span class="ident">widget</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
(<span class="number">0</span>, <span class="number">5</span>),
|
||||
<span class="ident">road</span>.<span class="ident">osm_tags</span>
|
||||
|
@ -538,7 +538,7 @@
|
||||
),
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="string">"Scroll speed for menus"</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">centered_vert</span>(),
|
||||
<span class="ident">Spinner</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, (<span class="number">1</span>, <span class="number">50</span>), <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">gui_scroll_speed</span> <span class="kw">as</span> <span class="ident">isize</span>)
|
||||
<span class="ident">Spinner</span>::<span class="ident">widget</span>(<span class="ident">ctx</span>, (<span class="number">1</span>, <span class="number">50</span>), <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">gui_scroll_speed</span> <span class="kw">as</span> <span class="ident">isize</span>)
|
||||
.<span class="ident">named</span>(<span class="string">"gui_scroll_speed"</span>),
|
||||
]),
|
||||
])
|
||||
|
@ -319,7 +319,7 @@
|
||||
<span class="comment">// TODO Display the value...</span>
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="string">"Resolution (meters)"</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">centered_vert</span>(),
|
||||
<span class="ident">Spinner</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, (<span class="number">1</span>, <span class="number">100</span>), <span class="self">self</span>.<span class="ident">resolution</span> <span class="kw">as</span> <span class="ident">isize</span>)
|
||||
<span class="ident">Spinner</span>::<span class="ident">widget</span>(<span class="ident">ctx</span>, (<span class="number">1</span>, <span class="number">100</span>), <span class="self">self</span>.<span class="ident">resolution</span> <span class="kw">as</span> <span class="ident">isize</span>)
|
||||
.<span class="ident">named</span>(<span class="string">"resolution"</span>)
|
||||
.<span class="ident">align_right</span>(),
|
||||
]),
|
||||
@ -327,7 +327,7 @@
|
||||
<span class="string">"Radius (resolution multiplier)"</span>
|
||||
.<span class="ident">draw_text</span>(<span class="ident">ctx</span>)
|
||||
.<span class="ident">centered_vert</span>(),
|
||||
<span class="ident">Spinner</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, (<span class="number">0</span>, <span class="number">10</span>), <span class="self">self</span>.<span class="ident">radius</span> <span class="kw">as</span> <span class="ident">isize</span>)
|
||||
<span class="ident">Spinner</span>::<span class="ident">widget</span>(<span class="ident">ctx</span>, (<span class="number">0</span>, <span class="number">10</span>), <span class="self">self</span>.<span class="ident">radius</span> <span class="kw">as</span> <span class="ident">isize</span>)
|
||||
.<span class="ident">named</span>(<span class="string">"radius"</span>)
|
||||
.<span class="ident">align_right</span>(),
|
||||
]),
|
||||
|
@ -460,6 +460,10 @@
|
||||
<span id="457">457</span>
|
||||
<span id="458">458</span>
|
||||
<span id="459">459</span>
|
||||
<span id="460">460</span>
|
||||
<span id="461">461</span>
|
||||
<span id="462">462</span>
|
||||
<span id="463">463</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">marker</span>::<span class="ident">PhantomData</span>;
|
||||
|
||||
@ -607,8 +611,12 @@
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">controls</span>.<span class="ident">has_zorder</span>(<span class="ident">app</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">"Z-order:"</span>).<span class="ident">small</span>().<span class="ident">draw</span>(<span class="ident">ctx</span>),
|
||||
<span class="ident">Spinner</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>.<span class="ident">draw_map</span>().<span class="ident">zorder_range</span>, <span class="ident">app</span>.<span class="ident">draw_map</span>().<span class="ident">show_zorder</span>)
|
||||
.<span class="ident">named</span>(<span class="string">"zorder"</span>),
|
||||
<span class="ident">Spinner</span>::<span class="ident">widget</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="ident">app</span>.<span class="ident">draw_map</span>().<span class="ident">zorder_range</span>,
|
||||
<span class="ident">app</span>.<span class="ident">draw_map</span>().<span class="ident">show_zorder</span>,
|
||||
)
|
||||
.<span class="ident">named</span>(<span class="string">"zorder"</span>),
|
||||
])
|
||||
.<span class="ident">margin_above</span>(<span class="number">10</span>)
|
||||
} <span class="kw">else</span> {
|
||||
|
@ -964,8 +964,8 @@
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">spinner</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">name</span>: <span class="kw-2">&</span><span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">isize</span> {
|
||||
<span class="self">self</span>.<span class="ident">find</span>::<span class="op"><</span><span class="ident">Spinner</span><span class="op">></span>(<span class="ident">name</span>).<span class="ident">current</span>
|
||||
}
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">modify_spinner</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">name</span>: <span class="kw-2">&</span><span class="ident">str</span>, <span class="ident">delta</span>: <span class="ident">isize</span>) {
|
||||
<span class="self">self</span>.<span class="ident">find_mut</span>::<span class="op"><</span><span class="ident">Spinner</span><span class="op">></span>(<span class="ident">name</span>).<span class="ident">modify</span>(<span class="ident">delta</span>)
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">modify_spinner</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="ident">EventCtx</span>, <span class="ident">name</span>: <span class="kw-2">&</span><span class="ident">str</span>, <span class="ident">delta</span>: <span class="ident">isize</span>) {
|
||||
<span class="self">self</span>.<span class="ident">find_mut</span>::<span class="op"><</span><span class="ident">Spinner</span><span class="op">></span>(<span class="ident">name</span>).<span class="ident">modify</span>(<span class="ident">ctx</span>, <span class="ident">delta</span>)
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">dropdown_value</span><span class="op"><</span><span class="ident">T</span>: <span class="lifetime">'static</span> <span class="op">+</span> <span class="ident">PartialEq</span> <span class="op">+</span> <span class="ident">Clone</span>, <span class="ident">I</span>: <span class="ident">Into</span><span class="op"><</span><span class="ident">String</span><span class="op">></span><span class="op">></span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">name</span>: <span class="ident">I</span>) <span class="op">-</span><span class="op">></span> <span class="ident">T</span> {
|
||||
|
@ -164,12 +164,33 @@
|
||||
<span id="161">161</span>
|
||||
<span id="162">162</span>
|
||||
<span id="163">163</span>
|
||||
<span id="164">164</span>
|
||||
<span id="165">165</span>
|
||||
<span id="166">166</span>
|
||||
<span id="167">167</span>
|
||||
<span id="168">168</span>
|
||||
<span id="169">169</span>
|
||||
<span id="170">170</span>
|
||||
<span id="171">171</span>
|
||||
<span id="172">172</span>
|
||||
<span id="173">173</span>
|
||||
<span id="174">174</span>
|
||||
<span id="175">175</span>
|
||||
<span id="176">176</span>
|
||||
<span id="177">177</span>
|
||||
<span id="178">178</span>
|
||||
<span id="179">179</span>
|
||||
<span id="180">180</span>
|
||||
<span id="181">181</span>
|
||||
<span id="182">182</span>
|
||||
<span id="183">183</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Polygon</span>, <span class="ident">Pt2D</span>};
|
||||
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">CornerRadii</span>, <span class="ident">Distance</span>, <span class="ident">Polygon</span>, <span class="ident">Pt2D</span>};
|
||||
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::{
|
||||
<span class="ident">include_labeled_bytes</span>, <span class="ident">text</span>, <span class="ident">Button</span>, <span class="ident">EdgeInsets</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>, <span class="ident">Line</span>, <span class="ident">Outcome</span>,
|
||||
<span class="ident">ScreenDims</span>, <span class="ident">ScreenPt</span>, <span class="ident">ScreenRectangle</span>, <span class="ident">StyledButtons</span>, <span class="ident">Text</span>, <span class="ident">Widget</span>, <span class="ident">WidgetImpl</span>, <span class="ident">WidgetOutput</span>,
|
||||
<span class="ident">include_labeled_bytes</span>, <span class="ident">text</span>, <span class="ident">Button</span>, <span class="ident">Drawable</span>, <span class="ident">EdgeInsets</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>, <span class="ident">Line</span>,
|
||||
<span class="ident">Outcome</span>, <span class="ident">OutlineStyle</span>, <span class="ident">Prerender</span>, <span class="ident">ScreenDims</span>, <span class="ident">ScreenPt</span>, <span class="ident">ScreenRectangle</span>, <span class="ident">Style</span>, <span class="ident">StyledButtons</span>,
|
||||
<span class="ident">Text</span>, <span class="ident">Widget</span>, <span class="ident">WidgetImpl</span>, <span class="ident">WidgetOutput</span>,
|
||||
};
|
||||
|
||||
<span class="comment">// TODO MAX_CHAR_WIDTH is a hardcoded nonsense value</span>
|
||||
@ -185,19 +206,25 @@
|
||||
|
||||
<span class="ident">up</span>: <span class="ident">Button</span>,
|
||||
<span class="ident">down</span>: <span class="ident">Button</span>,
|
||||
<span class="ident">outline</span>: <span class="ident">OutlineStyle</span>,
|
||||
<span class="ident">drawable</span>: <span class="ident">Drawable</span>,
|
||||
|
||||
<span class="ident">top_left</span>: <span class="ident">ScreenPt</span>,
|
||||
<span class="ident">dims</span>: <span class="ident">ScreenDims</span>,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">Spinner</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">ctx</span>: <span class="kw-2">&</span><span class="ident">EventCtx</span>, (<span class="ident">low</span>, <span class="ident">high</span>): (<span class="ident">isize</span>, <span class="ident">isize</span>), <span class="kw-2">mut</span> <span class="ident">current</span>: <span class="ident">isize</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Widget</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">widget</span>(<span class="ident">ctx</span>: <span class="kw-2">&</span><span class="ident">EventCtx</span>, (<span class="ident">low</span>, <span class="ident">high</span>): (<span class="ident">isize</span>, <span class="ident">isize</span>), <span class="ident">current</span>: <span class="ident">isize</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Widget</span> {
|
||||
<span class="ident">Widget</span>::<span class="ident">new</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="self">Self</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, (<span class="ident">low</span>, <span class="ident">high</span>), <span class="ident">current</span>)))
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">ctx</span>: <span class="kw-2">&</span><span class="ident">EventCtx</span>, (<span class="ident">low</span>, <span class="ident">high</span>): (<span class="ident">isize</span>, <span class="ident">isize</span>), <span class="kw-2">mut</span> <span class="ident">current</span>: <span class="ident">isize</span>) <span class="op">-</span><span class="op">></span> <span class="self">Self</span> {
|
||||
<span class="kw">let</span> <span class="ident">button_builder</span> <span class="op">=</span> <span class="ident">ctx</span>
|
||||
.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_plain</span>()
|
||||
.<span class="ident">padding</span>(<span class="ident">EdgeInsets</span> {
|
||||
<span class="ident">top</span>: <span class="number">1.0</span>,
|
||||
<span class="ident">bottom</span>: <span class="number">1.0</span>,
|
||||
<span class="ident">top</span>: <span class="number">2.0</span>,
|
||||
<span class="ident">bottom</span>: <span class="number">2.0</span>,
|
||||
<span class="ident">left</span>: <span class="number">4.0</span>,
|
||||
<span class="ident">right</span>: <span class="number">4.0</span>,
|
||||
})
|
||||
@ -206,16 +233,28 @@
|
||||
<span class="kw">let</span> <span class="ident">up</span> <span class="op">=</span> <span class="ident">button_builder</span>
|
||||
.<span class="ident">clone</span>()
|
||||
.<span class="ident">image_bytes</span>(<span class="macro">include_labeled_bytes</span><span class="macro">!</span>(<span class="string">"../../icons/arrow_up.svg"</span>))
|
||||
.<span class="ident">padding_bottom</span>(<span class="number">2.0</span>)
|
||||
.<span class="ident">corner_rounding</span>(<span class="ident">CornerRadii</span> {
|
||||
<span class="ident">top_left</span>: <span class="number">0.0</span>,
|
||||
<span class="ident">top_right</span>: <span class="number">5.0</span>,
|
||||
<span class="ident">bottom_right</span>: <span class="number">0.0</span>,
|
||||
<span class="ident">bottom_left</span>: <span class="number">5.0</span>,
|
||||
})
|
||||
.<span class="ident">build</span>(<span class="ident">ctx</span>, <span class="string">"increase value"</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="ident">down</span> <span class="op">=</span> <span class="ident">button_builder</span>
|
||||
.<span class="ident">image_bytes</span>(<span class="macro">include_labeled_bytes</span><span class="macro">!</span>(<span class="string">"../../icons/arrow_down.svg"</span>))
|
||||
.<span class="ident">corner_rounding</span>(<span class="ident">CornerRadii</span> {
|
||||
<span class="ident">top_left</span>: <span class="number">5.0</span>,
|
||||
<span class="ident">top_right</span>: <span class="number">0.0</span>,
|
||||
<span class="ident">bottom_right</span>: <span class="number">5.0</span>,
|
||||
<span class="ident">bottom_left</span>: <span class="number">0.0</span>,
|
||||
})
|
||||
.<span class="ident">build</span>(<span class="ident">ctx</span>, <span class="string">"decrease value"</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="ident">outline</span> <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_outline</span>.<span class="ident">outline</span>;
|
||||
<span class="kw">let</span> <span class="ident">dims</span> <span class="op">=</span> <span class="ident">ScreenDims</span>::<span class="ident">new</span>(
|
||||
<span class="ident">TEXT_WIDTH</span> <span class="op">+</span> <span class="ident">up</span>.<span class="ident">get_dims</span>().<span class="ident">width</span>,
|
||||
<span class="ident">up</span>.<span class="ident">get_dims</span>().<span class="ident">height</span> <span class="op">+</span> <span class="ident">down</span>.<span class="ident">get_dims</span>().<span class="ident">height</span>,
|
||||
<span class="ident">up</span>.<span class="ident">get_dims</span>().<span class="ident">height</span> <span class="op">+</span> <span class="ident">down</span>.<span class="ident">get_dims</span>().<span class="ident">height</span> <span class="op">+</span> <span class="number">1.0</span>,
|
||||
);
|
||||
<span class="kw">if</span> <span class="ident">current</span> <span class="op"><</span> <span class="ident">low</span> {
|
||||
<span class="ident">current</span> <span class="op">=</span> <span class="ident">low</span>;
|
||||
@ -225,38 +264,46 @@
|
||||
<span class="macro">warn</span><span class="macro">!</span>(<span class="string">"Spinner current value is out of bounds!"</span>);
|
||||
}
|
||||
|
||||
<span class="kw">let</span> <span class="ident">padded_widget</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">Widget</span>::<span class="ident">new</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">Spinner</span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">spinner</span> <span class="op">=</span> <span class="ident">Spinner</span> {
|
||||
<span class="ident">low</span>,
|
||||
<span class="ident">high</span>,
|
||||
<span class="ident">current</span>,
|
||||
|
||||
<span class="ident">up</span>,
|
||||
<span class="ident">down</span>,
|
||||
|
||||
<span class="ident">drawable</span>: <span class="ident">Drawable</span>::<span class="ident">empty</span>(<span class="ident">ctx</span>),
|
||||
<span class="ident">outline</span>,
|
||||
<span class="ident">top_left</span>: <span class="ident">ScreenPt</span>::<span class="ident">new</span>(<span class="number">0.0</span>, <span class="number">0.0</span>),
|
||||
<span class="ident">dims</span>,
|
||||
}))])
|
||||
<span class="comment">// pad to consistent height with other input components</span>
|
||||
<span class="comment">// Also, something funny going on with the outline here - without this padding</span>
|
||||
<span class="comment">// the outline is cropped and looks undesirably thin. I don't understand</span>
|
||||
<span class="comment">// why padding would affect the thickness of the outline stroke</span>
|
||||
.<span class="ident">padding</span>(<span class="ident">EdgeInsets</span> {
|
||||
<span class="ident">top</span>: <span class="number">2.0</span>,
|
||||
<span class="ident">left</span>: <span class="number">1.0</span>,
|
||||
<span class="ident">bottom</span>: <span class="number">2.0</span>,
|
||||
<span class="ident">right</span>: <span class="number">1.0</span>,
|
||||
})
|
||||
.<span class="ident">outline</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_outline</span>.<span class="ident">outline</span>);
|
||||
|
||||
<span class="comment">// Wrap in another widget so that the caller can apply any additional padding or whatever</span>
|
||||
<span class="comment">// they need without blowing away what's necessary for the spinner control to look right.</span>
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">padded_widget</span>])
|
||||
};
|
||||
<span class="ident">spinner</span>.<span class="ident">drawable</span> <span class="op">=</span> <span class="ident">spinner</span>.<span class="ident">drawable</span>(<span class="ident">ctx</span>.<span class="ident">prerender</span>, <span class="ident">ctx</span>.<span class="ident">style</span>());
|
||||
<span class="ident">spinner</span>
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">modify</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">delta</span>: <span class="ident">isize</span>) {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">modify</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="ident">EventCtx</span>, <span class="ident">delta</span>: <span class="ident">isize</span>) {
|
||||
<span class="self">self</span>.<span class="ident">current</span> <span class="op">+</span><span class="op">=</span> <span class="ident">delta</span>;
|
||||
<span class="self">self</span>.<span class="ident">current</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">current</span>.<span class="ident">min</span>(<span class="self">self</span>.<span class="ident">high</span>);
|
||||
<span class="self">self</span>.<span class="ident">current</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">current</span>.<span class="ident">max</span>(<span class="self">self</span>.<span class="ident">low</span>);
|
||||
<span class="self">self</span>.<span class="ident">drawable</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">drawable</span>(<span class="ident">ctx</span>.<span class="ident">prerender</span>, <span class="ident">ctx</span>.<span class="ident">style</span>());
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">drawable</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">prerender</span>: <span class="kw-2">&</span><span class="ident">Prerender</span>, <span class="ident">style</span>: <span class="kw-2">&</span><span class="ident">Style</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Drawable</span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">GeomBatch</span>::<span class="ident">from</span>(<span class="macro">vec</span><span class="macro">!</span>[(
|
||||
<span class="ident">style</span>.<span class="ident">field_bg</span>,
|
||||
<span class="ident">Polygon</span>::<span class="ident">rounded_rectangle</span>(<span class="self">self</span>.<span class="ident">dims</span>.<span class="ident">width</span>, <span class="self">self</span>.<span class="ident">dims</span>.<span class="ident">height</span>, <span class="number">5.0</span>),
|
||||
)]);
|
||||
<span class="ident">batch</span>.<span class="ident">append</span>(
|
||||
<span class="ident">Text</span>::<span class="ident">from</span>(<span class="ident">Line</span>(<span class="self">self</span>.<span class="ident">current</span>.<span class="ident">to_string</span>()))
|
||||
.<span class="ident">render_autocropped</span>(<span class="ident">prerender</span>)
|
||||
.<span class="ident">centered_on</span>(<span class="ident">Pt2D</span>::<span class="ident">new</span>(<span class="ident">TEXT_WIDTH</span> <span class="op">/</span> <span class="number">2.0</span>, <span class="self">self</span>.<span class="ident">dims</span>.<span class="ident">height</span> <span class="op">/</span> <span class="number">2.0</span>)),
|
||||
);
|
||||
<span class="ident">batch</span>.<span class="ident">push</span>(
|
||||
<span class="self">self</span>.<span class="ident">outline</span>.<span class="number">1</span>,
|
||||
<span class="ident">Polygon</span>::<span class="ident">rounded_rectangle</span>(<span class="self">self</span>.<span class="ident">dims</span>.<span class="ident">width</span>, <span class="self">self</span>.<span class="ident">dims</span>.<span class="ident">height</span>, <span class="number">5.0</span>)
|
||||
.<span class="ident">to_outline</span>(<span class="ident">Distance</span>::<span class="ident">meters</span>(<span class="self">self</span>.<span class="ident">outline</span>.<span class="number">0</span>))
|
||||
.<span class="ident">unwrap</span>(),
|
||||
);
|
||||
<span class="ident">prerender</span>.<span class="ident">upload</span>(<span class="ident">batch</span>)
|
||||
}
|
||||
}
|
||||
|
||||
@ -282,6 +329,7 @@
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="ident">Outcome</span>::<span class="ident">Clicked</span>(<span class="kw">_</span>) <span class="op">=</span> <span class="ident">output</span>.<span class="ident">outcome</span> {
|
||||
<span class="ident">output</span>.<span class="ident">outcome</span> <span class="op">=</span> <span class="ident">Outcome</span>::<span class="ident">Changed</span>;
|
||||
<span class="self">self</span>.<span class="ident">current</span> <span class="op">=</span> (<span class="self">self</span>.<span class="ident">current</span> <span class="op">+</span> <span class="number">1</span>).<span class="ident">min</span>(<span class="self">self</span>.<span class="ident">high</span>);
|
||||
<span class="self">self</span>.<span class="ident">drawable</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">drawable</span>(<span class="kw-2">&</span><span class="ident">ctx</span>.<span class="ident">prerender</span>, <span class="ident">ctx</span>.<span class="ident">style</span>());
|
||||
<span class="ident">ctx</span>.<span class="ident">no_op_event</span>(<span class="bool-val">true</span>, <span class="op">|</span><span class="ident">ctx</span><span class="op">|</span> <span class="self">self</span>.<span class="ident">up</span>.<span class="ident">event</span>(<span class="ident">ctx</span>, <span class="ident">output</span>));
|
||||
<span class="kw">return</span>;
|
||||
}
|
||||
@ -290,6 +338,7 @@
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="ident">Outcome</span>::<span class="ident">Clicked</span>(<span class="kw">_</span>) <span class="op">=</span> <span class="ident">output</span>.<span class="ident">outcome</span> {
|
||||
<span class="ident">output</span>.<span class="ident">outcome</span> <span class="op">=</span> <span class="ident">Outcome</span>::<span class="ident">Changed</span>;
|
||||
<span class="self">self</span>.<span class="ident">current</span> <span class="op">=</span> (<span class="self">self</span>.<span class="ident">current</span> <span class="op">-</span> <span class="number">1</span>).<span class="ident">max</span>(<span class="self">self</span>.<span class="ident">low</span>);
|
||||
<span class="self">self</span>.<span class="ident">drawable</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">drawable</span>(<span class="kw-2">&</span><span class="ident">ctx</span>.<span class="ident">prerender</span>, <span class="ident">ctx</span>.<span class="ident">style</span>());
|
||||
<span class="ident">ctx</span>.<span class="ident">no_op_event</span>(<span class="bool-val">true</span>, <span class="op">|</span><span class="ident">ctx</span><span class="op">|</span> <span class="self">self</span>.<span class="ident">down</span>.<span class="ident">event</span>(<span class="ident">ctx</span>, <span class="ident">output</span>));
|
||||
<span class="kw">return</span>;
|
||||
}
|
||||
@ -300,10 +349,12 @@
|
||||
<span class="kw">if</span> <span class="ident">dy</span> <span class="op">></span> <span class="number">0.0</span> <span class="op">&&</span> <span class="self">self</span>.<span class="ident">current</span> <span class="op">!</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">high</span> {
|
||||
<span class="self">self</span>.<span class="ident">current</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
|
||||
<span class="ident">output</span>.<span class="ident">outcome</span> <span class="op">=</span> <span class="ident">Outcome</span>::<span class="ident">Changed</span>;
|
||||
<span class="self">self</span>.<span class="ident">drawable</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">drawable</span>(<span class="kw-2">&</span><span class="ident">ctx</span>.<span class="ident">prerender</span>, <span class="ident">ctx</span>.<span class="ident">style</span>());
|
||||
}
|
||||
<span class="kw">if</span> <span class="ident">dy</span> <span class="op"><</span> <span class="number">0.0</span> <span class="op">&&</span> <span class="self">self</span>.<span class="ident">current</span> <span class="op">!</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">low</span> {
|
||||
<span class="self">self</span>.<span class="ident">current</span> <span class="op">-</span><span class="op">=</span> <span class="number">1</span>;
|
||||
<span class="ident">output</span>.<span class="ident">outcome</span> <span class="op">=</span> <span class="ident">Outcome</span>::<span class="ident">Changed</span>;
|
||||
<span class="self">self</span>.<span class="ident">drawable</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">drawable</span>(<span class="kw-2">&</span><span class="ident">ctx</span>.<span class="ident">prerender</span>, <span class="ident">ctx</span>.<span class="ident">style</span>());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -311,18 +362,7 @@
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>) {
|
||||
<span class="comment">// TODO Cache</span>
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">GeomBatch</span>::<span class="ident">from</span>(<span class="macro">vec</span><span class="macro">!</span>[(
|
||||
<span class="ident">g</span>.<span class="ident">style</span>().<span class="ident">panel_bg</span>,
|
||||
<span class="ident">Polygon</span>::<span class="ident">rounded_rectangle</span>(<span class="self">self</span>.<span class="ident">dims</span>.<span class="ident">width</span>, <span class="self">self</span>.<span class="ident">dims</span>.<span class="ident">height</span>, <span class="number">5.0</span>),
|
||||
)]);
|
||||
<span class="ident">batch</span>.<span class="ident">append</span>(
|
||||
<span class="ident">Text</span>::<span class="ident">from</span>(<span class="ident">Line</span>(<span class="self">self</span>.<span class="ident">current</span>.<span class="ident">to_string</span>()))
|
||||
.<span class="ident">render_autocropped</span>(<span class="ident">g</span>)
|
||||
.<span class="ident">centered_on</span>(<span class="ident">Pt2D</span>::<span class="ident">new</span>(<span class="ident">TEXT_WIDTH</span> <span class="op">/</span> <span class="number">2.0</span>, <span class="self">self</span>.<span class="ident">dims</span>.<span class="ident">height</span> <span class="op">/</span> <span class="number">2.0</span>)),
|
||||
);
|
||||
<span class="kw">let</span> <span class="ident">draw</span> <span class="op">=</span> <span class="ident">g</span>.<span class="ident">upload</span>(<span class="ident">batch</span>);
|
||||
<span class="ident">g</span>.<span class="ident">redraw_at</span>(<span class="self">self</span>.<span class="ident">top_left</span>, <span class="kw-2">&</span><span class="ident">draw</span>);
|
||||
<span class="ident">g</span>.<span class="ident">redraw_at</span>(<span class="self">self</span>.<span class="ident">top_left</span>, <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">drawable</span>);
|
||||
|
||||
<span class="self">self</span>.<span class="ident">up</span>.<span class="ident">draw</span>(<span class="ident">g</span>);
|
||||
<span class="self">self</span>.<span class="ident">down</span>.<span class="ident">draw</span>(<span class="ident">g</span>);
|
||||
|
@ -849,7 +849,7 @@
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"btn_outline_icon_text"</span>),
|
||||
])]),
|
||||
<span class="ident">Text</span>::<span class="ident">from</span>(<span class="ident">Line</span>(<span class="string">"Spinner"</span>).<span class="ident">big_heading_styled</span>().<span class="ident">size</span>(<span class="number">18</span>)).<span class="ident">draw</span>(<span class="ident">ctx</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>),
|
||||
<span class="ident">widgetry</span>::<span class="ident">Spinner</span>::<span class="ident">widget</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_outline_text</span>(<span class="string">"New faces"</span>)
|
||||
@ -979,7 +979,7 @@
|
||||
),
|
||||
<span class="ident">Widget</span>::<span class="ident">col</span>(
|
||||
(<span class="number">0</span>..<span class="ident">row_height</span>)
|
||||
.<span class="ident">map</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</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>))
|
||||
.<span class="ident">map</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">widgetry</span>::<span class="ident">Spinner</span>::<span class="ident">widget</span>(<span class="ident">ctx</span>, (<span class="number">0</span>, <span class="number">11</span>), <span class="number">1</span>))
|
||||
.<span class="ident">collect</span>::<span class="op"><</span><span class="ident">Vec</span><span class="op"><</span><span class="kw">_</span><span class="op">></span><span class="op">></span>(),
|
||||
),
|
||||
<span class="ident">Widget</span>::<span class="ident">col</span>(
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,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 `TEXT_WIDTH` constant in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, TEXT_WIDTH"><title>widgetry::widgets::spinner::TEXT_WIDTH - 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='../../../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">widgets</a>::<wbr><a href="index.html">spinner</a></p><script>window.sidebarCurrent = {name: "TEXT_WIDTH", 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><button type="button" class="help-button">?</button>
|
||||
<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/widgets/spinner.rs.html#9" title="goto source code">[src]</a></span><span class="in-band">Constant <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a>::<wbr><a href="index.html">spinner</a>::<wbr><a class="constant" href="">TEXT_WIDTH</a></span></h1><pre class="rust const">const TEXT_WIDTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a> = 2.0 * text::MAX_CHAR_WIDTH; // 50f64</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/widgets/spinner.rs.html#10" title="goto source code">[src]</a></span><span class="in-band">Constant <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a>::<wbr><a href="index.html">spinner</a>::<wbr><a class="constant" href="">TEXT_WIDTH</a></span></h1><pre class="rust const">const TEXT_WIDTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a> = 2.0 * text::MAX_CHAR_WIDTH; // 50f64</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 `spinner` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, spinner"><title>widgetry::widgets::spinner - 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 spinner</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#constants">Constants</a></li></ul></div><p class="location"><a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a></p><script>window.sidebarCurrent = {name: "spinner", 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><button type="button" class="help-button">?</button>
|
||||
<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/widgets/spinner.rs.html#1-163" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a>::<wbr><a class="mod" href="">spinner</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/widgetry/widgets/spinner.rs.html#1-183" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a>::<wbr><a class="mod" href="">spinner</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.Spinner.html" title="widgetry::widgets::spinner::Spinner struct">Spinner</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.TEXT_WIDTH.html" title="widgetry::widgets::spinner::TEXT_WIDTH constant">TEXT_WIDTH</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
Loading…
Reference in New Issue
Block a user