From ece2a2b9d35731399974c9028087bfc24ce6fd1b Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Wed, 30 Jun 2021 10:30:37 +0200 Subject: [PATCH] better error message when trying to open file with editor --- editor/src/editor/main.rs | 2 ++ editor/src/editor/resources/strings.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/editor/src/editor/main.rs b/editor/src/editor/main.rs index 94cdf006e1..ad8294a9a6 100644 --- a/editor/src/editor/main.rs +++ b/editor/src/editor/main.rs @@ -330,6 +330,8 @@ fn run_event_loop(file_path_opt: Option<&Path>) -> Result<(), Box> { ) } } else { + begin_render_pass(&mut encoder, &frame.view, &ed_theme); + queue_no_file_text( &size, NOTHING_OPENED, diff --git a/editor/src/editor/resources/strings.rs b/editor/src/editor/resources/strings.rs index 366e34f813..214dc55682 100644 --- a/editor/src/editor/resources/strings.rs +++ b/editor/src/editor/resources/strings.rs @@ -1,3 +1,3 @@ -pub const NOTHING_OPENED: &str = "Execute `cargo run edit ` to open a file."; +pub const NOTHING_OPENED: &str = "Opening files is not yet supported. Execute `cargo run edit` from the root folder of the repo to try the editor."; pub const START_TIP: &str = "Start by typing '[', '{', '\"' or a number.\nInput chars that would create parse errors will be ignored.";