From b7b3355400b09c4e79603d0afadd9340841ba192 Mon Sep 17 00:00:00 2001 From: dabreegster Date: Fri, 10 Sep 2021 21:34:56 +0000 Subject: [PATCH] deploy: 2387975fac7dd0bd60eb112d7312a8ef4aeca721 --- rustdoc/game/app/struct.App.html | 4 +-- .../edit/roads/fn.build_lane_highlights.html | 2 +- rustdoc/game/edit/roads/fn.can_reverse.html | 2 +- .../edit/roads/fn.draw_drop_position.html | 2 +- .../game/edit/roads/fn.fade_irrelevant.html | 2 +- .../game/edit/roads/fn.lane_type_to_icon.html | 2 +- .../game/edit/roads/fn.make_main_panel.html | 2 +- .../game/edit/roads/fn.make_top_panel.html | 2 +- .../game/edit/roads/fn.selected_lane_bg.html | 2 +- rustdoc/game/edit/roads/fn.width_choices.html | 2 +- rustdoc/game/edit/roads/index.html | 2 +- .../game/edit/roads/struct.RoadEditor.html | 4 +-- .../built_info/constant.BUILT_TIME_UTC.html | 2 +- rustdoc/src/game/edit/roads.rs.html | 36 +++++++++++++++++-- .../game-0716a03cc01a18cb/out/built.rs.html | 2 +- 15 files changed, 50 insertions(+), 18 deletions(-) diff --git a/rustdoc/game/app/struct.App.html b/rustdoc/game/app/struct.App.html index 6ec74dc6f0..463038ccaf 100644 --- a/rustdoc/game/app/struct.App.html +++ b/rustdoc/game/app/struct.App.html @@ -183,8 +183,8 @@ call this to handle all other events. Read more

Draw

Before this state is popped or replaced, call this.

Specifies what to draw before draw()

-

Respond to a UI event, such as input or time passing.

-

Draw

+

Respond to a UI event, such as input or time passing.

+

Draw

Specifies what to draw before draw()

Before this state is popped or replaced, call this.

Respond to a UI event, such as input or time passing.

diff --git a/rustdoc/game/edit/roads/fn.build_lane_highlights.html b/rustdoc/game/edit/roads/fn.build_lane_highlights.html index 35090e3f1c..e477e47a5e 100644 --- a/rustdoc/game/edit/roads/fn.build_lane_highlights.html +++ b/rustdoc/game/edit/roads/fn.build_lane_highlights.html @@ -1,3 +1,3 @@ -build_lane_highlights in game::edit::roads - Rust

Function game::edit::roads::build_lane_highlights[][src]

fn build_lane_highlights(
    ctx: &EventCtx<'_>,
    app: &App,
    selected_lane: Option<LaneID>,
    hovered_lane: Option<LaneID>
) -> ((Option<LaneID>, Option<LaneID>), Drawable)
+build_lane_highlights in game::edit::roads - Rust

Function game::edit::roads::build_lane_highlights[][src]

fn build_lane_highlights(
    ctx: &EventCtx<'_>,
    app: &App,
    selected_lane: Option<LaneID>,
    hovered_lane: Option<LaneID>
) -> ((Option<LaneID>, Option<LaneID>), Drawable)
\ No newline at end of file diff --git a/rustdoc/game/edit/roads/fn.can_reverse.html b/rustdoc/game/edit/roads/fn.can_reverse.html index b4e97a36e8..ebaac05e1e 100644 --- a/rustdoc/game/edit/roads/fn.can_reverse.html +++ b/rustdoc/game/edit/roads/fn.can_reverse.html @@ -1,3 +1,3 @@ -can_reverse in game::edit::roads - Rust

Function game::edit::roads::can_reverse[][src]

fn can_reverse(_: LaneType) -> bool
+can_reverse in game::edit::roads - Rust

Function game::edit::roads::can_reverse[][src]

