From bc56b2637dd43e77009115440331b481b24f9ddb Mon Sep 17 00:00:00 2001 From: Anshul Dalal Date: Thu, 11 Jan 2024 22:32:00 +0530 Subject: [PATCH] added help text for wasm deployment --- src/app.rs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/app.rs b/src/app.rs index a50e9d1..a554933 100644 --- a/src/app.rs +++ b/src/app.rs @@ -74,9 +74,9 @@ impl App { ui.horizontal(|ui| { if ui .add(egui::Button::new(if !self.paused { - "Pause Execution" + "Pause" } else { - "Resume Execution" + "Resume" })) .clicked() { @@ -296,6 +296,20 @@ impl App { self.breakpoints.remove(*i); }); }); + #[cfg(target_family = "wasm")] + egui::Window::new("Help").show(ctx, |ui| { + ui.label(egui::RichText::new( + "1. Use the arrow or WASD keys to move the snake.", + ).color(Color32::LIGHT_GREEN)); + ui.label(egui::RichText::new( + "2. Click 'Pause' button in 'Debug Controls' to pause execution.", + ).color(Color32::LIGHT_GREEN)); + ui.label(egui::RichText::new( + "3. Click on the line numbers on the 'Source Code' window to toggle breakpoints.", + ).color(Color32::LIGHT_GREEN)); + ui.label("Source Code:"); + ui.hyperlink("https://github.com/ArchUsr64/6502_emulator/"); + }); if self.breakpoints.contains(&(current_line_number + 1)) { self.paused = true; }