Use only file names in example window titles

This commit is contained in:
Joonas Javanainen 2019-06-29 12:49:23 +03:00
parent cebe02cb11
commit 09f4ad6cf0
No known key found for this signature in database
GPG Key ID: D39CCA5CB19B9179

View File

@ -15,6 +15,10 @@ pub struct System {
}
pub fn init(title: &str) -> System {
let title = match title.rfind('/') {
Some(idx) => title.split_at(idx + 1).1,
None => title,
};
let events_loop = glutin::EventsLoop::new();
let context = glutin::ContextBuilder::new().with_vsync(true);
let builder = glutin::WindowBuilder::new()