1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -04:00

Nicer looking colors and sliders

This commit is contained in:
Emil Ernerfeldt
2019-03-11 15:30:32 +01:00
parent cd58190d35
commit 7cbf8e45bc
4 changed files with 40 additions and 31 deletions

View File

@@ -85,6 +85,15 @@ pub const fn srgba(r: u8, g: u8, b: u8, a: u8) -> Color {
Color { r, g, b, a }
}
pub const fn gray(l: u8, a: u8) -> Color {
Color {
r: l,
g: l,
b: l,
a,
}
}
// ----------------------------------------------------------------------------
#[derive(Clone, Copy, Debug, Default, Serialize)]
@@ -160,7 +169,6 @@ pub enum PaintCmd {
outline: Option<Outline>,
radius: f32,
},
Mesh(Mesh),
Line {
points: Vec<Vec2>,
color: Color,
@@ -183,4 +191,6 @@ pub enum PaintCmd {
x_offsets: Vec<f32>,
// TODO: font info
},
/// Low-level triangle mesh
Mesh(Mesh),
}