mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-24 09:24:26 +03:00
deploy: 864bfacb30
This commit is contained in:
parent
8a7b8985bb
commit
af582e41ed
@ -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> = "Sun, 14 Feb 2021 18:39:27 +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> = "Sun, 14 Feb 2021 19:17:29 +0000";</pre><div class="docblock"><p>The built-time in RFC2822, UTC</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -2,7 +2,7 @@
|
||||
implementors["fifteen_min"] = [{"text":"impl State<SimpleApp<()>> for Viewer","synthetic":false,"types":[]},{"text":"impl State<SimpleApp<()>> for ExploreAmenities","synthetic":false,"types":[]}];
|
||||
implementors["game"] = [{"text":"impl State<App> for CutscenePlayer","synthetic":false,"types":[]},{"text":"impl State<App> for FYI","synthetic":false,"types":[]},{"text":"impl State<App> for ChallengesPicker","synthetic":false,"types":[]},{"text":"impl State<App> for Warping","synthetic":false,"types":[]},{"text":"impl State<App> for DebugWarp","synthetic":false,"types":[]},{"text":"impl State<App> for Viewer","synthetic":false,"types":[]},{"text":"impl State<App> for Floodfiller","synthetic":false,"types":[]},{"text":"impl State<App> for PathCounter","synthetic":false,"types":[]},{"text":"impl State<App> for PolygonDebugger","synthetic":false,"types":[]},{"text":"impl State<App> for RouteExplorer","synthetic":false,"types":[]},{"text":"impl State<App> for AllRoutesExplorer","synthetic":false,"types":[]},{"text":"impl State<App> for DebugMode","synthetic":false,"types":[]},{"text":"impl State<App> for ScreenshotTest","synthetic":false,"types":[]},{"text":"impl State<App> for CollisionsViewer","synthetic":false,"types":[]},{"text":"impl State<App> for PopularDestinations","synthetic":false,"types":[]},{"text":"impl State<App> for ViewKML","synthetic":false,"types":[]},{"text":"impl State<App> for PolygonEditor","synthetic":false,"types":[]},{"text":"impl State<App> for ScenarioManager","synthetic":false,"types":[]},{"text":"impl State<App> for StoryMapEditor","synthetic":false,"types":[]},{"text":"impl State<App> for DevToolsMode","synthetic":false,"types":[]},{"text":"impl State<App> for BulkSelect","synthetic":false,"types":[]},{"text":"impl State<App> for BulkEdit","synthetic":false,"types":[]},{"text":"impl State<App> for ClusterTrafficSignalEditor","synthetic":false,"types":[]},{"text":"impl State<App> for RouteEditor","synthetic":false,"types":[]},{"text":"impl State<App> for SignalPicker","synthetic":false,"types":[]},{"text":"impl State<App> for PreviewTrafficSignal","synthetic":false,"types":[]},{"text":"impl State<App> for TrafficSignalEditor","synthetic":false,"types":[]},{"text":"impl State<App> for ZoneEditor","synthetic":false,"types":[]},{"text":"impl State<App> for EditMode","synthetic":false,"types":[]},{"text":"impl State<App> for SaveEdits","synthetic":false,"types":[]},{"text":"impl State<App> for LoadEdits","synthetic":false,"types":[]},{"text":"impl State<App> for ConfirmDiscard","synthetic":false,"types":[]},{"text":"impl State<App> for PickLayer","synthetic":false,"types":[]},{"text":"impl State<App> for TitleScreen","synthetic":false,"types":[]},{"text":"impl State<App> for MainMenu","synthetic":false,"types":[]},{"text":"impl State<App> for About","synthetic":false,"types":[]},{"text":"impl State<App> for Proposals","synthetic":false,"types":[]},{"text":"impl State<App> for CommuterPatterns","synthetic":false,"types":[]},{"text":"impl<T: 'static, F: 'static, P: 'static + Fn(&mut EventCtx<'_>, &App, &Table<App, T, F>) -> Panel> State<App> for GenericTripTable<T, F, P>","synthetic":false,"types":[]},{"text":"impl State<App> for ActiveTraffic","synthetic":false,"types":[]},{"text":"impl State<App> for TransitRoutes","synthetic":false,"types":[]},{"text":"impl State<App> for TripSummaries","synthetic":false,"types":[]},{"text":"impl State<App> for TrafficSignalDemand","synthetic":false,"types":[]},{"text":"impl State<App> for AgentSpawner","synthetic":false,"types":[]},{"text":"impl State<App> for EditScenarioModifiers","synthetic":false,"types":[]},{"text":"impl State<App> for ChangeMode","synthetic":false,"types":[]},{"text":"impl State<App> for FinalScore","synthetic":false,"types":[]},{"text":"impl State<App> for TrafficRecorder","synthetic":false,"types":[]},{"text":"impl State<App> for JumpToTime","synthetic":false,"types":[]},{"text":"impl State<App> for JumpToDelay","synthetic":false,"types":[]},{"text":"impl State<App> for TimeWarpScreen","synthetic":false,"types":[]},{"text":"impl State<App> for SandboxMode","synthetic":false,"types":[]},{"text":"impl State<App> for BackToMainMenu","synthetic":false,"types":[]},{"text":"impl State<App> for SandboxLoader","synthetic":false,"types":[]}];
|
||||
implementors["map_editor"] = [{"text":"impl State<App> for MainState","synthetic":false,"types":[]}];
|
||||
implementors["map_gui"] = [{"text":"impl<A: AppLike + 'static> State<A> for MapAlreadyLoaded<A>","synthetic":false,"types":[]},{"text":"impl<A: AppLike + 'static, T: 'static + DeserializeOwned> State<A> for FileLoader<A, T>","synthetic":false,"types":[]},{"text":"impl<A, T> State<A> for FutureLoader<A, T> <span class=\"where fmt-newline\">where<br> A: 'static + AppLike,<br> T: 'static, </span>","synthetic":false,"types":[]},{"text":"impl<A: AppLike> State<A> for OptionsPanel","synthetic":false,"types":[]},{"text":"impl<T> State<SimpleApp<T>> for SimpleWarper","synthetic":false,"types":[]},{"text":"impl<A: AppLike + 'static> State<A> for CityPicker<A>","synthetic":false,"types":[]},{"text":"impl<A: AppLike + 'static> State<A> for AllCityPicker<A>","synthetic":false,"types":[]},{"text":"impl<A: AppLike + 'static> State<A> for Navigator","synthetic":false,"types":[]},{"text":"impl<A: AppLike + 'static> State<A> for CrossStreet","synthetic":false,"types":[]},{"text":"impl<A: AppLike + 'static> State<A> for SearchBuildings","synthetic":false,"types":[]},{"text":"impl<A: AppLike + 'static> State<A> for TurnExplorer","synthetic":false,"types":[]},{"text":"impl<A: AppLike + 'static, T: 'static> State<A> for ChooseSomething<A, T>","synthetic":false,"types":[]},{"text":"impl<A: AppLike + 'static> State<A> for PromptInput<A>","synthetic":false,"types":[]},{"text":"impl<A: AppLike> State<A> for PopupMsg","synthetic":false,"types":[]},{"text":"impl<A: AppLike + 'static> State<A> for Picker<A>","synthetic":false,"types":[]}];
|
||||
implementors["map_gui"] = [{"text":"impl<A: AppLike + 'static> State<A> for MapAlreadyLoaded<A>","synthetic":false,"types":[]},{"text":"impl<A: AppLike + 'static, T: 'static + DeserializeOwned> State<A> for FileLoader<A, T>","synthetic":false,"types":[]},{"text":"impl<A, T> State<A> for FutureLoader<A, T> <span class=\"where fmt-newline\">where<br> A: 'static + AppLike,<br> T: 'static, </span>","synthetic":false,"types":[]},{"text":"impl<A: AppLike> State<A> for OptionsPanel","synthetic":false,"types":[]},{"text":"impl<T> State<SimpleApp<T>> for SimpleWarper","synthetic":false,"types":[]},{"text":"impl<A: AppLike + 'static> State<A> for CityPicker<A>","synthetic":false,"types":[]},{"text":"impl<A: AppLike + 'static> State<A> for AllCityPicker<A>","synthetic":false,"types":[]},{"text":"impl<A: AppLike + 'static> State<A> for CitiesInCountryPicker<A>","synthetic":false,"types":[]},{"text":"impl<A: AppLike + 'static> State<A> for Navigator","synthetic":false,"types":[]},{"text":"impl<A: AppLike + 'static> State<A> for CrossStreet","synthetic":false,"types":[]},{"text":"impl<A: AppLike + 'static> State<A> for SearchBuildings","synthetic":false,"types":[]},{"text":"impl<A: AppLike + 'static> State<A> for TurnExplorer","synthetic":false,"types":[]},{"text":"impl<A: AppLike + 'static, T: 'static> State<A> for ChooseSomething<A, T>","synthetic":false,"types":[]},{"text":"impl<A: AppLike + 'static> State<A> for PromptInput<A>","synthetic":false,"types":[]},{"text":"impl<A: AppLike> State<A> for PopupMsg","synthetic":false,"types":[]},{"text":"impl<A: AppLike + 'static> State<A> for Picker<A>","synthetic":false,"types":[]}];
|
||||
implementors["osm_viewer"] = [{"text":"impl State<SimpleApp<()>> for Viewer","synthetic":false,"types":[]}];
|
||||
implementors["parking_mapper"] = [{"text":"impl State<SimpleApp<()>> for ParkingMapper","synthetic":false,"types":[]},{"text":"impl State<SimpleApp<()>> for ChangeWay","synthetic":false,"types":[]}];
|
||||
implementors["santa"] = [{"text":"impl State<SimpleApp<Session>> for Picker","synthetic":false,"types":[]},{"text":"impl State<SimpleApp<Session>> for Game","synthetic":false,"types":[]}];
|
||||
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `cities_per_country` fn in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, cities_per_country"><title>map_gui::tools::city_picker::cities_per_country - 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">city_picker</a></p><script>window.sidebarCurrent = {name: "cities_per_country", 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><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/city_picker.rs.html#438-447" 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">city_picker</a>::<wbr><a class="fn" href="">cities_per_country</a></span></h1><pre class="rust fn">fn cities_per_country() -> <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="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../../../abstio/abst_paths/struct.CityName.html" title="struct abstio::abst_paths::CityName">CityName</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,6 +1,7 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `city_picker` mod in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, city_picker"><title>map_gui::tools::city_picker - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script 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 city_picker</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class="location"><a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a></p><script>window.sidebarCurrent = {name: "city_picker", 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/city_picker.rs.html#1-350" 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="">city_picker</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.AllCityPicker.html" title="map_gui::tools::city_picker::AllCityPicker struct">AllCityPicker</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.CityPicker.html" title="map_gui::tools::city_picker::CityPicker struct">CityPicker</a></td><td class="docblock-short"><p>Lets the player switch maps.</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>
|
||||
<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 city_picker</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a></p><script>window.sidebarCurrent = {name: "city_picker", 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/city_picker.rs.html#1-447" 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="">city_picker</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.AllCityPicker.html" title="map_gui::tools::city_picker::AllCityPicker struct">AllCityPicker</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.CitiesInCountryPicker.html" title="map_gui::tools::city_picker::CitiesInCountryPicker struct">CitiesInCountryPicker</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.CityPicker.html" title="map_gui::tools::city_picker::CityPicker struct">CityPicker</a></td><td class="docblock-short"><p>Lets the player switch maps.</p>
|
||||
</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.cities_per_country.html" title="map_gui::tools::city_picker::cities_per_country fn">cities_per_country</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>
|
@ -1 +1 @@
|
||||
initSidebarItems({"struct":[["AllCityPicker",""],["CityPicker","Lets the player switch maps."]]});
|
||||
initSidebarItems({"fn":[["cities_per_country",""]],"struct":[["AllCityPicker",""],["CitiesInCountryPicker",""],["CityPicker","Lets the player switch maps."]]});
|
@ -1,13 +1,13 @@
|
||||
<!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 `AllCityPicker` struct in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, AllCityPicker"><title>map_gui::tools::city_picker::AllCityPicker - 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 struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Struct AllCityPicker</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.on_load">on_load</a><a href="#structfield.panel">panel</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.new">new</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-State%3CA%3E">State<A></a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">city_picker</a></p><script>window.sidebarCurrent = {name: "AllCityPicker", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" 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/city_picker.rs.html#265-269" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">city_picker</a>::<wbr><a class="struct" href="">AllCityPicker</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">struct AllCityPicker<A: <a class="trait" href="../../../map_gui/trait.AppLike.html" title="trait map_gui::AppLike">AppLike</a>> {
|
||||
<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/city_picker.rs.html#261-265" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">city_picker</a>::<wbr><a class="struct" href="">AllCityPicker</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">struct AllCityPicker<A: <a class="trait" href="../../../map_gui/trait.AppLike.html" title="trait map_gui::AppLike">AppLike</a>> {
|
||||
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/city_picker/struct.AllCityPicker.html" title="struct map_gui::tools::city_picker::AllCityPicker">AllCityPicker</a><A></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/map_gui/tools/city_picker.rs.html#271-308" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>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/city_picker.rs.html#272-307" 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/city_picker/struct.AllCityPicker.html" title="struct map_gui::tools::city_picker::AllCityPicker">AllCityPicker</a><A></code><a href="#impl-State%3CA%3E" class="anchor"></a><a class="srclink" href="../../../src/map_gui/tools/city_picker.rs.html#310-350" 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/city_picker.rs.html#311-340" 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_baselayer" class="method hidden"><code>fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&self) -> DrawBaselayer</code><a class="srclink" href="../../../src/map_gui/tools/city_picker.rs.html#342-344" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>A)</code><a class="srclink" href="../../../src/map_gui/tools/city_picker.rs.html#346-349" 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/city_picker/struct.AllCityPicker.html" title="struct map_gui::tools::city_picker::AllCityPicker">AllCityPicker</a><A></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/map_gui/tools/city_picker.rs.html#267-304" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>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/city_picker.rs.html#268-303" 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/city_picker/struct.AllCityPicker.html" title="struct map_gui::tools::city_picker::AllCityPicker">AllCityPicker</a><A></code><a href="#impl-State%3CA%3E" class="anchor"></a><a class="srclink" href="../../../src/map_gui/tools/city_picker.rs.html#306-346" 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/city_picker.rs.html#307-336" 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_baselayer" class="method hidden"><code>fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&self) -> DrawBaselayer</code><a class="srclink" href="../../../src/map_gui/tools/city_picker.rs.html#338-340" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>A)</code><a class="srclink" href="../../../src/map_gui/tools/city_picker.rs.html#342-345" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
|
||||
</div><h4 id="method.on_destroy" class="method hidden"><code>pub 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/city_picker/struct.AllCityPicker.html" title="struct map_gui::tools::city_picker::AllCityPicker">AllCityPicker</a><A></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/map_gui/lib.rs.html#1" title="goto source code">[src]</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/city_picker/struct.AllCityPicker.html" title="struct map_gui::tools::city_picker::AllCityPicker">AllCityPicker</a><A></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../../src/map_gui/lib.rs.html#1" title="goto source code">[src]</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/city_picker/struct.AllCityPicker.html" title="struct map_gui::tools::city_picker::AllCityPicker">AllCityPicker</a><A></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../../../src/map_gui/lib.rs.html#1" title="goto source code">[src]</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/city_picker/struct.AllCityPicker.html" title="struct map_gui::tools::city_picker::AllCityPicker">AllCityPicker</a><A></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../../src/map_gui/lib.rs.html#1" title="goto source code">[src]</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/city_picker/struct.AllCityPicker.html" title="struct map_gui::tools::city_picker::AllCityPicker">AllCityPicker</a><A></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/map_gui/lib.rs.html#1" title="goto source code">[src]</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>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
|
@ -0,0 +1,38 @@
|
||||
<!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 `CitiesInCountryPicker` struct in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, CitiesInCountryPicker"><title>map_gui::tools::city_picker::CitiesInCountryPicker - 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 struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Struct CitiesInCountryPicker</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.on_load">on_load</a><a href="#structfield.panel">panel</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.new">new</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-State%3CA%3E">State<A></a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">city_picker</a></p><script>window.sidebarCurrent = {name: "CitiesInCountryPicker", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" 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/city_picker.rs.html#348-352" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">city_picker</a>::<wbr><a class="struct" href="">CitiesInCountryPicker</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">struct CitiesInCountryPicker<A: <a class="trait" href="../../../map_gui/trait.AppLike.html" title="trait map_gui::AppLike">AppLike</a>> {
|
||||
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/city_picker/struct.CitiesInCountryPicker.html" title="struct map_gui::tools::city_picker::CitiesInCountryPicker">CitiesInCountryPicker</a><A></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/map_gui/tools/city_picker.rs.html#354-390" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>fn <a href="#method.new" class="fnname">new</a>(<br> ctx: &mut EventCtx<'_>, <br> app: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>A, <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> country: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</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/city_picker.rs.html#355-389" 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/city_picker/struct.CitiesInCountryPicker.html" title="struct map_gui::tools::city_picker::CitiesInCountryPicker">CitiesInCountryPicker</a><A></code><a href="#impl-State%3CA%3E" class="anchor"></a><a class="srclink" href="../../../src/map_gui/tools/city_picker.rs.html#392-436" 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/city_picker.rs.html#393-426" 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_baselayer" class="method hidden"><code>fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&self) -> DrawBaselayer</code><a class="srclink" href="../../../src/map_gui/tools/city_picker.rs.html#428-430" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>A)</code><a class="srclink" href="../../../src/map_gui/tools/city_picker.rs.html#432-435" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
|
||||
</div><h4 id="method.on_destroy" class="method hidden"><code>pub 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/city_picker/struct.CitiesInCountryPicker.html" title="struct map_gui::tools::city_picker::CitiesInCountryPicker">CitiesInCountryPicker</a><A></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/map_gui/lib.rs.html#1" title="goto source code">[src]</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/city_picker/struct.CitiesInCountryPicker.html" title="struct map_gui::tools::city_picker::CitiesInCountryPicker">CitiesInCountryPicker</a><A></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../../src/map_gui/lib.rs.html#1" title="goto source code">[src]</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/city_picker/struct.CitiesInCountryPicker.html" title="struct map_gui::tools::city_picker::CitiesInCountryPicker">CitiesInCountryPicker</a><A></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../../../src/map_gui/lib.rs.html#1" title="goto source code">[src]</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/city_picker/struct.CitiesInCountryPicker.html" title="struct map_gui::tools::city_picker::CitiesInCountryPicker">CitiesInCountryPicker</a><A></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../../src/map_gui/lib.rs.html#1" title="goto source code">[src]</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/city_picker/struct.CitiesInCountryPicker.html" title="struct map_gui::tools::city_picker::CitiesInCountryPicker">CitiesInCountryPicker</a><A></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/map_gui/lib.rs.html#1" title="goto source code">[src]</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>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
</div></div><h3 id="impl-Downcast" class="impl"><code class="in-band">impl<T> Downcast for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>, </span></code><a href="#impl-Downcast" class="anchor"></a></h3><div class="impl-items"><h4 id="method.into_any" class="method hidden"><code>pub fn <a href="#method.into_any" class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</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/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>></code></h4><div class='docblock hidden'><p>Convert <code>Box<dyn Trait></code> (where <code>Trait: Downcast</code>) to <code>Box<dyn Any></code>. <code>Box<dyn Any></code> can
|
||||
then be further <code>downcast</code> into <code>Box<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any">Read more</a></p>
|
||||
</div><h4 id="method.into_any_rc" class="method hidden"><code>pub fn <a href="#method.into_any_rc" class="fnname">into_any_rc</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html" title="struct alloc::rc::Rc">Rc</a><T>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html" title="struct alloc::rc::Rc">Rc</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static></code></h4><div class='docblock hidden'><p>Convert <code>Rc<Trait></code> (where <code>Trait: Downcast</code>) to <code>Rc<Any></code>. <code>Rc<Any></code> can then be
|
||||
further <code>downcast</code> into <code>Rc<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any_rc">Read more</a></p>
|
||||
</div><h4 id="method.as_any" class="method hidden"><code>pub fn <a href="#method.as_any" class="fnname">as_any</a>(&self) -> &(dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static)</code></h4><div class='docblock hidden'><p>Convert <code>&Trait</code> (where <code>Trait: Downcast</code>) to <code>&Any</code>. This is needed since Rust cannot
|
||||
generate <code>&Any</code>'s vtable from <code>&Trait</code>'s. <a href="#tymethod.as_any">Read more</a></p>
|
||||
</div><h4 id="method.as_any_mut" class="method hidden"><code>pub fn <a href="#method.as_any_mut" class="fnname">as_any_mut</a>(&mut self) -> &mut (dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static)</code></h4><div class='docblock hidden'><p>Convert <code>&mut Trait</code> (where <code>Trait: Downcast</code>) to <code>&Any</code>. This is needed since Rust cannot
|
||||
generate <code>&mut Any</code>'s vtable from <code>&mut Trait</code>'s. <a href="#tymethod.as_any_mut">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-556" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-Instrument" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://docs.rs/tracing/0.1.23/tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</code><a href="#impl-Instrument" class="anchor"></a><a class="srclink" href="https://docs.rs/tracing/0.1.23/src/tracing/instrument.rs.html#155" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.23/tracing/instrument/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.23/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="https://docs.rs/tracing/0.1.23/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing/0.1.23/src/tracing/instrument.rs.html#38-40" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
|
||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.23/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></p>
|
||||
</div><h4 id="method.in_current_span" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.23/tracing/instrument/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -> <a class="struct" href="https://docs.rs/tracing/0.1.23/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing/0.1.23/src/tracing/instrument.rs.html#74-76" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="../struct.Span.html#method.current">current</a> <code>Span</code>, returning an
|
||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.23/tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></p>
|
||||
</div></div><h3 id="impl-Instrument-1" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/trait.Instrument.html" title="trait tracing_futures::Instrument">Instrument</a> for T</code><a href="#impl-Instrument-1" class="anchor"></a><a class="srclink" href="https://docs.rs/tracing-futures/0.2.3/src/tracing_futures/lib.rs.html#248" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument-1" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.23/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/struct.Instrumented.html" title="struct tracing_futures::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing-futures/0.2.3/src/tracing_futures/lib.rs.html#129-131" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
|
||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/trait.Instrument.html#method.instrument">Read more</a></p>
|
||||
</div><h4 id="method.in_current_span-1" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -> <a class="struct" href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/struct.Instrumented.html" title="struct tracing_futures::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing-futures/0.2.3/src/tracing_futures/lib.rs.html#166-168" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="https://docs.rs/tracing/latest/tracing/span/struct.Span.html#method.current">current</a> <code>Span</code>, returning an
|
||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/trait.Instrument.html#method.in_current_span">Read more</a></p>
|
||||
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#541-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-547" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-Same%3CT%3E" class="impl"><code class="in-band">impl<T> Same<T> for T</code><a href="#impl-Same%3CT%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="associatedtype.Output" class="type"><code>type <a href="#associatedtype.Output" class="type">Output</a> = T</code></h4><div class='docblock'><p>Should always be <code>Self</code></p>
|
||||
</div></div><h3 id="impl-TryFrom%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#589-598" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id="method.try_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#595-597" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-TryInto%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#575-584" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id="method.try_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#581-583" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-VZip%3CV%3E" class="impl"><code class="in-band">impl<V, T> VZip<V> for T <span class="where fmt-newline">where<br> V: MultiLane<T>, </span></code><a href="#impl-VZip%3CV%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="method.vzip" class="method hidden"><code>pub fn <a href="#method.vzip" class="fnname">vzip</a>(self) -> V</code></h4></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "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
@ -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">"Sun, 14 Feb 2021 18:39:27 +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">"Sun, 14 Feb 2021 19:17:29 +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>
|
||||
|
@ -351,7 +351,106 @@
|
||||
<span id="348">348</span>
|
||||
<span id="349">349</span>
|
||||
<span id="350">350</span>
|
||||
<span id="351">351</span>
|
||||
<span id="352">352</span>
|
||||
<span id="353">353</span>
|
||||
<span id="354">354</span>
|
||||
<span id="355">355</span>
|
||||
<span id="356">356</span>
|
||||
<span id="357">357</span>
|
||||
<span id="358">358</span>
|
||||
<span id="359">359</span>
|
||||
<span id="360">360</span>
|
||||
<span id="361">361</span>
|
||||
<span id="362">362</span>
|
||||
<span id="363">363</span>
|
||||
<span id="364">364</span>
|
||||
<span id="365">365</span>
|
||||
<span id="366">366</span>
|
||||
<span id="367">367</span>
|
||||
<span id="368">368</span>
|
||||
<span id="369">369</span>
|
||||
<span id="370">370</span>
|
||||
<span id="371">371</span>
|
||||
<span id="372">372</span>
|
||||
<span id="373">373</span>
|
||||
<span id="374">374</span>
|
||||
<span id="375">375</span>
|
||||
<span id="376">376</span>
|
||||
<span id="377">377</span>
|
||||
<span id="378">378</span>
|
||||
<span id="379">379</span>
|
||||
<span id="380">380</span>
|
||||
<span id="381">381</span>
|
||||
<span id="382">382</span>
|
||||
<span id="383">383</span>
|
||||
<span id="384">384</span>
|
||||
<span id="385">385</span>
|
||||
<span id="386">386</span>
|
||||
<span id="387">387</span>
|
||||
<span id="388">388</span>
|
||||
<span id="389">389</span>
|
||||
<span id="390">390</span>
|
||||
<span id="391">391</span>
|
||||
<span id="392">392</span>
|
||||
<span id="393">393</span>
|
||||
<span id="394">394</span>
|
||||
<span id="395">395</span>
|
||||
<span id="396">396</span>
|
||||
<span id="397">397</span>
|
||||
<span id="398">398</span>
|
||||
<span id="399">399</span>
|
||||
<span id="400">400</span>
|
||||
<span id="401">401</span>
|
||||
<span id="402">402</span>
|
||||
<span id="403">403</span>
|
||||
<span id="404">404</span>
|
||||
<span id="405">405</span>
|
||||
<span id="406">406</span>
|
||||
<span id="407">407</span>
|
||||
<span id="408">408</span>
|
||||
<span id="409">409</span>
|
||||
<span id="410">410</span>
|
||||
<span id="411">411</span>
|
||||
<span id="412">412</span>
|
||||
<span id="413">413</span>
|
||||
<span id="414">414</span>
|
||||
<span id="415">415</span>
|
||||
<span id="416">416</span>
|
||||
<span id="417">417</span>
|
||||
<span id="418">418</span>
|
||||
<span id="419">419</span>
|
||||
<span id="420">420</span>
|
||||
<span id="421">421</span>
|
||||
<span id="422">422</span>
|
||||
<span id="423">423</span>
|
||||
<span id="424">424</span>
|
||||
<span id="425">425</span>
|
||||
<span id="426">426</span>
|
||||
<span id="427">427</span>
|
||||
<span id="428">428</span>
|
||||
<span id="429">429</span>
|
||||
<span id="430">430</span>
|
||||
<span id="431">431</span>
|
||||
<span id="432">432</span>
|
||||
<span id="433">433</span>
|
||||
<span id="434">434</span>
|
||||
<span id="435">435</span>
|
||||
<span id="436">436</span>
|
||||
<span id="437">437</span>
|
||||
<span id="438">438</span>
|
||||
<span id="439">439</span>
|
||||
<span id="440">440</span>
|
||||
<span id="441">441</span>
|
||||
<span id="442">442</span>
|
||||
<span id="443">443</span>
|
||||
<span id="444">444</span>
|
||||
<span id="445">445</span>
|
||||
<span id="446">446</span>
|
||||
<span id="447">447</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">abstio</span>::{<span class="ident">CityName</span>, <span class="ident">MapName</span>};
|
||||
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Distance</span>, <span class="ident">Percent</span>, <span class="ident">Polygon</span>, <span class="ident">Pt2D</span>};
|
||||
<span class="kw">use</span> <span class="ident">map_model</span>::<span class="ident">City</span>;
|
||||
@ -441,22 +540,15 @@
|
||||
);
|
||||
}
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">other_cities</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[<span class="ident">Line</span>(<span class="string">"Other cities"</span>).<span class="ident">draw</span>(<span class="ident">ctx</span>)];
|
||||
<span class="kw">for</span> <span class="ident">city</span> <span class="kw">in</span> <span class="ident">CityName</span>::<span class="ident">list_all_cities_from_system_data</span>() {
|
||||
<span class="kw">if</span> <span class="ident">city</span> <span class="op">=</span><span class="op">=</span> <span class="ident">city_name</span> {
|
||||
<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">city_path</span> <span class="op">=</span> <span class="ident">city</span>.<span class="ident">to_path</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_path</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>()));
|
||||
} <span class="kw">else</span> {
|
||||
<span class="ident">other_cities</span>.<span class="ident">push</span>(<span class="ident">button</span>.<span class="ident">no_tooltip</span>().<span class="ident">build_def</span>(<span class="ident">ctx</span>));
|
||||
}
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">other_places</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[<span class="ident">Line</span>(<span class="string">"Other places"</span>).<span class="ident">draw</span>(<span class="ident">ctx</span>)];
|
||||
<span class="kw">for</span> (<span class="ident">country</span>, <span class="ident">cities</span>) <span class="kw">in</span> <span class="ident">cities_per_country</span>() {
|
||||
<span class="ident">other_places</span>.<span class="ident">push</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="macro">format</span><span class="macro">!</span>(<span class="string">"{} in {}"</span>, <span class="ident">cities</span>.<span class="ident">len</span>(), <span class="ident">country</span>))
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&</span><span class="ident">country</span>),
|
||||
);
|
||||
}
|
||||
<span class="ident">other_cities</span>.<span class="ident">push</span>(
|
||||
<span class="ident">other_places</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">"Search all maps"</span>)
|
||||
.<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">Tab</span>)
|
||||
@ -473,7 +565,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">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">other_cities</span>).<span class="ident">centered_vert</span>(),
|
||||
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="ident">other_places</span>).<span class="ident">centered_vert</span>(),
|
||||
<span class="ident">Widget</span>::<span class="ident">draw_batch</span>(<span class="ident">ctx</span>, <span class="ident">batch</span>).<span class="ident">named</span>(<span class="string">"picker"</span>),
|
||||
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="ident">this_city</span>).<span class="ident">centered_vert</span>(),
|
||||
]),
|
||||
@ -543,11 +635,12 @@
|
||||
<span class="self">self</span>.<span class="ident">on_load</span>.<span class="ident">take</span>().<span class="ident">unwrap</span>(),
|
||||
));
|
||||
}
|
||||
<span class="comment">// Browse maps for another city without loading any map there</span>
|
||||
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Replace</span>(<span class="ident">CityPicker</span>::<span class="ident">new_in_city</span>(
|
||||
<span class="comment">// Browse cities for another country</span>
|
||||
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Replace</span>(<span class="ident">CitiesInCountryPicker</span>::<span class="ident">new</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="ident">app</span>,
|
||||
<span class="self">self</span>.<span class="ident">on_load</span>.<span class="ident">take</span>().<span class="ident">unwrap</span>(),
|
||||
<span class="ident">CityName</span>::<span class="ident">parse</span>(<span class="ident">x</span>).<span class="ident">unwrap</span>(),
|
||||
<span class="ident">x</span>,
|
||||
));
|
||||
}
|
||||
},
|
||||
@ -702,5 +795,106 @@
|
||||
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">draw</span>(<span class="ident">g</span>);
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">struct</span> <span class="ident">CitiesInCountryPicker</span><span class="op"><</span><span class="ident">A</span>: <span class="ident">AppLike</span><span class="op">></span> {
|
||||
<span class="ident">panel</span>: <span class="ident">Panel</span>,
|
||||
<span class="comment">// Wrapped in an Option just to make calling from event() work.</span>
|
||||
<span class="ident">on_load</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Box</span><span class="op"><</span><span class="kw">dyn</span> <span class="ident">FnOnce</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">A</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Transition</span><span class="op"><</span><span class="ident">A</span><span class="op">></span><span class="op">></span><span class="op">></span>,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span><span class="op"><</span><span class="ident">A</span>: <span class="ident">AppLike</span> <span class="op">+</span> <span class="lifetime">'static</span><span class="op">></span> <span class="ident">CitiesInCountryPicker</span><span class="op"><</span><span class="ident">A</span><span class="op">></span> {
|
||||
<span class="kw">fn</span> <span class="ident">new</span>(
|
||||
<span class="ident">ctx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>,
|
||||
<span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">A</span>,
|
||||
<span class="ident">on_load</span>: <span class="ident">Box</span><span class="op"><</span><span class="kw">dyn</span> <span class="ident">FnOnce</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">A</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Transition</span><span class="op"><</span><span class="ident">A</span><span class="op">></span><span class="op">></span>,
|
||||
<span class="ident">country</span>: <span class="kw-2">&</span><span class="ident">str</span>,
|
||||
) <span class="op">-</span><span class="op">></span> <span class="ident">Box</span><span class="op"><</span><span class="kw">dyn</span> <span class="ident">State</span><span class="op"><</span><span class="ident">A</span><span class="op">></span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buttons</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
|
||||
<span class="kw">for</span> <span class="ident">city</span> <span class="kw">in</span> <span class="ident">cities_per_country</span>().<span class="ident">remove</span>(<span class="ident">country</span>).<span class="ident">unwrap</span>() {
|
||||
<span class="kw">if</span> <span class="kw-2">&</span><span class="ident">city</span> <span class="op">=</span><span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>().<span class="ident">get_city_name</span>() {
|
||||
<span class="kw">continue</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_outline_light_text</span>(<span class="kw-2">&</span><span class="ident">city</span>.<span class="ident">city</span>)
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="kw-2">&</span><span class="ident">city</span>.<span class="ident">to_path</span>())
|
||||
.<span class="ident">margin_right</span>(<span class="number">10</span>)
|
||||
.<span class="ident">margin_below</span>(<span class="number">10</span>),
|
||||
);
|
||||
}
|
||||
|
||||
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">CitiesInCountryPicker</span> {
|
||||
<span class="ident">on_load</span>: <span class="prelude-val">Some</span>(<span class="ident">on_load</span>),
|
||||
<span class="ident">panel</span>: <span class="ident">Panel</span>::<span class="ident">new</span>(<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">"Select a city in {}"</span>, <span class="ident">country</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">Widget</span>::<span class="ident">custom_row</span>(<span class="ident">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">70</span>)),
|
||||
]))
|
||||
.<span class="ident">exact_size_percent</span>(<span class="number">80</span>, <span class="number">80</span>)
|
||||
.<span class="ident">build</span>(<span class="ident">ctx</span>),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl</span><span class="op"><</span><span class="ident">A</span>: <span class="ident">AppLike</span> <span class="op">+</span> <span class="lifetime">'static</span><span class="op">></span> <span class="ident">State</span><span class="op"><</span><span class="ident">A</span><span class="op">></span> <span class="kw">for</span> <span class="ident">CitiesInCountryPicker</span><span class="op"><</span><span class="ident">A</span><span class="op">></span> {
|
||||
<span class="kw">fn</span> <span class="ident">event</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">A</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Transition</span><span class="op"><</span><span class="ident">A</span><span class="op">></span> {
|
||||
<span class="kw">match</span> <span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">event</span>(<span class="ident">ctx</span>) {
|
||||
<span class="ident">Outcome</span>::<span class="ident">Clicked</span>(<span class="ident">x</span>) <span class="op">=</span><span class="op">></span> <span class="kw">match</span> <span class="ident">x</span>.<span class="ident">as_ref</span>() {
|
||||
<span class="string">"close"</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="comment">// Go back to the screen that lets you choose all countries.</span>
|
||||
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Replace</span>(<span class="ident">CityPicker</span>::<span class="ident">new</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="ident">app</span>,
|
||||
<span class="self">self</span>.<span class="ident">on_load</span>.<span class="ident">take</span>().<span class="ident">unwrap</span>(),
|
||||
));
|
||||
}
|
||||
<span class="ident">path</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">city</span> <span class="op">=</span> <span class="ident">CityName</span>::<span class="ident">parse</span>(<span class="ident">path</span>).<span class="ident">unwrap</span>();
|
||||
<span class="kw">let</span> <span class="kw-2">mut</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="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Replace</span>(<span class="ident">MapLoader</span>::<span class="ident">new</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="ident">app</span>,
|
||||
<span class="ident">maps</span>.<span class="ident">pop</span>().<span class="ident">unwrap</span>(),
|
||||
<span class="self">self</span>.<span class="ident">on_load</span>.<span class="ident">take</span>().<span class="ident">unwrap</span>(),
|
||||
));
|
||||
}
|
||||
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Replace</span>(<span class="ident">CityPicker</span>::<span class="ident">new_in_city</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="self">self</span>.<span class="ident">on_load</span>.<span class="ident">take</span>().<span class="ident">unwrap</span>(),
|
||||
<span class="ident">city</span>,
|
||||
));
|
||||
}
|
||||
},
|
||||
<span class="kw">_</span> <span class="op">=</span><span class="op">></span> {}
|
||||
}
|
||||
|
||||
<span class="ident">Transition</span>::<span class="ident">Keep</span>
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">draw_baselayer</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">DrawBaselayer</span> {
|
||||
<span class="ident">DrawBaselayer</span>::<span class="ident">PreviousState</span>
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">A</span>) {
|
||||
<span class="ident">grey_out_map</span>(<span class="ident">g</span>, <span class="ident">app</span>);
|
||||
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">draw</span>(<span class="ident">g</span>);
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">cities_per_country</span>() <span class="op">-</span><span class="op">></span> <span class="ident">BTreeMap</span><span class="op"><</span><span class="ident">String</span>, <span class="ident">Vec</span><span class="op"><</span><span class="ident">CityName</span><span class="op">></span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">per_country</span> <span class="op">=</span> <span class="ident">BTreeMap</span>::<span class="ident">new</span>();
|
||||
<span class="kw">for</span> <span class="ident">city</span> <span class="kw">in</span> <span class="ident">CityName</span>::<span class="ident">list_all_cities_from_system_data</span>() {
|
||||
<span class="ident">per_country</span>
|
||||
.<span class="ident">entry</span>(<span class="ident">city</span>.<span class="ident">country</span>.<span class="ident">clone</span>())
|
||||
.<span class="ident">or_insert_with</span>(<span class="ident">Vec</span>::<span class="ident">new</span>)
|
||||
.<span class="ident">push</span>(<span class="ident">city</span>);
|
||||
}
|
||||
<span class="ident">per_country</span>
|
||||
}
|
||||
</pre></div>
|
||||
</section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_gui";</script><script src="../../../main.js"></script><script src="../../../source-script.js"></script><script src="../../../source-files.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
Loading…
Reference in New Issue
Block a user