summaryrefslogtreecommitdiff
path: root/src/output_layout.rs
diff options
context:
space:
mode:
authoromagdy7 <omar.professional8777@gmail.com>2023-11-27 13:45:48 +0200
committeromagdy7 <omar.professional8777@gmail.com>2023-11-27 13:45:48 +0200
commit7ccc460a99bdd6299af9fc95d246826715092df1 (patch)
treead885618b9887f0145e81c7f89af3bd5cc1295ae /src/output_layout.rs
parent1e5dc994b7c7317a8c5be5c600dcd2dc90b0ac07 (diff)
downloadlgsim-7ccc460a99bdd6299af9fc95d246826715092df1.tar.xz
lgsim-7ccc460a99bdd6299af9fc95d246826715092df1.zip
Added the intial design of the logic gate simulator
Diffstat (limited to 'src/output_layout.rs')
-rw-r--r--src/output_layout.rs25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/output_layout.rs b/src/output_layout.rs
deleted file mode 100644
index efe4875..0000000
--- a/src/output_layout.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-use crate::gate::*;
-use macroquad::prelude::*;
-
-pub struct OutputLayout {
- outputs: Vec<Connection>,
-}
-
-impl OutputLayout {
- pub fn new(outputs: Vec<Connection>) -> Self {
- OutputLayout { outputs }
- }
- pub fn draw(&self) {
- let playground_offset_x: f32 = screen_width() / 20.;
- let playground_offset_y: f32 = screen_height() / 14.;
- let playground_height: f32 = screen_height() - playground_offset_y * 2.0;
- for (cnt, node) in self.outputs.iter().enumerate() {
- draw_circle(
- screen_width() - playground_offset_x,
- playground_height / 3.0 + 25. + (30. * cnt as f32),
- node.radius,
- if node.on { node.color } else { GRAY },
- );
- }
- }
-}