From cf616e584586bb875bed5a817c531918233444c2 Mon Sep 17 00:00:00 2001 From: Maximillian Date: Tue, 6 Jan 2015 15:28:25 -0700 Subject: Prompt save dialog if running a unsaved scene. Solution for #966 --- tools/editor/editor_node.cpp | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'tools/editor/editor_node.cpp') diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 5843a7cb28..7f75627a90 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -975,9 +975,19 @@ void EditorNode::_dialog_action(String p_file) { if (file->get_mode()==FileDialog::MODE_SAVE_FILE) { _save_scene(p_file); + _run(false); } } break; + + case FILE_SAVE_AND_RUN: { + if (file->get_mode()==FileDialog::MODE_SAVE_FILE) { + + _save_scene(p_file); + _run(false); + } + } break; + case FILE_EXPORT_MESH_LIBRARY: { Ref ml; @@ -1391,13 +1401,10 @@ void EditorNode::_run(bool p_current,const String& p_custom) { } if (scene->get_filename()=="") { - - current_option=-1; //accept->get_cancel()->hide(); - accept->get_ok()->set_text("I see.."); - accept->set_text("Scene has never been saved. Save before running!"); - accept->popup_centered(Size2(300,70));; + /**/ + _menu_option_confirm(FILE_SAVE_BEFORE_RUN, false); return; } @@ -1664,6 +1671,18 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { } break; + case FILE_SAVE_BEFORE_RUN: { + if (!p_confirmed) { + accept->get_ok()->set_text("Yes"); + accept->set_text("This scene has never been saved. Save before running?"); + accept->popup_centered(Size2(300, 70)); + break; + } + + _menu_option(FILE_SAVE_AS_SCENE); + _menu_option_confirm(FILE_SAVE_AND_RUN, true); + } break; + case FILE_DUMP_STRINGS: { Node *scene = edited_scene; -- cgit v1.2.3 From 5d86f845d7a67ec9e2c71fe975e1abcbb1a97097 Mon Sep 17 00:00:00 2001 From: Maximillian Date: Tue, 6 Jan 2015 20:35:52 -0700 Subject: fix little mistake that made the project run each save --- tools/editor/editor_node.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'tools/editor/editor_node.cpp') diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 7f75627a90..52c75c6d7e 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -975,7 +975,6 @@ void EditorNode::_dialog_action(String p_file) { if (file->get_mode()==FileDialog::MODE_SAVE_FILE) { _save_scene(p_file); - _run(false); } } break; -- cgit v1.2.3 From f3dc51fc69ec3a16c6b2a6834ff0a6d933b1ddca Mon Sep 17 00:00:00 2001 From: reduz Date: Sun, 11 Jan 2015 20:52:42 -0300 Subject: 2D shader progress --- tools/editor/editor_node.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools/editor/editor_node.cpp') diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 52c75c6d7e..f859d19504 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -4036,7 +4036,8 @@ EditorNode::EditorNode() { add_editor_plugin( memnew( EditorHelpPlugin(this) ) ); add_editor_plugin( memnew( AnimationPlayerEditorPlugin(this) ) ); add_editor_plugin( memnew( ShaderGraphEditorPlugin(this) ) ); - add_editor_plugin( memnew( ShaderEditorPlugin(this) ) ); + add_editor_plugin( memnew( ShaderEditorPlugin(this,true) ) ); + add_editor_plugin( memnew( ShaderEditorPlugin(this,false) ) ); add_editor_plugin( memnew( CameraEditorPlugin(this) ) ); add_editor_plugin( memnew( SampleEditorPlugin(this) ) ); add_editor_plugin( memnew( SampleLibraryEditorPlugin(this) ) ); -- cgit v1.2.3 From 7b9f5e65c9ebb187cf4b7e3ca639ca256915d3d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ralf=20H=C3=B6lzemer?= Date: Tue, 16 Sep 2014 02:16:26 +0200 Subject: New neutral default theme - desaturated UI elements to grey - desaturated all near-white icons to grey - changed some hardcoded colors --- tools/editor/editor_node.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/editor/editor_node.cpp') diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index f859d19504..36b9dd3cdb 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -4088,9 +4088,9 @@ EditorNode::EditorNode() { Globals::get_singleton()->set("debug/indicators_enabled",true); Globals::get_singleton()->set("render/room_cull_enabled",false); - theme->set_color("prop_category","Editor",Color::hex(0x3f3945ff)); - theme->set_color("prop_section","Editor",Color::hex(0x38323dff)); - theme->set_color("prop_subsection","Editor",Color::hex(0x342e39ff)); + theme->set_color("prop_category","Editor",Color::hex(0x454545ff)); + theme->set_color("prop_section","Editor",Color::hex(0x3d3d3dff)); + theme->set_color("prop_subsection","Editor",Color::hex(0x393939ff)); theme->set_color("fg_selected","Editor",Color::html("ffbd8e8e")); theme->set_color("fg_error","Editor",Color::html("ffbd8e8e")); -- cgit v1.2.3 From ae7010888363d6fb9648ef069264328b78ae9047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ralf=20H=C3=B6lzemer?= Date: Thu, 18 Sep 2014 03:11:49 +0200 Subject: New iteration of the theme - try to implement ndee's mockup from the forum - new color palette - get rid of most gradients probably needs some more tweaks --- tools/editor/editor_node.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/editor/editor_node.cpp') diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 36b9dd3cdb..005bb0958f 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -4088,9 +4088,9 @@ EditorNode::EditorNode() { Globals::get_singleton()->set("debug/indicators_enabled",true); Globals::get_singleton()->set("render/room_cull_enabled",false); - theme->set_color("prop_category","Editor",Color::hex(0x454545ff)); - theme->set_color("prop_section","Editor",Color::hex(0x3d3d3dff)); - theme->set_color("prop_subsection","Editor",Color::hex(0x393939ff)); + theme->set_color("prop_category","Editor",Color::hex(0x403d41ff)); + theme->set_color("prop_section","Editor",Color::hex(0x383539ff)); + theme->set_color("prop_subsection","Editor",Color::hex(0x343135ff)); theme->set_color("fg_selected","Editor",Color::html("ffbd8e8e")); theme->set_color("fg_error","Editor",Color::html("ffbd8e8e")); -- cgit v1.2.3 From 11c1756257368f3cd41702016c3303c0d22e3b59 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 20 Jan 2015 20:25:19 -0300 Subject: Visual Shader Editing for 2D Editing 2D shaders with visual editor seems to work now. --- tools/editor/editor_node.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools/editor/editor_node.cpp') diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 005bb0958f..6ff16e661c 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -4035,7 +4035,8 @@ EditorNode::EditorNode() { add_editor_plugin( memnew( ScriptEditorPlugin(this) ) ); add_editor_plugin( memnew( EditorHelpPlugin(this) ) ); add_editor_plugin( memnew( AnimationPlayerEditorPlugin(this) ) ); - add_editor_plugin( memnew( ShaderGraphEditorPlugin(this) ) ); + add_editor_plugin( memnew( ShaderGraphEditorPlugin(this,true) ) ); + add_editor_plugin( memnew( ShaderGraphEditorPlugin(this,false) ) ); add_editor_plugin( memnew( ShaderEditorPlugin(this,true) ) ); add_editor_plugin( memnew( ShaderEditorPlugin(this,false) ) ); add_editor_plugin( memnew( CameraEditorPlugin(this) ) ); -- cgit v1.2.3