Fix loading bug where button text did not appear
This commit is contained in:
parent
c3b50c8995
commit
af2f3101af
1 changed files with 7 additions and 5 deletions
12
src/main.rs
12
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 {
|
||||
|
|
Loading…
Reference in a new issue