Game Speed debug text (#103)
This commit is contained in:
parent
7c8f2ac60a
commit
730d1cb5d8
|
@ -2063,9 +2063,10 @@ impl Scene for GameScene {
|
|||
}
|
||||
|
||||
if state.settings.god_mode {
|
||||
let debug_name = "GOD";
|
||||
state.font.draw_text_with_shadow(
|
||||
"GOD".chars(),
|
||||
state.canvas_size.0 - 32.0,
|
||||
debug_name.chars(),
|
||||
state.canvas_size.0 - state.font.text_width(debug_name.chars(), &state.constants) - 10.0,
|
||||
20.0,
|
||||
&state.constants,
|
||||
&mut state.texture_set,
|
||||
|
@ -2074,9 +2075,10 @@ impl Scene for GameScene {
|
|||
}
|
||||
|
||||
if state.settings.infinite_booster {
|
||||
let debug_name = "INF.B";
|
||||
state.font.draw_text_with_shadow(
|
||||
"INF.B".chars(),
|
||||
state.canvas_size.0 - 32.0,
|
||||
debug_name.chars(),
|
||||
state.canvas_size.0 - state.font.text_width(debug_name.chars(), &state.constants) - 10.0,
|
||||
32.0,
|
||||
&state.constants,
|
||||
&mut state.texture_set,
|
||||
|
@ -2084,6 +2086,18 @@ impl Scene for GameScene {
|
|||
)?;
|
||||
}
|
||||
|
||||
if state.settings.speed != 1.0 {
|
||||
let tick_spd_mod = format!("{:.1}x SPD", state.settings.speed);
|
||||
state.font.draw_text_with_shadow(
|
||||
tick_spd_mod.chars(),
|
||||
state.canvas_size.0 - state.font.text_width(tick_spd_mod.chars(), &state.constants) - 10.0,
|
||||
44.0,
|
||||
&state.constants,
|
||||
&mut state.texture_set,
|
||||
ctx,
|
||||
)?;
|
||||
}
|
||||
|
||||
self.replay.draw(state, ctx, &self.frame)?;
|
||||
|
||||
self.pause_menu.draw(state, ctx)?;
|
||||
|
|
Loading…
Reference in New Issue