made painter actually how I wanted it (draw now takes in an owned painter)
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
use crate::{Widget, WidgetId};
|
||||
use crate::{Painter, Widget, WidgetId};
|
||||
|
||||
pub struct Stack {
|
||||
pub children: Vec<WidgetId>,
|
||||
}
|
||||
|
||||
impl<Ctx> Widget<Ctx> for Stack {
|
||||
fn draw(&self, painter: &mut crate::Painter<Ctx>) {
|
||||
fn draw(&self, mut painter: Painter<Ctx>) {
|
||||
for child in &self.children {
|
||||
painter.draw(child);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user