use std::rc::Rc;
use std::cell::RefCell;
pub struct Text {
pub data: &'static str,
pub position: [i32; 2],
pub color: [f32; 4],
}
pub type TextHandle = Rc<RefCell<Text>>;
impl Text {
pub fn new(data: &'static str, position: [i32; 2], color: [f32; 4]) -> TextHandle {
Rc::new(RefCell::new(Text {
data,
position,
color,
}))
}
}