aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/editor_node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor/editor_node.cpp')
-rw-r--r--tools/editor/editor_node.cpp32
1 files changed, 21 insertions, 11 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index b7da72632..5d55fed09 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -144,6 +144,7 @@ void EditorNode::_unhandled_input(const InputEvent& p_event) {
void EditorNode::_notification(int p_what) {
if (p_what==NOTIFICATION_EXIT_TREE) {
+
editor_data.save_editor_external_data();
log->deinit(); // do not get messages anymore
@@ -1393,7 +1394,7 @@ void EditorNode::_run(bool p_current,const String& p_custom) {
}
play_button->set_pressed(false);
- pause_button->set_pressed(false);
+ //pause_button->set_pressed(false);
play_scene_button->set_pressed(false);
String current_filename;
@@ -1559,7 +1560,9 @@ void EditorNode::_cleanup_scene() {
void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
- current_option=(MenuOptions)p_option;
+ //print_line("option "+itos(p_option)+" confirm "+itos(p_confirmed));
+ if (!p_confirmed) //this may be a hack..
+ current_option=(MenuOptions)p_option;
switch( p_option ) {
@@ -1930,7 +1933,9 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
case FILE_QUIT: {
+
if (!p_confirmed) {
+
confirmation->get_ok()->set_text("Quit");
//confirmation->get_cancel()->show();
confirmation->set_text("Exit the Editor?");
@@ -1938,6 +1943,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
break;
}
+
_menu_option_confirm(RUN_STOP,true);
get_tree()->quit();
@@ -2152,7 +2158,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
editor_run.stop();
play_button->set_pressed(false);
play_scene_button->set_pressed(false);
- pause_button->set_pressed(false);
+ //pause_button->set_pressed(false);
emit_signal("stop_pressed");
} break;
@@ -3023,7 +3029,7 @@ void EditorNode::notify_child_process_exited() {
play_button->set_pressed(false);
play_scene_button->set_pressed(false);
- pause_button->set_pressed(false);
+ //pause_button->set_pressed(false);
stop_button->set_pressed(false);
editor_run.stop();
@@ -3306,6 +3312,7 @@ EditorNode::EditorNode() {
FileDialog::unregister_func=_file_dialog_unregister;
editor_import_export = memnew( EditorImportExport );
+ add_child(editor_import_export);
register_exporters();
@@ -3491,8 +3498,9 @@ EditorNode::EditorNode() {
prev_scene->set_disabled(true);
//left_menu_hb->add_child( prev_scene );
prev_scene->connect("pressed",this,"_menu_option",make_binds(FILE_OPEN_PREV));
- //gui_base->add_child(prev_scene);
+ gui_base->add_child(prev_scene);
prev_scene->set_pos(Point2(3,24));
+ prev_scene->hide();
Separator *vs=NULL;
@@ -3617,14 +3625,14 @@ EditorNode::EditorNode() {
- pause_button = memnew( ToolButton );
+ /*pause_button = memnew( ToolButton );
//menu_panel->add_child(pause_button); - not needed for now?
pause_button->set_toggle_mode(true);
pause_button->set_icon(gui_base->get_icon("Pause","EditorIcons"));
pause_button->set_focus_mode(Control::FOCUS_NONE);
pause_button->connect("pressed", this,"_menu_option",make_binds(RUN_PAUSE));
pause_button->set_tooltip("Pause the scene (F7).");
-
+*/
stop_button = memnew( ToolButton );
play_hb->add_child(stop_button);
//stop_button->set_toggle_mode(true);
@@ -3641,7 +3649,7 @@ EditorNode::EditorNode() {
native_play_button->hide();
native_play_button->get_popup()->connect("item_pressed",this,"_run_in_device");
- VSeparator *s1 = memnew( VSeparator );
+// VSeparator *s1 = memnew( VSeparator );
// play_hb->add_child(s1);
play_scene_button = memnew( ToolButton );
@@ -3677,13 +3685,14 @@ EditorNode::EditorNode() {
p->set_item_tooltip(p->get_item_index(RUN_DEPLOY_DUMB_CLIENTS),"Deploy dumb clients when the File Server is active.");
p->connect("item_pressed",this,"_menu_option");
+ /*
run_settings_button = memnew( ToolButton );
//menu_hb->add_child(run_settings_button);
//run_settings_button->set_toggle_mode(true);
run_settings_button->set_focus_mode(Control::FOCUS_NONE);
run_settings_button->set_icon(gui_base->get_icon("Run","EditorIcons"));
run_settings_button->connect("pressed", this,"_menu_option",make_binds(RUN_SCENE_SETTINGS));
-
+*/
/*
run_settings_button = memnew( ToolButton );
@@ -4111,7 +4120,7 @@ EditorNode::EditorNode() {
add_editor_plugin( memnew( ParticlesEditorPlugin(this) ) );
add_editor_plugin( memnew( ResourcePreloaderEditorPlugin(this) ) );
add_editor_plugin( memnew( ItemListEditorPlugin(this) ) );
- add_editor_plugin( memnew( RichTextEditorPlugin(this) ) );
+ //add_editor_plugin( memnew( RichTextEditorPlugin(this) ) );
add_editor_plugin( memnew( CollisionPolygonEditorPlugin(this) ) );
add_editor_plugin( memnew( CollisionPolygon2DEditorPlugin(this) ) );
add_editor_plugin( memnew( TileSetEditorPlugin(this) ) );
@@ -4246,6 +4255,7 @@ EditorNode::EditorNode() {
EditorNode::~EditorNode() {
+
memdelete(editor_selection);
memdelete(file_server);
EditorSettings::destroy();