From af2f3101af5f80b2fb3977b3632334e2611b7e7e Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Sat, 5 Oct 2019 21:20:42 +0900 Subject: [PATCH] Fix loading bug where button text did not appear --- src/main.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 1703049..8c1abd4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -877,11 +877,13 @@ impl State for GameState { *text_image = Some(font.render(text, &style)?); Ok(()) })?; - mi.is_loaded = true; - if i + 1 < self.menu.items.len() { - self.menu.items[i + 1].is_loaded = false; - } else { - self.current_finished = true; + if text_image.is_some() { + mi.is_loaded = true; + if i + 1 < self.menu.items.len() { + self.menu.items[i + 1].is_loaded = false; + } else { + self.current_finished = true; + } } } MenuItemType::AppearingText {