summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/io/http_client.h2
-rw-r--r--doc/base/classes.xml21
-rw-r--r--platform/osx/os_osx.mm50
-rw-r--r--scene/gui/base_button.cpp17
-rw-r--r--scene/gui/base_button.h4
-rw-r--r--scene/gui/control.cpp1
-rw-r--r--scene/gui/line_edit.cpp2
-rw-r--r--scene/gui/link_button.cpp2
-rw-r--r--scene/gui/menu_button.cpp2
-rw-r--r--scene/gui/slider.cpp1
-rw-r--r--tools/editor/connections_dialog.cpp88
-rw-r--r--tools/editor/connections_dialog.h11
-rw-r--r--tools/editor/create_dialog.cpp13
-rw-r--r--tools/editor/editor_node.cpp31
-rw-r--r--tools/editor/editor_node.h1
-rw-r--r--tools/editor/editor_settings.cpp1
-rw-r--r--tools/editor/icons/icon_down.pngbin317 -> 186 bytes
-rw-r--r--tools/editor/icons/icon_up.pngbin327 -> 185 bytes
-rw-r--r--tools/editor/plugins/sample_library_editor_plugin.cpp2
-rw-r--r--tools/editor/scene_tree_dock.cpp40
-rw-r--r--tools/editor/scene_tree_dock.h2
21 files changed, 197 insertions, 94 deletions
diff --git a/core/io/http_client.h b/core/io/http_client.h
index a9cfb1ed73..ceb0273a7d 100644
--- a/core/io/http_client.h
+++ b/core/io/http_client.h
@@ -40,7 +40,7 @@ class HTTPClient : public Reference {
OBJ_TYPE(HTTPClient,Reference);
public:
- enum RespondeCode {
+ enum ResponseCode {
// 1xx informational
RESPONSE_CONTINUE = 100,
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index a380c19115..e5804cb9ea 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -5738,6 +5738,20 @@
Return the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the DRAW_* enum.
</description>
</method>
+ <method name="set_enabled_focus_mode">
+ <argument index="0" name="mode" type="int">
+ </argument>
+ <description>
+ Sets the focus access mode to use when switching between enabled/disabled (see [method Control.set_focus_mode] and [method set_disabled]).
+ </description>
+ </method>
+ <method name="get_enabled_focus_mode" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns focus access mode used when switching between enabled/disabled (see [method Control.set_focus_mode] and [method set_disabled]).
+ </description>
+ </method>
</methods>
<signals>
<signal name="released">
@@ -9171,6 +9185,13 @@
Set the focus access mode for the control (FOCUS_NONE, FOCUS_CLICK, FOCUS_ALL). Only one Control can be focused at the same time, and it will receive keyboard signals.
</description>
</method>
+ <method name="get_focus_mode" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the focus access mode for the control (FOCUS_NONE, FOCUS_CLICK, FOCUS_ALL) (see [method set_focus_mode]).
+ </description>
+ </method>
<method name="has_focus" qualifiers="const">
<return type="bool">
</return>
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index 065fe52b09..1d97ffacb6 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -772,20 +772,48 @@ static int translateKey(unsigned int key)
- (void)flagsChanged:(NSEvent *)event
{
- /* int action;
- unsigned int newModifierFlags =
- [event modifierFlags] & NSDeviceIndependentModifierFlagsMask;
+ InputEvent ev;
+ int key = [event keyCode];
+ int mod = [event modifierFlags];
- if (newModifierFlags > window->ns.modifierFlags)
- action = GLFW_PRESS;
- else
- action = GLFW_RELEASE;
+ ev.type=InputEvent::KEY;
- window->ns.modifierFlags = newModifierFlags;
+ if (key == 0x36 || key == 0x37) {
+ if (mod & NSCommandKeyMask) {
+ mod&= ~NSCommandKeyMask;
+ ev.key.pressed = true;
+ } else {
+ ev.key.pressed = false;
+ }
+ } else if (key == 0x38 || key == 0x3c) {
+ if (mod & NSShiftKeyMask) {
+ mod&= ~NSShiftKeyMask;
+ ev.key.pressed = true;
+ } else {
+ ev.key.pressed = false;
+ }
+ } else if (key == 0x3a || key == 0x3d) {
+ if (mod & NSAlternateKeyMask) {
+ mod&= ~NSAlternateKeyMask;
+ ev.key.pressed = true;
+ } else {
+ ev.key.pressed = false;
+ }
+ } else if (key == 0x3b || key == 0x3e) {
+ if (mod & NSControlKeyMask) {
+ mod&= ~NSControlKeyMask;
+ ev.key.pressed = true;
+ } else {
+ ev.key.pressed = false;
+ }
+ } else {
+ return;
+ }
- const int key = translateKey([event keyCode]);
- const int mods = translateFlags([event modifierFlags]);
- _glfwInputKey(window, key, [event keyCode], action, mods);*/
+ ev.key.mod=translateFlags(mod);
+ ev.key.scancode = latin_keyboard_keycode_convert(translateKey(key));
+
+ OS_OSX::singleton->push_input(ev);
}
- (void)keyUp:(NSEvent *)event
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp
index 3bcc60b86a..21820d7f10 100644
--- a/scene/gui/base_button.cpp
+++ b/scene/gui/base_button.cpp
@@ -289,7 +289,7 @@ void BaseButton::set_disabled(bool p_disabled) {
if (p_disabled)
set_focus_mode(FOCUS_NONE);
else
- set_focus_mode(FOCUS_ALL);
+ set_focus_mode(enabled_focus_mode);
}
bool BaseButton::is_disabled() const {
@@ -377,7 +377,18 @@ bool BaseButton::get_click_on_press() const {
return status.click_on_press;
}
+void BaseButton::set_enabled_focus_mode(FocusMode p_mode) {
+ enabled_focus_mode = p_mode;
+ if (!status.disabled) {
+ set_focus_mode( p_mode );
+ }
+}
+
+Control::FocusMode BaseButton::get_enabled_focus_mode() const {
+
+ return enabled_focus_mode;
+}
void BaseButton::_bind_methods() {
@@ -393,6 +404,8 @@ void BaseButton::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_click_on_press","enable"),&BaseButton::set_click_on_press);
ObjectTypeDB::bind_method(_MD("get_click_on_press"),&BaseButton::get_click_on_press);
ObjectTypeDB::bind_method(_MD("get_draw_mode"),&BaseButton::get_draw_mode);
+ ObjectTypeDB::bind_method(_MD("set_enabled_focus_mode","mode"),&BaseButton::set_enabled_focus_mode);
+ ObjectTypeDB::bind_method(_MD("get_enabled_focus_mode"),&BaseButton::get_enabled_focus_mode);
BIND_VMETHOD(MethodInfo("_pressed"));
BIND_VMETHOD(MethodInfo("_toggled",PropertyInfo(Variant::BOOL,"pressed")));
@@ -404,6 +417,7 @@ void BaseButton::_bind_methods() {
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "toggle_mode"), _SCS("set_toggle_mode"), _SCS("is_toggle_mode"));
ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "is_pressed"), _SCS("set_pressed"), _SCS("is_pressed"));
ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "click_on_press"), _SCS("set_click_on_press"), _SCS("get_click_on_press"));
+ ADD_PROPERTY( PropertyInfo( Variant::INT,"enabled_focus_mode", PROPERTY_HINT_ENUM, "None,Click,All" ), _SCS("set_enabled_focus_mode"), _SCS("get_enabled_focus_mode") );
BIND_CONSTANT( DRAW_NORMAL );
@@ -424,6 +438,7 @@ BaseButton::BaseButton() {
status.click_on_press=false;
status.pressing_button=0;
set_focus_mode( FOCUS_ALL );
+ enabled_focus_mode = FOCUS_ALL;
group=NULL;
diff --git a/scene/gui/base_button.h b/scene/gui/base_button.h
index 9a5213d971..0247fb2f21 100644
--- a/scene/gui/base_button.h
+++ b/scene/gui/base_button.h
@@ -42,6 +42,7 @@ class BaseButton : public Control {
OBJ_TYPE( BaseButton, Control );
bool toggle_mode;
+ FocusMode enabled_focus_mode;
struct Status {
@@ -97,6 +98,9 @@ public:
void set_click_on_press(bool p_click_on_press);
bool get_click_on_press() const;
+ void set_enabled_focus_mode(FocusMode p_mode);
+ FocusMode get_enabled_focus_mode() const;
+
BaseButton();
~BaseButton();
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index 0522b2efed..c99d3aa0f5 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -2266,6 +2266,7 @@ void Control::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_area_as_parent_rect","margin"),&Control::set_area_as_parent_rect,DEFVAL(0));
ObjectTypeDB::bind_method(_MD("show_modal","exclusive"),&Control::show_modal,DEFVAL(false));
ObjectTypeDB::bind_method(_MD("set_focus_mode","mode"),&Control::set_focus_mode);
+ ObjectTypeDB::bind_method(_MD("get_focus_mode"),&Control::get_focus_mode);
ObjectTypeDB::bind_method(_MD("has_focus"),&Control::has_focus);
ObjectTypeDB::bind_method(_MD("grab_focus"),&Control::grab_focus);
ObjectTypeDB::bind_method(_MD("release_focus"),&Control::release_focus);
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index 14dac454bd..ca2d09dd27 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -1027,7 +1027,7 @@ void LineEdit::_bind_methods() {
ADD_PROPERTYNZ( PropertyInfo( Variant::INT, "max_length" ), _SCS("set_max_length"),_SCS("get_max_length") );
ADD_PROPERTYNO( PropertyInfo( Variant::BOOL, "editable" ), _SCS("set_editable"),_SCS("is_editable") );
ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "secret" ), _SCS("set_secret"),_SCS("is_secret") );
-
+ ADD_PROPERTY( PropertyInfo( Variant::INT,"focus_mode", PROPERTY_HINT_ENUM, "None,Click,All" ), _SCS("set_focus_mode"), _SCS("get_focus_mode") );
}
diff --git a/scene/gui/link_button.cpp b/scene/gui/link_button.cpp
index 007d0a709e..065423ae2d 100644
--- a/scene/gui/link_button.cpp
+++ b/scene/gui/link_button.cpp
@@ -119,6 +119,6 @@ void LinkButton::_bind_methods() {
LinkButton::LinkButton() {
underline_mode=UNDERLINE_MODE_ALWAYS;
- set_focus_mode(FOCUS_NONE);
+ set_enabled_focus_mode(FOCUS_NONE);
set_default_cursor_shape(CURSOR_POINTING_HAND);
}
diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp
index 0f415f013d..0e39ee8a76 100644
--- a/scene/gui/menu_button.cpp
+++ b/scene/gui/menu_button.cpp
@@ -123,7 +123,7 @@ MenuButton::MenuButton() {
set_flat(true);
- set_focus_mode(FOCUS_NONE);
+ set_enabled_focus_mode(FOCUS_NONE);
popup = memnew( PopupMenu );
popup->hide();
add_child(popup);
diff --git a/scene/gui/slider.cpp b/scene/gui/slider.cpp
index f66f909517..d5d14ad649 100644
--- a/scene/gui/slider.cpp
+++ b/scene/gui/slider.cpp
@@ -237,6 +237,7 @@ void Slider::_bind_methods() {
ADD_PROPERTY( PropertyInfo( Variant::INT, "tick_count", PROPERTY_HINT_RANGE,"0,4096,1"), _SCS("set_ticks"), _SCS("get_ticks") );
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "ticks_on_borders" ), _SCS("set_ticks_on_borders"), _SCS("get_ticks_on_borders") );
+ ADD_PROPERTY( PropertyInfo( Variant::INT,"focus_mode", PROPERTY_HINT_ENUM, "None,Click,All" ), _SCS("set_focus_mode"), _SCS("get_focus_mode") );
}
diff --git a/tools/editor/connections_dialog.cpp b/tools/editor/connections_dialog.cpp
index b99cd12f65..40828c4664 100644
--- a/tools/editor/connections_dialog.cpp
+++ b/tools/editor/connections_dialog.cpp
@@ -94,8 +94,8 @@ void ConnectDialog::_notification(int p_what) {
if (p_what==NOTIFICATION_DRAW) {
- RID ci = get_canvas_item();
- get_stylebox("panel","PopupMenu")->draw(ci,Rect2(Point2(),get_size()));
+ //RID ci = get_canvas_item();
+ //get_stylebox("panel","PopupMenu")->draw(ci,Rect2(Point2(),get_size()));
}
if (p_what==NOTIFICATION_ENTER_TREE) {
@@ -480,21 +480,21 @@ ConnectDialog::~ConnectDialog()
-void ConnectionsDialog::_notification(int p_what) {
+void ConnectionsDock::_notification(int p_what) {
if (p_what==NOTIFICATION_DRAW) {
- RID ci = get_canvas_item();
- get_stylebox("panel","PopupMenu")->draw(ci,Rect2(Point2(),get_size()));
+ //RID ci = get_canvas_item();
+ //get_stylebox("panel","PopupMenu")->draw(ci,Rect2(Point2(),get_size()));
}
}
-void ConnectionsDialog::_close() {
+void ConnectionsDock::_close() {
hide();
}
-void ConnectionsDialog::_connect() {
+void ConnectionsDock::_connect() {
TreeItem *it = tree->get_selected();
ERR_FAIL_COND(!it);
@@ -533,13 +533,13 @@ void ConnectionsDialog::_connect() {
-void ConnectionsDialog::ok_pressed() {
+void ConnectionsDock::_connect_pressed() {
TreeItem *item = tree->get_selected();
if (!item) {
//no idea how this happened, but disable
- get_ok()->set_disabled(true);
+ connect_button->set_disabled(true);
return;
}
if (item->get_parent()==tree->get_root() || item->get_parent()->get_parent()==tree->get_root()) {
@@ -584,7 +584,7 @@ void ConnectionsDialog::ok_pressed() {
}
}
/*
-void ConnectionsDialog::_remove() {
+void ConnectionsDock::_remove() {
if (!tree->get_selected())
return;
@@ -600,7 +600,7 @@ void ConnectionsDialog::_remove() {
}
*/
/*
-void ConnectionsDialog::_remove_confirm() {
+void ConnectionsDock::_remove_confirm() {
if (!tree->get_selected())
return;
@@ -620,17 +620,15 @@ void ConnectionsDialog::_remove_confirm() {
}
*/
-struct _ConnectionsDialogMethodInfoSort {
+struct _ConnectionsDockMethodInfoSort {
_FORCE_INLINE_ bool operator()(const MethodInfo& a, const MethodInfo& b) const {
return a.name < b.name;
}
};
-void ConnectionsDialog::update_tree() {
+void ConnectionsDock::update_tree() {
- if (!is_visible())
- return; //don't update if not visible, of course
tree->clear();
if (!node)
@@ -643,7 +641,7 @@ void ConnectionsDialog::update_tree() {
node->get_signal_list(&node_signals);
- //node_signals.sort_custom<_ConnectionsDialogMethodInfoSort>();
+ //node_signals.sort_custom<_ConnectionsDockMethodInfoSort>();
bool did_script=false;
StringName base = node->get_type();
@@ -773,68 +771,72 @@ void ConnectionsDialog::update_tree() {
}
}
- get_ok()->set_text(TTR("Connect"));
- get_ok()->set_disabled(true);
+ connect_button->set_text(TTR("Connect"));
+ connect_button->set_disabled(true);
}
-void ConnectionsDialog::set_node(Node* p_node) {
+void ConnectionsDock::set_node(Node* p_node) {
node=p_node;
update_tree();
}
-void ConnectionsDialog::_something_selected() {
+void ConnectionsDock::_something_selected() {
TreeItem *item = tree->get_selected();
if (!item) {
//no idea how this happened, but disable
- get_ok()->set_text(TTR("Connect.."));
- get_ok()->set_disabled(true);
+ connect_button->set_text(TTR("Connect.."));
+ connect_button->set_disabled(true);
} else if (item->get_parent()==tree->get_root() || item->get_parent()->get_parent()==tree->get_root()) {
//a signal - connect
- get_ok()->set_text(TTR("Connect.."));
- get_ok()->set_disabled(false);
+ connect_button->set_text(TTR("Connect.."));
+ connect_button->set_disabled(false);
} else {
//a slot- disconnect
- get_ok()->set_text(TTR("Disconnect"));
- get_ok()->set_disabled(false);
+ connect_button->set_text(TTR("Disconnect"));
+ connect_button->set_disabled(false);
}
}
-void ConnectionsDialog::_bind_methods() {
+void ConnectionsDock::_bind_methods() {
- ObjectTypeDB::bind_method("_connect",&ConnectionsDialog::_connect);
- ObjectTypeDB::bind_method("_something_selected",&ConnectionsDialog::_something_selected);
- ObjectTypeDB::bind_method("_close",&ConnectionsDialog::_close);
-// ObjectTypeDB::bind_method("_remove_confirm",&ConnectionsDialog::_remove_confirm);
- ObjectTypeDB::bind_method("update_tree",&ConnectionsDialog::update_tree);
+ ObjectTypeDB::bind_method("_connect",&ConnectionsDock::_connect);
+ ObjectTypeDB::bind_method("_something_selected",&ConnectionsDock::_something_selected);
+ ObjectTypeDB::bind_method("_close",&ConnectionsDock::_close);
+ ObjectTypeDB::bind_method("_connect_pressed",&ConnectionsDock::_connect_pressed);
+ ObjectTypeDB::bind_method("update_tree",&ConnectionsDock::update_tree);
}
-ConnectionsDialog::ConnectionsDialog(EditorNode *p_editor) {
+ConnectionsDock::ConnectionsDock(EditorNode *p_editor) {
editor=p_editor;
- set_title(TTR("Edit Connections.."));
- set_hide_on_ok(false);
-
- VBoxContainer *vbc = memnew( VBoxContainer );
- add_child(vbc);
- set_child_rect(vbc);
+ set_name(TTR("Signals"));
+ VBoxContainer *vbc = this;
tree = memnew( Tree );
tree->set_columns(1);
tree->set_select_mode(Tree::SELECT_ROW);
tree->set_hide_root(true);
- vbc->add_margin_child(TTR("Connections:"),tree,true);
-
+ vbc->add_child(tree);
+ tree->set_v_size_flags(SIZE_EXPAND_FILL);
+
+ connect_button = memnew( Button );
+ connect_button->set_text("Connect");
+ HBoxContainer *hb = memnew( HBoxContainer);
+ vbc->add_child(hb);
+ hb->add_spacer();
+ hb->add_child(connect_button);
+ connect_button->connect("pressed",this,"_connect_pressed");
// add_child(tree);
connect_dialog = memnew( ConnectDialog );
@@ -858,12 +860,12 @@ ConnectionsDialog::ConnectionsDialog(EditorNode *p_editor) {
remove_confirm->connect("confirmed", this,"_remove_confirm");
connect_dialog->connect("connected", this,"_connect");
tree->connect("item_selected", this,"_something_selected");
- get_cancel()->set_text(TTR("Close"));
+ add_constant_override("separation",3*EDSCALE);
}
-ConnectionsDialog::~ConnectionsDialog()
+ConnectionsDock::~ConnectionsDock()
{
}
diff --git a/tools/editor/connections_dialog.h b/tools/editor/connections_dialog.h
index 575bcf54d7..96ebaf85b0 100644
--- a/tools/editor/connections_dialog.h
+++ b/tools/editor/connections_dialog.h
@@ -95,10 +95,11 @@ public:
};
-class ConnectionsDialog : public ConfirmationDialog {
+class ConnectionsDock : public VBoxContainer {
- OBJ_TYPE( ConnectionsDialog , ConfirmationDialog );
+ OBJ_TYPE( ConnectionsDock , VBoxContainer );
+ Button *connect_button;
EditorNode *editor;
Node *node;
Tree *tree;
@@ -114,7 +115,7 @@ class ConnectionsDialog : public ConfirmationDialog {
protected:
- virtual void ok_pressed();
+ void _connect_pressed();
void _notification(int p_what);
static void _bind_methods();
public:
@@ -124,8 +125,8 @@ public:
void set_node(Node* p_node);
String get_selected_type();
- ConnectionsDialog(EditorNode *p_editor=NULL);
- ~ConnectionsDialog();
+ ConnectionsDock(EditorNode *p_editor=NULL);
+ ~ConnectionsDock();
};
diff --git a/tools/editor/create_dialog.cpp b/tools/editor/create_dialog.cpp
index cd34b5aeb9..b6137ddac0 100644
--- a/tools/editor/create_dialog.cpp
+++ b/tools/editor/create_dialog.cpp
@@ -36,6 +36,7 @@
#if 1
#include "os/keyboard.h"
+#include "editor_settings.h"
#include "editor_help.h"
@@ -108,6 +109,18 @@ void CreateDialog::add_type(const String& p_type,HashMap<String,TreeItem*>& p_ty
}
+ if (bool(EditorSettings::get_singleton()->get("scenetree_editor/start_create_dialog_fully_expanded"))) {
+ item->set_collapsed(false);
+ } else {
+ // don't collapse search results
+ bool collapse = (search_box->get_text() == "");
+ // don't collapse the root node
+ collapse &= (item != p_root);
+ // don't collapse abstract nodes on the first tree level
+ collapse &= ((parent != p_root) || (ObjectTypeDB::can_instance(p_type)));
+ item->set_collapsed(collapse);
+ }
+
const String& description = EditorHelp::get_doc_data()->class_list[p_type].brief_description;
item->set_tooltip(0,description);
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 4b88e75e54..eb5f77d262 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -1533,6 +1533,7 @@ void EditorNode::push_item(Object *p_object,const String& p_property) {
if (!p_object) {
property_editor->edit(NULL);
+ connections_dock->set_node(NULL);
scene_tree_dock->set_selected(NULL);
return;
}
@@ -1678,6 +1679,7 @@ void EditorNode::_edit_current() {
scene_tree_dock->set_selected(NULL);
property_editor->edit( NULL );
+ connections_dock->set_node(NULL);
object_menu->set_disabled(true);
_display_top_editors(false);
@@ -1697,6 +1699,7 @@ void EditorNode::_edit_current() {
ERR_FAIL_COND(!current_res);
scene_tree_dock->set_selected(NULL);
property_editor->edit( current_res );
+ connections_dock->set_node(NULL);
object_menu->set_disabled(false);
//resources_dock->add_resource(Ref<Resource>(current_res));
@@ -1713,6 +1716,7 @@ void EditorNode::_edit_current() {
property_editor->edit( current_node );
+ connections_dock->set_node( current_node );
scene_tree_dock->set_selected(current_node);
object_menu->get_popup()->clear();
@@ -1721,6 +1725,7 @@ void EditorNode::_edit_current() {
} else {
property_editor->edit( current_obj );
+ connections_dock->set_node(NULL);
//scene_tree_dock->set_selected(current_node);
//object_menu->get_popup()->clear();
@@ -5785,14 +5790,20 @@ EditorNode::EditorNode() {
debug_button->set_tooltip(TTR("Debug options"));
p=debug_button->get_popup();
- p->add_check_item(TTR("Remote Debug Deploys"),RUN_DEPLOY_REMOTE_DEBUG);
- p->add_check_item(TTR("Use PC Filesystem for Deploys"),RUN_FILE_SERVER);
+ p->add_check_item(TTR("Deploy with Remote Debug"),RUN_DEPLOY_REMOTE_DEBUG);
+ p->set_item_tooltip(p->get_item_count()-1,TTR("When exporting or deploying, the resulting executable will attempt to connect to the IP of this computer in order to be debugged."));
+ p->add_check_item(TTR("Small Deploy with Network FS"),RUN_FILE_SERVER);
+ p->set_item_tooltip(p->get_item_count()-1,TTR("When this option is enabled, export or deploy will produce a minimal executable.\nThe filesystem will be provided from the project by the editor over the network. On Android, deploy will use the USB cable for faster performance. This option speeds up testing for games with a large footprint."));
p->add_separator();
p->add_check_item(TTR("Visible Collision Shapes"),RUN_DEBUG_COLLISONS);
+ p->set_item_tooltip(p->get_item_count()-1,TTR("Collision shapes and raycast nodes (for 2D and 3D) will be visible on the running game if this option is turned on."));
p->add_check_item(TTR("Visible Navigation"),RUN_DEBUG_NAVIGATION);
+ p->set_item_tooltip(p->get_item_count()-1,TTR("Navigation meshes and polygons will be visible on the running game if this option is turned on."));
p->add_separator();
- p->add_check_item(TTR("Mirror Scene Editing"),RUN_LIVE_DEBUG);
- p->add_check_item(TTR("Mirror Script Changes"),RUN_RELOAD_SCRIPTS);
+ p->add_check_item(TTR("Sync Scene Changes"),RUN_LIVE_DEBUG);
+ p->set_item_tooltip(p->get_item_count()-1,TTR("When this option is turned on, any changes made to the scene in the editor will be replicated in the running game.\nThis works remotely, and is more efficient with networked filesystem."));
+ p->add_check_item(TTR("Sync Script Changes"),RUN_RELOAD_SCRIPTS);
+ p->set_item_tooltip(p->get_item_count()-1,TTR("When this option is turned on, any script that is saved will be reloaded on the running game.\nThis works remotely, and is more efficient with networked filesystem."));
p->connect("item_pressed",this,"_menu_option");
/*
@@ -5917,7 +5928,7 @@ EditorNode::EditorNode() {
scene_tree_dock = memnew( SceneTreeDock(this,scene_root,editor_selection,editor_data) );
scene_tree_dock->set_name(TTR("Scene"));
//top_pallete->add_child(scene_tree_dock);
- dock_slot[DOCK_SLOT_LEFT_UR]->add_child(scene_tree_dock);
+ dock_slot[DOCK_SLOT_RIGHT_UL]->add_child(scene_tree_dock);
#if 0
resources_dock = memnew( ResourcesDock(this) );
resources_dock->set_name("Resources");
@@ -5925,7 +5936,7 @@ EditorNode::EditorNode() {
dock_slot[DOCK_SLOT_RIGHT_BL]->add_child(resources_dock);
//top_pallete->set_v_size_flags(Control::SIZE_EXPAND_FILL);
#endif
- dock_slot[DOCK_SLOT_RIGHT_BL]->hide();
+ dock_slot[DOCK_SLOT_LEFT_BR]->hide();
/*Control *editor_spacer = memnew( Control );
editor_spacer->set_custom_minimum_size(Size2(260,200));
editor_spacer->set_v_size_flags(Control::SIZE_EXPAND_FILL);
@@ -5947,7 +5958,7 @@ EditorNode::EditorNode() {
VBoxContainer *prop_editor_base = memnew( VBoxContainer );
prop_editor_base->set_name(TTR("Inspector")); // Properties?
- dock_slot[DOCK_SLOT_RIGHT_UL]->add_child(prop_editor_base);
+ dock_slot[DOCK_SLOT_RIGHT_BL]->add_child(prop_editor_base);
HBoxContainer *prop_editor_hb = memnew( HBoxContainer );
@@ -6059,10 +6070,14 @@ EditorNode::EditorNode() {
property_editor->set_undo_redo(&editor_data.get_undo_redo());
+ connections_dock = memnew( ConnectionsDock(this) );
+ connections_dock->set_undoredo(&editor_data.get_undo_redo());
+ dock_slot[DOCK_SLOT_RIGHT_BL]->add_child(connections_dock);
+
scenes_dock = memnew( ScenesDock(this) );
scenes_dock->set_name(TTR("FileSystem"));
scenes_dock->set_use_thumbnails(int(EditorSettings::get_singleton()->get("file_dialog/display_mode"))==EditorFileDialog::DISPLAY_THUMBNAILS);
- dock_slot[DOCK_SLOT_LEFT_BR]->add_child(scenes_dock);
+ dock_slot[DOCK_SLOT_LEFT_UR]->add_child(scenes_dock);
//prop_pallete->add_child(scenes_dock);
scenes_dock->connect("open",this,"open_request");
scenes_dock->connect("instance",this,"_instance_request");
diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h
index aa76753e33..736c2ad57a 100644
--- a/tools/editor/editor_node.h
+++ b/tools/editor/editor_node.h
@@ -272,6 +272,7 @@ private:
SceneTreeDock *scene_tree_dock;
//ResourcesDock *resources_dock;
PropertyEditor *property_editor;
+ ConnectionsDock *connections_dock;
VBoxContainer *prop_editor_vb;
ScenesDock *scenes_dock;
EditorRunNative *run_native;
diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp
index 1080509b8f..93b3369aaf 100644
--- a/tools/editor/editor_settings.cpp
+++ b/tools/editor/editor_settings.cpp
@@ -493,6 +493,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
set("scenetree_editor/duplicate_node_name_num_separator",0);
hints["scenetree_editor/duplicate_node_name_num_separator"]=PropertyInfo(Variant::INT,"scenetree_editor/duplicate_node_name_num_separator",PROPERTY_HINT_ENUM, "None,Space,Underscore,Dash");
//set("scenetree_editor/display_old_action_buttons",false);
+ set("scenetree_editor/start_create_dialog_fully_expanded",false);
set("gridmap_editor/pick_distance", 5000.0);
diff --git a/tools/editor/icons/icon_down.png b/tools/editor/icons/icon_down.png
index 908e06836b..d2fcdb4c9f 100644
--- a/tools/editor/icons/icon_down.png
+++ b/tools/editor/icons/icon_down.png
Binary files differ
diff --git a/tools/editor/icons/icon_up.png b/tools/editor/icons/icon_up.png
index ec1e090f86..346c4cdba8 100644
--- a/tools/editor/icons/icon_up.png
+++ b/tools/editor/icons/icon_up.png
Binary files differ
diff --git a/tools/editor/plugins/sample_library_editor_plugin.cpp b/tools/editor/plugins/sample_library_editor_plugin.cpp
index c333d1d85f..2a6940332c 100644
--- a/tools/editor/plugins/sample_library_editor_plugin.cpp
+++ b/tools/editor/plugins/sample_library_editor_plugin.cpp
@@ -481,7 +481,7 @@ SampleLibraryEditor::SampleLibraryEditor() {
file->connect("files_selected", this,"_file_load_request");
tree->connect("item_edited", this,"_item_edited");
-
+ is_playing = false;
}
diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp
index 3e36a30361..6dba04dd4f 100644
--- a/tools/editor/scene_tree_dock.cpp
+++ b/tools/editor/scene_tree_dock.cpp
@@ -260,8 +260,8 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
//if (!_validate_no_foreign())
// break;
- connect_dialog->popup_centered_ratio();
- connect_dialog->set_node(current);
+ //connect_dialog->popup_centered_ratio();
+ //connect_dialog->set_node(current);
} break;
case TOOL_GROUP: {
@@ -1663,8 +1663,8 @@ void SceneTreeDock::_tree_rmb(const Vector2& p_menu_pos) {
if (!EditorNode::get_singleton()->get_edited_scene()) {
menu->clear();
- menu->add_item(TTR("New Scene Root"),TOOL_NEW,KEY_MASK_CMD|KEY_A);
- menu->add_item(TTR("Inherit Scene"),TOOL_INSTANCE);
+ menu->add_icon_item(get_icon("Add","EditorIcons"),TTR("New Scene Root"),TOOL_NEW,KEY_MASK_CMD|KEY_A);
+ menu->add_icon_item(get_icon("Instance","EditorIcons"),TTR("Inherit Scene"),TOOL_INSTANCE);
menu->set_size(Size2(1,1));
menu->set_pos(p_menu_pos);
@@ -1681,31 +1681,31 @@ void SceneTreeDock::_tree_rmb(const Vector2& p_menu_pos) {
if (selection.size()==1) {
- menu->add_item(TTR("Add Child Node"),TOOL_NEW,KEY_MASK_CMD|KEY_A);
- menu->add_item(TTR("Instance Child Scene"),TOOL_INSTANCE);
+ menu->add_icon_item(get_icon("Add","EditorIcons"),TTR("Add Child Node"),TOOL_NEW,KEY_MASK_CMD|KEY_A);
+ menu->add_icon_item(get_icon("Instance","EditorIcons"),TTR("Instance Child Scene"),TOOL_INSTANCE);
menu->add_separator();
- menu->add_item(TTR("Change Type"),TOOL_REPLACE);
+ menu->add_icon_item(get_icon("Reload","EditorIcons"),TTR("Change Type"),TOOL_REPLACE);
menu->add_separator();
- menu->add_item(TTR("Edit Groups"),TOOL_GROUP);
- menu->add_item(TTR("Edit Connections"),TOOL_CONNECT);
+ menu->add_icon_item(get_icon("Groups","EditorIcons"),TTR("Edit Groups"),TOOL_GROUP);
+ //menu->add_icon_item(get_icon("Connect","EditorIcons"),TTR("Edit Connections"),TOOL_CONNECT);
menu->add_separator();
- menu->add_item(TTR("Add Script"),TOOL_SCRIPT);
+ menu->add_icon_item(get_icon("Script","EditorIcons"),TTR("Add Script"),TOOL_SCRIPT);
menu->add_separator();
}
- menu->add_item(TTR("Move Up"),TOOL_MOVE_UP,KEY_MASK_CMD|KEY_UP);
- menu->add_item(TTR("Move Down"),TOOL_MOVE_DOWN,KEY_MASK_CMD|KEY_DOWN);
- menu->add_item(TTR("Duplicate"),TOOL_DUPLICATE,KEY_MASK_CMD|KEY_D);
- menu->add_item(TTR("Reparent"),TOOL_REPARENT);
+ menu->add_icon_item(get_icon("Up","EditorIcons"),TTR("Move Up"),TOOL_MOVE_UP,KEY_MASK_CMD|KEY_UP);
+ menu->add_icon_item(get_icon("Down","EditorIcons"),TTR("Move Down"),TOOL_MOVE_DOWN,KEY_MASK_CMD|KEY_DOWN);
+ menu->add_icon_item(get_icon("Duplicate","EditorIcons"),TTR("Duplicate"),TOOL_DUPLICATE,KEY_MASK_CMD|KEY_D);
+ menu->add_icon_item(get_icon("Reparent","EditorIcons"),TTR("Reparent"),TOOL_REPARENT);
if (selection.size()==1) {
menu->add_separator();
- menu->add_item(TTR("Merge From Scene"),TOOL_MERGE_FROM_SCENE);
- menu->add_item(TTR("Save Branch as Scene"),TOOL_NEW_SCENE_FROM);
+ menu->add_icon_item(get_icon("Blend","EditorIcons"),TTR("Merge From Scene"),TOOL_MERGE_FROM_SCENE);
+ menu->add_icon_item(get_icon("Save","EditorIcons"),TTR("Save Branch as Scene"),TOOL_NEW_SCENE_FROM);
}
menu->add_separator();
- menu->add_item(TTR("Delete Node(s)"),TOOL_ERASE,KEY_DELETE);
+ menu->add_icon_item(get_icon("Remove","EditorIcons"),TTR("Delete Node(s)"),TOOL_ERASE,KEY_DELETE);
menu->set_size(Size2(1,1));
menu->set_pos(p_menu_pos);
@@ -1824,9 +1824,9 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor,Node *p_scene_root,EditorSelec
add_child(groups_editor);
groups_editor->set_undo_redo(&editor_data->get_undo_redo());
- connect_dialog = memnew( ConnectionsDialog(p_editor) );
- add_child(connect_dialog);
- connect_dialog->set_undoredo(&editor_data->get_undo_redo());
+ //connect_dialog = memnew( ConnectionsDialog(p_editor) );
+ //add_child(connect_dialog);
+ //connect_dialog->set_undoredo(&editor_data->get_undo_redo());
script_create_dialog = memnew( ScriptCreateDialog );
add_child(script_create_dialog);
diff --git a/tools/editor/scene_tree_dock.h b/tools/editor/scene_tree_dock.h
index a5866944f3..b1a2dcb689 100644
--- a/tools/editor/scene_tree_dock.h
+++ b/tools/editor/scene_tree_dock.h
@@ -87,7 +87,7 @@ class SceneTreeDock : public VBoxContainer {
EditorSelection *editor_selection;
GroupsEditor *groups_editor;
- ConnectionsDialog *connect_dialog;
+ //ConnectionsDialog *connect_dialog;
ScriptCreateDialog *script_create_dialog;
AcceptDialog *accept;
ConfirmationDialog *delete_dialog;