text vars

This commit is contained in:
Oliver Atkinson
2024-10-01 15:39:01 -06:00
parent a9507f4afb
commit 7df8646d4f

View File

@@ -22,8 +22,10 @@ async fn main() {
loop {
clear_background(BLACK);
if show_debug {
draw_text(&format!("Amplitude: {}, Freqency {}, X Offset {}", amp, freq, x_offset), 20.0, 40.0, 20.0, WHITE);
draw_text(&format!("Cursor {:?}, Last Click {:?}", mouse_position(), (inital_x_pos, inital_y_pos)), 20.0, 60.0, 20.0, WHITE);
let text_h = 20.0;
let text_margin = 20.0;
draw_text(&format!("Amplitude: {}, Freqency {}, X Offset {}", amp, freq, x_offset) , text_margin, text_h*1. +text_margin, text_h, WHITE);
draw_text(&format!("Cursor {:?}, Last Click {:?}", mouse_position(), (inital_x_pos, inital_y_pos)) , text_margin, text_h*2. +text_margin, text_h, WHITE);
}
// toggle debug box