Dehardcode menu toogles text [ci skip]

This commit is contained in:
biroder 2023-04-14 16:39:16 +03:00 committed by GitHub
parent 5f93658f0f
commit 5821f06928
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -490,7 +490,7 @@ impl<T: std::cmp::PartialEq + std::default::Default + Clone> Menu<T> {
)?;
}
MenuEntry::Toggle(name, value) => {
let value_text = if *value { "ON" } else { "OFF" };
let value_text = if *value { state.loc.t("common.on") } else { state.loc.t("common.off") };
let name_text_len = state.font.builder().compute_width(name);
state.font.builder().position(self.x as f32 + 20.0, y).draw(