nightshade-editor 0.13.4

An interactive editor for the Nightshade game engine
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pub fn format_window_title(
    app_name: &str,
    path: Option<&std::path::Path>,
    modified: bool,
) -> String {
    match path {
        Some(path) => {
            if modified {
                format!("{} - {} (*)", app_name, path.display())
            } else {
                format!("{} - {}", app_name, path.display())
            }
        }
        None => app_name.to_string(),
    }
}