Struct map_gui::tools::CityPicker [−][src]
pub struct CityPicker<A: AppLike> { panel: Panel, districts: Vec<(MapName, Color, Polygon)>, selected: Option<usize>, on_load: Option<Box<dyn FnOnce(&mut EventCtx<'_>, &mut A) -> Transition<A>>>, }
Lets the player switch maps.
Fields
panel: Panel
districts: Vec<(MapName, Color, Polygon)>
selected: Option<usize>
on_load: Option<Box<dyn FnOnce(&mut EventCtx<'_>, &mut A) -> Transition<A>>>
Implementations
impl<A: AppLike + 'static> CityPicker<A>
[src]
impl<A: AppLike + 'static> CityPicker<A>
[src]pub fn new_state(
ctx: &mut EventCtx<'_>,
app: &mut A,
on_load: Box<dyn FnOnce(&mut EventCtx<'_>, &mut A) -> Transition<A>>
) -> Box<dyn State<A>>
[src]
ctx: &mut EventCtx<'_>,
app: &mut A,
on_load: Box<dyn FnOnce(&mut EventCtx<'_>, &mut A) -> Transition<A>>
) -> Box<dyn State<A>>
fn new_in_city(
ctx: &mut EventCtx<'_>,
on_load: Box<dyn FnOnce(&mut EventCtx<'_>, &mut A) -> Transition<A>>,
city_name: CityName
) -> Box<dyn State<A>>
[src]
ctx: &mut EventCtx<'_>,
on_load: Box<dyn FnOnce(&mut EventCtx<'_>, &mut A) -> Transition<A>>,
city_name: CityName
) -> Box<dyn State<A>>
Trait Implementations
impl<A: AppLike + 'static> State<A> for CityPicker<A>
[src]
impl<A: AppLike + 'static> State<A> for CityPicker<A>
[src]fn event(&mut self, ctx: &mut EventCtx<'_>, app: &mut A) -> Transition<A>
[src]
fn draw_baselayer(&self) -> DrawBaselayer
[src]
fn draw(&self, g: &mut GfxCtx<'_>, app: &A)
[src]
pub fn on_destroy(&mut self, &mut EventCtx<'_>, &mut A)
Auto Trait Implementations
impl<A> !RefUnwindSafe for CityPicker<A>
impl<A> !Send for CityPicker<A>
impl<A> !Sync for CityPicker<A>
impl<A> Unpin for CityPicker<A>
impl<A> !UnwindSafe for CityPicker<A>
Blanket Implementations
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,