diff --git a/rustdoc/experiment/after_level/constant.ZOOM.html b/rustdoc/experiment/after_level/constant.ZOOM.html index 93addbc9c2..6c3496ceee 100644 --- a/rustdoc/experiment/after_level/constant.ZOOM.html +++ b/rustdoc/experiment/after_level/constant.ZOOM.html @@ -1,4 +1,4 @@ experiment::after_level::ZOOM - Rust

[][src]Constant experiment::after_level::ZOOM

const ZOOM: f64 = 2.0;
\ No newline at end of file + Change settings

[][src]Constant experiment::after_level::ZOOM

const ZOOM: f64 = 2.0;
\ No newline at end of file diff --git a/rustdoc/experiment/after_level/index.html b/rustdoc/experiment/after_level/index.html index a5ba27d7e7..da3f3478df 100644 --- a/rustdoc/experiment/after_level/index.html +++ b/rustdoc/experiment/after_level/index.html @@ -1,6 +1,6 @@ experiment::after_level - Rust

[][src]Module experiment::after_level

Structs

+ Change settings

[][src]Module experiment::after_level

Structs

Results

Constants

ZOOM
\ No newline at end of file diff --git a/rustdoc/experiment/after_level/struct.Results.html b/rustdoc/experiment/after_level/struct.Results.html index f0b07dd21e..4920425ede 100644 --- a/rustdoc/experiment/after_level/struct.Results.html +++ b/rustdoc/experiment/after_level/struct.Results.html @@ -1,11 +1,12 @@ experiment::after_level::Results - Rust -

[][src]Struct experiment::after_level::Results

pub struct Results {
+

[][src]Struct experiment::after_level::Results

pub struct Results {
     panel: Panel,
+    unlock_message: Option<String>,
 }

- Fields

panel: Panel

Implementations

impl Results[src]

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

Trait Implementations

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

 use map_gui::tools::{open_browser, PopupMsg};
 use widgetry::{
     Btn, DrawBaselayer, EventCtx, GfxCtx, Key, Line, Outcome, Panel, State, Text, Widget,
 };
 
-use crate::levels::Level;
 use crate::{App, Transition};
 
 pub struct TitleScreen {
@@ -123,8 +118,15 @@
 }
 
 impl TitleScreen {
-    pub fn new(ctx: &mut EventCtx) -> Box<dyn State<App>> {
-        let levels = Level::all();
+    pub fn new(ctx: &mut EventCtx, app: &App) -> Box<dyn State<App>> {
+        let mut level_buttons = Vec::new();
+        for (idx, level) in app.session.levels.iter().enumerate() {
+            if idx < app.session.levels_unlocked {
+                level_buttons.push(Btn::text_bg2(level.title).build_def(ctx, None));
+            } else {
+                level_buttons.push(Btn::text_bg2(level.title).inactive(ctx));
+            }
+        }
 
         Box::new(TitleScreen {
             panel: Panel::new(
@@ -143,12 +145,7 @@
                         None,
                     ),
                     Btn::text_bg2("Instructions").build_def(ctx, None),
-                    Widget::row(
-                        levels
-                            .into_iter()
-                            .map(|lvl| Btn::text_bg2(lvl.title).build_def(ctx, None))
-                            .collect(),
-                    ),
+                    Widget::row(level_buttons),
                 ])
                 .evenly_spaced(),
             )
@@ -166,24 +163,17 @@
                     std::process::exit(0);
                 }
                 "Instructions" => {
-                    // TODO As I'm writing the range argument, I don't buy the hybrid motor.
-                    // Wireless Tesla energy instead?
                     return Transition::Push(PopupMsg::new(
                         ctx,
                         "Instructions",
                         vec![
                             "It's Christmas Eve, so it's time for Santa to deliver presents in \
-                             Seattle. 2020 has thoroughly squashed any remaining magic out of the \
-                             world, so your sleigh can only hold so many presents at a time.",
+                             Seattle.",
+                            "2020 has thoroughly squashed any remaining magic out of the world, \
+                             so your sleigh can only hold so many presents at a time.",
                             "Deliver presents as fast as you can. When you run out, refill from a \
                              yellow-colored store.",
                             "It's faster to deliver to buildings with multiple families inside.",
-                            "",
-                            "When you deliver enough presents, a little bit of magic is restored, \
-                             and you can upzone buildings to make your job easier.",
-                            "If you're having trouble delivering to houses far away from \
-                             businesses, why not build a new grocery store where it might be \
-                             needed?",
                         ],
                     ));
                 }
@@ -193,10 +183,12 @@
                         return Transition::Keep;
                     }
 
-                    for lvl in Level::all() {
-                        if x == lvl.title {
+                    for level in &app.session.levels {
+                        if x == level.title {
                             return Transition::Push(crate::before_level::Picker::new(
-                                ctx, app, lvl,
+                                ctx,
+                                app,
+                                level.clone(),
                             ));
                         }
                     }
diff --git a/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-f38555f90777146b/out/built.rs.html b/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-f38555f90777146b/out/built.rs.html
index dd8eabd5ca..0cfe85b54c 100644
--- a/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-f38555f90777146b/out/built.rs.html
+++ b/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-f38555f90777146b/out/built.rs.html
@@ -114,7 +114,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 = "Fri, 04 Dec 2020 23:25:26 +0000";
+pub const BUILT_TIME_UTC: &str = "Sat, 05 Dec 2020 00:34:28 +0000";
 /// The target architecture, given by `cfg!(target_arch)`.
 pub const CFG_TARGET_ARCH: &str = "x86_64";
 /// The endianness, given by `cfg!(target_endian)`.