diff options
author | 2023-09-12 14:51:00 +0200 | |
---|---|---|
committer | 2023-09-12 14:51:00 +0200 | |
commit | 6448429103c9c82b90040ac5a5a097bdded23f82 (patch) | |
tree | 79582bde4a7d6df71df0abefe35146b06452409f /wgpu/src/layer.rs | |
parent | 346af3f8b0baa418fd37b878bc2930ff0bd57cc0 (diff) | |
download | iced-6448429103c9c82b90040ac5a5a097bdded23f82.tar.gz iced-6448429103c9c82b90040ac5a5a097bdded23f82.tar.bz2 iced-6448429103c9c82b90040ac5a5a097bdded23f82.zip |
Draft `Editor` API and `TextEditor` widget
Diffstat (limited to 'wgpu/src/layer.rs')
-rw-r--r-- | wgpu/src/layer.rs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/wgpu/src/layer.rs b/wgpu/src/layer.rs index 7a5a0f7c..10b3332d 100644 --- a/wgpu/src/layer.rs +++ b/wgpu/src/layer.rs @@ -120,12 +120,25 @@ impl<'a> Layer<'a> { } => { let layer = &mut layers[current_layer]; - layer.text.push(Text::Managed { + layer.text.push(Text::Paragraph { paragraph: paragraph.clone(), position: *position + translation, color: *color, }); } + Primitive::Editor { + editor, + position, + color, + } => { + let layer = &mut layers[current_layer]; + + layer.text.push(Text::Editor { + editor: editor.clone(), + position: *position + translation, + color: *color, + }); + } Primitive::Text { content, bounds, |