render: bound async title textures to their rect
This commit is contained in:
parent
5932ec14a7
commit
f80ac20220
3 changed files with 16 additions and 18 deletions
|
|
@ -92,8 +92,7 @@ pub enum ContainerFocus {
|
|||
tree_id!(ContainerNodeId);
|
||||
|
||||
pub struct ContainerTitle {
|
||||
pub x: i32,
|
||||
pub y: i32,
|
||||
pub rect: Rect,
|
||||
pub tex: Rc<dyn GfxTexture>,
|
||||
}
|
||||
|
||||
|
|
@ -765,11 +764,7 @@ impl ContainerNode {
|
|||
}
|
||||
if let Some(tex) = tex.texture() {
|
||||
let titles = rd.titles.get_or_default_mut(*scale);
|
||||
titles.push(ContainerTitle {
|
||||
x: rect.x1(),
|
||||
y: rect.y1(),
|
||||
tex,
|
||||
})
|
||||
titles.push(ContainerTitle { rect, tex })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -840,11 +835,7 @@ impl ContainerNode {
|
|||
for (scale, tex) in tt {
|
||||
if let Some(tex) = tex.texture() {
|
||||
let titles = rd.titles.get_or_default_mut(*scale);
|
||||
titles.push(ContainerTitle {
|
||||
x: rect.x1(),
|
||||
y: rect.y1(),
|
||||
tex,
|
||||
})
|
||||
titles.push(ContainerTitle { rect, tex })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue