use crate::element::{ElementProps, ElementWidget};
use crate::widgets::Widget;
use bevy::asset::AssetServer;
use bevy::prelude::{Component, Entity, EntityCommands};
use roxmltree::Node;
#[derive(Clone, Debug, Component)]
pub struct NodeWidget;
impl Widget for NodeWidget {
fn spawn(&self, commands: &mut EntityCommands, _: &AssetServer) -> Entity {
commands.id()
}
fn parse(_: &Node, _: Option<&str>, _: Option<&ElementWidget>) -> Result<Self, String>
where
Self: Sized,
{
Ok(Self)
}
fn apply_defaults(_: &Node, _: &mut ElementProps, _: &mut ElementProps, _: &mut ElementProps) {}
}