rename a bit
This commit is contained in:
@@ -4,7 +4,7 @@ use std::{any::Any, marker::PhantomData};
|
||||
|
||||
pub trait Widget: Any {
|
||||
fn draw(&mut self, painter: &mut Painter);
|
||||
fn size(&mut self, ctx: &mut SizeCtx) -> Vec2 {
|
||||
fn get_size(&mut self, ctx: &mut SizeCtx) -> Vec2 {
|
||||
ctx.size
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ pub struct SizeCtx<'a> {
|
||||
|
||||
impl SizeCtx<'_> {
|
||||
pub fn size<W>(&mut self, id: &WidgetId<W>) -> Vec2 {
|
||||
self.widgets.get_dyn_dynamic(&id.id).size(self)
|
||||
self.widgets.get_dyn_dynamic(&id.id).get_size(self)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user