mirror of
https://github.com/griffi-gh/hUI.git
synced 2024-11-28 18:08:42 -06:00
uhh i'm not happy with this
This commit is contained in:
parent
1cd2f0ec1a
commit
15d92a2c74
|
@ -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