Skip to content

Commit

Permalink
added help text for wasm deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchUsr64 committed Jan 11, 2024
1 parent 7a85ebd commit bc56b26
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit bc56b26

Please sign in to comment.