fn can_reverse(_: LaneType) -> bool
\ No newline at end of file diff --git a/rustdoc/game/edit/roads/fn.draw_drop_position.html b/rustdoc/game/edit/roads/fn.draw_drop_position.html index 41c58b0aae..54c79b57e7 100644 --- a/rustdoc/game/edit/roads/fn.draw_drop_position.html +++ b/rustdoc/game/edit/roads/fn.draw_drop_position.html @@ -1,3 +1,3 @@ -draw_drop_position in game::edit::roads - Rust

Function game::edit::roads::draw_drop_position[][src]

fn draw_drop_position(app: &App, r: RoadID, from: usize, to: usize) -> GeomBatch
+draw_drop_position in game::edit::roads - Rust

Function game::edit::roads::draw_drop_position[][src]

fn draw_drop_position(app: &App, r: RoadID, from: usize, to: usize) -> GeomBatch
\ No newline at end of file diff --git a/rustdoc/game/edit/roads/fn.fade_irrelevant.html b/rustdoc/game/edit/roads/fn.fade_irrelevant.html index 0a350e0707..138d748934 100644 --- a/rustdoc/game/edit/roads/fn.fade_irrelevant.html +++ b/rustdoc/game/edit/roads/fn.fade_irrelevant.html @@ -1,3 +1,3 @@ -fade_irrelevant in game::edit::roads - Rust

Function game::edit::roads::fade_irrelevant[][src]

fn fade_irrelevant(app: &App, r: RoadID) -> GeomBatch
+fade_irrelevant in game::edit::roads - Rust

Function game::edit::roads::fade_irrelevant[][src]

fn fade_irrelevant(app: &App, r: RoadID) -> GeomBatch
\ No newline at end of file diff --git a/rustdoc/game/edit/roads/fn.lane_type_to_icon.html b/rustdoc/game/edit/roads/fn.lane_type_to_icon.html index 085e6b7872..d52802cc5c 100644 --- a/rustdoc/game/edit/roads/fn.lane_type_to_icon.html +++ b/rustdoc/game/edit/roads/fn.lane_type_to_icon.html @@ -1,3 +1,3 @@ -lane_type_to_icon in game::edit::roads - Rust

Function game::edit::roads::lane_type_to_icon[][src]

fn lane_type_to_icon(lt: LaneType) -> Option<&'static str>
+lane_type_to_icon in game::edit::roads - Rust

Function game::edit::roads::lane_type_to_icon[][src]

fn lane_type_to_icon(lt: LaneType) -> Option<&'static str>
\ No newline at end of file diff --git a/rustdoc/game/edit/roads/fn.make_main_panel.html b/rustdoc/game/edit/roads/fn.make_main_panel.html index b54530c950..39c189a094 100644 --- a/rustdoc/game/edit/roads/fn.make_main_panel.html +++ b/rustdoc/game/edit/roads/fn.make_main_panel.html @@ -1,3 +1,3 @@ -make_main_panel in game::edit::roads - Rust

Function game::edit::roads::make_main_panel[][src]

fn make_main_panel(
    ctx: &mut EventCtx<'_>,
    app: &App,
    road: &Road,
    selected_lane: Option<LaneID>,
    hovering_on_lane: Option<LaneID>
) -> Panel
+make_main_panel in game::edit::roads - Rust

Function game::edit::roads::make_main_panel[][src]

fn make_main_panel(
    ctx: &mut EventCtx<'_>,
    app: &App,
    road: &Road,
    selected_lane: Option<LaneID>,
    hovering_on_lane: Option<LaneID>
) -> Panel
\ No newline at end of file diff --git a/rustdoc/game/edit/roads/fn.make_top_panel.html b/rustdoc/game/edit/roads/fn.make_top_panel.html index d8613d54fa..c9800546cd 100644 --- a/rustdoc/game/edit/roads/fn.make_top_panel.html +++ b/rustdoc/game/edit/roads/fn.make_top_panel.html @@ -1,3 +1,3 @@ -make_top_panel in game::edit::roads - Rust

