aboutsummaryrefslogtreecommitdiff
path: root/src/widgets/components.rs
diff options
context:
space:
mode:
authorLibravatar Silas Bartha <[email protected]>2024-06-04 15:00:16 -0400
committerLibravatar Silas Bartha <[email protected]>2024-06-04 15:00:16 -0400
commita002e4d738535e6ca779c71231f7b84864b9a8d0 (patch)
tree8ec521b535f3820328f9ea6f2511ca29c630b82f /src/widgets/components.rs
parent56aafda8495243fa939bdce01f36d4adbf4ec556 (diff)
Refactored + Renamed + Added Docs
Diffstat (limited to 'src/widgets/components.rs')
-rw-r--r--src/widgets/components.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/widgets/components.rs b/src/widgets/components.rs
new file mode 100644
index 0000000..b6ff925
--- /dev/null
+++ b/src/widgets/components.rs
@@ -0,0 +1,14 @@
+use bevy::prelude::*;
+
+use super::TerminalWidget;
+
+/// Component representing a terminal widget.
+#[derive(Component)]
+pub struct Widget {
+ /// The widget instance itself, containing rendering and input logic
+ pub widget: Box<dyn TerminalWidget + Send + Sync>,
+ /// Depth to render widget at
+ pub depth: u32,
+ /// Whether this widget is currently enabled or should be hidden
+ pub enabled: bool,
+}