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)?);
|
*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 {
|
||||||
|
|
Loading…
Reference in a new issue