Expect box future
This commit is contained in:
parent
bdbbb4267e
commit
4db8aefed1
1 changed files with 2 additions and 2 deletions
|
@ -141,7 +141,7 @@ impl CharacterWindow {
|
||||||
engine: Arc<Engine>,
|
engine: Arc<Engine>,
|
||||||
hero: Entity,
|
hero: Entity,
|
||||||
name: &str,
|
name: &str,
|
||||||
close: &'static dyn FutureStateChange,
|
close: Box<dyn FutureStateChange>,
|
||||||
) -> Result<Arc<Self>> {
|
) -> Result<Arc<Self>> {
|
||||||
let menu_gui =
|
let menu_gui =
|
||||||
GuiBuilder::from_str(engine.gui_handler(), include_str!("../resources/menu.xml"))?;
|
GuiBuilder::from_str(engine.gui_handler(), include_str!("../resources/menu.xml"))?;
|
||||||
|
@ -153,7 +153,7 @@ impl CharacterWindow {
|
||||||
let close_button: Arc<Button> = menu_gui.element("close")?;
|
let close_button: Arc<Button> = menu_gui.element("close")?;
|
||||||
|
|
||||||
let character_window = Arc::new_cyclic(|me| CharacterWindow {
|
let character_window = Arc::new_cyclic(|me| CharacterWindow {
|
||||||
close: Box::new(close),
|
close,
|
||||||
|
|
||||||
menu_gui,
|
menu_gui,
|
||||||
tab_content_grid: content_grid,
|
tab_content_grid: content_grid,
|
||||||
|
|
Loading…
Reference in a new issue