pub trait UiController {
Show 14 methods
fn window_title(&self) -> Option<String>;
fn set_window_title(&mut self, title: &str);
fn quit(&mut self);
fn redraw(&self);
fn resize(&mut self, width: i32, height: i32);
fn ping_tx(&self) -> PingSender;
fn select_string<F>(&mut self, title: &str, strings: &[&str], callback: F)
where
Self: Sized,
F: Fn(Option<String>) + 'static;
fn select_index<F>(&mut self, title: &str, strings: &[&str], callback: F)
where
Self: Sized,
F: Fn(Option<usize>) + 'static;
fn select_trains<F>(&mut self, game: &dyn Game, title: &str, callback: F)
where
Self: Sized,
F: Fn(Option<(Trains, Vec<bool>)>) + 'static;
fn select_phase<F>(&mut self, game: &dyn Game, callback: F)
where
Self: Sized,
F: Fn(Option<usize>) + 'static;
fn select_screenshot_save<F>(
&mut self,
title: &str,
default_path: Option<&str>,
callback: F
)
where
Self: Sized,
F: Fn(Option<PathBuf>) + 'static;
fn select_game_save<F>(
&mut self,
title: &str,
default_path: Option<&str>,
callback: F
)
where
Self: Sized,
F: Fn(Option<PathBuf>) + 'static;
fn select_game_load<F>(
&mut self,
title: &str,
default_path: Option<&str>,
callback: F
)
where
Self: Sized,
F: Fn(Option<PathBuf>) + 'static;
fn show_dividends<F>(
&mut self,
abbrev: &str,
revenue: usize,
options: DividendOptions,
callback: F
)
where
Self: Sized,
F: Fn() + 'static;
}