diff --git a/rustdoc/experiment/before_level/fn.make_upzone_panel.html b/rustdoc/experiment/before_level/fn.make_upzone_panel.html index 12bff9ef4c..2afe62f59a 100644 --- a/rustdoc/experiment/before_level/fn.make_upzone_panel.html +++ b/rustdoc/experiment/before_level/fn.make_upzone_panel.html @@ -1,4 +1,4 @@ experiment::before_level::make_upzone_panel - Rust

[][src]Function experiment::before_level::make_upzone_panel

fn make_upzone_panel(
    ctx: &mut EventCtx<'_>,
    app: &SimpleApp<Session>,
    num_picked: usize
) -> Panel
\ No newline at end of file + Change settings

[][src]Function experiment::before_level::make_upzone_panel

fn make_upzone_panel(
    ctx: &mut EventCtx<'_>,
    app: &SimpleApp<Session>,
    num_picked: usize
) -> Panel
\ No newline at end of file diff --git a/rustdoc/experiment/before_level/fn.make_vehicle_panel.html b/rustdoc/experiment/before_level/fn.make_vehicle_panel.html index c441509c66..c08b7284a2 100644 --- a/rustdoc/experiment/before_level/fn.make_vehicle_panel.html +++ b/rustdoc/experiment/before_level/fn.make_vehicle_panel.html @@ -1,4 +1,4 @@ experiment::before_level::make_vehicle_panel - Rust

[][src]Function experiment::before_level::make_vehicle_panel

fn make_vehicle_panel(ctx: &mut EventCtx<'_>, app: &SimpleApp<Session>) -> Panel
\ No newline at end of file + Change settings

[][src]Function experiment::before_level::make_vehicle_panel

fn make_vehicle_panel(ctx: &mut EventCtx<'_>, app: &SimpleApp<Session>) -> Panel
\ No newline at end of file diff --git a/rustdoc/experiment/before_level/index.html b/rustdoc/experiment/before_level/index.html index 2c961dc507..8164b69845 100644 --- a/rustdoc/experiment/before_level/index.html +++ b/rustdoc/experiment/before_level/index.html @@ -1,7 +1,7 @@ experiment::before_level - Rust

[][src]Module experiment::before_level

Structs

+ Change settings

[][src]Module experiment::before_level

Structs

Picker

Constants

ZOOM

Functions

make_upzone_panel
make_vehicle_panel
\ No newline at end of file diff --git a/rustdoc/experiment/before_level/struct.Picker.html b/rustdoc/experiment/before_level/struct.Picker.html index 6c7a8771f6..492cdddd4c 100644 --- a/rustdoc/experiment/before_level/struct.Picker.html +++ b/rustdoc/experiment/before_level/struct.Picker.html @@ -1,16 +1,17 @@ experiment::before_level::Picker - Rust -

[][src]Struct experiment::before_level::Picker

pub struct Picker {
+

[][src]Struct experiment::before_level::Picker

pub struct Picker {
     vehicle_panel: Panel,
     instructions_panel: Panel,
     upzone_panel: Panel,
     level: Level,
     bldgs: Buildings,
     current_picks: HashSet<BuildingID>,
+    draw_start: Drawable,
 }

- Fields

vehicle_panel: Panelinstructions_panel: Panelupzone_panel: Panellevel: Levelbldgs: Buildingscurrent_picks: HashSet<BuildingID>

Implementations

impl Picker[src]

pub fn new(
    ctx: &mut EventCtx<'_>,
    app: &SimpleApp<Session>,
    level: Level
) -> Box<dyn State<SimpleApp<Session>>>
[src]

fn randomly_pick_upzones(&mut self, app: &SimpleApp<Session>)[src]

Trait Implementations

impl State<SimpleApp<Session>> for Picker[src]

 use std::collections::HashSet;
 
@@ -282,8 +315,8 @@
 use map_gui::ID;
 use map_model::BuildingID;
 use widgetry::{
-    Btn, Color, EventCtx, GfxCtx, HorizontalAlignment, Key, Line, Outcome, Panel, RewriteColor,
-    State, Text, TextExt, VerticalAlignment, Widget,
+    Btn, Color, Drawable, EventCtx, GeomBatch, GfxCtx, HorizontalAlignment, Key, Line, Outcome,
+    Panel, RewriteColor, State, Text, TextExt, VerticalAlignment, Widget,
 };
 
 use crate::buildings::{BldgState, Buildings};
@@ -302,6 +335,7 @@
     level: Level,
     bldgs: Buildings,
     current_picks: HashSet<BuildingID>,
+    draw_start: Drawable,
 }
 
 impl Picker {
@@ -312,22 +346,22 @@
             level.map.clone(),
             Box::new(move |ctx, app| {
                 ctx.canvas.cam_zoom = ZOOM;
-                ctx.canvas.center_on_map_pt(app.map.get_bounds().center());
+                let start = app
+                    .map
+                    .get_i(app.map.find_i_by_osm_id(level.start).unwrap())
+                    .polygon
+                    .center();
+                ctx.canvas.center_on_map_pt(start);
 
                 let bldgs = Buildings::new(ctx, app, HashSet::new());
 
                 let mut txt = Text::new();
-                txt.add(Line(format!("Prepare for {}", level.title)).small_heading());
+                txt.add(Line(format!("Ready for {}?", level.title)).small_heading());
                 txt.add(Line(format!(
-                    "Goal: deliver {} presents in {}",
-                    prettyprint_usize(level.goal),
-                    level.time_limit
+                    "Goal: deliver {} presents",
+                    prettyprint_usize(level.goal)
                 )));
-                txt.add_appended(vec![
-                    Line("Use the "),
-                    Line("arrow keys").fg(ctx.style().hotkey_color),
-                    Line(" to move"),
-                ]);
+                txt.add(Line(format!("Time limit: {}", level.time_limit)));
                 txt.add_appended(vec![
                     Line("Deliver presents to "),
                     Line("single-family homes").fg(app.cs.residential_building),
@@ -339,15 +373,46 @@
                     Line("stores").fg(app.session.colors.store),
                 ]);
 
+                let instructions_panel = Panel::new(Widget::col(vec![
+                    txt.draw(ctx),
+                    Widget::row(vec![
+                        Widget::draw_svg(ctx, "system/assets/tools/arrow_keys.svg"),
+                        Text::from_all(vec![
+                            Line("arrow keys").fg(ctx.style().hotkey_color),
+                            Line(" to move"),
+                        ])
+                        .draw(ctx),
+                    ]),
+                    Widget::row(vec![
+                        Widget::draw_svg(ctx, "system/assets/tools/mouse.svg"),
+                        Text::from_all(vec![
+                            Line("mouse scroll wheel or touchpad").fg(ctx.style().hotkey_color),
+                            Line(" to zoom in or out"),
+                        ])
+                        .draw(ctx),
+                    ]),
+                    Text::from_all(vec![
+                        Line("Escape key").fg(ctx.style().hotkey_color),
+                        Line(" to pause"),
+                    ])
+                    .draw(ctx),
+                ]))
+                .aligned(HorizontalAlignment::Center, VerticalAlignment::BottomInset)
+                .build(ctx);
+
+                let draw_start = GeomBatch::load_svg(ctx, "system/assets/timeline/start_pos.svg")
+                    .scale(3.0)
+                    .color(RewriteColor::ChangeAll(Color::RED))
+                    .centered_on(start);
+
                 Transition::Replace(Box::new(Picker {
                     vehicle_panel: make_vehicle_panel(ctx, app),
                     upzone_panel: make_upzone_panel(ctx, app, 0),
-                    instructions_panel: Panel::new(txt.draw(ctx).container())
-                        .aligned(HorizontalAlignment::Center, VerticalAlignment::BottomInset)
-                        .build(ctx),
+                    instructions_panel,
                     level,
                     bldgs,
                     current_picks: HashSet::new(),
+                    draw_start: ctx.upload(draw_start),
                 }))
             }),
         )
@@ -441,6 +506,7 @@
         if let Some(ID::Building(b)) = app.current_selection {
             g.draw_polygon(app.cs.selected, app.map.get_b(b).polygon.clone());
         }
+        g.redraw(&self.draw_start);
     }
 }
 
diff --git a/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-c1f324f9d3d7e3b2/out/built.rs.html b/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-c1f324f9d3d7e3b2/out/built.rs.html
index 4b4ba9fffd..110d006999 100644
--- a/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-c1f324f9d3d7e3b2/out/built.rs.html
+++ b/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-c1f324f9d3d7e3b2/out/built.rs.html
@@ -122,7 +122,7 @@
 /// The output of `rustdoc -V`
 pub const RUSTDOC_VERSION: &str = "rustdoc 1.48.0 (7eac88abb 2020-11-16)";
 /// The built-time in RFC2822, UTC
-pub const BUILT_TIME_UTC: &str = "Tue, 15 Dec 2020 20:53:15 +0000";
+pub const BUILT_TIME_UTC: &str = "Tue, 15 Dec 2020 21:10:54 +0000";
 /// The target architecture, given by `cfg!(target_arch)`.
 pub const CFG_TARGET_ARCH: &str = "x86_64";
 /// The endianness, given by `cfg!(target_endian)`.