mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-24 06:55:40 +03:00
deploy: 1ed5e7c444
This commit is contained in:
parent
6ddc9fec00
commit
c2c5144112
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `BUILT_TIME_UTC` constant in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>game::pregame::built_info::BUILT_TIME_UTC - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a></p><script>window.sidebarCurrent = {name: "BUILT_TIME_UTC", ty: "constant", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-a95c4551e63dceca/out/built.rs.html#53" title="goto source code">[src]</a></span><span class="in-band">Constant <a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="">BUILT_TIME_UTC</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "Sat, 20 Feb 2021 17:48:44 +0000";</pre><div class="docblock"><p>The built-time in RFC2822, UTC</p>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-a95c4551e63dceca/out/built.rs.html#53" title="goto source code">[src]</a></span><span class="in-band">Constant <a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="">BUILT_TIME_UTC</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "Sat, 20 Feb 2021 18:06:32 +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
@ -3,4 +3,4 @@
|
||||
<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_editor/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate map_editor</p><div class="block version"><p>Version 0.1.0</p></div><a id="all-types" href="index.html"><p>Back to index</p></a></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>
|
||||
</span>
|
||||
<span class="in-band">List of all items</span></h1><h3 id="Structs">Structs</h3><ul class="structs docblock"><li><a href="struct.App.html">App</a></li><li><a href="struct.MainState.html">MainState</a></li><li><a href="edit/struct.EditRoad.html">edit::EditRoad</a></li><li><a href="model/struct.Model.html">model::Model</a></li><li><a href="world/struct.Object.html">world::Object</a></li><li><a href="world/struct.World.html">world::World</a></li><li><a href="world/struct.WorldObject.html">world::WorldObject</a></li></ul><h3 id="Enums">Enums</h3><ul class="enums docblock"><li><a href="enum.Mode.html">Mode</a></li><li><a href="model/enum.ID.html">model::ID</a></li></ul><h3 id="Traits">Traits</h3><ul class="traits docblock"><li><a href="world/trait.ObjectID.html">world::ObjectID</a></li></ul><h3 id="Functions">Functions</h3><ul class="functions docblock"><li><a href="fn.main.html">main</a></li><li><a href="model/fn.dump_to_osm.html">model::dump_to_osm</a></li><li><a href="model/fn.time_to_id.html">model::time_to_id</a></li><li><a href="fn.preview_all_intersections.html">preview_all_intersections</a></li><li><a href="fn.preview_intersection.html">preview_intersection</a></li></ul><h3 id="Constants">Constants</h3><ul class="constants docblock"><li><a href="model/constant.BUILDING_LENGTH.html">model::BUILDING_LENGTH</a></li><li><a href="model/constant.INTERSECTION_RADIUS.html">model::INTERSECTION_RADIUS</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "map_editor";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
||||
<span class="in-band">List of all items</span></h1><h3 id="Structs">Structs</h3><ul class="structs docblock"><li><a href="struct.App.html">App</a></li><li><a href="struct.MainState.html">MainState</a></li><li><a href="edit/struct.EditRoad.html">edit::EditRoad</a></li><li><a href="model/struct.Model.html">model::Model</a></li><li><a href="world/struct.Object.html">world::Object</a></li><li><a href="world/struct.World.html">world::World</a></li><li><a href="world/struct.WorldObject.html">world::WorldObject</a></li></ul><h3 id="Enums">Enums</h3><ul class="enums docblock"><li><a href="enum.Mode.html">Mode</a></li><li><a href="model/enum.ID.html">model::ID</a></li></ul><h3 id="Traits">Traits</h3><ul class="traits docblock"><li><a href="world/trait.ObjectID.html">world::ObjectID</a></li></ul><h3 id="Functions">Functions</h3><ul class="functions docblock"><li><a href="fn.main.html">main</a></li><li><a href="model/fn.dump_to_osm.html">model::dump_to_osm</a></li><li><a href="model/fn.time_to_id.html">model::time_to_id</a></li></ul><h3 id="Constants">Constants</h3><ul class="constants docblock"><li><a href="model/constant.BUILDING_LENGTH.html">model::BUILDING_LENGTH</a></li><li><a href="model/constant.INTERSECTION_RADIUS.html">model::INTERSECTION_RADIUS</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "map_editor";</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
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `main` fn in crate `map_editor`."><meta name="keywords" content="rust, rustlang, rust-lang, main"><title>map_editor::main - 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_editor/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_editor</a></p><script>window.sidebarCurrent = {name: "main", 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_editor/main.rs.html#532-540" title="goto source code">[src]</a></span><span class="in-band">Function <a href="index.html">map_editor</a>::<wbr><a class="fn" href="">main</a></span></h1><pre class="rust fn">pub(crate) fn main()</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "map_editor";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/map_editor/main.rs.html#462-470" title="goto source code">[src]</a></span><span class="in-band">Function <a href="index.html">map_editor</a>::<wbr><a class="fn" href="">main</a></span></h1><pre class="rust fn">pub(crate) fn main()</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "map_editor";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
@ -1,4 +0,0 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `preview_all_intersections` fn in crate `map_editor`."><meta name="keywords" content="rust, rustlang, rust-lang, preview_all_intersections"><title>map_editor::preview_all_intersections - 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_editor/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_editor</a></p><script>window.sidebarCurrent = {name: "preview_all_intersections", 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_editor/main.rs.html#517-530" title="goto source code">[src]</a></span><span class="in-band">Function <a href="index.html">map_editor</a>::<wbr><a class="fn" href="">preview_all_intersections</a></span></h1><pre class="rust fn">pub(crate) fn preview_all_intersections(<br> model: &<a class="struct" href="../map_editor/model/struct.Model.html" title="struct map_editor::model::Model">Model</a>, <br> ctx: &EventCtx<'_><br>) -> Drawable</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "map_editor";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
@ -1,4 +0,0 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `preview_intersection` fn in crate `map_editor`."><meta name="keywords" content="rust, rustlang, rust-lang, preview_intersection"><title>map_editor::preview_intersection - 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_editor/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_editor</a></p><script>window.sidebarCurrent = {name: "preview_intersection", 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_editor/main.rs.html#496-515" title="goto source code">[src]</a></span><span class="in-band">Function <a href="index.html">map_editor</a>::<wbr><a class="fn" href="">preview_intersection</a></span></h1><pre class="rust fn">pub(crate) fn preview_intersection(<br> i: <a class="struct" href="../map_model/osm/struct.NodeID.html" title="struct map_model::osm::NodeID">NodeID</a>, <br> model: &<a class="struct" href="../map_editor/model/struct.Model.html" title="struct map_editor::model::Model">Model</a>, <br> ctx: &EventCtx<'_><br>) -> Drawable</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "map_editor";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
@ -1,11 +1,11 @@
|
||||
<!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 `map_editor` crate."><meta name="keywords" content="rust, rustlang, rust-lang, map_editor"><title>map_editor - 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_editor/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate map_editor</p><div class="block version"><p>Version 0.1.0</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all map_editor's items</p></a><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"></p><script>window.sidebarCurrent = {name: "map_editor", ty: "mod", relpath: "../"};</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_editor/main.rs.html#1-540" title="goto source code">[src]</a></span><span class="in-band">Crate <a class="mod" href="">map_editor</a></span></h1><div class="docblock"><p>The map_editor renders and lets you edit RawMaps, which are a format in between OSM and the
|
||||
<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_editor/main.rs.html#1-470" title="goto source code">[src]</a></span><span class="in-band">Crate <a class="mod" href="">map_editor</a></span></h1><div class="docblock"><p>The map_editor renders and lets you edit RawMaps, which are a format in between OSM and the
|
||||
full Map. It's useful for debugging maps imported from OSM, and for drawing synthetic maps for
|
||||
testing.</p>
|
||||
</div><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
|
||||
<table><tr class="module-item"><td><a class="mod" href="edit/index.html" title="map_editor::edit mod">edit</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="model/index.html" title="map_editor::model mod">model</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="world/index.html" title="map_editor::world mod">world</a></td><td class="docblock-short"></td></tr></table><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<table><tr class="module-item"><td><a class="struct" href="struct.App.html" title="map_editor::App struct">App</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.MainState.html" title="map_editor::MainState struct">MainState</a></td><td class="docblock-short"></td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
|
||||
<table><tr class="module-item"><td><a class="enum" href="enum.Mode.html" title="map_editor::Mode enum">Mode</a></td><td class="docblock-short"></td></tr></table><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
|
||||
<table><tr class="module-item"><td><a class="fn" href="fn.main.html" title="map_editor::main fn">main</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.preview_all_intersections.html" title="map_editor::preview_all_intersections fn">preview_all_intersections</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.preview_intersection.html" title="map_editor::preview_intersection fn">preview_intersection</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_editor";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
||||
<table><tr class="module-item"><td><a class="fn" href="fn.main.html" title="map_editor::main fn">main</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_editor";</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
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `dump_to_osm` fn in crate `map_editor`."><meta name="keywords" content="rust, rustlang, rust-lang, dump_to_osm"><title>map_editor::model::dump_to_osm - 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_editor/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_editor</a>::<wbr><a href="index.html">model</a></p><script>window.sidebarCurrent = {name: "dump_to_osm", 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_editor/model.rs.html#545-590" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">map_editor</a>::<wbr><a href="index.html">model</a>::<wbr><a class="fn" href="">dump_to_osm</a></span></h1><pre class="rust fn">fn dump_to_osm(map: &<a class="struct" href="../../map_model/raw/struct.RawMap.html" title="struct map_model::raw::RawMap">RawMap</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>></pre><div class="docblock"><p>Express a RawMap as a .osm file. Why not just save the RawMap? The format may change over time,
|
||||
<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_editor/model.rs.html#548-593" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">map_editor</a>::<wbr><a href="index.html">model</a>::<wbr><a class="fn" href="">dump_to_osm</a></span></h1><pre class="rust fn">fn dump_to_osm(map: &<a class="struct" href="../../map_model/raw/struct.RawMap.html" title="struct map_model::raw::RawMap">RawMap</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>></pre><div class="docblock"><p>Express a RawMap as a .osm file. Why not just save the RawMap? The format may change over time,
|
||||
and even if a RawMap is saved as JSON, manually updating it is annoying. This is used to create
|
||||
synthetic maps that will never go bad -- there will always be a pipeline to import a .osm file,
|
||||
so actually, .osm is a stable-over-time format.</p>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `time_to_id` fn in crate `map_editor`."><meta name="keywords" content="rust, rustlang, rust-lang, time_to_id"><title>map_editor::model::time_to_id - 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_editor/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_editor</a>::<wbr><a href="index.html">model</a></p><script>window.sidebarCurrent = {name: "time_to_id", 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_editor/model.rs.html#527-532" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">map_editor</a>::<wbr><a href="index.html">model</a>::<wbr><a class="fn" href="">time_to_id</a></span></h1><pre class="rust fn">fn time_to_id() -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "map_editor";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/map_editor/model.rs.html#530-535" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">map_editor</a>::<wbr><a href="index.html">model</a>::<wbr><a class="fn" href="">time_to_id</a></span></h1><pre class="rust fn">fn time_to_id() -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "map_editor";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `model` mod in crate `map_editor`."><meta name="keywords" content="rust, rustlang, rust-lang, model"><title>map_editor::model - 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_editor/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module model</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../index.html">map_editor</a></p><script>window.sidebarCurrent = {name: "model", 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_editor/model.rs.html#1-590" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../index.html">map_editor</a>::<wbr><a class="mod" href="">model</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/map_editor/model.rs.html#1-593" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../index.html">map_editor</a>::<wbr><a class="mod" href="">model</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.Model.html" title="map_editor::model::Model struct">Model</a></td><td class="docblock-short"></td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
|
||||
<table><tr class="module-item"><td><a class="enum" href="enum.ID.html" title="map_editor::model::ID enum">ID</a></td><td class="docblock-short"></td></tr></table><h2 id="constants" class="section-header"><a href="#constants">Constants</a></h2>
|
||||
<table><tr class="module-item"><td><a class="constant" href="constant.BUILDING_LENGTH.html" title="map_editor::model::BUILDING_LENGTH constant">BUILDING_LENGTH</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="constant" href="constant.INTERSECTION_RADIUS.html" title="map_editor::model::INTERSECTION_RADIUS constant">INTERSECTION_RADIUS</a></td><td class="docblock-short"></td></tr></table><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
|
||||
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
initSidebarItems({"enum":[["Mode",""]],"fn":[["main",""],["preview_all_intersections",""],["preview_intersection",""]],"mod":[["edit",""],["model",""],["world",""]],"struct":[["App",""],["MainState",""]]});
|
||||
initSidebarItems({"enum":[["Mode",""]],"fn":[["main",""]],"mod":[["edit",""],["model",""],["world",""]],"struct":[["App",""],["MainState",""]]});
|
@ -15,8 +15,8 @@ call this to handle all other events. <a href="#method.other_event">Read more</a
|
||||
</div><h4 id="method.draw-1" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&self, g: &mut GfxCtx<'_>, _: &<a class="struct" href="../map_editor/struct.App.html" title="struct map_editor::App">App</a>)</code><a class="srclink" href="../src/map_editor/edit.rs.html#193-195" title="goto source code">[src]</a></h4><h4 id="method.draw_baselayer-1" class="method hidden"><code>fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&self) -> DrawBaselayer</code><a class="srclink" href="../src/map_editor/edit.rs.html#197-199" title="goto source code">[src]</a></h4><h4 id="method.panel_changed" class="method hidden"><code>pub fn <a href="#method.panel_changed" class="fnname">panel_changed</a>(<br> &mut self, <br> &mut EventCtx<'_>, <br> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>A, <br> &Panel<br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Transition<A>></code></h4><div class='docblock hidden'><p>Called when something on the panel has changed. If a transition is returned, stop handling
|
||||
the event and immediately apply the transition. <a href="#method.panel_changed">Read more</a></p>
|
||||
</div><h4 id="method.on_mouseover" class="method hidden"><code>pub fn <a href="#method.on_mouseover" class="fnname">on_mouseover</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>Called when the mouse has moved.</p>
|
||||
</div></div><h3 id="impl-State%3CApp%3E" class="impl"><code class="in-band">impl State<<a class="struct" href="../map_editor/struct.App.html" title="struct map_editor::App">App</a>> for <a class="struct" href="../map_editor/struct.MainState.html" title="struct map_editor::MainState">MainState</a></code><a href="#impl-State%3CApp%3E" class="anchor"></a><a class="srclink" href="../src/map_editor/main.rs.html#134-494" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="../map_editor/struct.App.html" title="struct map_editor::App">App</a>) -> Transition<<a class="struct" href="../map_editor/struct.App.html" title="struct map_editor::App">App</a>></code><a class="srclink" href="../src/map_editor/main.rs.html#135-439" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
|
||||
</div><h4 id="method.draw" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&self, g: &mut GfxCtx<'_>, app: &<a class="struct" href="../map_editor/struct.App.html" title="struct map_editor::App">App</a>)</code><a class="srclink" href="../src/map_editor/main.rs.html#441-493" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
|
||||
</div></div><h3 id="impl-State%3CApp%3E" class="impl"><code class="in-band">impl State<<a class="struct" href="../map_editor/struct.App.html" title="struct map_editor::App">App</a>> for <a class="struct" href="../map_editor/struct.MainState.html" title="struct map_editor::MainState">MainState</a></code><a href="#impl-State%3CApp%3E" class="anchor"></a><a class="srclink" href="../src/map_editor/main.rs.html#130-460" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="../map_editor/struct.App.html" title="struct map_editor::App">App</a>) -> Transition<<a class="struct" href="../map_editor/struct.App.html" title="struct map_editor::App">App</a>></code><a class="srclink" href="../src/map_editor/main.rs.html#131-421" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
|
||||
</div><h4 id="method.draw" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&self, g: &mut GfxCtx<'_>, app: &<a class="struct" href="../map_editor/struct.App.html" title="struct map_editor::App">App</a>)</code><a class="srclink" href="../src/map_editor/main.rs.html#423-459" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
|
||||
</div><h4 id="method.draw_baselayer" class="method hidden"><code>pub fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&self) -> DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
|
||||
</div><h4 id="method.on_destroy" class="method hidden"><code>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 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_editor/struct.App.html" title="struct map_editor::App">App</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../src/map_editor/main.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 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_editor/struct.App.html" title="struct map_editor::App">App</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../src/map_editor/main.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 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_editor/struct.App.html" title="struct map_editor::App">App</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../src/map_editor/main.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 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_editor/struct.App.html" title="struct map_editor::App">App</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../src/map_editor/main.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 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_editor/struct.App.html" title="struct map_editor::App">App</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../src/map_editor/main.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>
|
||||
|
@ -6,8 +6,8 @@
|
||||
panel: Panel,
|
||||
last_id: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../map_editor/model/enum.ID.html" title="enum map_editor::model::ID">ID</a>>,
|
||||
}</pre></div><h2 id="fields" class="fields small-section-header">
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.mode" class="structfield small-section-header"><a href="#structfield.mode" class="anchor field"></a><code>mode: <a class="enum" href="../map_editor/enum.Mode.html" title="enum map_editor::Mode">Mode</a></code></span><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.last_id" class="structfield small-section-header"><a href="#structfield.last_id" class="anchor field"></a><code>last_id: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../map_editor/model/enum.ID.html" title="enum map_editor::model::ID">ID</a>></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../map_editor/struct.MainState.html" title="struct map_editor::MainState">MainState</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/map_editor/main.rs.html#60-132" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub(crate) fn <a href="#method.new" class="fnname">new</a>(ctx: &mut EventCtx<'_>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../map_editor/struct.App.html" title="struct map_editor::App">App</a>, <a class="struct" href="../map_editor/struct.MainState.html" title="struct map_editor::MainState">MainState</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class="srclink" href="../src/map_editor/main.rs.html#61-131" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-State%3CApp%3E" class="impl"><code class="in-band">impl State<<a class="struct" href="../map_editor/struct.App.html" title="struct map_editor::App">App</a>> for <a class="struct" href="../map_editor/struct.MainState.html" title="struct map_editor::MainState">MainState</a></code><a href="#impl-State%3CApp%3E" class="anchor"></a><a class="srclink" href="../src/map_editor/main.rs.html#134-494" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="../map_editor/struct.App.html" title="struct map_editor::App">App</a>) -> Transition<<a class="struct" href="../map_editor/struct.App.html" title="struct map_editor::App">App</a>></code><a class="srclink" href="../src/map_editor/main.rs.html#135-439" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
|
||||
</div><h4 id="method.draw" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&self, g: &mut GfxCtx<'_>, app: &<a class="struct" href="../map_editor/struct.App.html" title="struct map_editor::App">App</a>)</code><a class="srclink" href="../src/map_editor/main.rs.html#441-493" 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.mode" class="structfield small-section-header"><a href="#structfield.mode" class="anchor field"></a><code>mode: <a class="enum" href="../map_editor/enum.Mode.html" title="enum map_editor::Mode">Mode</a></code></span><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.last_id" class="structfield small-section-header"><a href="#structfield.last_id" class="anchor field"></a><code>last_id: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../map_editor/model/enum.ID.html" title="enum map_editor::model::ID">ID</a>></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../map_editor/struct.MainState.html" title="struct map_editor::MainState">MainState</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/map_editor/main.rs.html#59-128" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub(crate) fn <a href="#method.new" class="fnname">new</a>(ctx: &mut EventCtx<'_>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../map_editor/struct.App.html" title="struct map_editor::App">App</a>, <a class="struct" href="../map_editor/struct.MainState.html" title="struct map_editor::MainState">MainState</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class="srclink" href="../src/map_editor/main.rs.html#60-127" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-State%3CApp%3E" class="impl"><code class="in-band">impl State<<a class="struct" href="../map_editor/struct.App.html" title="struct map_editor::App">App</a>> for <a class="struct" href="../map_editor/struct.MainState.html" title="struct map_editor::MainState">MainState</a></code><a href="#impl-State%3CApp%3E" class="anchor"></a><a class="srclink" href="../src/map_editor/main.rs.html#130-460" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="../map_editor/struct.App.html" title="struct map_editor::App">App</a>) -> Transition<<a class="struct" href="../map_editor/struct.App.html" title="struct map_editor::App">App</a>></code><a class="srclink" href="../src/map_editor/main.rs.html#131-421" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
|
||||
</div><h4 id="method.draw" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&self, g: &mut GfxCtx<'_>, app: &<a class="struct" href="../map_editor/struct.App.html" title="struct map_editor::App">App</a>)</code><a class="srclink" href="../src/map_editor/main.rs.html#423-459" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
|
||||
</div><h4 id="method.draw_baselayer" class="method hidden"><code>pub fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&self) -> DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
|
||||
</div><h4 id="method.on_destroy" class="method hidden"><code>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 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_editor/struct.MainState.html" title="struct map_editor::MainState">MainState</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../src/map_editor/main.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 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_editor/struct.MainState.html" title="struct map_editor::MainState">MainState</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../src/map_editor/main.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 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_editor/struct.MainState.html" title="struct map_editor::MainState">MainState</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../src/map_editor/main.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 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_editor/struct.MainState.html" title="struct map_editor::MainState">MainState</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../src/map_editor/main.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 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_editor/struct.MainState.html" title="struct map_editor::MainState">MainState</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../src/map_editor/main.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>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `world` mod in crate `map_editor`."><meta name="keywords" content="rust, rustlang, rust-lang, world"><title>map_editor::world - 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_editor/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module world</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#traits">Traits</a></li></ul></div><p class="location"><a href="../index.html">map_editor</a></p><script>window.sidebarCurrent = {name: "world", 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_editor/world.rs.html#1-141" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../index.html">map_editor</a>::<wbr><a class="mod" href="">world</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/map_editor/world.rs.html#1-146" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../index.html">map_editor</a>::<wbr><a class="mod" href="">world</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.Object.html" title="map_editor::world::Object struct">Object</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.World.html" title="map_editor::world::World struct">World</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.WorldObject.html" title="map_editor::world::WorldObject struct">WorldObject</a></td><td class="docblock-short"></td></tr></table><h2 id="traits" class="section-header"><a href="#traits">Traits</a></h2>
|
||||
<table><tr class="module-item"><td><a class="trait" href="trait.ObjectID.html" title="map_editor::world::ObjectID trait">ObjectID</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_editor";</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
@ -3,4 +3,4 @@
|
||||
<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 trait"><!--[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_editor/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Trait ObjectID</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.zorder">zorder</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class="location"><a href="../index.html">map_editor</a>::<wbr><a href="index.html">world</a></p><script>window.sidebarCurrent = {name: "ObjectID", ty: "trait", 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_editor/world.rs.html#10-13" title="goto source code">[src]</a></span><span class="in-band">Trait <a href="../index.html">map_editor</a>::<wbr><a href="index.html">world</a>::<wbr><a class="trait" href="">ObjectID</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust trait">pub trait ObjectID: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> {
|
||||
fn <a href="#tymethod.zorder" class="fnname">zorder</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>;
|
||||
}</pre></div><h2 id="required-methods" class="small-section-header">Required methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><h3 id="tymethod.zorder" class="method"><code>fn <a href="#tymethod.zorder" class="fnname">zorder</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class="srclink" href="../../src/map_editor/world.rs.html#12" title="goto source code">[src]</a></h3></div><span class="loading-content">Loading content...</span><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><h3 id="impl-ObjectID" class="impl"><code class="in-band">impl ObjectID for <a class="enum" href="../../map_editor/model/enum.ID.html" title="enum map_editor::model::ID">ID</a></code><a href="#impl-ObjectID" class="anchor"></a><a class="srclink" href="../../src/map_editor/model.rs.html#514-523" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.zorder" class="method hidden"><code>fn <a href="#method.zorder" class="fnname">zorder</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class="srclink" href="../../src/map_editor/model.rs.html#515-522" title="goto source code">[src]</a></h4></div></div><span class="loading-content">Loading content...</span><script type="text/javascript" src="../../implementors/map_editor/world/trait.ObjectID.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "map_editor";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
}</pre></div><h2 id="required-methods" class="small-section-header">Required methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><h3 id="tymethod.zorder" class="method"><code>fn <a href="#tymethod.zorder" class="fnname">zorder</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class="srclink" href="../../src/map_editor/world.rs.html#12" title="goto source code">[src]</a></h3></div><span class="loading-content">Loading content...</span><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><h3 id="impl-ObjectID" class="impl"><code class="in-band">impl ObjectID for <a class="enum" href="../../map_editor/model/enum.ID.html" title="enum map_editor::model::ID">ID</a></code><a href="#impl-ObjectID" class="anchor"></a><a class="srclink" href="../../src/map_editor/model.rs.html#517-526" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.zorder" class="method hidden"><code>fn <a href="#method.zorder" class="fnname">zorder</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class="srclink" href="../../src/map_editor/model.rs.html#518-525" title="goto source code">[src]</a></h4></div></div><span class="loading-content">Loading content...</span><script type="text/javascript" src="../../implementors/map_editor/world/trait.ObjectID.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "map_editor";</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
@ -122,7 +122,7 @@
|
||||
<span class="doccomment">/// The output of `rustdoc -V`</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"rustdoc 1.50.0 (cb75ad5db 2021-02-10)"</span>;
|
||||
<span class="doccomment">/// The built-time in RFC2822, UTC</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"Sat, 20 Feb 2021 17:48:44 +0000"</span>;
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"Sat, 20 Feb 2021 18:06:32 +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>
|
||||
|
@ -471,76 +471,6 @@
|
||||
<span id="468">468</span>
|
||||
<span id="469">469</span>
|
||||
<span id="470">470</span>
|
||||
<span id="471">471</span>
|
||||
<span id="472">472</span>
|
||||
<span id="473">473</span>
|
||||
<span id="474">474</span>
|
||||
<span id="475">475</span>
|
||||
<span id="476">476</span>
|
||||
<span id="477">477</span>
|
||||
<span id="478">478</span>
|
||||
<span id="479">479</span>
|
||||
<span id="480">480</span>
|
||||
<span id="481">481</span>
|
||||
<span id="482">482</span>
|
||||
<span id="483">483</span>
|
||||
<span id="484">484</span>
|
||||
<span id="485">485</span>
|
||||
<span id="486">486</span>
|
||||
<span id="487">487</span>
|
||||
<span id="488">488</span>
|
||||
<span id="489">489</span>
|
||||
<span id="490">490</span>
|
||||
<span id="491">491</span>
|
||||
<span id="492">492</span>
|
||||
<span id="493">493</span>
|
||||
<span id="494">494</span>
|
||||
<span id="495">495</span>
|
||||
<span id="496">496</span>
|
||||
<span id="497">497</span>
|
||||
<span id="498">498</span>
|
||||
<span id="499">499</span>
|
||||
<span id="500">500</span>
|
||||
<span id="501">501</span>
|
||||
<span id="502">502</span>
|
||||
<span id="503">503</span>
|
||||
<span id="504">504</span>
|
||||
<span id="505">505</span>
|
||||
<span id="506">506</span>
|
||||
<span id="507">507</span>
|
||||
<span id="508">508</span>
|
||||
<span id="509">509</span>
|
||||
<span id="510">510</span>
|
||||
<span id="511">511</span>
|
||||
<span id="512">512</span>
|
||||
<span id="513">513</span>
|
||||
<span id="514">514</span>
|
||||
<span id="515">515</span>
|
||||
<span id="516">516</span>
|
||||
<span id="517">517</span>
|
||||
<span id="518">518</span>
|
||||
<span id="519">519</span>
|
||||
<span id="520">520</span>
|
||||
<span id="521">521</span>
|
||||
<span id="522">522</span>
|
||||
<span id="523">523</span>
|
||||
<span id="524">524</span>
|
||||
<span id="525">525</span>
|
||||
<span id="526">526</span>
|
||||
<span id="527">527</span>
|
||||
<span id="528">528</span>
|
||||
<span id="529">529</span>
|
||||
<span id="530">530</span>
|
||||
<span id="531">531</span>
|
||||
<span id="532">532</span>
|
||||
<span id="533">533</span>
|
||||
<span id="534">534</span>
|
||||
<span id="535">535</span>
|
||||
<span id="536">536</span>
|
||||
<span id="537">537</span>
|
||||
<span id="538">538</span>
|
||||
<span id="539">539</span>
|
||||
<span id="540">540</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="doccomment">//! The map_editor renders and lets you edit RawMaps, which are a format in between OSM and the</span>
|
||||
<span class="doccomment">//! full Map. It's useful for debugging maps imported from OSM, and for drawing synthetic maps for</span>
|
||||
@ -551,14 +481,14 @@
|
||||
|
||||
<span class="kw">use</span> <span class="ident">model</span>::{<span class="ident">Model</span>, <span class="ident">ID</span>};
|
||||
|
||||
<span class="kw">use</span> <span class="ident">abstutil</span>::{<span class="ident">CmdArgs</span>, <span class="ident">Timer</span>};
|
||||
<span class="kw">use</span> <span class="ident">abstutil</span>::<span class="ident">CmdArgs</span>;
|
||||
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Distance</span>, <span class="ident">Line</span>, <span class="ident">Polygon</span>, <span class="ident">Pt2D</span>};
|
||||
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">tools</span>::<span class="ident">CameraState</span>;
|
||||
<span class="kw">use</span> <span class="ident">map_model</span>::<span class="ident">osm</span>;
|
||||
<span class="kw">use</span> <span class="ident">map_model</span>::<span class="ident">raw</span>::<span class="ident">OriginalRoad</span>;
|
||||
<span class="kw">use</span> <span class="ident">widgetry</span>::{
|
||||
<span class="ident">Canvas</span>, <span class="ident">Color</span>, <span class="ident">Drawable</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>, <span class="ident">HorizontalAlignment</span>, <span class="ident">Key</span>, <span class="ident">Line</span>, <span class="ident">Outcome</span>,
|
||||
<span class="ident">Panel</span>, <span class="ident">SharedAppState</span>, <span class="ident">State</span>, <span class="ident">StyledButtons</span>, <span class="ident">Text</span>, <span class="ident">Transition</span>, <span class="ident">VerticalAlignment</span>, <span class="ident">Widget</span>,
|
||||
<span class="ident">Canvas</span>, <span class="ident">Checkbox</span>, <span class="ident">Color</span>, <span class="ident">EventCtx</span>, <span class="ident">GfxCtx</span>, <span class="ident">HorizontalAlignment</span>, <span class="ident">Key</span>, <span class="ident">Line</span>, <span class="ident">Outcome</span>, <span class="ident">Panel</span>,
|
||||
<span class="ident">SharedAppState</span>, <span class="ident">State</span>, <span class="ident">StyledButtons</span>, <span class="ident">Text</span>, <span class="ident">Transition</span>, <span class="ident">VerticalAlignment</span>, <span class="ident">Widget</span>,
|
||||
};
|
||||
|
||||
<span class="kw">mod</span> <span class="ident">edit</span>;
|
||||
@ -596,7 +526,6 @@
|
||||
<span class="ident">MovingBuilding</span>(<span class="ident">osm</span>::<span class="ident">OsmID</span>),
|
||||
<span class="ident">MovingRoadPoint</span>(<span class="ident">OriginalRoad</span>, <span class="ident">usize</span>),
|
||||
<span class="ident">CreatingRoad</span>(<span class="ident">osm</span>::<span class="ident">NodeID</span>),
|
||||
<span class="ident">PreviewIntersection</span>(<span class="ident">Drawable</span>),
|
||||
<span class="ident">SetBoundaryPt1</span>,
|
||||
<span class="ident">SetBoundaryPt2</span>(<span class="ident">Pt2D</span>),
|
||||
}
|
||||
@ -606,11 +535,10 @@
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">args</span> <span class="op">=</span> <span class="ident">CmdArgs</span>::<span class="ident">new</span>();
|
||||
<span class="kw">let</span> <span class="ident">load</span> <span class="op">=</span> <span class="ident">args</span>.<span class="ident">optional_free</span>();
|
||||
<span class="kw">let</span> <span class="ident">include_bldgs</span> <span class="op">=</span> <span class="ident">args</span>.<span class="ident">enabled</span>(<span class="string">"--bldgs"</span>);
|
||||
<span class="kw">let</span> <span class="ident">intersection_geom</span> <span class="op">=</span> <span class="ident">args</span>.<span class="ident">enabled</span>(<span class="string">"--geom"</span>);
|
||||
<span class="ident">args</span>.<span class="ident">done</span>();
|
||||
|
||||
<span class="kw">let</span> <span class="ident">model</span> <span class="op">=</span> <span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">path</span>) <span class="op">=</span> <span class="ident">load</span> {
|
||||
<span class="ident">Model</span>::<span class="ident">import</span>(<span class="ident">path</span>, <span class="ident">include_bldgs</span>, <span class="ident">intersection_geom</span>, <span class="ident">ctx</span>)
|
||||
<span class="ident">Model</span>::<span class="ident">import</span>(<span class="ident">path</span>, <span class="ident">include_bldgs</span>, <span class="ident">ctx</span>)
|
||||
} <span class="kw">else</span> {
|
||||
<span class="ident">Model</span>::<span class="ident">blank</span>()
|
||||
};
|
||||
@ -655,15 +583,13 @@
|
||||
]),
|
||||
<span class="ident">Text</span>::<span class="ident">new</span>().<span class="ident">draw</span>(<span class="ident">ctx</span>).<span class="ident">named</span>(<span class="string">"instructions"</span>),
|
||||
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Checkbox</span>::<span class="ident">switch</span>(<span class="ident">ctx</span>, <span class="string">"intersection geometry"</span>, <span class="ident">Key</span>::<span class="ident">G</span>, <span class="bool-val">false</span>),
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"adjust boundary"</span>)
|
||||
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_solid_dark_text</span>(<span class="string">"export to OSM"</span>)
|
||||
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_outline_light_text</span>(<span class="string">"preview all intersections"</span>)
|
||||
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
|
||||
]),
|
||||
]))
|
||||
.<span class="ident">aligned</span>(<span class="ident">HorizontalAlignment</span>::<span class="ident">Right</span>, <span class="ident">VerticalAlignment</span>::<span class="ident">Top</span>)
|
||||
@ -723,9 +649,6 @@
|
||||
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">ctx</span>.<span class="ident">input</span>.<span class="ident">pressed</span>(<span class="ident">Key</span>::<span class="ident">Backspace</span>) {
|
||||
<span class="ident">app</span>.<span class="ident">model</span>.<span class="ident">delete_i</span>(<span class="ident">i</span>);
|
||||
<span class="ident">app</span>.<span class="ident">model</span>.<span class="ident">world</span>.<span class="ident">handle_mouseover</span>(<span class="ident">ctx</span>);
|
||||
} <span class="kw">else</span> <span class="kw">if</span> <span class="op">!</span><span class="ident">app</span>.<span class="ident">model</span>.<span class="ident">intersection_geom</span> <span class="op">&&</span> <span class="ident">ctx</span>.<span class="ident">input</span>.<span class="ident">pressed</span>(<span class="ident">Key</span>::<span class="ident">P</span>) {
|
||||
<span class="kw">let</span> <span class="ident">draw</span> <span class="op">=</span> <span class="ident">preview_intersection</span>(<span class="ident">i</span>, <span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">model</span>, <span class="ident">ctx</span>);
|
||||
<span class="self">self</span>.<span class="ident">mode</span> <span class="op">=</span> <span class="ident">Mode</span>::<span class="ident">PreviewIntersection</span>(<span class="ident">draw</span>);
|
||||
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">ctx</span>.<span class="ident">input</span>.<span class="ident">pressed</span>(<span class="ident">Key</span>::<span class="ident">T</span>) {
|
||||
<span class="ident">app</span>.<span class="ident">model</span>.<span class="ident">toggle_i</span>(<span class="ident">ctx</span>, <span class="ident">i</span>);
|
||||
}
|
||||
@ -746,11 +669,6 @@
|
||||
<span class="ident">Key</span>::<span class="ident">LeftControl</span>.<span class="ident">txt</span>(<span class="ident">ctx</span>),
|
||||
<span class="ident">Line</span>(<span class="string">" to move"</span>),
|
||||
]);
|
||||
<span class="ident">txt</span>.<span class="ident">add_appended</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Line</span>(<span class="string">"- Press "</span>),
|
||||
<span class="ident">Key</span>::<span class="ident">P</span>.<span class="ident">txt</span>(<span class="ident">ctx</span>),
|
||||
<span class="ident">Line</span>(<span class="string">" to preview geometry"</span>),
|
||||
]);
|
||||
<span class="ident">txt</span>.<span class="ident">add_appended</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Line</span>(<span class="string">"- Press "</span>),
|
||||
<span class="ident">Key</span>::<span class="ident">T</span>.<span class="ident">txt</span>(<span class="ident">ctx</span>),
|
||||
@ -860,14 +778,14 @@
|
||||
<span class="string">"export to OSM"</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="ident">app</span>.<span class="ident">model</span>.<span class="ident">export_to_osm</span>();
|
||||
}
|
||||
<span class="string">"preview all intersections"</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="kw">if</span> <span class="op">!</span><span class="ident">app</span>.<span class="ident">model</span>.<span class="ident">intersection_geom</span> {
|
||||
<span class="kw">let</span> <span class="ident">draw</span> <span class="op">=</span> <span class="ident">preview_all_intersections</span>(<span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">model</span>, <span class="ident">ctx</span>);
|
||||
<span class="self">self</span>.<span class="ident">mode</span> <span class="op">=</span> <span class="ident">Mode</span>::<span class="ident">PreviewIntersection</span>(<span class="ident">draw</span>);
|
||||
}
|
||||
}
|
||||
<span class="kw">_</span> <span class="op">=</span><span class="op">></span> <span class="macro">unreachable</span><span class="macro">!</span>(),
|
||||
},
|
||||
<span class="ident">Outcome</span>::<span class="ident">Changed</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="ident">app</span>.<span class="ident">model</span>.<span class="ident">show_intersection_geometry</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">is_checked</span>(<span class="string">"intersection geometry"</span>),
|
||||
);
|
||||
}
|
||||
<span class="kw">_</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="kw">if</span> <span class="ident">ctx</span>.<span class="ident">input</span>.<span class="ident">pressed</span>(<span class="ident">Key</span>::<span class="ident">I</span>) {
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">pt</span>) <span class="op">=</span> <span class="ident">cursor</span> {
|
||||
@ -938,12 +856,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
<span class="ident">Mode</span>::<span class="ident">PreviewIntersection</span>(<span class="kw">_</span>) <span class="op">=</span><span class="op">></span> {
|
||||
<span class="kw">if</span> <span class="ident">ctx</span>.<span class="ident">input</span>.<span class="ident">pressed</span>(<span class="ident">Key</span>::<span class="ident">P</span>) {
|
||||
<span class="self">self</span>.<span class="ident">mode</span> <span class="op">=</span> <span class="ident">Mode</span>::<span class="ident">Viewing</span>;
|
||||
<span class="ident">app</span>.<span class="ident">model</span>.<span class="ident">world</span>.<span class="ident">handle_mouseover</span>(<span class="ident">ctx</span>);
|
||||
}
|
||||
}
|
||||
<span class="ident">Mode</span>::<span class="ident">SetBoundaryPt1</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">txt</span> <span class="op">=</span> <span class="ident">Text</span>::<span class="ident">new</span>();
|
||||
<span class="ident">txt</span>.<span class="ident">add_appended</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
@ -993,13 +905,7 @@
|
||||
<span class="ident">Color</span>::<span class="ident">rgb</span>(<span class="number">242</span>, <span class="number">239</span>, <span class="number">233</span>),
|
||||
<span class="ident">app</span>.<span class="ident">model</span>.<span class="ident">map</span>.<span class="ident">boundary_polygon</span>.<span class="ident">clone</span>(),
|
||||
);
|
||||
<span class="kw">match</span> <span class="self">self</span>.<span class="ident">mode</span> {
|
||||
<span class="ident">Mode</span>::<span class="ident">PreviewIntersection</span>(<span class="kw">_</span>) <span class="op">=</span><span class="op">></span> <span class="ident">app</span>.<span class="ident">model</span>.<span class="ident">world</span>.<span class="ident">draw</span>(<span class="ident">g</span>, <span class="op">|</span><span class="ident">id</span><span class="op">|</span> <span class="kw">match</span> <span class="ident">id</span> {
|
||||
<span class="ident">ID</span>::<span class="ident">Intersection</span>(<span class="kw">_</span>) <span class="op">=</span><span class="op">></span> <span class="bool-val">false</span>,
|
||||
<span class="kw">_</span> <span class="op">=</span><span class="op">></span> <span class="bool-val">true</span>,
|
||||
}),
|
||||
<span class="kw">_</span> <span class="op">=</span><span class="op">></span> <span class="ident">app</span>.<span class="ident">model</span>.<span class="ident">world</span>.<span class="ident">draw</span>(<span class="ident">g</span>, <span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="bool-val">true</span>),
|
||||
}
|
||||
<span class="ident">app</span>.<span class="ident">model</span>.<span class="ident">world</span>.<span class="ident">draw</span>(<span class="ident">g</span>, <span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="bool-val">true</span>);
|
||||
|
||||
<span class="kw">match</span> <span class="self">self</span>.<span class="ident">mode</span> {
|
||||
<span class="ident">Mode</span>::<span class="ident">CreatingRoad</span>(<span class="ident">i1</span>) <span class="op">=</span><span class="op">></span> {
|
||||
@ -1013,16 +919,6 @@
|
||||
<span class="op">|</span> <span class="ident">Mode</span>::<span class="ident">MovingIntersection</span>(<span class="kw">_</span>)
|
||||
<span class="op">|</span> <span class="ident">Mode</span>::<span class="ident">MovingBuilding</span>(<span class="kw">_</span>)
|
||||
<span class="op">|</span> <span class="ident">Mode</span>::<span class="ident">MovingRoadPoint</span>(<span class="kw">_</span>, <span class="kw">_</span>) <span class="op">=</span><span class="op">></span> {}
|
||||
<span class="ident">Mode</span>::<span class="ident">PreviewIntersection</span>(<span class="kw-2">ref</span> <span class="ident">draw</span>) <span class="op">=</span><span class="op">></span> {
|
||||
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="ident">draw</span>);
|
||||
|
||||
<span class="kw">if</span> <span class="ident">g</span>.<span class="ident">is_key_down</span>(<span class="ident">Key</span>::<span class="ident">RightAlt</span>) {
|
||||
<span class="comment">// TODO Argh, covers up mouseover tooltip.</span>
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">cursor</span>) <span class="op">=</span> <span class="ident">g</span>.<span class="ident">canvas</span>.<span class="ident">get_cursor_in_map_space</span>() {
|
||||
<span class="ident">g</span>.<span class="ident">draw_mouse_tooltip</span>(<span class="ident">Text</span>::<span class="ident">from</span>(<span class="ident">Line</span>(<span class="ident">cursor</span>.<span class="ident">to_string</span>())));
|
||||
}
|
||||
}
|
||||
}
|
||||
<span class="ident">Mode</span>::<span class="ident">SetBoundaryPt1</span> <span class="op">=</span><span class="op">></span> {}
|
||||
<span class="ident">Mode</span>::<span class="ident">SetBoundaryPt2</span>(<span class="ident">pt1</span>) <span class="op">=</span><span class="op">></span> {
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">pt2</span>) <span class="op">=</span> <span class="ident">g</span>.<span class="ident">canvas</span>.<span class="ident">get_cursor_in_map_space</span>() {
|
||||
@ -1037,42 +933,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">preview_intersection</span>(<span class="ident">i</span>: <span class="ident">osm</span>::<span class="ident">NodeID</span>, <span class="ident">model</span>: <span class="kw-2">&</span><span class="ident">Model</span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Drawable</span> {
|
||||
<span class="kw">let</span> (<span class="ident">intersection</span>, <span class="ident">roads</span>, <span class="ident">debug</span>) <span class="op">=</span> <span class="ident">model</span>.<span class="ident">map</span>.<span class="ident">preview_intersection</span>(<span class="ident">i</span>);
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>();
|
||||
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">Color</span>::<span class="ident">ORANGE</span>.<span class="ident">alpha</span>(<span class="number">0.5</span>), <span class="ident">intersection</span>);
|
||||
<span class="kw">for</span> <span class="ident">r</span> <span class="kw">in</span> <span class="ident">roads</span> {
|
||||
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">Color</span>::<span class="ident">GREEN</span>.<span class="ident">alpha</span>(<span class="number">0.5</span>), <span class="ident">r</span>);
|
||||
}
|
||||
<span class="kw">for</span> (<span class="ident">label</span>, <span class="ident">poly</span>) <span class="kw">in</span> <span class="ident">debug</span> {
|
||||
<span class="kw">let</span> <span class="ident">center</span> <span class="op">=</span> <span class="ident">poly</span>.<span class="ident">center</span>();
|
||||
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">Color</span>::<span class="ident">RED</span>.<span class="ident">alpha</span>(<span class="number">0.5</span>), <span class="ident">poly</span>);
|
||||
<span class="ident">batch</span>.<span class="ident">append</span>(
|
||||
<span class="ident">Text</span>::<span class="ident">from</span>(<span class="ident">Line</span>(<span class="ident">label</span>))
|
||||
.<span class="ident">with_bg</span>()
|
||||
.<span class="ident">render_autocropped</span>(<span class="ident">ctx</span>)
|
||||
.<span class="ident">scale</span>(<span class="number">0.1</span>)
|
||||
.<span class="ident">centered_on</span>(<span class="ident">center</span>),
|
||||
);
|
||||
}
|
||||
<span class="ident">batch</span>.<span class="ident">upload</span>(<span class="ident">ctx</span>)
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">preview_all_intersections</span>(<span class="ident">model</span>: <span class="kw-2">&</span><span class="ident">Model</span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Drawable</span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>();
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">timer</span> <span class="op">=</span> <span class="ident">Timer</span>::<span class="ident">new</span>(<span class="string">"preview all intersections"</span>);
|
||||
<span class="ident">timer</span>.<span class="ident">start_iter</span>(<span class="string">"preview"</span>, <span class="ident">model</span>.<span class="ident">map</span>.<span class="ident">intersections</span>.<span class="ident">len</span>());
|
||||
<span class="kw">for</span> <span class="ident">i</span> <span class="kw">in</span> <span class="ident">model</span>.<span class="ident">map</span>.<span class="ident">intersections</span>.<span class="ident">keys</span>() {
|
||||
<span class="ident">timer</span>.<span class="ident">next</span>();
|
||||
<span class="kw">if</span> <span class="ident">model</span>.<span class="ident">map</span>.<span class="ident">roads_per_intersection</span>(<span class="kw-2">*</span><span class="ident">i</span>).<span class="ident">is_empty</span>() {
|
||||
<span class="kw">continue</span>;
|
||||
}
|
||||
<span class="kw">let</span> (<span class="ident">intersection</span>, <span class="kw">_</span>, <span class="kw">_</span>) <span class="op">=</span> <span class="ident">model</span>.<span class="ident">map</span>.<span class="ident">preview_intersection</span>(<span class="kw-2">*</span><span class="ident">i</span>);
|
||||
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">Color</span>::<span class="ident">ORANGE</span>.<span class="ident">alpha</span>(<span class="number">0.5</span>), <span class="ident">intersection</span>);
|
||||
}
|
||||
<span class="ident">batch</span>.<span class="ident">upload</span>(<span class="ident">ctx</span>)
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">main</span>() {
|
||||
<span class="ident">widgetry</span>::<span class="ident">run</span>(
|
||||
<span class="ident">widgetry</span>::<span class="ident">Settings</span>::<span class="ident">new</span>(<span class="string">"RawMap editor"</span>).<span class="ident">read_svg</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">abstio</span>::<span class="ident">slurp_bytes</span>)),
|
||||
|
@ -591,6 +591,9 @@
|
||||
<span id="588">588</span>
|
||||
<span id="589">589</span>
|
||||
<span id="590">590</span>
|
||||
<span id="591">591</span>
|
||||
<span id="592">592</span>
|
||||
<span id="593">593</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">HashMap</span>;
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Write</span>;
|
||||
@ -615,7 +618,7 @@
|
||||
<span class="kw">pub</span> <span class="ident">world</span>: <span class="ident">World</span><span class="op"><</span><span class="ident">ID</span><span class="op">></span>,
|
||||
|
||||
<span class="ident">include_bldgs</span>: <span class="ident">bool</span>,
|
||||
<span class="kw">pub</span> <span class="ident">intersection_geom</span>: <span class="ident">bool</span>,
|
||||
<span class="ident">intersection_geom</span>: <span class="ident">bool</span>,
|
||||
}
|
||||
|
||||
<span class="comment">// Construction</span>
|
||||
@ -637,16 +640,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">import</span>(
|
||||
<span class="ident">path</span>: <span class="ident">String</span>,
|
||||
<span class="ident">include_bldgs</span>: <span class="ident">bool</span>,
|
||||
<span class="ident">intersection_geom</span>: <span class="ident">bool</span>,
|
||||
<span class="ident">ctx</span>: <span class="kw-2">&</span><span class="ident">EventCtx</span>,
|
||||
) <span class="op">-</span><span class="op">></span> <span class="ident">Model</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">import</span>(<span class="ident">path</span>: <span class="ident">String</span>, <span class="ident">include_bldgs</span>: <span class="ident">bool</span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Model</span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">timer</span> <span class="op">=</span> <span class="ident">Timer</span>::<span class="ident">new</span>(<span class="string">"import map"</span>);
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">model</span> <span class="op">=</span> <span class="ident">Model</span>::<span class="ident">blank</span>();
|
||||
<span class="ident">model</span>.<span class="ident">include_bldgs</span> <span class="op">=</span> <span class="ident">include_bldgs</span>;
|
||||
<span class="ident">model</span>.<span class="ident">intersection_geom</span> <span class="op">=</span> <span class="ident">intersection_geom</span>;
|
||||
|
||||
<span class="ident">model</span>.<span class="ident">map</span> <span class="op">=</span> <span class="kw">if</span> <span class="ident">path</span>.<span class="ident">ends_with</span>(<span class="string">".osm"</span>) {
|
||||
<span class="ident">convert_osm</span>::<span class="ident">convert</span>(
|
||||
@ -831,6 +828,15 @@
|
||||
|
||||
<span class="self">self</span>.<span class="ident">intersection_added</span>(<span class="ident">id</span>, <span class="ident">ctx</span>);
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">show_intersection_geometry</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="ident">EventCtx</span>, <span class="ident">show</span>: <span class="ident">bool</span>) {
|
||||
<span class="self">self</span>.<span class="ident">intersection_geom</span> <span class="op">=</span> <span class="ident">show</span>;
|
||||
|
||||
<span class="kw">for</span> <span class="ident">id</span> <span class="kw">in</span> <span class="self">self</span>.<span class="ident">map</span>.<span class="ident">intersections</span>.<span class="ident">keys</span>().<span class="ident">cloned</span>().<span class="ident">collect</span>::<span class="op"><</span><span class="ident">Vec</span><span class="op"><</span><span class="kw">_</span><span class="op">></span><span class="op">></span>() {
|
||||
<span class="self">self</span>.<span class="ident">world</span>.<span class="ident">delete</span>(<span class="ident">ID</span>::<span class="ident">Intersection</span>(<span class="ident">id</span>));
|
||||
<span class="self">self</span>.<span class="ident">intersection_added</span>(<span class="ident">id</span>, <span class="ident">ctx</span>);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="comment">// Roads</span>
|
||||
|
@ -142,6 +142,11 @@
|
||||
<span id="139">139</span>
|
||||
<span id="140">140</span>
|
||||
<span id="141">141</span>
|
||||
<span id="142">142</span>
|
||||
<span id="143">143</span>
|
||||
<span id="144">144</span>
|
||||
<span id="145">145</span>
|
||||
<span id="146">146</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">HashMap</span>;
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">fmt</span>::<span class="ident">Debug</span>;
|
||||
@ -281,7 +286,12 @@
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">delete</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">id</span>: <span class="ident">ID</span>) {
|
||||
<span class="kw">let</span> <span class="ident">obj</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">objects</span>.<span class="ident">remove</span>(<span class="kw-2">&</span><span class="ident">id</span>).<span class="ident">unwrap</span>();
|
||||
<span class="self">self</span>.<span class="ident">quadtree</span>.<span class="ident">remove</span>(<span class="ident">obj</span>.<span class="ident">quadtree_id</span>).<span class="ident">unwrap</span>();
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">quadtree</span>.<span class="ident">remove</span>(<span class="ident">obj</span>.<span class="ident">quadtree_id</span>).<span class="ident">is_none</span>() {
|
||||
<span class="comment">// TODO This happens for nodes that're totally off-map. They're retained because we</span>
|
||||
<span class="comment">// defer running the remove_disconnected code, so map_editor can actually debug more</span>
|
||||
<span class="comment">// stuff.</span>
|
||||
<span class="macro">error</span><span class="macro">!</span>(<span class="string">"{:?} wasn't in the quadtree"</span>, <span class="ident">id</span>);
|
||||
}
|
||||
}
|
||||
}
|
||||
</pre></div>
|
||||
|
Loading…
Reference in New Issue
Block a user