mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-29 01:13:53 +03:00
Fix merge
This commit is contained in:
parent
d7d994066a
commit
229f2d5dca
@ -137,7 +137,7 @@ fn agent_counters(ctx: &EventCtx, app: &App) -> (Widget, Widget, Widget, Widget)
|
||||
+ counts.walking_to_from_car
|
||||
+ counts.walking_to_from_bike,
|
||||
)
|
||||
.draw_text(ctx),
|
||||
.text_widget(ctx),
|
||||
]);
|
||||
|
||||
let bike_details = Widget::custom_row(vec![
|
||||
@ -148,7 +148,7 @@ fn agent_counters(ctx: &EventCtx, app: &App) -> (Widget, Widget, Widget, Widget)
|
||||
]))
|
||||
.into_widget(ctx)
|
||||
.margin_right(5),
|
||||
prettyprint_usize(counts.cyclists).draw_text(ctx),
|
||||
prettyprint_usize(counts.cyclists).text_widget(ctx),
|
||||
]);
|
||||
|
||||
let car_details = Widget::custom_row(vec![
|
||||
@ -163,7 +163,7 @@ fn agent_counters(ctx: &EventCtx, app: &App) -> (Widget, Widget, Widget, Widget)
|
||||
]))
|
||||
.into_widget(ctx)
|
||||
.margin_right(5),
|
||||
prettyprint_usize(counts.sov_drivers).draw_text(ctx),
|
||||
prettyprint_usize(counts.sov_drivers).text_widget(ctx),
|
||||
]);
|
||||
|
||||
let bus_details = Widget::custom_row(vec![
|
||||
@ -185,7 +185,7 @@ fn agent_counters(ctx: &EventCtx, app: &App) -> (Widget, Widget, Widget, Widget)
|
||||
]))
|
||||
.into_widget(ctx)
|
||||
.margin_right(5),
|
||||
prettyprint_usize(counts.bus_riders + counts.train_riders).draw_text(ctx),
|
||||
prettyprint_usize(counts.bus_riders + counts.train_riders).text_widget(ctx),
|
||||
]);
|
||||
|
||||
(car_details, bike_details, bus_details, pedestrian_details)
|
||||
|
@ -171,7 +171,7 @@ impl TimePanel {
|
||||
prettyprint_usize(finished),
|
||||
pct as usize
|
||||
)));
|
||||
txt.draw(ctx).centered_vert()
|
||||
txt.into_widget(ctx).centered_vert()
|
||||
},
|
||||
if app.primary.dirty_from_edits {
|
||||
ctx.style()
|
||||
@ -188,15 +188,13 @@ impl TimePanel {
|
||||
// into the panel for all gameplay modes
|
||||
let record_trips = if let Some(n) = app.primary.sim.num_recorded_trips() {
|
||||
Widget::row(vec![
|
||||
Widget::draw_batch(
|
||||
ctx,
|
||||
GeomBatch::from(vec![(
|
||||
Color::RED,
|
||||
Circle::new(Pt2D::new(0.0, 0.0), Distance::meters(10.0)).to_polygon(),
|
||||
)]),
|
||||
)
|
||||
GeomBatch::from(vec![(
|
||||
Color::RED,
|
||||
Circle::new(Pt2D::new(0.0, 0.0), Distance::meters(10.0)).to_polygon(),
|
||||
)])
|
||||
.into_widget(ctx)
|
||||
.centered_vert(),
|
||||
format!("{} trips captured", prettyprint_usize(n)).draw_text(ctx),
|
||||
format!("{} trips captured", prettyprint_usize(n)).text_widget(ctx),
|
||||
ctx.style()
|
||||
.btn_solid_primary
|
||||
.text("Finish Capture")
|
||||
@ -236,12 +234,12 @@ impl TimePanel {
|
||||
);
|
||||
}
|
||||
|
||||
Widget::draw_batch(ctx, batch)
|
||||
batch.into_widget(ctx)
|
||||
};
|
||||
|
||||
Widget::col(vec![
|
||||
Text::from(Line(self.time.ampm_tostring()).big_monospaced())
|
||||
.draw(ctx)
|
||||
.into_widget(ctx)
|
||||
.centered_horiz(),
|
||||
time_bar,
|
||||
trip_results,
|
||||
|
Loading…
Reference in New Issue
Block a user