mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 06:10:06 -04:00
trait App now has fn name() for specifying egui_glium window title
This commit is contained in:
@@ -12,6 +12,10 @@ use crate::Context;
|
||||
/// Implement this trait to write apps that can be compiled both natively using the [`egui_glium`](https://crates.io/crates/egui_glium) crate,
|
||||
/// and deployed as a web site using the [`egui_web`](https://crates.io/crates/egui_web) crate.
|
||||
pub trait App {
|
||||
/// The name of your App.
|
||||
fn name(&self) -> &str;
|
||||
}
|
||||
|
||||
/// Called once before the first frame.
|
||||
/// Allows you to do setup code and to call `ctx.set_fonts()`.
|
||||
/// Optional.
|
||||
|
||||
@@ -278,6 +278,10 @@ impl DemoApp {
|
||||
}
|
||||
|
||||
impl app::App for DemoApp {
|
||||
fn name(&self) -> &str {
|
||||
"Egui Demo"
|
||||
}
|
||||
|
||||
fn ui(
|
||||
&mut self,
|
||||
ctx: &Arc<Context>,
|
||||
|
||||
Reference in New Issue
Block a user