aboutsummaryrefslogtreecommitdiff
path: root/src/widgets/components.rs
blob: b6ff925b0eaad7df56663a899a9093e08fcfea74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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,
}