diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-08-26 22:04:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-26 22:04:37 +0200 |
commit | 2f63811c9aa1d1710dc045e01b1391493243ddde (patch) | |
tree | 4b31dec797c055bc2075707fb57c41a1a4fd07a0 /scene/main | |
parent | 2b202f3dd0cd1900a8302f7404207ed27d7a9ed9 (diff) | |
parent | db6d4352ea528e925c69ee94f6fb9bc0942719ec (diff) |
Merge pull request #25656 from bruvzg/macos_multi_instances
[macOS] Add ability to open multiple editor instances and global/dock menu access
Diffstat (limited to 'scene/main')
-rw-r--r-- | scene/main/scene_tree.cpp | 7 | ||||
-rw-r--r-- | scene/main/scene_tree.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index 98d63650d3..617a703855 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -1673,6 +1673,12 @@ void SceneTree::drop_files(const Vector<String> &p_files, int p_from_screen) { MainLoop::drop_files(p_files, p_from_screen); } +void SceneTree::global_menu_action(const Variant &p_id, const Variant &p_meta) { + + emit_signal("global_menu_action", p_id, p_meta); + MainLoop::global_menu_action(p_id, p_meta); +} + Ref<SceneTreeTimer> SceneTree::create_timer(float p_delay_sec, bool p_process_pause) { Ref<SceneTreeTimer> stt; @@ -1894,6 +1900,7 @@ void SceneTree::_bind_methods() { ADD_SIGNAL(MethodInfo("physics_frame")); ADD_SIGNAL(MethodInfo("files_dropped", PropertyInfo(Variant::POOL_STRING_ARRAY, "files"), PropertyInfo(Variant::INT, "screen"))); + ADD_SIGNAL(MethodInfo("global_menu_action", PropertyInfo(Variant::NIL, "id"), PropertyInfo(Variant::NIL, "meta"))); ADD_SIGNAL(MethodInfo("network_peer_connected", PropertyInfo(Variant::INT, "id"))); ADD_SIGNAL(MethodInfo("network_peer_disconnected", PropertyInfo(Variant::INT, "id"))); ADD_SIGNAL(MethodInfo("connected_to_server")); diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h index afb653e242..42a87545a6 100644 --- a/scene/main/scene_tree.h +++ b/scene/main/scene_tree.h @@ -407,6 +407,7 @@ public: static SceneTree *get_singleton() { return singleton; } void drop_files(const Vector<String> &p_files, int p_from_screen = 0); + void global_menu_action(const Variant &p_id, const Variant &p_meta); //network API |