mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-07-17 15:56:57 +02:00
screen: return damaged area
This commit is contained in:
parent
4e6c62a7f1
commit
347151f7fc
3 changed files with 35 additions and 28 deletions
|
|
@ -194,11 +194,12 @@ impl Screen for Tui {
|
|||
/// Render drawable in subarea specified by `area`
|
||||
fn show <'t, T: Draw<Self>> (
|
||||
&mut self, area: XYWH<u16>, content: T
|
||||
) {
|
||||
) -> Usually<XYWH<u16>> {
|
||||
let previous_area = self.1;
|
||||
self.1 = area;
|
||||
let _result_area = content.draw(self);
|
||||
let result_area = content.draw(self);
|
||||
self.1 = previous_area;
|
||||
result_area
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue