1
0
Fork 0
mirror of https://github.com/doukutsu-rs/doukutsu-rs synced 2024-11-16 02:43:02 +00:00

main menu improvements

This commit is contained in:
Sallai József 2022-08-07 22:54:23 +03:00
parent 56631201c8
commit 7b359ae4c1

View file

@ -376,14 +376,12 @@ impl Scene for TitleScene {
self.nikumaru_rec.load_counter(state, ctx)?; self.nikumaru_rec.load_counter(state, ctx)?;
self.current_menu = CurrentMenu::ChallengeConfirmMenu; self.current_menu = CurrentMenu::ChallengeConfirmMenu;
} }
state.reload_graphics();
} }
} }
MenuSelectionResult::Selected(ChallengesMenuEntry::Back, _) | MenuSelectionResult::Canceled => { MenuSelectionResult::Selected(ChallengesMenuEntry::Back, _) | MenuSelectionResult::Canceled => {
state.mod_path = None; state.mod_path = None;
self.nikumaru_rec.load_counter(state, ctx)?; self.nikumaru_rec.load_counter(state, ctx)?;
self.current_menu = CurrentMenu::MainMenu; self.current_menu = CurrentMenu::MainMenu;
state.reload_graphics();
} }
_ => (), _ => (),
}, },
@ -464,6 +462,7 @@ impl Scene for TitleScene {
)?; )?;
} }
if self.current_menu == CurrentMenu::MainMenu {
self.draw_text_centered(&VERSION_BANNER, state.canvas_size.1 - 15.0, state, ctx)?; self.draw_text_centered(&VERSION_BANNER, state.canvas_size.1 - 15.0, state, ctx)?;
if state.constants.is_cs_plus { if state.constants.is_cs_plus {
@ -471,6 +470,7 @@ impl Scene for TitleScene {
} else { } else {
self.draw_text_centered(COPYRIGHT_PIXEL, state.canvas_size.1 - 30.0, state, ctx)?; self.draw_text_centered(COPYRIGHT_PIXEL, state.canvas_size.1 - 30.0, state, ctx)?;
} }
}
self.nikumaru_rec.draw(state, ctx, &self.frame)?; self.nikumaru_rec.draw(state, ctx, &self.frame)?;