[][src]Struct game::app::App

pub struct App {
    pub primary: PerMap,
    pub cs: ColorScheme,
    pub unzoomed_agents: UnzoomedAgents,
    pub opts: Options,
    pub per_obj: PerObjectActions,
    pub session: SessionState,
}

The top-level data that lasts through the entire game, no matter what state the game is in.

Fields

primary: PerMapcs: ColorSchemeunzoomed_agents: UnzoomedAgentsopts: Optionsper_obj: PerObjectActionssession: SessionState

Static data that lasts the entire session. Use sparingly.

Implementations

impl App[src]

pub fn new(
    flags: Flags,
    opts: Options,
    ctx: &mut EventCtx<'_>,
    splash: bool
) -> App
[src]

pub fn has_prebaked(&self) -> Option<(&String, &String)>[src]

pub fn prebaked(&self) -> &Analytics[src]

pub fn set_prebaked(&mut self, prebaked: Option<(String, String, Analytics)>)[src]

pub fn map_switched(
    &mut self,
    ctx: &mut EventCtx<'_>,
    map: Map,
    sim: Sim,
    timer: &mut Timer<'_>
)
[src]

pub fn draw(
    &self,
    g: &mut GfxCtx<'_>,
    opts: DrawOptions,
    show_objs: &dyn ShowObject
)
[src]

pub fn recalculate_current_selection(&mut self, ctx: &EventCtx<'_>)[src]

Assumes some defaults.

pub fn mouseover_unzoomed_roads_and_intersections(
    &self,
    ctx: &EventCtx<'_>
) -> Option<ID>
[src]

pub fn mouseover_unzoomed_buildings(&self, ctx: &EventCtx<'_>) -> Option<ID>[src]

pub fn mouseover_unzoomed_everything(&self, ctx: &EventCtx<'_>) -> Option<ID>[src]

pub fn mouseover_debug_mode(
    &self,
    ctx: &EventCtx<'_>,
    show_objs: &dyn ShowObject
) -> Option<ID>
[src]

fn calculate_current_selection(
    &self,
    ctx: &EventCtx<'_>,
    show_objs: &dyn ShowObject,
    debug_mode: bool,
    unzoomed_roads_and_intersections: bool,
    unzoomed_buildings: bool
) -> Option<ID>
[src]

fn get_renderables_back_to_front<'a>(
    &'a self,
    bounds: Bounds,
    prerender: &Prerender,
    agents: &'a mut AgentCache,
    show_objs: &dyn ShowObject
) -> Vec<&'a (dyn Renderable + 'a)>
[src]

Trait Implementations

impl SharedAppState for App[src]

impl State<App> for ChallengesPicker[src]

impl State<App> for CityPicker[src]

impl State<App> for Floodfiller[src]

impl State<App> for PathCounter[src]

impl State<App> for PolygonDebugger[src]

impl State<App> for DebugMode[src]

impl State<App> for ScreenshotTest[src]

impl State<App> for PopularDestinations[src]

impl State<App> for ViewKML[src]

impl State<App> for ParkingMapper[src]

impl State<App> for ChangeWay[src]

impl State<App> for Viewer[src]

impl State<App> for IsochroneViewer[src]

impl State<App> for PolygonEditor[src]

impl State<App> for ScenarioManager[src]

impl State<App> for StoryMapEditor[src]

impl State<App> for DevToolsMode[src]

impl State<App> for BulkSelect[src]

impl State<App> for BulkEdit[src]

impl State<App> for ClusterTrafficSignalEditor[src]

impl State<App> for LaneEditor[src]

impl State<App> for RouteEditor[src]

impl State<App> for StopSignEditor[src]

impl State<App> for Navigator[src]

impl State<App> for ChangeDuration[src]

impl State<App> for ShowAbsolute[src]

impl State<App> for ShowRelative[src]

impl State<App> for TuneRelative[src]

impl State<App> for SignalPicker[src]

impl State<App> for PreviewTrafficSignal[src]

impl State<App> for TrafficSignalEditor[src]

impl State<App> for ZoneEditor[src]

impl State<App> for EditMode[src]

impl State<App> for SaveEdits[src]

impl State<App> for CrossStreet[src]

impl State<App> for LoadEdits[src]

impl State<App> for ConfirmDiscard[src]

impl<T: 'static> State<App> for ChooseSomething<T>[src]

impl State<App> for PromptInput[src]

impl State<App> for PopupMsg[src]

impl State<App> for PickLayer[src]

impl State<App> for MapAlreadyLoaded[src]

impl<T: 'static + DeserializeOwned> State<App> for FileLoader<T>[src]

impl State<App> for OptionsPanel[src]

impl State<App> for TitleScreen[src]

impl State<App> for SearchBuildings[src]

impl State<App> for MainMenu[src]

impl State<App> for About[src]

impl State<App> for Proposals[src]

impl State<App> for CommuterPatterns[src]

impl<T: 'static, F: 'static, P: 'static + Fn(&mut EventCtx<'_>, &App, &Table<T, F>) -> Panel> State<App> for GenericTripTable<T, F, P>[src]

impl State<App> for ActiveTraffic[src]

impl State<App> for TransitRoutes[src]

impl State<App> for TripSummaries[src]

impl State<App> for TrafficSignalDemand[src]

impl State<App> for AgentSpawner[src]

impl State<App> for Warping[src]

impl State<App> for EditScenarioModifiers[src]

impl State<App> for ChangeMode[src]

impl State<App> for FinalScore[src]

impl State<App> for TurnExplorer[src]

impl State<App> for JumpToTime[src]

impl State<App> for JumpToDelay[src]

impl State<App> for TimeWarpScreen[src]

impl State<App> for UberTurnPicker[src]

impl State<App> for UberTurnViewer[src]

impl State<App> for SandboxMode[src]

impl State<App> for DebugWarp[src]

impl State<App> for BackToMainMenu[src]

impl State<App> for SandboxLoader[src]

impl State<App> for CutscenePlayer[src]

impl State<App> for FYI[src]

Auto Trait Implementations

impl !RefUnwindSafe for App

impl !Send for App

impl !Sync for App

impl Unpin for App

impl !UnwindSafe for App

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,