From 2a7c035a42bf130858f3ed7117625e0cd55a6dc1 Mon Sep 17 00:00:00 2001
From: Manuel Thalmann <m@nuth.ch>
Date: Fri, 11 Apr 2025 19:52:57 +0200
Subject: [PATCH] Implement a function for drawing components

---
 gui/src/lib.rs | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gui/src/lib.rs b/gui/src/lib.rs
index 1ae5aef..9cbc855 100644
--- a/gui/src/lib.rs
+++ b/gui/src/lib.rs
@@ -2,6 +2,14 @@ pub struct Screen {
     pub components: Vec<Box<dyn Draw>>,
 }
 
+impl Screen {
+    pub fn run(&self) {
+        for component in self.components.iter() {
+            component.draw();
+        }
+    }
+}
+
 pub trait Draw {
     fn draw(&self);
 }