mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 04:36:45 +01:00
separate Input and Output impls
This commit is contained in:
parent
a6efde40f8
commit
0e821e098f
77 changed files with 465 additions and 454 deletions
|
|
@ -19,7 +19,7 @@ impl<T> Align<T> {
|
|||
pub fn se (a: T) -> Self { Self(Alignment::SE, a) }
|
||||
}
|
||||
|
||||
impl<E: Engine, T: Content<E>> Content<E> for Align<T> {
|
||||
impl<E: Output, T: Content<E>> Content<E> for Align<T> {
|
||||
fn content (&self) -> impl Render<E> {
|
||||
&self.1
|
||||
}
|
||||
|
|
@ -46,7 +46,7 @@ impl<E: Engine, T: Content<E>> Content<E> for Align<T> {
|
|||
};
|
||||
[x, y, centered.w(), centered.h()].into()
|
||||
}
|
||||
fn render (&self, render: &mut E::Output) {
|
||||
fn render (&self, render: &mut E) {
|
||||
let content = &self.content();
|
||||
let it = Render::layout(content, render.area()).xywh();
|
||||
render.place(it.into(), content)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue