Fix loading bug where button text did not appear

This commit is contained in:
Stephen Seo 2019-10-05 21:20:42 +09:00
parent c3b50c8995
commit af2f3101af

View file

@ -877,11 +877,13 @@ impl State for GameState {
*text_image = Some(font.render(text, &style)?); *text_image = Some(font.render(text, &style)?);
Ok(()) Ok(())
})?; })?;
mi.is_loaded = true; if text_image.is_some() {
if i + 1 < self.menu.items.len() { mi.is_loaded = true;
self.menu.items[i + 1].is_loaded = false; if i + 1 < self.menu.items.len() {
} else { self.menu.items[i + 1].is_loaded = false;
self.current_finished = true; } else {
self.current_finished = true;
}
} }
} }
MenuItemType::AppearingText { MenuItemType::AppearingText {