MCPcopy Create free account
hub / github.com/DeadlockCode/n-body / gui

Method gui

src/renderer.rs:86–104  ·  view source on GitHub ↗
(&mut self, ctx: &quarkstrom::egui::Context)

Source from the content-addressed store, hash-verified

84 }
85
86 fn gui(&mut self, ctx: &quarkstrom::egui::Context) {
87 egui::Window::new("")
88 .open(&mut self.info_window_open)
89 .show(ctx, |ui| {
90 ui.label(format!("Simulation Tick: {}", TICK.load(Ordering::Relaxed)));
91 ui.horizontal(|ui| {
92 ui.label("Seed:");
93 if ui.add(egui::DragValue::new(&mut self.seed)).changed() {
94 TICK.store(0, Ordering::Relaxed);
95 SEED.lock().replace(self.seed);
96 }
97 if ui.button("Randomize").clicked() {
98 self.seed = fastrand::u64(..);
99 TICK.store(0, Ordering::Relaxed);
100 SEED.lock().replace(self.seed);
101 }
102 })
103 });
104 }
105}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected