max size + better scrolling size fn
This commit is contained in:
@@ -184,12 +184,12 @@ impl<'a> PainterCtx<'a> {
|
||||
// but this has a very weird issue where you can't move widgets unless u remove first
|
||||
// so swapping is impossible rn I think?
|
||||
// there's definitely better solutions like a counter (>1 = panic) but don't care rn
|
||||
if self.draw_started.contains(&id) {
|
||||
panic!(
|
||||
"Cannot draw the same widget ({}) twice (1)",
|
||||
self.widgets.data(&id).unwrap().label
|
||||
);
|
||||
}
|
||||
// if self.draw_started.contains(&id) {
|
||||
// panic!(
|
||||
// "Cannot draw the same widget ({}) twice (1)",
|
||||
// self.widgets.data(&id).unwrap().label
|
||||
// );
|
||||
// }
|
||||
let mut old_children = old_children.unwrap_or_default();
|
||||
let mut resize = ResizeRef::default();
|
||||
if let Some(active) = self.active.get_mut(&id)
|
||||
@@ -580,6 +580,10 @@ impl SizeCtx<'_> {
|
||||
self.outer.to_abs(self.output_size)
|
||||
}
|
||||
|
||||
pub fn output_size(&mut self) -> Vec2 {
|
||||
self.output_size
|
||||
}
|
||||
|
||||
pub fn draw_text(&mut self, buffer: &mut TextBuffer, attrs: &TextAttrs) -> TextTexture {
|
||||
self.text.draw(buffer, attrs, self.textures)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user