hide traffic sig details when turn cycling in sandbox mode

This commit is contained in:
Dustin Carlino 2020-01-09 17:17:24 -06:00
parent 1d379e8315
commit bc95319859
2 changed files with 13 additions and 2 deletions

View File

@ -31,7 +31,8 @@ impl TitleScreen {
composite: Composite::new(
ezgui::Composite::new(
ManagedWidget::col(vec![ManagedWidget::col(vec![
ManagedWidget::just_draw(JustDraw::image("assets/pregame/logo.png", ctx)),
ManagedWidget::just_draw(JustDraw::image("assets/pregame/logo.png", ctx))
.bg(Color::GREEN.alpha(0.2)),
// TODO that nicer font
// TODO Any key
ManagedWidget::btn(Button::text(

View File

@ -12,7 +12,7 @@ use crate::game::{State, Transition, WizardState};
use crate::helpers::ID;
use crate::managed::Outcome;
use crate::pregame::main_menu;
use crate::ui::UI;
use crate::ui::{ShowEverything, UI};
use abstutil::Timer;
use ezgui::{
hotkey, lctrl, Choice, Color, Composite, EventCtx, EventLoopMode, GfxCtx, HorizontalAlignment,
@ -247,7 +247,17 @@ impl State for SandboxMode {
}
}
fn draw_default_ui(&self) -> bool {
false
}
fn draw(&self, g: &mut GfxCtx, ui: &UI) {
ui.draw(
g,
self.common.draw_options(ui),
&ui.primary.sim,
&ShowEverything::new(),
);
self.overlay.draw(g);
self.agent_tools.draw(g);
self.common.draw(g, ui);