1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use {
    crate::{
        makepad_platform::*,
        shader::draw_quad::DrawQuad
    },
};

live_design!{
    DrawColor= {{DrawColor}} {
        fn pixel(self) -> vec4 {
            return vec4(self.color.rgb*self.color.a, self.color.a);
        }
    }
}

#[derive(Live, LiveHook)]
#[repr(C)]
pub struct DrawColor {
    #[deref] pub draw_super: DrawQuad,
    #[live] pub color: Vec4
}