1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 06:40:06 -04:00

Added App::clear_color() that apps can use to specify background color

This commit is contained in:
Emil Ernerfeldt
2020-12-18 22:34:48 +01:00
parent 9ea8d907fd
commit c3c4f28a9d
6 changed files with 33 additions and 11 deletions

View File

@@ -14,6 +14,11 @@ use crate::Context;
pub trait App {
/// The name of your App.
fn name(&self) -> &str;
/// Background color for the app.
/// e.g. what is sent to `gl.clearColor`
fn clear_color(&self) -> crate::Rgba {
crate::Srgba::from_rgb(16, 16, 16).into()
}
/// Called once before the first frame.