1
0
Fork 0
mirror of https://github.com/doukutsu-rs/doukutsu-rs synced 2024-11-29 08:42:50 +00:00

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

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(