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:
parent
5f93658f0f
commit
5821f06928
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue