mirror of
https://github.com/griffi-gh/hUI.git
synced 2024-12-22 12:28:19 -06:00
uhh i'm not happy with this
This commit is contained in:
parent
915b99c3a5
commit
bbc1d9f1ff
|
@ -7,6 +7,8 @@ use layer::{FrameLayer, RectLayer};
|
|||
|
||||
///XXX: this is not used yet, and also kinda a mess, simplify?
|
||||
///Maybe limit to a single layer? (aka `Frame` will be just one of the options)
|
||||
///Because currently, this is just a duplicate of the dormal draw command system, but with a different name...
|
||||
///Then, there's no need for the positioning stuff too, which is a bit overkill and is kinda code duplication too!
|
||||
///aka Frame::Rectangle, Frame::NinePatch, ...
|
||||
|
||||
/// A frame, which can contain multiple layers
|
||||
|
@ -27,8 +29,14 @@ impl<T: Into<FillColor>> From<T> for Frame {
|
|||
}
|
||||
|
||||
impl Frame {
|
||||
#[inline]
|
||||
pub fn add(&mut self, layer: impl Into<FrameLayer>) -> &mut Self {
|
||||
self.layers.push(layer.into());
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn finish(&mut self) -> Self {
|
||||
self.clone()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue