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

Update mod.rs

This commit is contained in:
biroder 2024-03-25 11:40:59 +00:00 committed by GitHub
parent dcb6af6581
commit d3bb79cf4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -675,15 +675,14 @@ impl<T: std::cmp::PartialEq + std::default::Default + Clone> Menu<T> {
);
batch.draw(ctx)?;
} else {
let loc = &state.loc;
let difficulty = match save.difficulty {
0 => loc.t("menus.difficulty_menu.normal"),
2 => loc.t("menus.difficulty_menu.easy"),
4 => loc.t("menus.difficulty_menu.hard"),
_ => loc.t("menus.difficulty_menu.unknown"),
0 => state.loc.t("menus.difficulty_menu.normal"),
2 => state.loc.t("menus.difficulty_menu.easy"),
4 => state.loc.t("menus.difficulty_menu.hard"),
_ => state.loc.t("menus.difficulty_menu.unknown"),
};
let difficulty_name =
loc.tt("menus.difficulty_menu.difficulty_name", &[("difficulty", &difficulty)]);
state.loc.tt("menus.difficulty_menu.difficulty_name", &[("difficulty", &difficulty)]);
state.font.builder().position(self.x as f32 + 20.0, y + 10.0).draw(
&difficulty_name,