summaryrefslogtreecommitdiffstats
path: root/wgpu/src/quad.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-10-08 03:13:41 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-10-08 03:13:41 +0200
commit10e10e5e06841574425d2633f1c2916733f7b4ff (patch)
tree0407a0136973a201fe44bfc1a94268544a2f8eb5 /wgpu/src/quad.rs
parenta0234d5bcea5b25f575af01d3a8e0296b2d0395c (diff)
downloadiced-10e10e5e06841574425d2633f1c2916733f7b4ff.tar.gz
iced-10e10e5e06841574425d2633f1c2916733f7b4ff.tar.bz2
iced-10e10e5e06841574425d2633f1c2916733f7b4ff.zip
Make `iced_core::Button` customizable
Now it supports: - Any kind of content - Custom border radius - Custom background
Diffstat (limited to 'wgpu/src/quad.rs')
-rw-r--r--wgpu/src/quad.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/wgpu/src/quad.rs b/wgpu/src/quad.rs
index d0126bbd..adb294f0 100644
--- a/wgpu/src/quad.rs
+++ b/wgpu/src/quad.rs
@@ -123,6 +123,11 @@ impl Pipeline {
format: wgpu::VertexFormat::Float4,
offset: 4 * (2 + 2),
},
+ wgpu::VertexAttributeDescriptor {
+ shader_location: 4,
+ format: wgpu::VertexFormat::Uint,
+ offset: 4 * (2 + 2 + 4),
+ },
],
},
],
@@ -262,6 +267,7 @@ pub struct Quad {
pub position: [f32; 2],
pub scale: [f32; 2],
pub color: [f32; 4],
+ pub border_radius: u32,
}
impl Quad {