diff --git a/src/user/lib/libgui/libgui_elements.rs b/src/user/lib/libgui/libgui_elements.rs index e69de29..3bc453e 100644 --- a/src/user/lib/libgui/libgui_elements.rs +++ b/src/user/lib/libgui/libgui_elements.rs @@ -0,0 +1,37 @@ +use super::libgui_core; + +pub struct TextBox { + dimensions: (usize, usize), + position: (usize, usize), + content: String, + title: String, + outlined: bool, +} + +impl Element for TextBox { + fn render(&self) -> (Vec>, (usize, usize)) { + + let mut charmap = Vec::>::new(); + + if self.outlined { + charmap = libgui_core::gen_outline(self.dimensions); + } + + let inner_dims = (self.dimensions.0 -2, self.dimensions.1 -2); + + let mut titlechars = title.chars().collect::>(); + // render title + + for (i, char) in titlechars.enumerate() { + + } + + + let mut idx = 0 + + while idx < content.len() + + + return (charmap, self.position) + } +} \ No newline at end of file