Function game::edit::roads::make_top_panel[][src]

fn make_top_panel(
    ctx: &mut EventCtx<'_>,
    app: &App,
    num_edit_cmds_originally: usize,
    no_redo_cmds: bool,
    r: RoadID,
    orig_road_state: EditRoad
) -> Panel
+make_top_panel in game::edit::roads - Rust

Function game::edit::roads::make_top_panel[][src]

fn make_top_panel(
    ctx: &mut EventCtx<'_>,
    app: &App,
    num_edit_cmds_originally: usize,
    no_redo_cmds: bool,
    r: RoadID,
    orig_road_state: EditRoad
) -> Panel
\ No newline at end of file diff --git a/rustdoc/game/edit/roads/fn.selected_lane_bg.html b/rustdoc/game/edit/roads/fn.selected_lane_bg.html index 6a02e74a27..5d3f00240e 100644 --- a/rustdoc/game/edit/roads/fn.selected_lane_bg.html +++ b/rustdoc/game/edit/roads/fn.selected_lane_bg.html @@ -1,3 +1,3 @@ -selected_lane_bg in game::edit::roads - Rust

Function game::edit::roads::selected_lane_bg[][src]

fn selected_lane_bg(ctx: &EventCtx<'_>) -> Color
+selected_lane_bg in game::edit::roads - Rust

Function game::edit::roads::selected_lane_bg[][src]

fn selected_lane_bg(ctx: &EventCtx<'_>) -> Color
\ No newline at end of file diff --git a/rustdoc/game/edit/roads/fn.width_choices.html b/rustdoc/game/edit/roads/fn.width_choices.html index 3e3eb51aa3..490b43aeb3 100644 --- a/rustdoc/game/edit/roads/fn.width_choices.html +++ b/rustdoc/game/edit/roads/fn.width_choices.html @@ -1,3 +1,3 @@ -width_choices in game::edit::roads - Rust

Function game::edit::roads::width_choices[][src]

fn width_choices(app: &App, l: LaneID) -> Vec<Choice<Distance>>
+width_choices in game::edit::roads - Rust

Function game::edit::roads::width_choices[][src]

fn width_choices(app: &App, l: LaneID) -> Vec<Choice<Distance>>
\ No newline at end of file diff --git a/rustdoc/game/edit/roads/index.html b/rustdoc/game/edit/roads/index.html index c1700c7625..95011f310a 100644 --- a/rustdoc/game/edit/roads/index.html +++ b/rustdoc/game/edit/roads/index.html @@ -1,4 +1,4 @@ -game::edit::roads - Rust

Module game::edit::roads[][src]

Structs

+game::edit::roads - Rust

Module game::edit::roads[][src]

Structs

Functions

diff --git a/rustdoc/game/edit/roads/struct.RoadEditor.html b/rustdoc/game/edit/roads/struct.RoadEditor.html index 0e987c7803..772c9ab118 100644 --- a/rustdoc/game/edit/roads/struct.RoadEditor.html +++ b/rustdoc/game/edit/roads/struct.RoadEditor.html @@ -11,8 +11,8 @@ redo_stack: Vec<EditCmd>, orig_road_state: EditRoad, }

Fields

r: RoadIDselected_lane: Option<LaneID>hovering_on_lane: Option<LaneID>top_panel: Panelmain_panel: Panelfade_irrelevant: Drawablelane_highlights: ((Option<LaneID>, Option<LaneID>), Drawable)draw_drop_position: Drawablenum_edit_cmds_originally: usizeredo_stack: Vec<EditCmd>orig_road_state: EditRoad

Implementations

Always starts focused on a certain lane.

-

Trait Implementations

Respond to a UI event, such as input or time passing.

-

Draw

+

Trait Implementations

Respond to a UI event, such as input or time passing.

+

Draw

Specifies what to draw before draw()

Before this state is popped or replaced, call this.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

diff --git a/rustdoc/game/pregame/built_info/constant.BUILT_TIME_UTC.html b/rustdoc/game/pregame/built_info/constant.BUILT_TIME_UTC.html index 723ca43b4a..a0696dfa74 100644 --- a/rustdoc/game/pregame/built_info/constant.BUILT_TIME_UTC.html +++ b/rustdoc/game/pregame/built_info/constant.BUILT_TIME_UTC.html @@ -1,4 +1,4 @@ -BUILT_TIME_UTC in game::pregame::built_info - Rust

Constant game::pregame::built_info::BUILT_TIME_UTC[][src]

pub const BUILT_TIME_UTC: &str = r"Fri, 10 Sep 2021 21:05:12 +0000";
Expand description

The build time in RFC2822, UTC.

+BUILT_TIME_UTC in game::pregame::built_info - Rust

Constant game::pregame::built_info::BUILT_TIME_UTC[][src]

pub const BUILT_TIME_UTC: &str = r"Fri, 10 Sep 2021 21:33:39 +0000";
Expand description

The build time in RFC2822, UTC.

\ No newline at end of file diff --git a/rustdoc/src/game/edit/roads.rs.html b/rustdoc/src/game/edit/roads.rs.html index b6873a4fa4..74885c4775 100644 --- a/rustdoc/src/game/edit/roads.rs.html +++ b/rustdoc/src/game/edit/roads.rs.html @@ -1019,6 +1019,22 @@ 1019 1020 1021 +1022 +1023 +1024 +1025 +1026 +1027 +1028 +1029 +1030 +1031 +1032 +1033 +1034 +1035 +1036 +1037
 use std::collections::HashMap;
 
@@ -1371,9 +1387,25 @@
             Outcome::Changed(x) => match x.as_ref() {
                 "speed limit" => {
                     let speed_limit = self.main_panel.dropdown_value("speed limit");
-                    return self.modify_current_lane(ctx, app, Some(0), |new, _| {
-                        new.speed_limit = speed_limit;
+
+                    let mut edits = app.primary.map.get_edits().clone();
+                    let old = app.primary.map.get_r_edit(self.r);
+                    let mut new = old.clone();
+                    new.speed_limit = speed_limit;
+                    edits.commands.push(EditCmd::ChangeRoad {
+                        r: self.r,
+                        old,
+                        new,
                     });
+                    apply_map_edits(ctx, app, edits);
+                    self.redo_stack.clear();
+
+                    // Keep selecting the same lane, if one was selected
+                    self.selected_lane = self
+                        .selected_lane
+                        .map(|id| self.lane_for_idx(app, id.offset));
+                    self.recalc_hovering(ctx, app);
+                    panels_need_recalc = true;
                 }
                 "width preset" => {
                     let width = self.main_panel.dropdown_value("width preset");
diff --git a/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-0716a03cc01a18cb/out/built.rs.html b/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-0716a03cc01a18cb/out/built.rs.html
index 1a2a2de649..6bf09b732e 100644
--- a/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-0716a03cc01a18cb/out/built.rs.html
+++ b/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-0716a03cc01a18cb/out/built.rs.html
@@ -175,7 +175,7 @@
 pub const RUSTDOC_VERSION: &str = r"rustdoc 1.55.0 (c8dfcfe04 2021-09-06)";
 #[doc=r#"The build time in RFC2822, UTC."#]
 #[allow(dead_code)]
-pub const BUILT_TIME_UTC: &str = r"Fri, 10 Sep 2021 21:05:12 +0000";
+pub const BUILT_TIME_UTC: &str = r"Fri, 10 Sep 2021 21:33:39 +0000";
 #[doc=r#"The target architecture, given by `CARGO_CFG_TARGET_ARCH`."#]
 #[allow(dead_code)]
 pub const CFG_TARGET_ARCH: &str = r"x86_64";