mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 19:42:43 +00:00
[Scene] Add SceneStringNames::id_pressed
This commit is contained in:
parent
505da68b26
commit
755a0efbb6
@ -1950,5 +1950,5 @@ AnimationBezierTrackEdit::AnimationBezierTrackEdit() {
|
|||||||
|
|
||||||
menu = memnew(PopupMenu);
|
menu = memnew(PopupMenu);
|
||||||
add_child(menu);
|
add_child(menu);
|
||||||
menu->connect("id_pressed", callable_mp(this, &AnimationBezierTrackEdit::_menu_selected));
|
menu->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationBezierTrackEdit::_menu_selected));
|
||||||
}
|
}
|
||||||
|
@ -2810,7 +2810,7 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
|
|||||||
if (!menu) {
|
if (!menu) {
|
||||||
menu = memnew(PopupMenu);
|
menu = memnew(PopupMenu);
|
||||||
add_child(menu);
|
add_child(menu);
|
||||||
menu->connect("id_pressed", callable_mp(this, &AnimationTrackEdit::_menu_selected));
|
menu->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationTrackEdit::_menu_selected));
|
||||||
}
|
}
|
||||||
menu->clear();
|
menu->clear();
|
||||||
if (animation->track_get_type(track) == Animation::TYPE_AUDIO) {
|
if (animation->track_get_type(track) == Animation::TYPE_AUDIO) {
|
||||||
@ -2833,7 +2833,7 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
|
|||||||
if (!menu) {
|
if (!menu) {
|
||||||
menu = memnew(PopupMenu);
|
menu = memnew(PopupMenu);
|
||||||
add_child(menu);
|
add_child(menu);
|
||||||
menu->connect("id_pressed", callable_mp(this, &AnimationTrackEdit::_menu_selected));
|
menu->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationTrackEdit::_menu_selected));
|
||||||
}
|
}
|
||||||
menu->clear();
|
menu->clear();
|
||||||
menu->add_icon_item(get_editor_theme_icon(SNAME("InterpRaw")), TTR("Nearest"), MENU_INTERPOLATION_NEAREST);
|
menu->add_icon_item(get_editor_theme_icon(SNAME("InterpRaw")), TTR("Nearest"), MENU_INTERPOLATION_NEAREST);
|
||||||
@ -2879,7 +2879,7 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
|
|||||||
if (!menu) {
|
if (!menu) {
|
||||||
menu = memnew(PopupMenu);
|
menu = memnew(PopupMenu);
|
||||||
add_child(menu);
|
add_child(menu);
|
||||||
menu->connect("id_pressed", callable_mp(this, &AnimationTrackEdit::_menu_selected));
|
menu->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationTrackEdit::_menu_selected));
|
||||||
}
|
}
|
||||||
menu->clear();
|
menu->clear();
|
||||||
menu->add_icon_item(get_editor_theme_icon(SNAME("InterpWrapClamp")), TTR("Clamp Loop Interp"), MENU_LOOP_CLAMP);
|
menu->add_icon_item(get_editor_theme_icon(SNAME("InterpWrapClamp")), TTR("Clamp Loop Interp"), MENU_LOOP_CLAMP);
|
||||||
@ -2913,7 +2913,7 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
|
|||||||
if (!menu) {
|
if (!menu) {
|
||||||
menu = memnew(PopupMenu);
|
menu = memnew(PopupMenu);
|
||||||
add_child(menu);
|
add_child(menu);
|
||||||
menu->connect("id_pressed", callable_mp(this, &AnimationTrackEdit::_menu_selected));
|
menu->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationTrackEdit::_menu_selected));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool selected = _try_select_at_ui_pos(pos, mb->is_command_or_control_pressed() || mb->is_shift_pressed(), false);
|
bool selected = _try_select_at_ui_pos(pos, mb->is_command_or_control_pressed() || mb->is_shift_pressed(), false);
|
||||||
@ -7365,7 +7365,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||||||
edit->get_popup()->add_item(TTR("Optimize Animation (no undo)..."), EDIT_OPTIMIZE_ANIMATION);
|
edit->get_popup()->add_item(TTR("Optimize Animation (no undo)..."), EDIT_OPTIMIZE_ANIMATION);
|
||||||
edit->get_popup()->add_item(TTR("Clean-Up Animation (no undo)..."), EDIT_CLEAN_UP_ANIMATION);
|
edit->get_popup()->add_item(TTR("Clean-Up Animation (no undo)..."), EDIT_CLEAN_UP_ANIMATION);
|
||||||
|
|
||||||
edit->get_popup()->connect("id_pressed", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed));
|
edit->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed));
|
||||||
edit->get_popup()->connect("about_to_popup", callable_mp(this, &AnimationTrackEditor::_edit_menu_about_to_popup));
|
edit->get_popup()->connect("about_to_popup", callable_mp(this, &AnimationTrackEditor::_edit_menu_about_to_popup));
|
||||||
|
|
||||||
pick_track = memnew(SceneTreeDialog);
|
pick_track = memnew(SceneTreeDialog);
|
||||||
|
@ -1794,7 +1794,7 @@ CodeTextEditor::CodeTextEditor() {
|
|||||||
zoom_menu->set_item_metadata(i, z);
|
zoom_menu->set_item_metadata(i, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
zoom_menu->connect("id_pressed", callable_mp(this, &CodeTextEditor::_zoom_popup_id_pressed));
|
zoom_menu->connect(SceneStringName(id_pressed), callable_mp(this, &CodeTextEditor::_zoom_popup_id_pressed));
|
||||||
|
|
||||||
status_bar->add_child(memnew(VSeparator));
|
status_bar->add_child(memnew(VSeparator));
|
||||||
|
|
||||||
|
@ -1596,13 +1596,13 @@ ConnectionsDock::ConnectionsDock() {
|
|||||||
disconnect_all_dialog->set_text(TTR("Are you sure you want to remove all connections from this signal?"));
|
disconnect_all_dialog->set_text(TTR("Are you sure you want to remove all connections from this signal?"));
|
||||||
|
|
||||||
class_menu = memnew(PopupMenu);
|
class_menu = memnew(PopupMenu);
|
||||||
class_menu->connect("id_pressed", callable_mp(this, &ConnectionsDock::_handle_class_menu_option));
|
class_menu->connect(SceneStringName(id_pressed), callable_mp(this, &ConnectionsDock::_handle_class_menu_option));
|
||||||
class_menu->connect("about_to_popup", callable_mp(this, &ConnectionsDock::_class_menu_about_to_popup));
|
class_menu->connect("about_to_popup", callable_mp(this, &ConnectionsDock::_class_menu_about_to_popup));
|
||||||
class_menu->add_item(TTR("Open Documentation"), CLASS_MENU_OPEN_DOCS);
|
class_menu->add_item(TTR("Open Documentation"), CLASS_MENU_OPEN_DOCS);
|
||||||
add_child(class_menu);
|
add_child(class_menu);
|
||||||
|
|
||||||
signal_menu = memnew(PopupMenu);
|
signal_menu = memnew(PopupMenu);
|
||||||
signal_menu->connect("id_pressed", callable_mp(this, &ConnectionsDock::_handle_signal_menu_option));
|
signal_menu->connect(SceneStringName(id_pressed), callable_mp(this, &ConnectionsDock::_handle_signal_menu_option));
|
||||||
signal_menu->connect("about_to_popup", callable_mp(this, &ConnectionsDock::_signal_menu_about_to_popup));
|
signal_menu->connect("about_to_popup", callable_mp(this, &ConnectionsDock::_signal_menu_about_to_popup));
|
||||||
signal_menu->add_item(TTR("Connect..."), SIGNAL_MENU_CONNECT);
|
signal_menu->add_item(TTR("Connect..."), SIGNAL_MENU_CONNECT);
|
||||||
signal_menu->add_item(TTR("Disconnect All"), SIGNAL_MENU_DISCONNECT_ALL);
|
signal_menu->add_item(TTR("Disconnect All"), SIGNAL_MENU_DISCONNECT_ALL);
|
||||||
@ -1612,7 +1612,7 @@ ConnectionsDock::ConnectionsDock() {
|
|||||||
add_child(signal_menu);
|
add_child(signal_menu);
|
||||||
|
|
||||||
slot_menu = memnew(PopupMenu);
|
slot_menu = memnew(PopupMenu);
|
||||||
slot_menu->connect("id_pressed", callable_mp(this, &ConnectionsDock::_handle_slot_menu_option));
|
slot_menu->connect(SceneStringName(id_pressed), callable_mp(this, &ConnectionsDock::_handle_slot_menu_option));
|
||||||
slot_menu->connect("about_to_popup", callable_mp(this, &ConnectionsDock::_slot_menu_about_to_popup));
|
slot_menu->connect("about_to_popup", callable_mp(this, &ConnectionsDock::_slot_menu_about_to_popup));
|
||||||
slot_menu->add_item(TTR("Edit..."), SLOT_MENU_EDIT);
|
slot_menu->add_item(TTR("Edit..."), SLOT_MENU_EDIT);
|
||||||
slot_menu->add_item(TTR("Go to Method"), SLOT_MENU_GO_TO_METHOD);
|
slot_menu->add_item(TTR("Go to Method"), SLOT_MENU_GO_TO_METHOD);
|
||||||
|
@ -496,7 +496,7 @@ void EditorDebuggerNode::set_script_debug_button(MenuButton *p_button) {
|
|||||||
p->add_shortcut(ED_GET_SHORTCUT("debugger/continue"), DEBUG_CONTINUE);
|
p->add_shortcut(ED_GET_SHORTCUT("debugger/continue"), DEBUG_CONTINUE);
|
||||||
p->add_separator();
|
p->add_separator();
|
||||||
p->add_check_shortcut(ED_GET_SHORTCUT("debugger/debug_with_external_editor"), DEBUG_WITH_EXTERNAL_EDITOR);
|
p->add_check_shortcut(ED_GET_SHORTCUT("debugger/debug_with_external_editor"), DEBUG_WITH_EXTERNAL_EDITOR);
|
||||||
p->connect("id_pressed", callable_mp(this, &EditorDebuggerNode::_menu_option));
|
p->connect(SceneStringName(id_pressed), callable_mp(this, &EditorDebuggerNode::_menu_option));
|
||||||
|
|
||||||
_break_state_changed();
|
_break_state_changed();
|
||||||
script_menu->show();
|
script_menu->show();
|
||||||
|
@ -45,7 +45,7 @@ EditorDebuggerTree::EditorDebuggerTree() {
|
|||||||
|
|
||||||
// Popup
|
// Popup
|
||||||
item_menu = memnew(PopupMenu);
|
item_menu = memnew(PopupMenu);
|
||||||
item_menu->connect("id_pressed", callable_mp(this, &EditorDebuggerTree::_item_menu_id_pressed));
|
item_menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorDebuggerTree::_item_menu_id_pressed));
|
||||||
add_child(item_menu);
|
add_child(item_menu);
|
||||||
|
|
||||||
// File Dialog
|
// File Dialog
|
||||||
|
@ -1937,7 +1937,7 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
|
|||||||
tabs->add_child(dbg);
|
tabs->add_child(dbg);
|
||||||
|
|
||||||
breakpoints_menu = memnew(PopupMenu);
|
breakpoints_menu = memnew(PopupMenu);
|
||||||
breakpoints_menu->connect("id_pressed", callable_mp(this, &ScriptEditorDebugger::_item_menu_id_pressed));
|
breakpoints_menu->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptEditorDebugger::_item_menu_id_pressed));
|
||||||
breakpoints_tree->add_child(breakpoints_menu);
|
breakpoints_tree->add_child(breakpoints_menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1990,7 +1990,7 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
|
|||||||
errors_tab->add_child(error_tree);
|
errors_tab->add_child(error_tree);
|
||||||
|
|
||||||
item_menu = memnew(PopupMenu);
|
item_menu = memnew(PopupMenu);
|
||||||
item_menu->connect("id_pressed", callable_mp(this, &ScriptEditorDebugger::_item_menu_id_pressed));
|
item_menu->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptEditorDebugger::_item_menu_id_pressed));
|
||||||
error_tree->add_child(item_menu);
|
error_tree->add_child(item_menu);
|
||||||
|
|
||||||
tabs->add_child(errors_tab);
|
tabs->add_child(errors_tab);
|
||||||
|
@ -396,7 +396,7 @@ void DependencyEditorOwners::show(const String &p_path) {
|
|||||||
DependencyEditorOwners::DependencyEditorOwners() {
|
DependencyEditorOwners::DependencyEditorOwners() {
|
||||||
file_options = memnew(PopupMenu);
|
file_options = memnew(PopupMenu);
|
||||||
add_child(file_options);
|
add_child(file_options);
|
||||||
file_options->connect("id_pressed", callable_mp(this, &DependencyEditorOwners::_file_option));
|
file_options->connect(SceneStringName(id_pressed), callable_mp(this, &DependencyEditorOwners::_file_option));
|
||||||
|
|
||||||
owners = memnew(ItemList);
|
owners = memnew(ItemList);
|
||||||
owners->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
owners->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||||
|
@ -838,7 +838,7 @@ EditorDockManager::EditorDockManager() {
|
|||||||
|
|
||||||
docks_menu = memnew(PopupMenu);
|
docks_menu = memnew(PopupMenu);
|
||||||
docks_menu->set_hide_on_item_selection(false);
|
docks_menu->set_hide_on_item_selection(false);
|
||||||
docks_menu->connect("id_pressed", callable_mp(this, &EditorDockManager::_docks_menu_option));
|
docks_menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorDockManager::_docks_menu_option));
|
||||||
EditorNode::get_singleton()->get_gui_base()->connect(SceneStringName(theme_changed), callable_mp(this, &EditorDockManager::_update_docks_menu));
|
EditorNode::get_singleton()->get_gui_base()->connect(SceneStringName(theme_changed), callable_mp(this, &EditorDockManager::_update_docks_menu));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1094,7 +1094,7 @@ void EditorProperty::_update_popup() {
|
|||||||
} else {
|
} else {
|
||||||
menu = memnew(PopupMenu);
|
menu = memnew(PopupMenu);
|
||||||
add_child(menu);
|
add_child(menu);
|
||||||
menu->connect("id_pressed", callable_mp(this, &EditorProperty::menu_option));
|
menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorProperty::menu_option));
|
||||||
}
|
}
|
||||||
menu->add_icon_shortcut(get_editor_theme_icon(SNAME("ActionCopy")), ED_GET_SHORTCUT("property_editor/copy_value"), MENU_COPY_VALUE);
|
menu->add_icon_shortcut(get_editor_theme_icon(SNAME("ActionCopy")), ED_GET_SHORTCUT("property_editor/copy_value"), MENU_COPY_VALUE);
|
||||||
menu->add_icon_shortcut(get_editor_theme_icon(SNAME("ActionPaste")), ED_GET_SHORTCUT("property_editor/paste_value"), MENU_PASTE_VALUE);
|
menu->add_icon_shortcut(get_editor_theme_icon(SNAME("ActionPaste")), ED_GET_SHORTCUT("property_editor/paste_value"), MENU_PASTE_VALUE);
|
||||||
@ -1290,7 +1290,7 @@ void EditorInspectorCategory::gui_input(const Ref<InputEvent> &p_event) {
|
|||||||
|
|
||||||
EditorInspectorCategory::EditorInspectorCategory() {
|
EditorInspectorCategory::EditorInspectorCategory() {
|
||||||
menu = memnew(PopupMenu);
|
menu = memnew(PopupMenu);
|
||||||
menu->connect("id_pressed", callable_mp(this, &EditorInspectorCategory::_handle_menu_option));
|
menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorInspectorCategory::_handle_menu_option));
|
||||||
menu->add_item(TTR("Open Documentation"), MENU_OPEN_DOCS);
|
menu->add_item(TTR("Open Documentation"), MENU_OPEN_DOCS);
|
||||||
add_child(menu);
|
add_child(menu);
|
||||||
}
|
}
|
||||||
@ -2427,7 +2427,7 @@ EditorInspectorArray::EditorInspectorArray(bool p_read_only) {
|
|||||||
rmb_popup->add_separator();
|
rmb_popup->add_separator();
|
||||||
rmb_popup->add_item(TTR("Clear Array"), OPTION_CLEAR_ARRAY);
|
rmb_popup->add_item(TTR("Clear Array"), OPTION_CLEAR_ARRAY);
|
||||||
rmb_popup->add_item(TTR("Resize Array..."), OPTION_RESIZE_ARRAY);
|
rmb_popup->add_item(TTR("Resize Array..."), OPTION_RESIZE_ARRAY);
|
||||||
rmb_popup->connect("id_pressed", callable_mp(this, &EditorInspectorArray::_rmb_popup_id_pressed));
|
rmb_popup->connect(SceneStringName(id_pressed), callable_mp(this, &EditorInspectorArray::_rmb_popup_id_pressed));
|
||||||
add_child(rmb_popup);
|
add_child(rmb_popup);
|
||||||
|
|
||||||
elements_vbox = memnew(VBoxContainer);
|
elements_vbox = memnew(VBoxContainer);
|
||||||
|
@ -6902,7 +6902,7 @@ EditorNode::EditorNode() {
|
|||||||
|
|
||||||
recent_scenes = memnew(PopupMenu);
|
recent_scenes = memnew(PopupMenu);
|
||||||
file_menu->add_submenu_node_item(TTR("Open Recent"), recent_scenes, FILE_OPEN_RECENT);
|
file_menu->add_submenu_node_item(TTR("Open Recent"), recent_scenes, FILE_OPEN_RECENT);
|
||||||
recent_scenes->connect("id_pressed", callable_mp(this, &EditorNode::_open_recent_scene));
|
recent_scenes->connect(SceneStringName(id_pressed), callable_mp(this, &EditorNode::_open_recent_scene));
|
||||||
|
|
||||||
file_menu->add_separator();
|
file_menu->add_separator();
|
||||||
file_menu->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/save_scene", TTR("Save Scene"), KeyModifierMask::CMD_OR_CTRL + Key::S), FILE_SAVE_SCENE);
|
file_menu->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/save_scene", TTR("Save Scene"), KeyModifierMask::CMD_OR_CTRL + Key::S), FILE_SAVE_SCENE);
|
||||||
@ -6947,7 +6947,7 @@ EditorNode::EditorNode() {
|
|||||||
|
|
||||||
apple_menu->add_shortcut(ED_GET_SHORTCUT("editor/editor_settings"), SETTINGS_PREFERENCES);
|
apple_menu->add_shortcut(ED_GET_SHORTCUT("editor/editor_settings"), SETTINGS_PREFERENCES);
|
||||||
apple_menu->add_separator();
|
apple_menu->add_separator();
|
||||||
apple_menu->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));
|
apple_menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorNode::_menu_option));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -6956,7 +6956,7 @@ EditorNode::EditorNode() {
|
|||||||
main_menu->add_child(project_menu);
|
main_menu->add_child(project_menu);
|
||||||
|
|
||||||
project_menu->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/project_settings", TTR("Project Settings..."), Key::NONE, TTR("Project Settings")), RUN_SETTINGS);
|
project_menu->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/project_settings", TTR("Project Settings..."), Key::NONE, TTR("Project Settings")), RUN_SETTINGS);
|
||||||
project_menu->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));
|
project_menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorNode::_menu_option));
|
||||||
|
|
||||||
project_menu->add_separator();
|
project_menu->add_separator();
|
||||||
project_menu->add_item(TTR("Version Control"), VCS_MENU);
|
project_menu->add_item(TTR("Version Control"), VCS_MENU);
|
||||||
@ -7028,7 +7028,7 @@ EditorNode::EditorNode() {
|
|||||||
editor_layouts = memnew(PopupMenu);
|
editor_layouts = memnew(PopupMenu);
|
||||||
editor_layouts->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
editor_layouts->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||||
settings_menu->add_submenu_node_item(TTR("Editor Layout"), editor_layouts);
|
settings_menu->add_submenu_node_item(TTR("Editor Layout"), editor_layouts);
|
||||||
editor_layouts->connect("id_pressed", callable_mp(this, &EditorNode::_layout_menu_option));
|
editor_layouts->connect(SceneStringName(id_pressed), callable_mp(this, &EditorNode::_layout_menu_option));
|
||||||
settings_menu->add_separator();
|
settings_menu->add_separator();
|
||||||
|
|
||||||
ED_SHORTCUT_AND_COMMAND("editor/take_screenshot", TTR("Take Screenshot"), KeyModifierMask::CTRL | Key::F12);
|
ED_SHORTCUT_AND_COMMAND("editor/take_screenshot", TTR("Take Screenshot"), KeyModifierMask::CTRL | Key::F12);
|
||||||
@ -7071,7 +7071,7 @@ EditorNode::EditorNode() {
|
|||||||
}
|
}
|
||||||
main_menu->add_child(help_menu);
|
main_menu->add_child(help_menu);
|
||||||
|
|
||||||
help_menu->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));
|
help_menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorNode::_menu_option));
|
||||||
|
|
||||||
ED_SHORTCUT_AND_COMMAND("editor/editor_help", TTR("Search Help..."), Key::F1);
|
ED_SHORTCUT_AND_COMMAND("editor/editor_help", TTR("Search Help..."), Key::F1);
|
||||||
ED_SHORTCUT_OVERRIDE("editor/editor_help", "macos", KeyModifierMask::ALT | Key::SPACE);
|
ED_SHORTCUT_OVERRIDE("editor/editor_help", "macos", KeyModifierMask::ALT | Key::SPACE);
|
||||||
@ -7170,7 +7170,7 @@ EditorNode::EditorNode() {
|
|||||||
update_spinner = memnew(MenuButton);
|
update_spinner = memnew(MenuButton);
|
||||||
right_menu_hb->add_child(update_spinner);
|
right_menu_hb->add_child(update_spinner);
|
||||||
update_spinner->set_icon(theme->get_icon(SNAME("Progress1"), EditorStringName(EditorIcons)));
|
update_spinner->set_icon(theme->get_icon(SNAME("Progress1"), EditorStringName(EditorIcons)));
|
||||||
update_spinner->get_popup()->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));
|
update_spinner->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &EditorNode::_menu_option));
|
||||||
PopupMenu *p = update_spinner->get_popup();
|
PopupMenu *p = update_spinner->get_popup();
|
||||||
p->add_radio_check_item(TTR("Update Continuously"), SETTINGS_UPDATE_CONTINUOUSLY);
|
p->add_radio_check_item(TTR("Update Continuously"), SETTINGS_UPDATE_CONTINUOUSLY);
|
||||||
p->add_radio_check_item(TTR("Update When Changed"), SETTINGS_UPDATE_WHEN_CHANGED);
|
p->add_radio_check_item(TTR("Update When Changed"), SETTINGS_UPDATE_WHEN_CHANGED);
|
||||||
@ -7341,11 +7341,11 @@ EditorNode::EditorNode() {
|
|||||||
gui_base->add_child(file_script);
|
gui_base->add_child(file_script);
|
||||||
file_script->connect("file_selected", callable_mp(this, &EditorNode::_dialog_action));
|
file_script->connect("file_selected", callable_mp(this, &EditorNode::_dialog_action));
|
||||||
|
|
||||||
file_menu->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));
|
file_menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorNode::_menu_option));
|
||||||
file_menu->connect("about_to_popup", callable_mp(this, &EditorNode::_update_file_menu_opened));
|
file_menu->connect("about_to_popup", callable_mp(this, &EditorNode::_update_file_menu_opened));
|
||||||
file_menu->connect("popup_hide", callable_mp(this, &EditorNode::_update_file_menu_closed));
|
file_menu->connect("popup_hide", callable_mp(this, &EditorNode::_update_file_menu_closed));
|
||||||
|
|
||||||
settings_menu->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));
|
settings_menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorNode::_menu_option));
|
||||||
|
|
||||||
file->connect("file_selected", callable_mp(this, &EditorNode::_dialog_action));
|
file->connect("file_selected", callable_mp(this, &EditorNode::_dialog_action));
|
||||||
file_templates->connect("file_selected", callable_mp(this, &EditorNode::_dialog_action));
|
file_templates->connect("file_selected", callable_mp(this, &EditorNode::_dialog_action));
|
||||||
|
@ -854,7 +854,7 @@ EditorPropertyLayersGrid::EditorPropertyLayersGrid() {
|
|||||||
layer_rename = memnew(PopupMenu);
|
layer_rename = memnew(PopupMenu);
|
||||||
layer_rename->add_item(TTR("Rename layer"), 0);
|
layer_rename->add_item(TTR("Rename layer"), 0);
|
||||||
add_child(layer_rename);
|
add_child(layer_rename);
|
||||||
layer_rename->connect("id_pressed", callable_mp(this, &EditorPropertyLayersGrid::_rename_pressed));
|
layer_rename->connect(SceneStringName(id_pressed), callable_mp(this, &EditorPropertyLayersGrid::_rename_pressed));
|
||||||
}
|
}
|
||||||
|
|
||||||
Size2 EditorPropertyLayersGrid::get_grid_size() const {
|
Size2 EditorPropertyLayersGrid::get_grid_size() const {
|
||||||
@ -1304,7 +1304,7 @@ EditorPropertyLayers::EditorPropertyLayers() {
|
|||||||
layers = memnew(PopupMenu);
|
layers = memnew(PopupMenu);
|
||||||
add_child(layers);
|
add_child(layers);
|
||||||
layers->set_hide_on_checkable_item_selection(false);
|
layers->set_hide_on_checkable_item_selection(false);
|
||||||
layers->connect("id_pressed", callable_mp(this, &EditorPropertyLayers::_menu_pressed));
|
layers->connect(SceneStringName(id_pressed), callable_mp(this, &EditorPropertyLayers::_menu_pressed));
|
||||||
layers->connect("popup_hide", callable_mp((BaseButton *)button, &BaseButton::set_pressed).bind(false));
|
layers->connect("popup_hide", callable_mp((BaseButton *)button, &BaseButton::set_pressed).bind(false));
|
||||||
ProjectSettings::get_singleton()->connect("settings_changed", callable_mp(this, &EditorPropertyLayers::_refresh_names));
|
ProjectSettings::get_singleton()->connect("settings_changed", callable_mp(this, &EditorPropertyLayers::_refresh_names));
|
||||||
}
|
}
|
||||||
@ -1687,7 +1687,7 @@ EditorPropertyEasing::EditorPropertyEasing() {
|
|||||||
|
|
||||||
preset = memnew(PopupMenu);
|
preset = memnew(PopupMenu);
|
||||||
add_child(preset);
|
add_child(preset);
|
||||||
preset->connect("id_pressed", callable_mp(this, &EditorPropertyEasing::_set_preset));
|
preset->connect(SceneStringName(id_pressed), callable_mp(this, &EditorPropertyEasing::_set_preset));
|
||||||
|
|
||||||
spin = memnew(EditorSpinSlider);
|
spin = memnew(EditorSpinSlider);
|
||||||
spin->set_flat(true);
|
spin->set_flat(true);
|
||||||
@ -2990,7 +2990,7 @@ EditorPropertyNodePath::EditorPropertyNodePath() {
|
|||||||
menu->get_popup()->add_item(TTR("Copy as Text"), ACTION_COPY);
|
menu->get_popup()->add_item(TTR("Copy as Text"), ACTION_COPY);
|
||||||
menu->get_popup()->add_item(TTR("Edit"), ACTION_EDIT);
|
menu->get_popup()->add_item(TTR("Edit"), ACTION_EDIT);
|
||||||
menu->get_popup()->add_item(TTR("Show Node in Tree"), ACTION_SELECT);
|
menu->get_popup()->add_item(TTR("Show Node in Tree"), ACTION_SELECT);
|
||||||
menu->get_popup()->connect(SNAME("id_pressed"), callable_mp(this, &EditorPropertyNodePath::_menu_option));
|
menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &EditorPropertyNodePath::_menu_option));
|
||||||
|
|
||||||
edit = memnew(LineEdit);
|
edit = memnew(LineEdit);
|
||||||
edit->set_h_size_flags(SIZE_EXPAND_FILL);
|
edit->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||||
|
@ -841,7 +841,7 @@ EditorPropertyArray::EditorPropertyArray() {
|
|||||||
|
|
||||||
change_type = memnew(PopupMenu);
|
change_type = memnew(PopupMenu);
|
||||||
add_child(change_type);
|
add_child(change_type);
|
||||||
change_type->connect("id_pressed", callable_mp(this, &EditorPropertyArray::_change_type_menu));
|
change_type->connect(SceneStringName(id_pressed), callable_mp(this, &EditorPropertyArray::_change_type_menu));
|
||||||
changing_type_index = -1;
|
changing_type_index = -1;
|
||||||
|
|
||||||
subtype = Variant::NIL;
|
subtype = Variant::NIL;
|
||||||
@ -1157,7 +1157,7 @@ EditorPropertyDictionary::EditorPropertyDictionary() {
|
|||||||
paginator = nullptr;
|
paginator = nullptr;
|
||||||
change_type = memnew(PopupMenu);
|
change_type = memnew(PopupMenu);
|
||||||
add_child(change_type);
|
add_child(change_type);
|
||||||
change_type->connect("id_pressed", callable_mp(this, &EditorPropertyDictionary::_change_type_menu));
|
change_type->connect(SceneStringName(id_pressed), callable_mp(this, &EditorPropertyDictionary::_change_type_menu));
|
||||||
changing_type_index = -1;
|
changing_type_index = -1;
|
||||||
has_borders = true;
|
has_borders = true;
|
||||||
}
|
}
|
||||||
|
@ -947,7 +947,7 @@ void EditorResourcePicker::_ensure_resource_menu() {
|
|||||||
edit_menu = memnew(PopupMenu);
|
edit_menu = memnew(PopupMenu);
|
||||||
edit_menu->add_theme_constant_override("icon_max_width", get_theme_constant(SNAME("class_icon_size"), EditorStringName(Editor)));
|
edit_menu->add_theme_constant_override("icon_max_width", get_theme_constant(SNAME("class_icon_size"), EditorStringName(Editor)));
|
||||||
add_child(edit_menu);
|
add_child(edit_menu);
|
||||||
edit_menu->connect("id_pressed", callable_mp(this, &EditorResourcePicker::_edit_menu_cbk));
|
edit_menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorResourcePicker::_edit_menu_cbk));
|
||||||
edit_menu->connect("popup_hide", callable_mp((BaseButton *)edit_button, &BaseButton::set_pressed).bind(false));
|
edit_menu->connect("popup_hide", callable_mp((BaseButton *)edit_button, &BaseButton::set_pressed).bind(false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ EditorRunNative::EditorRunNative() {
|
|||||||
remote_debug = memnew(MenuButton);
|
remote_debug = memnew(MenuButton);
|
||||||
remote_debug->set_flat(false);
|
remote_debug->set_flat(false);
|
||||||
remote_debug->set_theme_type_variation("RunBarButton");
|
remote_debug->set_theme_type_variation("RunBarButton");
|
||||||
remote_debug->get_popup()->connect("id_pressed", callable_mp(this, &EditorRunNative::start_run_native));
|
remote_debug->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &EditorRunNative::start_run_native));
|
||||||
remote_debug->set_tooltip_text(TTR("Remote Debug"));
|
remote_debug->set_tooltip_text(TTR("Remote Debug"));
|
||||||
remote_debug->set_disabled(true);
|
remote_debug->set_disabled(true);
|
||||||
|
|
||||||
|
@ -973,7 +973,7 @@ ExportTemplateManager::ExportTemplateManager() {
|
|||||||
mirror_options_button->get_popup()->add_item(TTR("Copy Mirror URL"), COPY_MIRROR_URL);
|
mirror_options_button->get_popup()->add_item(TTR("Copy Mirror URL"), COPY_MIRROR_URL);
|
||||||
mirror_options_button->set_disabled(!downloads_available);
|
mirror_options_button->set_disabled(!downloads_available);
|
||||||
download_install_hb->add_child(mirror_options_button);
|
download_install_hb->add_child(mirror_options_button);
|
||||||
mirror_options_button->get_popup()->connect("id_pressed", callable_mp(this, &ExportTemplateManager::_mirror_options_button_cbk));
|
mirror_options_button->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &ExportTemplateManager::_mirror_options_button_cbk));
|
||||||
|
|
||||||
download_install_hb->add_spacer();
|
download_install_hb->add_spacer();
|
||||||
|
|
||||||
|
@ -1373,7 +1373,7 @@ ProjectExportDialog::ProjectExportDialog() {
|
|||||||
file_mode_popup->add_item(TTR("Strip Visuals"), EditorExportPreset::MODE_FILE_STRIP);
|
file_mode_popup->add_item(TTR("Strip Visuals"), EditorExportPreset::MODE_FILE_STRIP);
|
||||||
file_mode_popup->add_item(TTR("Keep"), EditorExportPreset::MODE_FILE_KEEP);
|
file_mode_popup->add_item(TTR("Keep"), EditorExportPreset::MODE_FILE_KEEP);
|
||||||
file_mode_popup->add_item(TTR("Remove"), EditorExportPreset::MODE_FILE_REMOVE);
|
file_mode_popup->add_item(TTR("Remove"), EditorExportPreset::MODE_FILE_REMOVE);
|
||||||
file_mode_popup->connect("id_pressed", callable_mp(this, &ProjectExportDialog::_set_file_export_mode));
|
file_mode_popup->connect(SceneStringName(id_pressed), callable_mp(this, &ProjectExportDialog::_set_file_export_mode));
|
||||||
|
|
||||||
include_filters = memnew(LineEdit);
|
include_filters = memnew(LineEdit);
|
||||||
resources_vb->add_margin_child(
|
resources_vb->add_margin_child(
|
||||||
|
@ -556,8 +556,8 @@ void FileSystemDock::_notification(int p_what) {
|
|||||||
files->connect("item_activated", callable_mp(this, &FileSystemDock::_file_list_activate_file));
|
files->connect("item_activated", callable_mp(this, &FileSystemDock::_file_list_activate_file));
|
||||||
button_hist_next->connect(SceneStringName(pressed), callable_mp(this, &FileSystemDock::_fw_history));
|
button_hist_next->connect(SceneStringName(pressed), callable_mp(this, &FileSystemDock::_fw_history));
|
||||||
button_hist_prev->connect(SceneStringName(pressed), callable_mp(this, &FileSystemDock::_bw_history));
|
button_hist_prev->connect(SceneStringName(pressed), callable_mp(this, &FileSystemDock::_bw_history));
|
||||||
file_list_popup->connect("id_pressed", callable_mp(this, &FileSystemDock::_file_list_rmb_option));
|
file_list_popup->connect(SceneStringName(id_pressed), callable_mp(this, &FileSystemDock::_file_list_rmb_option));
|
||||||
tree_popup->connect("id_pressed", callable_mp(this, &FileSystemDock::_tree_rmb_option));
|
tree_popup->connect(SceneStringName(id_pressed), callable_mp(this, &FileSystemDock::_tree_rmb_option));
|
||||||
current_path_line_edit->connect("text_submitted", callable_mp(this, &FileSystemDock::_navigate_to_path).bind(false));
|
current_path_line_edit->connect("text_submitted", callable_mp(this, &FileSystemDock::_navigate_to_path).bind(false));
|
||||||
|
|
||||||
always_show_folders = bool(EDITOR_GET("docks/filesystem/always_show_folders"));
|
always_show_folders = bool(EDITOR_GET("docks/filesystem/always_show_folders"));
|
||||||
@ -3174,7 +3174,7 @@ void FileSystemDock::_file_and_folders_fill_popup(PopupMenu *p_popup, const Vect
|
|||||||
|
|
||||||
if (p_paths.size() == 1 && p_display_path_dependent_options) {
|
if (p_paths.size() == 1 && p_display_path_dependent_options) {
|
||||||
PopupMenu *new_menu = memnew(PopupMenu);
|
PopupMenu *new_menu = memnew(PopupMenu);
|
||||||
new_menu->connect("id_pressed", callable_mp(this, &FileSystemDock::_tree_rmb_option));
|
new_menu->connect(SceneStringName(id_pressed), callable_mp(this, &FileSystemDock::_tree_rmb_option));
|
||||||
|
|
||||||
p_popup->add_submenu_node_item(TTR("Create New"), new_menu, FILE_NEW);
|
p_popup->add_submenu_node_item(TTR("Create New"), new_menu, FILE_NEW);
|
||||||
p_popup->set_item_icon(p_popup->get_item_index(FILE_NEW), get_editor_theme_icon(SNAME("Add")));
|
p_popup->set_item_icon(p_popup->get_item_index(FILE_NEW), get_editor_theme_icon(SNAME("Add")));
|
||||||
@ -3199,7 +3199,7 @@ void FileSystemDock::_file_and_folders_fill_popup(PopupMenu *p_popup, const Vect
|
|||||||
|
|
||||||
if (p_paths[0] != "res://") {
|
if (p_paths[0] != "res://") {
|
||||||
PopupMenu *folder_colors_menu = memnew(PopupMenu);
|
PopupMenu *folder_colors_menu = memnew(PopupMenu);
|
||||||
folder_colors_menu->connect("id_pressed", callable_mp(this, &FileSystemDock::_folder_color_index_pressed).bind(folder_colors_menu));
|
folder_colors_menu->connect(SceneStringName(id_pressed), callable_mp(this, &FileSystemDock::_folder_color_index_pressed).bind(folder_colors_menu));
|
||||||
|
|
||||||
p_popup->add_submenu_node_item(TTR("Set Folder Color..."), folder_colors_menu);
|
p_popup->add_submenu_node_item(TTR("Set Folder Color..."), folder_colors_menu);
|
||||||
p_popup->set_item_icon(-1, get_editor_theme_icon(SNAME("Paint")));
|
p_popup->set_item_icon(-1, get_editor_theme_icon(SNAME("Paint")));
|
||||||
@ -3771,7 +3771,7 @@ MenuButton *FileSystemDock::_create_file_menu_button() {
|
|||||||
button->set_tooltip_text(TTR("Sort Files"));
|
button->set_tooltip_text(TTR("Sort Files"));
|
||||||
|
|
||||||
PopupMenu *p = button->get_popup();
|
PopupMenu *p = button->get_popup();
|
||||||
p->connect("id_pressed", callable_mp(this, &FileSystemDock::_file_sort_popup));
|
p->connect(SceneStringName(id_pressed), callable_mp(this, &FileSystemDock::_file_sort_popup));
|
||||||
p->add_radio_check_item(TTR("Sort by Name (Ascending)"), FILE_SORT_NAME);
|
p->add_radio_check_item(TTR("Sort by Name (Ascending)"), FILE_SORT_NAME);
|
||||||
p->add_radio_check_item(TTR("Sort by Name (Descending)"), FILE_SORT_NAME_REVERSE);
|
p->add_radio_check_item(TTR("Sort by Name (Descending)"), FILE_SORT_NAME_REVERSE);
|
||||||
p->add_radio_check_item(TTR("Sort by Type (Ascending)"), FILE_SORT_TYPE);
|
p->add_radio_check_item(TTR("Sort by Type (Ascending)"), FILE_SORT_TYPE);
|
||||||
|
@ -858,7 +858,7 @@ GroupsEditor::GroupsEditor() {
|
|||||||
add_child(tree);
|
add_child(tree);
|
||||||
|
|
||||||
menu = memnew(PopupMenu);
|
menu = memnew(PopupMenu);
|
||||||
menu->connect("id_pressed", callable_mp(this, &GroupsEditor::_menu_id_pressed));
|
menu->connect(SceneStringName(id_pressed), callable_mp(this, &GroupsEditor::_menu_id_pressed));
|
||||||
tree->add_child(menu);
|
tree->add_child(menu);
|
||||||
|
|
||||||
ProjectSettingsEditor::get_singleton()->get_group_settings()->connect("group_changed", callable_mp(this, &GroupsEditor::_update_groups_and_tree));
|
ProjectSettingsEditor::get_singleton()->get_group_settings()->connect("group_changed", callable_mp(this, &GroupsEditor::_update_groups_and_tree));
|
||||||
|
@ -2265,7 +2265,7 @@ EditorFileDialog::EditorFileDialog() {
|
|||||||
list_vb->add_child(item_list);
|
list_vb->add_child(item_list);
|
||||||
|
|
||||||
item_menu = memnew(PopupMenu);
|
item_menu = memnew(PopupMenu);
|
||||||
item_menu->connect("id_pressed", callable_mp(this, &EditorFileDialog::_item_menu_id_pressed));
|
item_menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorFileDialog::_item_menu_id_pressed));
|
||||||
add_child(item_menu);
|
add_child(item_menu);
|
||||||
|
|
||||||
// Other stuff.
|
// Other stuff.
|
||||||
|
@ -251,7 +251,7 @@ EditorObjectSelector::EditorObjectSelector(EditorSelectionHistory *p_history) {
|
|||||||
sub_objects_menu->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
sub_objects_menu->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||||
add_child(sub_objects_menu);
|
add_child(sub_objects_menu);
|
||||||
sub_objects_menu->connect("about_to_popup", callable_mp(this, &EditorObjectSelector::_about_to_show));
|
sub_objects_menu->connect("about_to_popup", callable_mp(this, &EditorObjectSelector::_about_to_show));
|
||||||
sub_objects_menu->connect("id_pressed", callable_mp(this, &EditorObjectSelector::_id_pressed));
|
sub_objects_menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorObjectSelector::_id_pressed));
|
||||||
|
|
||||||
set_tooltip_text(TTR("Open a list of sub-resources."));
|
set_tooltip_text(TTR("Open a list of sub-resources."));
|
||||||
}
|
}
|
||||||
|
@ -409,7 +409,7 @@ EditorSceneTabs::EditorSceneTabs() {
|
|||||||
|
|
||||||
scene_tabs_context_menu = memnew(PopupMenu);
|
scene_tabs_context_menu = memnew(PopupMenu);
|
||||||
tabbar_container->add_child(scene_tabs_context_menu);
|
tabbar_container->add_child(scene_tabs_context_menu);
|
||||||
scene_tabs_context_menu->connect("id_pressed", callable_mp(EditorNode::get_singleton(), &EditorNode::trigger_menu_option).bind(false));
|
scene_tabs_context_menu->connect(SceneStringName(id_pressed), callable_mp(EditorNode::get_singleton(), &EditorNode::trigger_menu_option).bind(false));
|
||||||
|
|
||||||
scene_tab_add = memnew(Button);
|
scene_tab_add = memnew(Button);
|
||||||
scene_tab_add->set_flat(true);
|
scene_tab_add->set_flat(true);
|
||||||
|
@ -1584,7 +1584,7 @@ SceneImportSettingsDialog::SceneImportSettingsDialog() {
|
|||||||
action_menu->get_popup()->add_item(TTR("Set Animation Save Paths"), ACTION_CHOOSE_ANIMATION_SAVE_PATHS);
|
action_menu->get_popup()->add_item(TTR("Set Animation Save Paths"), ACTION_CHOOSE_ANIMATION_SAVE_PATHS);
|
||||||
action_menu->get_popup()->add_item(TTR("Set Mesh Save Paths"), ACTION_CHOOSE_MESH_SAVE_PATHS);
|
action_menu->get_popup()->add_item(TTR("Set Mesh Save Paths"), ACTION_CHOOSE_MESH_SAVE_PATHS);
|
||||||
|
|
||||||
action_menu->get_popup()->connect("id_pressed", callable_mp(this, &SceneImportSettingsDialog::_menu_callback));
|
action_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &SceneImportSettingsDialog::_menu_callback));
|
||||||
|
|
||||||
tree_split = memnew(HSplitContainer);
|
tree_split = memnew(HSplitContainer);
|
||||||
main_vb->add_child(tree_split);
|
main_vb->add_child(tree_split);
|
||||||
|
@ -666,7 +666,7 @@ InspectorDock::InspectorDock(EditorData &p_editor_data) {
|
|||||||
general_options_hb->add_child(resource_save_button);
|
general_options_hb->add_child(resource_save_button);
|
||||||
resource_save_button->get_popup()->add_item(TTR("Save"), RESOURCE_SAVE);
|
resource_save_button->get_popup()->add_item(TTR("Save"), RESOURCE_SAVE);
|
||||||
resource_save_button->get_popup()->add_item(TTR("Save As..."), RESOURCE_SAVE_AS);
|
resource_save_button->get_popup()->add_item(TTR("Save As..."), RESOURCE_SAVE_AS);
|
||||||
resource_save_button->get_popup()->connect("id_pressed", callable_mp(this, &InspectorDock::_menu_option));
|
resource_save_button->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &InspectorDock::_menu_option));
|
||||||
resource_save_button->set_focus_mode(Control::FOCUS_NONE);
|
resource_save_button->set_focus_mode(Control::FOCUS_NONE);
|
||||||
resource_save_button->set_disabled(true);
|
resource_save_button->set_disabled(true);
|
||||||
|
|
||||||
@ -683,7 +683,7 @@ InspectorDock::InspectorDock(EditorData &p_editor_data) {
|
|||||||
resource_extra_button->get_popup()->add_shortcut(ED_SHORTCUT("property_editor/show_in_filesystem", TTR("Show in FileSystem")), RESOURCE_SHOW_IN_FILESYSTEM);
|
resource_extra_button->get_popup()->add_shortcut(ED_SHORTCUT("property_editor/show_in_filesystem", TTR("Show in FileSystem")), RESOURCE_SHOW_IN_FILESYSTEM);
|
||||||
resource_extra_button->get_popup()->add_shortcut(ED_SHORTCUT("property_editor/unref_resource", TTR("Make Resource Built-In")), RESOURCE_MAKE_BUILT_IN);
|
resource_extra_button->get_popup()->add_shortcut(ED_SHORTCUT("property_editor/unref_resource", TTR("Make Resource Built-In")), RESOURCE_MAKE_BUILT_IN);
|
||||||
resource_extra_button->get_popup()->set_item_disabled(3, true);
|
resource_extra_button->get_popup()->set_item_disabled(3, true);
|
||||||
resource_extra_button->get_popup()->connect("id_pressed", callable_mp(this, &InspectorDock::_menu_option));
|
resource_extra_button->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &InspectorDock::_menu_option));
|
||||||
|
|
||||||
general_options_hb->add_spacer();
|
general_options_hb->add_spacer();
|
||||||
|
|
||||||
@ -708,7 +708,7 @@ InspectorDock::InspectorDock(EditorData &p_editor_data) {
|
|||||||
history_menu->set_tooltip_text(TTR("History of recently edited objects."));
|
history_menu->set_tooltip_text(TTR("History of recently edited objects."));
|
||||||
general_options_hb->add_child(history_menu);
|
general_options_hb->add_child(history_menu);
|
||||||
history_menu->connect("about_to_popup", callable_mp(this, &InspectorDock::_prepare_history));
|
history_menu->connect("about_to_popup", callable_mp(this, &InspectorDock::_prepare_history));
|
||||||
history_menu->get_popup()->connect("id_pressed", callable_mp(this, &InspectorDock::_select_history));
|
history_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &InspectorDock::_select_history));
|
||||||
|
|
||||||
HBoxContainer *subresource_hb = memnew(HBoxContainer);
|
HBoxContainer *subresource_hb = memnew(HBoxContainer);
|
||||||
add_child(subresource_hb);
|
add_child(subresource_hb);
|
||||||
@ -745,7 +745,7 @@ InspectorDock::InspectorDock(EditorData &p_editor_data) {
|
|||||||
property_tools_hb->add_child(object_menu);
|
property_tools_hb->add_child(object_menu);
|
||||||
object_menu->set_tooltip_text(TTR("Manage object properties."));
|
object_menu->set_tooltip_text(TTR("Manage object properties."));
|
||||||
object_menu->get_popup()->connect("about_to_popup", callable_mp(this, &InspectorDock::_prepare_menu));
|
object_menu->get_popup()->connect("about_to_popup", callable_mp(this, &InspectorDock::_prepare_menu));
|
||||||
object_menu->get_popup()->connect("id_pressed", callable_mp(this, &InspectorDock::_menu_option));
|
object_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &InspectorDock::_menu_option));
|
||||||
|
|
||||||
info = memnew(Button);
|
info = memnew(Button);
|
||||||
add_child(info);
|
add_child(info);
|
||||||
|
@ -799,7 +799,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
|||||||
|
|
||||||
menu = memnew(PopupMenu);
|
menu = memnew(PopupMenu);
|
||||||
add_child(menu);
|
add_child(menu);
|
||||||
menu->connect("id_pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_add_menu_type));
|
menu->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationNodeBlendSpace1DEditor::_add_menu_type));
|
||||||
|
|
||||||
animations_menu = memnew(PopupMenu);
|
animations_menu = memnew(PopupMenu);
|
||||||
animations_menu->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
animations_menu->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||||
|
@ -1078,7 +1078,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
|||||||
|
|
||||||
menu = memnew(PopupMenu);
|
menu = memnew(PopupMenu);
|
||||||
add_child(menu);
|
add_child(menu);
|
||||||
menu->connect("id_pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_add_menu_type));
|
menu->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_add_menu_type));
|
||||||
|
|
||||||
animations_menu = memnew(PopupMenu);
|
animations_menu = memnew(PopupMenu);
|
||||||
animations_menu->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
animations_menu->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||||
|
@ -1193,7 +1193,7 @@ AnimationNodeBlendTreeEditor::AnimationNodeBlendTreeEditor() {
|
|||||||
graph->get_menu_hbox()->add_child(add_node);
|
graph->get_menu_hbox()->add_child(add_node);
|
||||||
add_node->set_text(TTR("Add Node..."));
|
add_node->set_text(TTR("Add Node..."));
|
||||||
graph->get_menu_hbox()->move_child(add_node, 0);
|
graph->get_menu_hbox()->move_child(add_node, 0);
|
||||||
add_node->get_popup()->connect("id_pressed", callable_mp(this, &AnimationNodeBlendTreeEditor::_add_node));
|
add_node->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationNodeBlendTreeEditor::_add_node));
|
||||||
add_node->get_popup()->connect("popup_hide", callable_mp(this, &AnimationNodeBlendTreeEditor::_popup_hide), CONNECT_DEFERRED);
|
add_node->get_popup()->connect("popup_hide", callable_mp(this, &AnimationNodeBlendTreeEditor::_popup_hide), CONNECT_DEFERRED);
|
||||||
add_node->connect("about_to_popup", callable_mp(this, &AnimationNodeBlendTreeEditor::_update_options_menu).bind(false));
|
add_node->connect("about_to_popup", callable_mp(this, &AnimationNodeBlendTreeEditor::_update_options_menu).bind(false));
|
||||||
add_node->set_disabled(read_only);
|
add_node->set_disabled(read_only);
|
||||||
|
@ -839,7 +839,7 @@ AnimationLibraryEditor::AnimationLibraryEditor() {
|
|||||||
|
|
||||||
file_popup = memnew(PopupMenu);
|
file_popup = memnew(PopupMenu);
|
||||||
add_child(file_popup);
|
add_child(file_popup);
|
||||||
file_popup->connect("id_pressed", callable_mp(this, &AnimationLibraryEditor::_file_popup_selected));
|
file_popup->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationLibraryEditor::_file_popup_selected));
|
||||||
|
|
||||||
add_child(vb);
|
add_child(vb);
|
||||||
|
|
||||||
|
@ -121,9 +121,9 @@ void AnimationPlayerEditor::_notification(int p_what) {
|
|||||||
} break;
|
} break;
|
||||||
|
|
||||||
case NOTIFICATION_ENTER_TREE: {
|
case NOTIFICATION_ENTER_TREE: {
|
||||||
tool_anim->get_popup()->connect(SNAME("id_pressed"), callable_mp(this, &AnimationPlayerEditor::_animation_tool_menu));
|
tool_anim->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationPlayerEditor::_animation_tool_menu));
|
||||||
|
|
||||||
onion_skinning->get_popup()->connect(SNAME("id_pressed"), callable_mp(this, &AnimationPlayerEditor::_onion_skinning_menu));
|
onion_skinning->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationPlayerEditor::_onion_skinning_menu));
|
||||||
|
|
||||||
blend_editor.next->connect(SNAME("item_selected"), callable_mp(this, &AnimationPlayerEditor::_blend_editor_next_changed));
|
blend_editor.next->connect(SNAME("item_selected"), callable_mp(this, &AnimationPlayerEditor::_blend_editor_next_changed));
|
||||||
|
|
||||||
|
@ -606,7 +606,7 @@ bool AnimationNodeStateMachineEditor::_create_submenu(PopupMenu *p_menu, Ref<Ani
|
|||||||
|
|
||||||
PopupMenu *nodes_menu = memnew(PopupMenu);
|
PopupMenu *nodes_menu = memnew(PopupMenu);
|
||||||
nodes_menu->set_name(p_name);
|
nodes_menu->set_name(p_name);
|
||||||
nodes_menu->connect("id_pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_connect_to));
|
nodes_menu->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationNodeStateMachineEditor::_connect_to));
|
||||||
p_menu->add_child(nodes_menu);
|
p_menu->add_child(nodes_menu);
|
||||||
|
|
||||||
bool node_added = false;
|
bool node_added = false;
|
||||||
@ -1766,7 +1766,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
|
|||||||
|
|
||||||
menu = memnew(PopupMenu);
|
menu = memnew(PopupMenu);
|
||||||
add_child(menu);
|
add_child(menu);
|
||||||
menu->connect("id_pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_add_menu_type));
|
menu->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationNodeStateMachineEditor::_add_menu_type));
|
||||||
menu->connect("popup_hide", callable_mp(this, &AnimationNodeStateMachineEditor::_stop_connecting));
|
menu->connect("popup_hide", callable_mp(this, &AnimationNodeStateMachineEditor::_stop_connecting));
|
||||||
|
|
||||||
animations_menu = memnew(PopupMenu);
|
animations_menu = memnew(PopupMenu);
|
||||||
@ -1776,17 +1776,17 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
|
|||||||
|
|
||||||
connect_menu = memnew(PopupMenu);
|
connect_menu = memnew(PopupMenu);
|
||||||
add_child(connect_menu);
|
add_child(connect_menu);
|
||||||
connect_menu->connect("id_pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_connect_to));
|
connect_menu->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationNodeStateMachineEditor::_connect_to));
|
||||||
connect_menu->connect("popup_hide", callable_mp(this, &AnimationNodeStateMachineEditor::_stop_connecting));
|
connect_menu->connect("popup_hide", callable_mp(this, &AnimationNodeStateMachineEditor::_stop_connecting));
|
||||||
|
|
||||||
state_machine_menu = memnew(PopupMenu);
|
state_machine_menu = memnew(PopupMenu);
|
||||||
state_machine_menu->set_name("state_machines");
|
state_machine_menu->set_name("state_machines");
|
||||||
state_machine_menu->connect("id_pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_connect_to));
|
state_machine_menu->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationNodeStateMachineEditor::_connect_to));
|
||||||
connect_menu->add_child(state_machine_menu);
|
connect_menu->add_child(state_machine_menu);
|
||||||
|
|
||||||
end_menu = memnew(PopupMenu);
|
end_menu = memnew(PopupMenu);
|
||||||
end_menu->set_name("end_nodes");
|
end_menu->set_name("end_nodes");
|
||||||
end_menu->connect("id_pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_connect_to));
|
end_menu->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationNodeStateMachineEditor::_connect_to));
|
||||||
connect_menu->add_child(end_menu);
|
connect_menu->add_child(end_menu);
|
||||||
|
|
||||||
name_edit_popup = memnew(Popup);
|
name_edit_popup = memnew(Popup);
|
||||||
|
@ -1679,7 +1679,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
|
|||||||
support->get_popup()->add_check_item(TTRGET(support_text[SUPPORT_TESTING]), SUPPORT_TESTING);
|
support->get_popup()->add_check_item(TTRGET(support_text[SUPPORT_TESTING]), SUPPORT_TESTING);
|
||||||
support->get_popup()->set_item_checked(SUPPORT_FEATURED, true);
|
support->get_popup()->set_item_checked(SUPPORT_FEATURED, true);
|
||||||
support->get_popup()->set_item_checked(SUPPORT_COMMUNITY, true);
|
support->get_popup()->set_item_checked(SUPPORT_COMMUNITY, true);
|
||||||
support->get_popup()->connect("id_pressed", callable_mp(this, &EditorAssetLibrary::_support_toggled));
|
support->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &EditorAssetLibrary::_support_toggled));
|
||||||
|
|
||||||
/////////
|
/////////
|
||||||
|
|
||||||
|
@ -5388,7 +5388,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||||||
snap_config_menu->set_switch_on_hover(true);
|
snap_config_menu->set_switch_on_hover(true);
|
||||||
|
|
||||||
PopupMenu *p = snap_config_menu->get_popup();
|
PopupMenu *p = snap_config_menu->get_popup();
|
||||||
p->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_popup_callback));
|
p->connect(SceneStringName(id_pressed), callable_mp(this, &CanvasItemEditor::_popup_callback));
|
||||||
p->set_hide_on_checkable_item_selection(false);
|
p->set_hide_on_checkable_item_selection(false);
|
||||||
p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/use_rotation_snap", TTR("Use Rotation Snap")), SNAP_USE_ROTATION);
|
p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/use_rotation_snap", TTR("Use Rotation Snap")), SNAP_USE_ROTATION);
|
||||||
p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/use_scale_snap", TTR("Use Scale Snap")), SNAP_USE_SCALE);
|
p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/use_scale_snap", TTR("Use Scale Snap")), SNAP_USE_SCALE);
|
||||||
@ -5396,7 +5396,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||||||
p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/use_pixel_snap", TTR("Use Pixel Snap")), SNAP_USE_PIXEL);
|
p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/use_pixel_snap", TTR("Use Pixel Snap")), SNAP_USE_PIXEL);
|
||||||
|
|
||||||
smartsnap_config_popup = memnew(PopupMenu);
|
smartsnap_config_popup = memnew(PopupMenu);
|
||||||
smartsnap_config_popup->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_popup_callback));
|
smartsnap_config_popup->connect(SceneStringName(id_pressed), callable_mp(this, &CanvasItemEditor::_popup_callback));
|
||||||
smartsnap_config_popup->set_hide_on_checkable_item_selection(false);
|
smartsnap_config_popup->set_hide_on_checkable_item_selection(false);
|
||||||
smartsnap_config_popup->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/snap_node_parent", TTR("Snap to Parent")), SNAP_USE_NODE_PARENT);
|
smartsnap_config_popup->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/snap_node_parent", TTR("Snap to Parent")), SNAP_USE_NODE_PARENT);
|
||||||
smartsnap_config_popup->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/snap_node_anchors", TTR("Snap to Node Anchor")), SNAP_USE_NODE_ANCHORS);
|
smartsnap_config_popup->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/snap_node_anchors", TTR("Snap to Node Anchor")), SNAP_USE_NODE_ANCHORS);
|
||||||
@ -5459,7 +5459,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||||||
p->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_show_bones", TTR("Show Bones")), SKELETON_SHOW_BONES);
|
p->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_show_bones", TTR("Show Bones")), SKELETON_SHOW_BONES);
|
||||||
p->add_separator();
|
p->add_separator();
|
||||||
p->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_make_bones", TTR("Make Bone2D Node(s) from Node(s)"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT | Key::B), SKELETON_MAKE_BONES);
|
p->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_make_bones", TTR("Make Bone2D Node(s) from Node(s)"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT | Key::B), SKELETON_MAKE_BONES);
|
||||||
p->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_popup_callback));
|
p->connect(SceneStringName(id_pressed), callable_mp(this, &CanvasItemEditor::_popup_callback));
|
||||||
|
|
||||||
main_menu_hbox->add_child(memnew(VSeparator));
|
main_menu_hbox->add_child(memnew(VSeparator));
|
||||||
|
|
||||||
@ -5481,14 +5481,14 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||||||
view_menu->set_switch_on_hover(true);
|
view_menu->set_switch_on_hover(true);
|
||||||
view_menu->set_shortcut_context(this);
|
view_menu->set_shortcut_context(this);
|
||||||
main_menu_hbox->add_child(view_menu);
|
main_menu_hbox->add_child(view_menu);
|
||||||
view_menu->get_popup()->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_popup_callback));
|
view_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &CanvasItemEditor::_popup_callback));
|
||||||
|
|
||||||
p = view_menu->get_popup();
|
p = view_menu->get_popup();
|
||||||
p->set_hide_on_checkable_item_selection(false);
|
p->set_hide_on_checkable_item_selection(false);
|
||||||
|
|
||||||
grid_menu = memnew(PopupMenu);
|
grid_menu = memnew(PopupMenu);
|
||||||
grid_menu->connect("about_to_popup", callable_mp(this, &CanvasItemEditor::_prepare_grid_menu));
|
grid_menu->connect("about_to_popup", callable_mp(this, &CanvasItemEditor::_prepare_grid_menu));
|
||||||
grid_menu->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_on_grid_menu_id_pressed));
|
grid_menu->connect(SceneStringName(id_pressed), callable_mp(this, &CanvasItemEditor::_on_grid_menu_id_pressed));
|
||||||
grid_menu->add_radio_check_item(TTR("Show"), GRID_VISIBILITY_SHOW);
|
grid_menu->add_radio_check_item(TTR("Show"), GRID_VISIBILITY_SHOW);
|
||||||
grid_menu->add_radio_check_item(TTR("Show When Snapping"), GRID_VISIBILITY_SHOW_WHEN_SNAPPING);
|
grid_menu->add_radio_check_item(TTR("Show When Snapping"), GRID_VISIBILITY_SHOW_WHEN_SNAPPING);
|
||||||
grid_menu->add_radio_check_item(TTR("Hide"), GRID_VISIBILITY_HIDE);
|
grid_menu->add_radio_check_item(TTR("Hide"), GRID_VISIBILITY_HIDE);
|
||||||
@ -5505,7 +5505,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||||||
|
|
||||||
gizmos_menu = memnew(PopupMenu);
|
gizmos_menu = memnew(PopupMenu);
|
||||||
gizmos_menu->set_name("GizmosMenu");
|
gizmos_menu->set_name("GizmosMenu");
|
||||||
gizmos_menu->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_popup_callback));
|
gizmos_menu->connect(SceneStringName(id_pressed), callable_mp(this, &CanvasItemEditor::_popup_callback));
|
||||||
gizmos_menu->set_hide_on_checkable_item_selection(false);
|
gizmos_menu->set_hide_on_checkable_item_selection(false);
|
||||||
gizmos_menu->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/show_position_gizmos", TTR("Position")), SHOW_POSITION_GIZMOS);
|
gizmos_menu->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/show_position_gizmos", TTR("Position")), SHOW_POSITION_GIZMOS);
|
||||||
gizmos_menu->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/show_lock_gizmos", TTR("Lock")), SHOW_LOCK_GIZMOS);
|
gizmos_menu->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/show_lock_gizmos", TTR("Lock")), SHOW_LOCK_GIZMOS);
|
||||||
@ -5522,7 +5522,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||||||
p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/preview_canvas_scale", TTR("Preview Canvas Scale")), PREVIEW_CANVAS_SCALE);
|
p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/preview_canvas_scale", TTR("Preview Canvas Scale")), PREVIEW_CANVAS_SCALE);
|
||||||
|
|
||||||
theme_menu = memnew(PopupMenu);
|
theme_menu = memnew(PopupMenu);
|
||||||
theme_menu->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_switch_theme_preview));
|
theme_menu->connect(SceneStringName(id_pressed), callable_mp(this, &CanvasItemEditor::_switch_theme_preview));
|
||||||
theme_menu->add_radio_check_item(TTR("Project theme"), THEME_PREVIEW_PROJECT);
|
theme_menu->add_radio_check_item(TTR("Project theme"), THEME_PREVIEW_PROJECT);
|
||||||
theme_menu->add_radio_check_item(TTR("Editor theme"), THEME_PREVIEW_EDITOR);
|
theme_menu->add_radio_check_item(TTR("Editor theme"), THEME_PREVIEW_EDITOR);
|
||||||
theme_menu->add_radio_check_item(TTR("Default theme"), THEME_PREVIEW_DEFAULT);
|
theme_menu->add_radio_check_item(TTR("Default theme"), THEME_PREVIEW_DEFAULT);
|
||||||
@ -5596,7 +5596,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||||||
animation_menu->set_shortcut_context(this);
|
animation_menu->set_shortcut_context(this);
|
||||||
animation_menu->set_tooltip_text(TTR("Animation Key and Pose Options"));
|
animation_menu->set_tooltip_text(TTR("Animation Key and Pose Options"));
|
||||||
animation_hb->add_child(animation_menu);
|
animation_hb->add_child(animation_menu);
|
||||||
animation_menu->get_popup()->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_popup_callback));
|
animation_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &CanvasItemEditor::_popup_callback));
|
||||||
animation_menu->set_switch_on_hover(true);
|
animation_menu->set_switch_on_hover(true);
|
||||||
|
|
||||||
p = animation_menu->get_popup();
|
p = animation_menu->get_popup();
|
||||||
@ -5618,12 +5618,12 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||||||
add_child(selection_menu);
|
add_child(selection_menu);
|
||||||
selection_menu->set_min_size(Vector2(100, 0));
|
selection_menu->set_min_size(Vector2(100, 0));
|
||||||
selection_menu->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
selection_menu->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||||
selection_menu->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_selection_result_pressed));
|
selection_menu->connect(SceneStringName(id_pressed), callable_mp(this, &CanvasItemEditor::_selection_result_pressed));
|
||||||
selection_menu->connect("popup_hide", callable_mp(this, &CanvasItemEditor::_selection_menu_hide), CONNECT_DEFERRED);
|
selection_menu->connect("popup_hide", callable_mp(this, &CanvasItemEditor::_selection_menu_hide), CONNECT_DEFERRED);
|
||||||
|
|
||||||
add_node_menu = memnew(PopupMenu);
|
add_node_menu = memnew(PopupMenu);
|
||||||
add_child(add_node_menu);
|
add_child(add_node_menu);
|
||||||
add_node_menu->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_add_node_pressed));
|
add_node_menu->connect(SceneStringName(id_pressed), callable_mp(this, &CanvasItemEditor::_add_node_pressed));
|
||||||
|
|
||||||
multiply_grid_step_shortcut = ED_SHORTCUT("canvas_item_editor/multiply_grid_step", TTR("Multiply grid step by 2"), Key::KP_MULTIPLY);
|
multiply_grid_step_shortcut = ED_SHORTCUT("canvas_item_editor/multiply_grid_step", TTR("Multiply grid step by 2"), Key::KP_MULTIPLY);
|
||||||
divide_grid_step_shortcut = ED_SHORTCUT("canvas_item_editor/divide_grid_step", TTR("Divide grid step by 2"), Key::KP_DIVIDE);
|
divide_grid_step_shortcut = ED_SHORTCUT("canvas_item_editor/divide_grid_step", TTR("Divide grid step by 2"), Key::KP_DIVIDE);
|
||||||
|
@ -251,7 +251,7 @@ void CPUParticles2DEditorPlugin::_generate_emission_mask() {
|
|||||||
void CPUParticles2DEditorPlugin::_notification(int p_what) {
|
void CPUParticles2DEditorPlugin::_notification(int p_what) {
|
||||||
switch (p_what) {
|
switch (p_what) {
|
||||||
case NOTIFICATION_ENTER_TREE: {
|
case NOTIFICATION_ENTER_TREE: {
|
||||||
menu->get_popup()->connect("id_pressed", callable_mp(this, &CPUParticles2DEditorPlugin::_menu_callback));
|
menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &CPUParticles2DEditorPlugin::_menu_callback));
|
||||||
menu->set_icon(file->get_editor_theme_icon(SNAME("CPUParticles2D")));
|
menu->set_icon(file->get_editor_theme_icon(SNAME("CPUParticles2D")));
|
||||||
file->connect("file_selected", callable_mp(this, &CPUParticles2DEditorPlugin::_file_selected));
|
file->connect("file_selected", callable_mp(this, &CPUParticles2DEditorPlugin::_file_selected));
|
||||||
} break;
|
} break;
|
||||||
|
@ -173,7 +173,7 @@ CPUParticles3DEditor::CPUParticles3DEditor() {
|
|||||||
options->get_popup()->add_item(TTR("Generate AABB"), MENU_OPTION_GENERATE_AABB);
|
options->get_popup()->add_item(TTR("Generate AABB"), MENU_OPTION_GENERATE_AABB);
|
||||||
options->get_popup()->add_item(TTR("Create Emission Points From Node"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE);
|
options->get_popup()->add_item(TTR("Create Emission Points From Node"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE);
|
||||||
options->get_popup()->add_item(TTR("Convert to GPUParticles3D"), MENU_OPTION_CONVERT_TO_GPU_PARTICLES);
|
options->get_popup()->add_item(TTR("Convert to GPUParticles3D"), MENU_OPTION_CONVERT_TO_GPU_PARTICLES);
|
||||||
options->get_popup()->connect("id_pressed", callable_mp(this, &CPUParticles3DEditor::_menu_option));
|
options->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &CPUParticles3DEditor::_menu_option));
|
||||||
|
|
||||||
generate_aabb = memnew(ConfirmationDialog);
|
generate_aabb = memnew(ConfirmationDialog);
|
||||||
generate_aabb->set_title(TTR("Generate Visibility AABB"));
|
generate_aabb->set_title(TTR("Generate Visibility AABB"));
|
||||||
|
@ -1026,7 +1026,7 @@ CurveEditor::CurveEditor() {
|
|||||||
presets_button->set_switch_on_hover(true);
|
presets_button->set_switch_on_hover(true);
|
||||||
presets_button->set_h_size_flags(SIZE_EXPAND | SIZE_SHRINK_END);
|
presets_button->set_h_size_flags(SIZE_EXPAND | SIZE_SHRINK_END);
|
||||||
toolbar->add_child(presets_button);
|
toolbar->add_child(presets_button);
|
||||||
presets_button->get_popup()->connect("id_pressed", callable_mp(this, &CurveEditor::_on_preset_item_selected));
|
presets_button->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &CurveEditor::_on_preset_item_selected));
|
||||||
|
|
||||||
curve_editor_rect = memnew(CurveEdit);
|
curve_editor_rect = memnew(CurveEdit);
|
||||||
add_child(curve_editor_rect);
|
add_child(curve_editor_rect);
|
||||||
|
@ -99,7 +99,7 @@ DebuggerEditorPlugin::DebuggerEditorPlugin(PopupMenu *p_debug_menu) {
|
|||||||
// Multi-instance, start/stop.
|
// Multi-instance, start/stop.
|
||||||
debug_menu->add_separator();
|
debug_menu->add_separator();
|
||||||
debug_menu->add_item(TTR("Customize Run Instances..."), RUN_MULTIPLE_INSTANCES);
|
debug_menu->add_item(TTR("Customize Run Instances..."), RUN_MULTIPLE_INSTANCES);
|
||||||
debug_menu->connect("id_pressed", callable_mp(this, &DebuggerEditorPlugin::_menu_option));
|
debug_menu->connect(SceneStringName(id_pressed), callable_mp(this, &DebuggerEditorPlugin::_menu_option));
|
||||||
|
|
||||||
run_instances_dialog = memnew(RunInstancesDialog);
|
run_instances_dialog = memnew(RunInstancesDialog);
|
||||||
EditorNode::get_singleton()->get_gui_base()->add_child(run_instances_dialog);
|
EditorNode::get_singleton()->get_gui_base()->add_child(run_instances_dialog);
|
||||||
|
@ -372,7 +372,7 @@ EditorPropertyFontMetaOverride::EditorPropertyFontMetaOverride(bool p_script) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
add_child(menu);
|
add_child(menu);
|
||||||
menu->connect("id_pressed", callable_mp(this, &EditorPropertyFontMetaOverride::_add_script));
|
menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorPropertyFontMetaOverride::_add_script));
|
||||||
|
|
||||||
locale_select = memnew(EditorLocaleDialog);
|
locale_select = memnew(EditorLocaleDialog);
|
||||||
locale_select->connect("locale_selected", callable_mp(this, &EditorPropertyFontMetaOverride::_add_lang));
|
locale_select->connect("locale_selected", callable_mp(this, &EditorPropertyFontMetaOverride::_add_lang));
|
||||||
@ -840,12 +840,12 @@ EditorPropertyOTFeatures::EditorPropertyOTFeatures() {
|
|||||||
|
|
||||||
menu = memnew(PopupMenu);
|
menu = memnew(PopupMenu);
|
||||||
add_child(menu);
|
add_child(menu);
|
||||||
menu->connect("id_pressed", callable_mp(this, &EditorPropertyOTFeatures::_add_feature));
|
menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorPropertyOTFeatures::_add_feature));
|
||||||
|
|
||||||
for (int i = 0; i < FGRP_MAX; i++) {
|
for (int i = 0; i < FGRP_MAX; i++) {
|
||||||
menu_sub[i] = memnew(PopupMenu);
|
menu_sub[i] = memnew(PopupMenu);
|
||||||
menu->add_child(menu_sub[i]);
|
menu->add_child(menu_sub[i]);
|
||||||
menu_sub[i]->connect("id_pressed", callable_mp(this, &EditorPropertyOTFeatures::_add_feature));
|
menu_sub[i]->connect(SceneStringName(id_pressed), callable_mp(this, &EditorPropertyOTFeatures::_add_feature));
|
||||||
}
|
}
|
||||||
|
|
||||||
group_names[FGRP_STYLISTIC_SET] = TTRC("Stylistic Sets");
|
group_names[FGRP_STYLISTIC_SET] = TTRC("Stylistic Sets");
|
||||||
@ -1018,7 +1018,7 @@ EditorPropertyFontNamesArray::EditorPropertyFontNamesArray() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
add_child(menu);
|
add_child(menu);
|
||||||
menu->connect("id_pressed", callable_mp(this, &EditorPropertyFontNamesArray::_add_font));
|
menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorPropertyFontNamesArray::_add_font));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
@ -352,7 +352,7 @@ void GPUParticles2DEditorPlugin::_generate_emission_mask() {
|
|||||||
void GPUParticles2DEditorPlugin::_notification(int p_what) {
|
void GPUParticles2DEditorPlugin::_notification(int p_what) {
|
||||||
switch (p_what) {
|
switch (p_what) {
|
||||||
case NOTIFICATION_ENTER_TREE: {
|
case NOTIFICATION_ENTER_TREE: {
|
||||||
menu->get_popup()->connect("id_pressed", callable_mp(this, &GPUParticles2DEditorPlugin::_menu_callback));
|
menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &GPUParticles2DEditorPlugin::_menu_callback));
|
||||||
menu->set_icon(menu->get_editor_theme_icon(SNAME("GPUParticles2D")));
|
menu->set_icon(menu->get_editor_theme_icon(SNAME("GPUParticles2D")));
|
||||||
file->connect("file_selected", callable_mp(this, &GPUParticles2DEditorPlugin::_file_selected));
|
file->connect("file_selected", callable_mp(this, &GPUParticles2DEditorPlugin::_file_selected));
|
||||||
EditorNode::get_singleton()->get_editor_selection()->connect("selection_changed", callable_mp(this, &GPUParticles2DEditorPlugin::_selection_changed));
|
EditorNode::get_singleton()->get_editor_selection()->connect("selection_changed", callable_mp(this, &GPUParticles2DEditorPlugin::_selection_changed));
|
||||||
|
@ -420,7 +420,7 @@ GPUParticles3DEditor::GPUParticles3DEditor() {
|
|||||||
options->get_popup()->add_item(TTR("Create Emission Points From Node"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE);
|
options->get_popup()->add_item(TTR("Create Emission Points From Node"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE);
|
||||||
options->get_popup()->add_item(TTR("Convert to CPUParticles3D"), MENU_OPTION_CONVERT_TO_CPU_PARTICLES);
|
options->get_popup()->add_item(TTR("Convert to CPUParticles3D"), MENU_OPTION_CONVERT_TO_CPU_PARTICLES);
|
||||||
|
|
||||||
options->get_popup()->connect("id_pressed", callable_mp(this, &GPUParticles3DEditor::_menu_option));
|
options->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &GPUParticles3DEditor::_menu_option));
|
||||||
|
|
||||||
generate_aabb = memnew(ConfirmationDialog);
|
generate_aabb = memnew(ConfirmationDialog);
|
||||||
generate_aabb->set_title(TTR("Generate Visibility AABB"));
|
generate_aabb->set_title(TTR("Generate Visibility AABB"));
|
||||||
|
@ -540,7 +540,7 @@ MeshInstance3DEditor::MeshInstance3DEditor() {
|
|||||||
options->get_popup()->add_item(TTR("View UV2"), MENU_OPTION_DEBUG_UV2);
|
options->get_popup()->add_item(TTR("View UV2"), MENU_OPTION_DEBUG_UV2);
|
||||||
options->get_popup()->add_item(TTR("Unwrap UV2 for Lightmap/AO"), MENU_OPTION_CREATE_UV2);
|
options->get_popup()->add_item(TTR("Unwrap UV2 for Lightmap/AO"), MENU_OPTION_CREATE_UV2);
|
||||||
|
|
||||||
options->get_popup()->connect("id_pressed", callable_mp(this, &MeshInstance3DEditor::_menu_option));
|
options->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &MeshInstance3DEditor::_menu_option));
|
||||||
|
|
||||||
outline_dialog = memnew(ConfirmationDialog);
|
outline_dialog = memnew(ConfirmationDialog);
|
||||||
outline_dialog->set_title(TTR("Create Outline Mesh"));
|
outline_dialog->set_title(TTR("Create Outline Mesh"));
|
||||||
|
@ -271,7 +271,7 @@ MeshLibraryEditor::MeshLibraryEditor() {
|
|||||||
menu->get_popup()->add_item(TTR("Import from Scene (Apply Transforms)"), MENU_OPTION_IMPORT_FROM_SCENE_APPLY_XFORMS);
|
menu->get_popup()->add_item(TTR("Import from Scene (Apply Transforms)"), MENU_OPTION_IMPORT_FROM_SCENE_APPLY_XFORMS);
|
||||||
menu->get_popup()->add_item(TTR("Update from Scene"), MENU_OPTION_UPDATE_FROM_SCENE);
|
menu->get_popup()->add_item(TTR("Update from Scene"), MENU_OPTION_UPDATE_FROM_SCENE);
|
||||||
menu->get_popup()->set_item_disabled(menu->get_popup()->get_item_index(MENU_OPTION_UPDATE_FROM_SCENE), true);
|
menu->get_popup()->set_item_disabled(menu->get_popup()->get_item_index(MENU_OPTION_UPDATE_FROM_SCENE), true);
|
||||||
menu->get_popup()->connect("id_pressed", callable_mp(this, &MeshLibraryEditor::_menu_cbk));
|
menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &MeshLibraryEditor::_menu_cbk));
|
||||||
menu->hide();
|
menu->hide();
|
||||||
|
|
||||||
cd_remove = memnew(ConfirmationDialog);
|
cd_remove = memnew(ConfirmationDialog);
|
||||||
|
@ -278,7 +278,7 @@ MultiMeshEditor::MultiMeshEditor() {
|
|||||||
options->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MultiMeshInstance3D"), EditorStringName(EditorIcons)));
|
options->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MultiMeshInstance3D"), EditorStringName(EditorIcons)));
|
||||||
|
|
||||||
options->get_popup()->add_item(TTR("Populate Surface"));
|
options->get_popup()->add_item(TTR("Populate Surface"));
|
||||||
options->get_popup()->connect("id_pressed", callable_mp(this, &MultiMeshEditor::_menu_option));
|
options->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &MultiMeshEditor::_menu_option));
|
||||||
|
|
||||||
populate_dialog = memnew(ConfirmationDialog);
|
populate_dialog = memnew(ConfirmationDialog);
|
||||||
populate_dialog->set_title(TTR("Populate MultiMesh"));
|
populate_dialog->set_title(TTR("Populate MultiMesh"));
|
||||||
|
@ -5294,8 +5294,8 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
|
|||||||
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/focus_selection"), VIEW_CENTER_TO_SELECTION);
|
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/focus_selection"), VIEW_CENTER_TO_SELECTION);
|
||||||
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/align_transform_with_view"), VIEW_ALIGN_TRANSFORM_WITH_VIEW);
|
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/align_transform_with_view"), VIEW_ALIGN_TRANSFORM_WITH_VIEW);
|
||||||
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/align_rotation_with_view"), VIEW_ALIGN_ROTATION_WITH_VIEW);
|
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/align_rotation_with_view"), VIEW_ALIGN_ROTATION_WITH_VIEW);
|
||||||
view_menu->get_popup()->connect("id_pressed", callable_mp(this, &Node3DEditorViewport::_menu_option));
|
view_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &Node3DEditorViewport::_menu_option));
|
||||||
display_submenu->connect("id_pressed", callable_mp(this, &Node3DEditorViewport::_menu_option));
|
display_submenu->connect(SceneStringName(id_pressed), callable_mp(this, &Node3DEditorViewport::_menu_option));
|
||||||
view_menu->set_disable_shortcuts(true);
|
view_menu->set_disable_shortcuts(true);
|
||||||
|
|
||||||
// TODO: Re-evaluate with new OpenGL3 renderer, and implement.
|
// TODO: Re-evaluate with new OpenGL3 renderer, and implement.
|
||||||
@ -5474,7 +5474,7 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
|
|||||||
selection_menu = memnew(PopupMenu);
|
selection_menu = memnew(PopupMenu);
|
||||||
add_child(selection_menu);
|
add_child(selection_menu);
|
||||||
selection_menu->set_min_size(Size2(100, 0) * EDSCALE);
|
selection_menu->set_min_size(Size2(100, 0) * EDSCALE);
|
||||||
selection_menu->connect("id_pressed", callable_mp(this, &Node3DEditorViewport::_selection_result_pressed));
|
selection_menu->connect(SceneStringName(id_pressed), callable_mp(this, &Node3DEditorViewport::_selection_result_pressed));
|
||||||
selection_menu->connect("popup_hide", callable_mp(this, &Node3DEditorViewport::_selection_menu_hide));
|
selection_menu->connect("popup_hide", callable_mp(this, &Node3DEditorViewport::_selection_menu_hide));
|
||||||
|
|
||||||
if (p_index == 0) {
|
if (p_index == 0) {
|
||||||
@ -8640,7 +8640,7 @@ Node3DEditor::Node3DEditor() {
|
|||||||
p->add_separator();
|
p->add_separator();
|
||||||
p->add_shortcut(ED_SHORTCUT("spatial_editor/configure_snap", TTR("Configure Snap...")), MENU_TRANSFORM_CONFIGURE_SNAP);
|
p->add_shortcut(ED_SHORTCUT("spatial_editor/configure_snap", TTR("Configure Snap...")), MENU_TRANSFORM_CONFIGURE_SNAP);
|
||||||
|
|
||||||
p->connect("id_pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed));
|
p->connect(SceneStringName(id_pressed), callable_mp(this, &Node3DEditor::_menu_item_pressed));
|
||||||
|
|
||||||
view_menu = memnew(MenuButton);
|
view_menu = memnew(MenuButton);
|
||||||
view_menu->set_flat(false);
|
view_menu->set_flat(false);
|
||||||
@ -8676,7 +8676,7 @@ Node3DEditor::Node3DEditor() {
|
|||||||
gizmos_menu = memnew(PopupMenu);
|
gizmos_menu = memnew(PopupMenu);
|
||||||
gizmos_menu->set_hide_on_checkable_item_selection(false);
|
gizmos_menu->set_hide_on_checkable_item_selection(false);
|
||||||
p->add_submenu_node_item(TTR("Gizmos"), gizmos_menu);
|
p->add_submenu_node_item(TTR("Gizmos"), gizmos_menu);
|
||||||
gizmos_menu->connect("id_pressed", callable_mp(this, &Node3DEditor::_menu_gizmo_toggled));
|
gizmos_menu->connect(SceneStringName(id_pressed), callable_mp(this, &Node3DEditor::_menu_gizmo_toggled));
|
||||||
|
|
||||||
p->add_separator();
|
p->add_separator();
|
||||||
p->add_check_shortcut(ED_SHORTCUT("spatial_editor/view_origin", TTR("View Origin")), MENU_VIEW_ORIGIN);
|
p->add_check_shortcut(ED_SHORTCUT("spatial_editor/view_origin", TTR("View Origin")), MENU_VIEW_ORIGIN);
|
||||||
@ -8688,7 +8688,7 @@ Node3DEditor::Node3DEditor() {
|
|||||||
p->set_item_checked(p->get_item_index(MENU_VIEW_ORIGIN), true);
|
p->set_item_checked(p->get_item_index(MENU_VIEW_ORIGIN), true);
|
||||||
p->set_item_checked(p->get_item_index(MENU_VIEW_GRID), true);
|
p->set_item_checked(p->get_item_index(MENU_VIEW_GRID), true);
|
||||||
|
|
||||||
p->connect("id_pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed));
|
p->connect(SceneStringName(id_pressed), callable_mp(this, &Node3DEditor::_menu_item_pressed));
|
||||||
|
|
||||||
/* REST OF MENU */
|
/* REST OF MENU */
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ void ParallaxBackgroundEditorPlugin::convert_to_parallax2d() {
|
|||||||
void ParallaxBackgroundEditorPlugin::_notification(int p_what) {
|
void ParallaxBackgroundEditorPlugin::_notification(int p_what) {
|
||||||
switch (p_what) {
|
switch (p_what) {
|
||||||
case NOTIFICATION_ENTER_TREE: {
|
case NOTIFICATION_ENTER_TREE: {
|
||||||
menu->get_popup()->connect("id_pressed", callable_mp(this, &ParallaxBackgroundEditorPlugin::_menu_callback));
|
menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &ParallaxBackgroundEditorPlugin::_menu_callback));
|
||||||
menu->set_icon(menu->get_editor_theme_icon(SNAME("ParallaxBackground")));
|
menu->set_icon(menu->get_editor_theme_icon(SNAME("ParallaxBackground")));
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
|
@ -672,7 +672,7 @@ Path2DEditor::Path2DEditor() {
|
|||||||
menu->set_item_checked(HANDLE_OPTION_ANGLE, mirror_handle_angle);
|
menu->set_item_checked(HANDLE_OPTION_ANGLE, mirror_handle_angle);
|
||||||
menu->add_check_item(TTR("Mirror Handle Lengths"));
|
menu->add_check_item(TTR("Mirror Handle Lengths"));
|
||||||
menu->set_item_checked(HANDLE_OPTION_LENGTH, mirror_handle_length);
|
menu->set_item_checked(HANDLE_OPTION_LENGTH, mirror_handle_length);
|
||||||
menu->connect("id_pressed", callable_mp(this, &Path2DEditor::_handle_option_pressed));
|
menu->connect(SceneStringName(id_pressed), callable_mp(this, &Path2DEditor::_handle_option_pressed));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Path2DEditorPlugin::edit(Object *p_object) {
|
void Path2DEditorPlugin::edit(Object *p_object) {
|
||||||
|
@ -896,7 +896,7 @@ Path3DEditorPlugin::Path3DEditorPlugin() {
|
|||||||
menu->set_item_checked(HANDLE_OPTION_ANGLE, mirror_handle_angle);
|
menu->set_item_checked(HANDLE_OPTION_ANGLE, mirror_handle_angle);
|
||||||
menu->add_check_item(TTR("Mirror Handle Lengths"));
|
menu->add_check_item(TTR("Mirror Handle Lengths"));
|
||||||
menu->set_item_checked(HANDLE_OPTION_LENGTH, mirror_handle_length);
|
menu->set_item_checked(HANDLE_OPTION_LENGTH, mirror_handle_length);
|
||||||
menu->connect("id_pressed", callable_mp(this, &Path3DEditorPlugin::_handle_option_pressed));
|
menu->connect(SceneStringName(id_pressed), callable_mp(this, &Path3DEditorPlugin::_handle_option_pressed));
|
||||||
|
|
||||||
curve_edit->set_pressed(true);
|
curve_edit->set_pressed(true);
|
||||||
}
|
}
|
||||||
|
@ -1434,7 +1434,7 @@ Polygon2DEditor::Polygon2DEditor() {
|
|||||||
uv_menu->get_popup()->add_item(TTR("Clear UV"), UVEDIT_UV_CLEAR);
|
uv_menu->get_popup()->add_item(TTR("Clear UV"), UVEDIT_UV_CLEAR);
|
||||||
uv_menu->get_popup()->add_separator();
|
uv_menu->get_popup()->add_separator();
|
||||||
uv_menu->get_popup()->add_item(TTR("Grid Settings"), UVEDIT_GRID_SETTINGS);
|
uv_menu->get_popup()->add_item(TTR("Grid Settings"), UVEDIT_GRID_SETTINGS);
|
||||||
uv_menu->get_popup()->connect("id_pressed", callable_mp(this, &Polygon2DEditor::_menu_option));
|
uv_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &Polygon2DEditor::_menu_option));
|
||||||
|
|
||||||
uv_mode_hb->add_child(memnew(VSeparator));
|
uv_mode_hb->add_child(memnew(VSeparator));
|
||||||
|
|
||||||
|
@ -4038,7 +4038,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
|
|||||||
|
|
||||||
context_menu = memnew(PopupMenu);
|
context_menu = memnew(PopupMenu);
|
||||||
add_child(context_menu);
|
add_child(context_menu);
|
||||||
context_menu->connect("id_pressed", callable_mp(this, &ScriptEditor::_menu_option));
|
context_menu->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptEditor::_menu_option));
|
||||||
|
|
||||||
overview_vbox = memnew(VBoxContainer);
|
overview_vbox = memnew(VBoxContainer);
|
||||||
overview_vbox->set_custom_minimum_size(Size2(0, 90));
|
overview_vbox->set_custom_minimum_size(Size2(0, 90));
|
||||||
@ -4122,7 +4122,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
|
|||||||
|
|
||||||
recent_scripts = memnew(PopupMenu);
|
recent_scripts = memnew(PopupMenu);
|
||||||
file_menu->get_popup()->add_submenu_node_item(TTR("Open Recent"), recent_scripts, FILE_OPEN_RECENT);
|
file_menu->get_popup()->add_submenu_node_item(TTR("Open Recent"), recent_scripts, FILE_OPEN_RECENT);
|
||||||
recent_scripts->connect("id_pressed", callable_mp(this, &ScriptEditor::_open_recent_script));
|
recent_scripts->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptEditor::_open_recent_script));
|
||||||
|
|
||||||
_update_recent_scripts();
|
_update_recent_scripts();
|
||||||
|
|
||||||
@ -4148,7 +4148,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
|
|||||||
theme_submenu->add_shortcut(ED_SHORTCUT("script_editor/import_theme", TTR("Import Theme...")), THEME_IMPORT);
|
theme_submenu->add_shortcut(ED_SHORTCUT("script_editor/import_theme", TTR("Import Theme...")), THEME_IMPORT);
|
||||||
theme_submenu->add_shortcut(ED_SHORTCUT("script_editor/reload_theme", TTR("Reload Theme")), THEME_RELOAD);
|
theme_submenu->add_shortcut(ED_SHORTCUT("script_editor/reload_theme", TTR("Reload Theme")), THEME_RELOAD);
|
||||||
file_menu->get_popup()->add_submenu_node_item(TTR("Theme"), theme_submenu, FILE_THEME);
|
file_menu->get_popup()->add_submenu_node_item(TTR("Theme"), theme_submenu, FILE_THEME);
|
||||||
theme_submenu->connect("id_pressed", callable_mp(this, &ScriptEditor::_theme_option));
|
theme_submenu->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptEditor::_theme_option));
|
||||||
|
|
||||||
theme_submenu->add_separator();
|
theme_submenu->add_separator();
|
||||||
theme_submenu->add_shortcut(ED_SHORTCUT("script_editor/save_theme", TTR("Save Theme")), THEME_SAVE);
|
theme_submenu->add_shortcut(ED_SHORTCUT("script_editor/save_theme", TTR("Save Theme")), THEME_SAVE);
|
||||||
@ -4165,7 +4165,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
|
|||||||
|
|
||||||
file_menu->get_popup()->add_separator();
|
file_menu->get_popup()->add_separator();
|
||||||
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/toggle_scripts_panel", TTR("Toggle Scripts Panel"), KeyModifierMask::CMD_OR_CTRL | Key::BACKSLASH), TOGGLE_SCRIPTS_PANEL);
|
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/toggle_scripts_panel", TTR("Toggle Scripts Panel"), KeyModifierMask::CMD_OR_CTRL | Key::BACKSLASH), TOGGLE_SCRIPTS_PANEL);
|
||||||
file_menu->get_popup()->connect("id_pressed", callable_mp(this, &ScriptEditor::_menu_option));
|
file_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptEditor::_menu_option));
|
||||||
file_menu->get_popup()->connect("about_to_popup", callable_mp(this, &ScriptEditor::_prepare_file_menu));
|
file_menu->get_popup()->connect("about_to_popup", callable_mp(this, &ScriptEditor::_prepare_file_menu));
|
||||||
file_menu->get_popup()->connect("popup_hide", callable_mp(this, &ScriptEditor::_file_menu_closed));
|
file_menu->get_popup()->connect("popup_hide", callable_mp(this, &ScriptEditor::_file_menu_closed));
|
||||||
|
|
||||||
@ -4173,7 +4173,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
|
|||||||
script_search_menu->set_text(TTR("Search"));
|
script_search_menu->set_text(TTR("Search"));
|
||||||
script_search_menu->set_switch_on_hover(true);
|
script_search_menu->set_switch_on_hover(true);
|
||||||
script_search_menu->set_shortcut_context(this);
|
script_search_menu->set_shortcut_context(this);
|
||||||
script_search_menu->get_popup()->connect("id_pressed", callable_mp(this, &ScriptEditor::_menu_option));
|
script_search_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptEditor::_menu_option));
|
||||||
menu_hb->add_child(script_search_menu);
|
menu_hb->add_child(script_search_menu);
|
||||||
|
|
||||||
MenuButton *debug_menu_btn = memnew(MenuButton);
|
MenuButton *debug_menu_btn = memnew(MenuButton);
|
||||||
|
@ -2254,7 +2254,7 @@ void ScriptTextEditor::_enable_code_editor() {
|
|||||||
errors_panel->connect("meta_clicked", callable_mp(this, &ScriptTextEditor::_error_clicked));
|
errors_panel->connect("meta_clicked", callable_mp(this, &ScriptTextEditor::_error_clicked));
|
||||||
|
|
||||||
add_child(context_menu);
|
add_child(context_menu);
|
||||||
context_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
|
context_menu->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptTextEditor::_edit_option));
|
||||||
|
|
||||||
add_child(color_panel);
|
add_child(color_panel);
|
||||||
|
|
||||||
@ -2297,7 +2297,7 @@ void ScriptTextEditor::_enable_code_editor() {
|
|||||||
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/unindent"), EDIT_UNINDENT);
|
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/unindent"), EDIT_UNINDENT);
|
||||||
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/delete_line"), EDIT_DELETE_LINE);
|
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/delete_line"), EDIT_DELETE_LINE);
|
||||||
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_comment"), EDIT_TOGGLE_COMMENT);
|
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_comment"), EDIT_TOGGLE_COMMENT);
|
||||||
sub_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
|
sub_menu->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptTextEditor::_edit_option));
|
||||||
edit_menu->get_popup()->add_submenu_node_item(TTR("Line"), sub_menu);
|
edit_menu->get_popup()->add_submenu_node_item(TTR("Line"), sub_menu);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@ -2306,7 +2306,7 @@ void ScriptTextEditor::_enable_code_editor() {
|
|||||||
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/fold_all_lines"), EDIT_FOLD_ALL_LINES);
|
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/fold_all_lines"), EDIT_FOLD_ALL_LINES);
|
||||||
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/unfold_all_lines"), EDIT_UNFOLD_ALL_LINES);
|
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/unfold_all_lines"), EDIT_UNFOLD_ALL_LINES);
|
||||||
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/create_code_region"), EDIT_CREATE_CODE_REGION);
|
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/create_code_region"), EDIT_CREATE_CODE_REGION);
|
||||||
sub_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
|
sub_menu->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptTextEditor::_edit_option));
|
||||||
edit_menu->get_popup()->add_submenu_node_item(TTR("Folding"), sub_menu);
|
edit_menu->get_popup()->add_submenu_node_item(TTR("Folding"), sub_menu);
|
||||||
}
|
}
|
||||||
edit_menu->get_popup()->add_separator();
|
edit_menu->get_popup()->add_separator();
|
||||||
@ -2318,21 +2318,21 @@ void ScriptTextEditor::_enable_code_editor() {
|
|||||||
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_indent_to_spaces"), EDIT_CONVERT_INDENT_TO_SPACES);
|
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_indent_to_spaces"), EDIT_CONVERT_INDENT_TO_SPACES);
|
||||||
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_indent_to_tabs"), EDIT_CONVERT_INDENT_TO_TABS);
|
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_indent_to_tabs"), EDIT_CONVERT_INDENT_TO_TABS);
|
||||||
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/auto_indent"), EDIT_AUTO_INDENT);
|
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/auto_indent"), EDIT_AUTO_INDENT);
|
||||||
sub_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
|
sub_menu->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptTextEditor::_edit_option));
|
||||||
edit_menu->get_popup()->add_submenu_node_item(TTR("Indentation"), sub_menu);
|
edit_menu->get_popup()->add_submenu_node_item(TTR("Indentation"), sub_menu);
|
||||||
}
|
}
|
||||||
edit_menu->get_popup()->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
|
edit_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptTextEditor::_edit_option));
|
||||||
edit_menu->get_popup()->add_separator();
|
edit_menu->get_popup()->add_separator();
|
||||||
{
|
{
|
||||||
PopupMenu *sub_menu = memnew(PopupMenu);
|
PopupMenu *sub_menu = memnew(PopupMenu);
|
||||||
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_to_uppercase"), EDIT_TO_UPPERCASE);
|
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_to_uppercase"), EDIT_TO_UPPERCASE);
|
||||||
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_to_lowercase"), EDIT_TO_LOWERCASE);
|
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_to_lowercase"), EDIT_TO_LOWERCASE);
|
||||||
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/capitalize"), EDIT_CAPITALIZE);
|
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/capitalize"), EDIT_CAPITALIZE);
|
||||||
sub_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
|
sub_menu->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptTextEditor::_edit_option));
|
||||||
edit_menu->get_popup()->add_submenu_node_item(TTR("Convert Case"), sub_menu);
|
edit_menu->get_popup()->add_submenu_node_item(TTR("Convert Case"), sub_menu);
|
||||||
}
|
}
|
||||||
edit_menu->get_popup()->add_submenu_node_item(TTR("Syntax Highlighter"), highlighter_menu);
|
edit_menu->get_popup()->add_submenu_node_item(TTR("Syntax Highlighter"), highlighter_menu);
|
||||||
highlighter_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_change_syntax_highlighter));
|
highlighter_menu->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptTextEditor::_change_syntax_highlighter));
|
||||||
|
|
||||||
edit_hb->add_child(search_menu);
|
edit_hb->add_child(search_menu);
|
||||||
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find"), SEARCH_FIND);
|
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find"), SEARCH_FIND);
|
||||||
@ -2344,7 +2344,7 @@ void ScriptTextEditor::_enable_code_editor() {
|
|||||||
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/replace_in_files"), REPLACE_IN_FILES);
|
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/replace_in_files"), REPLACE_IN_FILES);
|
||||||
search_menu->get_popup()->add_separator();
|
search_menu->get_popup()->add_separator();
|
||||||
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/contextual_help"), HELP_CONTEXTUAL);
|
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/contextual_help"), HELP_CONTEXTUAL);
|
||||||
search_menu->get_popup()->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
|
search_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptTextEditor::_edit_option));
|
||||||
|
|
||||||
_load_theme_settings();
|
_load_theme_settings();
|
||||||
|
|
||||||
@ -2363,7 +2363,7 @@ void ScriptTextEditor::_enable_code_editor() {
|
|||||||
breakpoints_menu->connect("about_to_popup", callable_mp(this, &ScriptTextEditor::_update_breakpoint_list));
|
breakpoints_menu->connect("about_to_popup", callable_mp(this, &ScriptTextEditor::_update_breakpoint_list));
|
||||||
breakpoints_menu->connect("index_pressed", callable_mp(this, &ScriptTextEditor::_breakpoint_item_pressed));
|
breakpoints_menu->connect("index_pressed", callable_mp(this, &ScriptTextEditor::_breakpoint_item_pressed));
|
||||||
|
|
||||||
goto_menu->get_popup()->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
|
goto_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptTextEditor::_edit_option));
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptTextEditor::ScriptTextEditor() {
|
ScriptTextEditor::ScriptTextEditor() {
|
||||||
|
@ -699,7 +699,7 @@ ShaderEditorPlugin::ShaderEditorPlugin() {
|
|||||||
file_menu->get_popup()->add_item(TTR("Open File in Inspector"), FILE_INSPECT);
|
file_menu->get_popup()->add_item(TTR("Open File in Inspector"), FILE_INSPECT);
|
||||||
file_menu->get_popup()->add_separator();
|
file_menu->get_popup()->add_separator();
|
||||||
file_menu->get_popup()->add_item(TTR("Close File"), FILE_CLOSE);
|
file_menu->get_popup()->add_item(TTR("Close File"), FILE_CLOSE);
|
||||||
file_menu->get_popup()->connect("id_pressed", callable_mp(this, &ShaderEditorPlugin::_menu_item_pressed));
|
file_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &ShaderEditorPlugin::_menu_item_pressed));
|
||||||
menu_hb->add_child(file_menu);
|
menu_hb->add_child(file_menu);
|
||||||
|
|
||||||
for (int i = FILE_SAVE; i < FILE_MAX; i++) {
|
for (int i = FILE_SAVE; i < FILE_MAX; i++) {
|
||||||
|
@ -107,7 +107,7 @@ Skeleton2DEditor::Skeleton2DEditor() {
|
|||||||
options->get_popup()->add_item(TTR("Overwrite Rest Pose"), MENU_OPTION_MAKE_REST);
|
options->get_popup()->add_item(TTR("Overwrite Rest Pose"), MENU_OPTION_MAKE_REST);
|
||||||
options->set_switch_on_hover(true);
|
options->set_switch_on_hover(true);
|
||||||
|
|
||||||
options->get_popup()->connect("id_pressed", callable_mp(this, &Skeleton2DEditor::_menu_option));
|
options->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &Skeleton2DEditor::_menu_option));
|
||||||
|
|
||||||
err_dialog = memnew(AcceptDialog);
|
err_dialog = memnew(AcceptDialog);
|
||||||
add_child(err_dialog);
|
add_child(err_dialog);
|
||||||
|
@ -735,7 +735,7 @@ void Skeleton3DEditor::create_editors() {
|
|||||||
p->add_item(TTR("Create Physical Skeleton"), SKELETON_OPTION_CREATE_PHYSICAL_SKELETON);
|
p->add_item(TTR("Create Physical Skeleton"), SKELETON_OPTION_CREATE_PHYSICAL_SKELETON);
|
||||||
p->add_item(TTR("Export Skeleton Profile"), SKELETON_OPTION_EXPORT_SKELETON_PROFILE);
|
p->add_item(TTR("Export Skeleton Profile"), SKELETON_OPTION_EXPORT_SKELETON_PROFILE);
|
||||||
|
|
||||||
p->connect("id_pressed", callable_mp(this, &Skeleton3DEditor::_on_click_skeleton_option));
|
p->connect(SceneStringName(id_pressed), callable_mp(this, &Skeleton3DEditor::_on_click_skeleton_option));
|
||||||
set_bone_options_enabled(false);
|
set_bone_options_enabled(false);
|
||||||
|
|
||||||
Vector<Variant> button_binds;
|
Vector<Variant> button_binds;
|
||||||
|
@ -587,7 +587,7 @@ Sprite2DEditor::Sprite2DEditor() {
|
|||||||
options->get_popup()->add_item(TTR("Create LightOccluder2D Sibling"), MENU_OPTION_CREATE_LIGHT_OCCLUDER_2D);
|
options->get_popup()->add_item(TTR("Create LightOccluder2D Sibling"), MENU_OPTION_CREATE_LIGHT_OCCLUDER_2D);
|
||||||
options->set_switch_on_hover(true);
|
options->set_switch_on_hover(true);
|
||||||
|
|
||||||
options->get_popup()->connect("id_pressed", callable_mp(this, &Sprite2DEditor::_menu_option));
|
options->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &Sprite2DEditor::_menu_option));
|
||||||
|
|
||||||
err_dialog = memnew(AcceptDialog);
|
err_dialog = memnew(AcceptDialog);
|
||||||
add_child(err_dialog);
|
add_child(err_dialog);
|
||||||
|
@ -614,7 +614,7 @@ TextEditor::TextEditor() {
|
|||||||
|
|
||||||
context_menu = memnew(PopupMenu);
|
context_menu = memnew(PopupMenu);
|
||||||
add_child(context_menu);
|
add_child(context_menu);
|
||||||
context_menu->connect("id_pressed", callable_mp(this, &TextEditor::_edit_option));
|
context_menu->connect(SceneStringName(id_pressed), callable_mp(this, &TextEditor::_edit_option));
|
||||||
|
|
||||||
edit_hb = memnew(HBoxContainer);
|
edit_hb = memnew(HBoxContainer);
|
||||||
|
|
||||||
@ -624,7 +624,7 @@ TextEditor::TextEditor() {
|
|||||||
edit_menu->set_text(TTR("Edit"));
|
edit_menu->set_text(TTR("Edit"));
|
||||||
edit_menu->set_switch_on_hover(true);
|
edit_menu->set_switch_on_hover(true);
|
||||||
edit_menu->connect("about_to_popup", callable_mp(this, &TextEditor::_prepare_edit_menu));
|
edit_menu->connect("about_to_popup", callable_mp(this, &TextEditor::_prepare_edit_menu));
|
||||||
edit_menu->get_popup()->connect("id_pressed", callable_mp(this, &TextEditor::_edit_option));
|
edit_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &TextEditor::_edit_option));
|
||||||
|
|
||||||
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_undo"), EDIT_UNDO);
|
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_undo"), EDIT_UNDO);
|
||||||
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_redo"), EDIT_REDO);
|
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_redo"), EDIT_REDO);
|
||||||
@ -658,11 +658,11 @@ TextEditor::TextEditor() {
|
|||||||
convert_case->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_to_uppercase"), EDIT_TO_UPPERCASE);
|
convert_case->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_to_uppercase"), EDIT_TO_UPPERCASE);
|
||||||
convert_case->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_to_lowercase"), EDIT_TO_LOWERCASE);
|
convert_case->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_to_lowercase"), EDIT_TO_LOWERCASE);
|
||||||
convert_case->add_shortcut(ED_GET_SHORTCUT("script_text_editor/capitalize"), EDIT_CAPITALIZE);
|
convert_case->add_shortcut(ED_GET_SHORTCUT("script_text_editor/capitalize"), EDIT_CAPITALIZE);
|
||||||
convert_case->connect("id_pressed", callable_mp(this, &TextEditor::_edit_option));
|
convert_case->connect(SceneStringName(id_pressed), callable_mp(this, &TextEditor::_edit_option));
|
||||||
|
|
||||||
highlighter_menu = memnew(PopupMenu);
|
highlighter_menu = memnew(PopupMenu);
|
||||||
edit_menu->get_popup()->add_submenu_node_item(TTR("Syntax Highlighter"), highlighter_menu);
|
edit_menu->get_popup()->add_submenu_node_item(TTR("Syntax Highlighter"), highlighter_menu);
|
||||||
highlighter_menu->connect("id_pressed", callable_mp(this, &TextEditor::_change_syntax_highlighter));
|
highlighter_menu->connect(SceneStringName(id_pressed), callable_mp(this, &TextEditor::_change_syntax_highlighter));
|
||||||
|
|
||||||
Ref<EditorPlainTextSyntaxHighlighter> plain_highlighter;
|
Ref<EditorPlainTextSyntaxHighlighter> plain_highlighter;
|
||||||
plain_highlighter.instantiate();
|
plain_highlighter.instantiate();
|
||||||
@ -678,7 +678,7 @@ TextEditor::TextEditor() {
|
|||||||
edit_hb->add_child(search_menu);
|
edit_hb->add_child(search_menu);
|
||||||
search_menu->set_text(TTR("Search"));
|
search_menu->set_text(TTR("Search"));
|
||||||
search_menu->set_switch_on_hover(true);
|
search_menu->set_switch_on_hover(true);
|
||||||
search_menu->get_popup()->connect("id_pressed", callable_mp(this, &TextEditor::_edit_option));
|
search_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &TextEditor::_edit_option));
|
||||||
|
|
||||||
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find"), SEARCH_FIND);
|
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find"), SEARCH_FIND);
|
||||||
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_next"), SEARCH_FIND_NEXT);
|
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_next"), SEARCH_FIND_NEXT);
|
||||||
@ -693,7 +693,7 @@ TextEditor::TextEditor() {
|
|||||||
edit_hb->add_child(goto_menu);
|
edit_hb->add_child(goto_menu);
|
||||||
goto_menu->set_text(TTR("Go To"));
|
goto_menu->set_text(TTR("Go To"));
|
||||||
goto_menu->set_switch_on_hover(true);
|
goto_menu->set_switch_on_hover(true);
|
||||||
goto_menu->get_popup()->connect("id_pressed", callable_mp(this, &TextEditor::_edit_option));
|
goto_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &TextEditor::_edit_option));
|
||||||
|
|
||||||
goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"), SEARCH_GOTO_LINE);
|
goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"), SEARCH_GOTO_LINE);
|
||||||
goto_menu->get_popup()->add_separator();
|
goto_menu->get_popup()->add_separator();
|
||||||
|
@ -1138,7 +1138,7 @@ TextShaderEditor::TextShaderEditor() {
|
|||||||
|
|
||||||
context_menu = memnew(PopupMenu);
|
context_menu = memnew(PopupMenu);
|
||||||
add_child(context_menu);
|
add_child(context_menu);
|
||||||
context_menu->connect("id_pressed", callable_mp(this, &TextShaderEditor::_menu_option));
|
context_menu->connect(SceneStringName(id_pressed), callable_mp(this, &TextShaderEditor::_menu_option));
|
||||||
|
|
||||||
VBoxContainer *main_container = memnew(VBoxContainer);
|
VBoxContainer *main_container = memnew(VBoxContainer);
|
||||||
HBoxContainer *hbc = memnew(HBoxContainer);
|
HBoxContainer *hbc = memnew(HBoxContainer);
|
||||||
@ -1169,7 +1169,7 @@ TextShaderEditor::TextShaderEditor() {
|
|||||||
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_word_wrap"), EDIT_TOGGLE_WORD_WRAP);
|
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_word_wrap"), EDIT_TOGGLE_WORD_WRAP);
|
||||||
edit_menu->get_popup()->add_separator();
|
edit_menu->get_popup()->add_separator();
|
||||||
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_text_completion_query"), EDIT_COMPLETE);
|
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_text_completion_query"), EDIT_COMPLETE);
|
||||||
edit_menu->get_popup()->connect("id_pressed", callable_mp(this, &TextShaderEditor::_menu_option));
|
edit_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &TextShaderEditor::_menu_option));
|
||||||
|
|
||||||
search_menu = memnew(MenuButton);
|
search_menu = memnew(MenuButton);
|
||||||
search_menu->set_shortcut_context(this);
|
search_menu->set_shortcut_context(this);
|
||||||
@ -1180,13 +1180,13 @@ TextShaderEditor::TextShaderEditor() {
|
|||||||
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_next"), SEARCH_FIND_NEXT);
|
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_next"), SEARCH_FIND_NEXT);
|
||||||
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_previous"), SEARCH_FIND_PREV);
|
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_previous"), SEARCH_FIND_PREV);
|
||||||
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/replace"), SEARCH_REPLACE);
|
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/replace"), SEARCH_REPLACE);
|
||||||
search_menu->get_popup()->connect("id_pressed", callable_mp(this, &TextShaderEditor::_menu_option));
|
search_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &TextShaderEditor::_menu_option));
|
||||||
|
|
||||||
MenuButton *goto_menu = memnew(MenuButton);
|
MenuButton *goto_menu = memnew(MenuButton);
|
||||||
goto_menu->set_shortcut_context(this);
|
goto_menu->set_shortcut_context(this);
|
||||||
goto_menu->set_text(TTR("Go To"));
|
goto_menu->set_text(TTR("Go To"));
|
||||||
goto_menu->set_switch_on_hover(true);
|
goto_menu->set_switch_on_hover(true);
|
||||||
goto_menu->get_popup()->connect("id_pressed", callable_mp(this, &TextShaderEditor::_menu_option));
|
goto_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &TextShaderEditor::_menu_option));
|
||||||
|
|
||||||
goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"), SEARCH_GOTO_LINE);
|
goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"), SEARCH_GOTO_LINE);
|
||||||
goto_menu->get_popup()->add_separator();
|
goto_menu->get_popup()->add_separator();
|
||||||
@ -1201,7 +1201,7 @@ TextShaderEditor::TextShaderEditor() {
|
|||||||
help_menu->set_text(TTR("Help"));
|
help_menu->set_text(TTR("Help"));
|
||||||
help_menu->set_switch_on_hover(true);
|
help_menu->set_switch_on_hover(true);
|
||||||
help_menu->get_popup()->add_item(TTR("Online Docs"), HELP_DOCS);
|
help_menu->get_popup()->add_item(TTR("Online Docs"), HELP_DOCS);
|
||||||
help_menu->get_popup()->connect("id_pressed", callable_mp(this, &TextShaderEditor::_menu_option));
|
help_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &TextShaderEditor::_menu_option));
|
||||||
|
|
||||||
add_child(main_container);
|
add_child(main_container);
|
||||||
main_container->add_child(hbc);
|
main_container->add_child(hbc);
|
||||||
|
@ -903,7 +903,7 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() {
|
|||||||
button_advanced_menu->get_popup()->add_item(TTR("Rotate Left"), ROTATE_LEFT, Key::E);
|
button_advanced_menu->get_popup()->add_item(TTR("Rotate Left"), ROTATE_LEFT, Key::E);
|
||||||
button_advanced_menu->get_popup()->add_item(TTR("Flip Horizontally"), FLIP_HORIZONTALLY, Key::H);
|
button_advanced_menu->get_popup()->add_item(TTR("Flip Horizontally"), FLIP_HORIZONTALLY, Key::H);
|
||||||
button_advanced_menu->get_popup()->add_item(TTR("Flip Vertically"), FLIP_VERTICALLY, Key::V);
|
button_advanced_menu->get_popup()->add_item(TTR("Flip Vertically"), FLIP_VERTICALLY, Key::V);
|
||||||
button_advanced_menu->get_popup()->connect("id_pressed", callable_mp(this, &GenericTilePolygonEditor::_advanced_menu_item_pressed));
|
button_advanced_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &GenericTilePolygonEditor::_advanced_menu_item_pressed));
|
||||||
button_advanced_menu->set_focus_mode(FOCUS_ALL);
|
button_advanced_menu->set_focus_mode(FOCUS_ALL);
|
||||||
toolbar->add_child(button_advanced_menu);
|
toolbar->add_child(button_advanced_menu);
|
||||||
|
|
||||||
|
@ -2389,7 +2389,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
|||||||
source_sort_button->set_tooltip_text(TTR("Sort sources"));
|
source_sort_button->set_tooltip_text(TTR("Sort sources"));
|
||||||
|
|
||||||
PopupMenu *p = source_sort_button->get_popup();
|
PopupMenu *p = source_sort_button->get_popup();
|
||||||
p->connect("id_pressed", callable_mp(this, &TileMapLayerEditorTilesPlugin::_set_source_sort));
|
p->connect(SceneStringName(id_pressed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_set_source_sort));
|
||||||
p->add_radio_check_item(TTR("Sort by ID (Ascending)"), TilesEditorUtils::SOURCE_SORT_ID);
|
p->add_radio_check_item(TTR("Sort by ID (Ascending)"), TilesEditorUtils::SOURCE_SORT_ID);
|
||||||
p->add_radio_check_item(TTR("Sort by ID (Descending)"), TilesEditorUtils::SOURCE_SORT_ID_REVERSE);
|
p->add_radio_check_item(TTR("Sort by ID (Descending)"), TilesEditorUtils::SOURCE_SORT_ID_REVERSE);
|
||||||
p->add_radio_check_item(TTR("Sort by Name (Ascending)"), TilesEditorUtils::SOURCE_SORT_NAME);
|
p->add_radio_check_item(TTR("Sort by Name (Ascending)"), TilesEditorUtils::SOURCE_SORT_NAME);
|
||||||
@ -4491,7 +4491,7 @@ TileMapLayerEditor::TileMapLayerEditor() {
|
|||||||
advanced_menu_button->set_theme_type_variation("FlatButton");
|
advanced_menu_button->set_theme_type_variation("FlatButton");
|
||||||
advanced_menu_button->get_popup()->add_item(TTR("Automatically Replace Tiles with Proxies"), ADVANCED_MENU_REPLACE_WITH_PROXIES);
|
advanced_menu_button->get_popup()->add_item(TTR("Automatically Replace Tiles with Proxies"), ADVANCED_MENU_REPLACE_WITH_PROXIES);
|
||||||
advanced_menu_button->get_popup()->add_item(TTR("Extract TileMap layers as individual TileMapLayer nodes"), ADVANCED_MENU_EXTRACT_TILE_MAP_LAYERS);
|
advanced_menu_button->get_popup()->add_item(TTR("Extract TileMap layers as individual TileMapLayer nodes"), ADVANCED_MENU_EXTRACT_TILE_MAP_LAYERS);
|
||||||
advanced_menu_button->get_popup()->connect("id_pressed", callable_mp(this, &TileMapLayerEditor::_advanced_menu_button_id_pressed));
|
advanced_menu_button->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &TileMapLayerEditor::_advanced_menu_button_id_pressed));
|
||||||
tile_map_toolbar->add_child(advanced_menu_button);
|
tile_map_toolbar->add_child(advanced_menu_button);
|
||||||
|
|
||||||
// A label for editing errors.
|
// A label for editing errors.
|
||||||
|
@ -378,7 +378,7 @@ TileProxiesManagerDialog::TileProxiesManagerDialog() {
|
|||||||
|
|
||||||
popup_menu = memnew(PopupMenu);
|
popup_menu = memnew(PopupMenu);
|
||||||
popup_menu->add_shortcut(ED_GET_SHORTCUT("ui_text_delete"));
|
popup_menu->add_shortcut(ED_GET_SHORTCUT("ui_text_delete"));
|
||||||
popup_menu->connect("id_pressed", callable_mp(this, &TileProxiesManagerDialog::_menu_id_pressed));
|
popup_menu->connect(SceneStringName(id_pressed), callable_mp(this, &TileProxiesManagerDialog::_menu_id_pressed));
|
||||||
add_child(popup_menu);
|
add_child(popup_menu);
|
||||||
|
|
||||||
// Add proxy panel.
|
// Add proxy panel.
|
||||||
|
@ -2637,7 +2637,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
|
|||||||
tool_advanced_menu_button->get_popup()->add_item(TTR("Create Tiles in Non-Transparent Texture Regions"), ADVANCED_AUTO_CREATE_TILES);
|
tool_advanced_menu_button->get_popup()->add_item(TTR("Create Tiles in Non-Transparent Texture Regions"), ADVANCED_AUTO_CREATE_TILES);
|
||||||
tool_advanced_menu_button->get_popup()->add_item(TTR("Remove Tiles in Fully Transparent Texture Regions"), ADVANCED_AUTO_REMOVE_TILES);
|
tool_advanced_menu_button->get_popup()->add_item(TTR("Remove Tiles in Fully Transparent Texture Regions"), ADVANCED_AUTO_REMOVE_TILES);
|
||||||
tool_advanced_menu_button->get_popup()->add_item(TTR("Remove Tiles Outside the Texture"), ADVANCED_CLEANUP_TILES);
|
tool_advanced_menu_button->get_popup()->add_item(TTR("Remove Tiles Outside the Texture"), ADVANCED_CLEANUP_TILES);
|
||||||
tool_advanced_menu_button->get_popup()->connect("id_pressed", callable_mp(this, &TileSetAtlasSourceEditor::_menu_option));
|
tool_advanced_menu_button->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &TileSetAtlasSourceEditor::_menu_option));
|
||||||
tool_settings->add_child(tool_advanced_menu_button);
|
tool_settings->add_child(tool_advanced_menu_button);
|
||||||
|
|
||||||
outside_tiles_warning = memnew(TextureRect);
|
outside_tiles_warning = memnew(TextureRect);
|
||||||
@ -2689,12 +2689,12 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
|
|||||||
base_tile_popup_menu = memnew(PopupMenu);
|
base_tile_popup_menu = memnew(PopupMenu);
|
||||||
base_tile_popup_menu->add_shortcut(ED_GET_SHORTCUT("tiles_editor/delete"), TILE_DELETE);
|
base_tile_popup_menu->add_shortcut(ED_GET_SHORTCUT("tiles_editor/delete"), TILE_DELETE);
|
||||||
base_tile_popup_menu->add_item(TTR("Create an Alternative Tile"), TILE_CREATE_ALTERNATIVE);
|
base_tile_popup_menu->add_item(TTR("Create an Alternative Tile"), TILE_CREATE_ALTERNATIVE);
|
||||||
base_tile_popup_menu->connect("id_pressed", callable_mp(this, &TileSetAtlasSourceEditor::_menu_option));
|
base_tile_popup_menu->connect(SceneStringName(id_pressed), callable_mp(this, &TileSetAtlasSourceEditor::_menu_option));
|
||||||
tile_atlas_view->add_child(base_tile_popup_menu);
|
tile_atlas_view->add_child(base_tile_popup_menu);
|
||||||
|
|
||||||
empty_base_tile_popup_menu = memnew(PopupMenu);
|
empty_base_tile_popup_menu = memnew(PopupMenu);
|
||||||
empty_base_tile_popup_menu->add_item(TTR("Create a Tile"), TILE_CREATE);
|
empty_base_tile_popup_menu->add_item(TTR("Create a Tile"), TILE_CREATE);
|
||||||
empty_base_tile_popup_menu->connect("id_pressed", callable_mp(this, &TileSetAtlasSourceEditor::_menu_option));
|
empty_base_tile_popup_menu->connect(SceneStringName(id_pressed), callable_mp(this, &TileSetAtlasSourceEditor::_menu_option));
|
||||||
tile_atlas_view->add_child(empty_base_tile_popup_menu);
|
tile_atlas_view->add_child(empty_base_tile_popup_menu);
|
||||||
|
|
||||||
tile_atlas_control = memnew(TileAtlasControl(this));
|
tile_atlas_control = memnew(TileAtlasControl(this));
|
||||||
@ -2710,7 +2710,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
|
|||||||
|
|
||||||
alternative_tile_popup_menu = memnew(PopupMenu);
|
alternative_tile_popup_menu = memnew(PopupMenu);
|
||||||
alternative_tile_popup_menu->add_shortcut(ED_SHORTCUT("tiles_editor/delete_tile", TTR("Delete"), Key::KEY_DELETE), TILE_DELETE);
|
alternative_tile_popup_menu->add_shortcut(ED_SHORTCUT("tiles_editor/delete_tile", TTR("Delete"), Key::KEY_DELETE), TILE_DELETE);
|
||||||
alternative_tile_popup_menu->connect("id_pressed", callable_mp(this, &TileSetAtlasSourceEditor::_menu_option));
|
alternative_tile_popup_menu->connect(SceneStringName(id_pressed), callable_mp(this, &TileSetAtlasSourceEditor::_menu_option));
|
||||||
tile_atlas_view->add_child(alternative_tile_popup_menu);
|
tile_atlas_view->add_child(alternative_tile_popup_menu);
|
||||||
|
|
||||||
alternative_tiles_control = memnew(Control);
|
alternative_tiles_control = memnew(Control);
|
||||||
|
@ -849,7 +849,7 @@ TileSetEditor::TileSetEditor() {
|
|||||||
source_sort_button->set_tooltip_text(TTR("Sort Sources"));
|
source_sort_button->set_tooltip_text(TTR("Sort Sources"));
|
||||||
|
|
||||||
PopupMenu *p = source_sort_button->get_popup();
|
PopupMenu *p = source_sort_button->get_popup();
|
||||||
p->connect("id_pressed", callable_mp(this, &TileSetEditor::_set_source_sort));
|
p->connect(SceneStringName(id_pressed), callable_mp(this, &TileSetEditor::_set_source_sort));
|
||||||
p->add_radio_check_item(TTR("Sort by ID (Ascending)"), TilesEditorUtils::SOURCE_SORT_ID);
|
p->add_radio_check_item(TTR("Sort by ID (Ascending)"), TilesEditorUtils::SOURCE_SORT_ID);
|
||||||
p->add_radio_check_item(TTR("Sort by ID (Descending)"), TilesEditorUtils::SOURCE_SORT_ID_REVERSE);
|
p->add_radio_check_item(TTR("Sort by ID (Descending)"), TilesEditorUtils::SOURCE_SORT_ID_REVERSE);
|
||||||
p->add_radio_check_item(TTR("Sort by Name (Ascending)"), TilesEditorUtils::SOURCE_SORT_NAME);
|
p->add_radio_check_item(TTR("Sort by Name (Ascending)"), TilesEditorUtils::SOURCE_SORT_NAME);
|
||||||
@ -887,7 +887,7 @@ TileSetEditor::TileSetEditor() {
|
|||||||
sources_add_button->get_popup()->set_item_tooltip(-1, TTR("A palette of tiles made from a texture."));
|
sources_add_button->get_popup()->set_item_tooltip(-1, TTR("A palette of tiles made from a texture."));
|
||||||
sources_add_button->get_popup()->add_item(TTR("Scenes Collection"));
|
sources_add_button->get_popup()->add_item(TTR("Scenes Collection"));
|
||||||
sources_add_button->get_popup()->set_item_tooltip(-1, TTR("A collection of scenes that can be instantiated and placed as tiles."));
|
sources_add_button->get_popup()->set_item_tooltip(-1, TTR("A collection of scenes that can be instantiated and placed as tiles."));
|
||||||
sources_add_button->get_popup()->connect("id_pressed", callable_mp(this, &TileSetEditor::_source_add_id_pressed));
|
sources_add_button->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &TileSetEditor::_source_add_id_pressed));
|
||||||
sources_bottom_actions->add_child(sources_add_button);
|
sources_bottom_actions->add_child(sources_add_button);
|
||||||
|
|
||||||
sources_advanced_menu_button = memnew(MenuButton);
|
sources_advanced_menu_button = memnew(MenuButton);
|
||||||
@ -895,7 +895,7 @@ TileSetEditor::TileSetEditor() {
|
|||||||
sources_advanced_menu_button->set_theme_type_variation("FlatButton");
|
sources_advanced_menu_button->set_theme_type_variation("FlatButton");
|
||||||
sources_advanced_menu_button->get_popup()->add_item(TTR("Open Atlas Merging Tool"));
|
sources_advanced_menu_button->get_popup()->add_item(TTR("Open Atlas Merging Tool"));
|
||||||
sources_advanced_menu_button->get_popup()->add_item(TTR("Manage Tile Proxies"));
|
sources_advanced_menu_button->get_popup()->add_item(TTR("Manage Tile Proxies"));
|
||||||
sources_advanced_menu_button->get_popup()->connect("id_pressed", callable_mp(this, &TileSetEditor::_sources_advanced_menu_id_pressed));
|
sources_advanced_menu_button->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &TileSetEditor::_sources_advanced_menu_id_pressed));
|
||||||
sources_bottom_actions->add_child(sources_advanced_menu_button);
|
sources_bottom_actions->add_child(sources_advanced_menu_button);
|
||||||
sources_bottom_actions->add_child(source_sort_button);
|
sources_bottom_actions->add_child(source_sort_button);
|
||||||
|
|
||||||
|
@ -1432,7 +1432,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||||||
extra_options = memnew(MenuButton);
|
extra_options = memnew(MenuButton);
|
||||||
extra_options->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GuiTabMenuHl"), EditorStringName(EditorIcons)));
|
extra_options->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GuiTabMenuHl"), EditorStringName(EditorIcons)));
|
||||||
extra_options->get_popup()->connect(SNAME("about_to_popup"), callable_mp(this, &VersionControlEditorPlugin::_update_extra_options));
|
extra_options->get_popup()->connect(SNAME("about_to_popup"), callable_mp(this, &VersionControlEditorPlugin::_update_extra_options));
|
||||||
extra_options->get_popup()->connect(SNAME("id_pressed"), callable_mp(this, &VersionControlEditorPlugin::_extra_option_selected));
|
extra_options->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &VersionControlEditorPlugin::_extra_option_selected));
|
||||||
menu_bar->add_child(extra_options);
|
menu_bar->add_child(extra_options);
|
||||||
|
|
||||||
extra_options->get_popup()->add_item(TTR("Force Push"), EXTRA_OPTION_FORCE_PUSH);
|
extra_options->get_popup()->add_item(TTR("Force Push"), EXTRA_OPTION_FORCE_PUSH);
|
||||||
@ -1440,14 +1440,14 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||||||
extra_options->get_popup()->add_item(TTR("Create New Branch"), EXTRA_OPTION_CREATE_BRANCH);
|
extra_options->get_popup()->add_item(TTR("Create New Branch"), EXTRA_OPTION_CREATE_BRANCH);
|
||||||
|
|
||||||
extra_options_remove_branch_list = memnew(PopupMenu);
|
extra_options_remove_branch_list = memnew(PopupMenu);
|
||||||
extra_options_remove_branch_list->connect(SNAME("id_pressed"), callable_mp(this, &VersionControlEditorPlugin::_popup_branch_remove_confirm));
|
extra_options_remove_branch_list->connect(SceneStringName(id_pressed), callable_mp(this, &VersionControlEditorPlugin::_popup_branch_remove_confirm));
|
||||||
extra_options->get_popup()->add_submenu_node_item(TTR("Remove Branch"), extra_options_remove_branch_list);
|
extra_options->get_popup()->add_submenu_node_item(TTR("Remove Branch"), extra_options_remove_branch_list);
|
||||||
|
|
||||||
extra_options->get_popup()->add_separator();
|
extra_options->get_popup()->add_separator();
|
||||||
extra_options->get_popup()->add_item(TTR("Create New Remote"), EXTRA_OPTION_CREATE_REMOTE);
|
extra_options->get_popup()->add_item(TTR("Create New Remote"), EXTRA_OPTION_CREATE_REMOTE);
|
||||||
|
|
||||||
extra_options_remove_remote_list = memnew(PopupMenu);
|
extra_options_remove_remote_list = memnew(PopupMenu);
|
||||||
extra_options_remove_remote_list->connect(SNAME("id_pressed"), callable_mp(this, &VersionControlEditorPlugin::_popup_remote_remove_confirm));
|
extra_options_remove_remote_list->connect(SceneStringName(id_pressed), callable_mp(this, &VersionControlEditorPlugin::_popup_remote_remove_confirm));
|
||||||
extra_options->get_popup()->add_submenu_node_item(TTR("Remove Remote"), extra_options_remove_remote_list);
|
extra_options->get_popup()->add_submenu_node_item(TTR("Remove Remote"), extra_options_remove_remote_list);
|
||||||
|
|
||||||
change_type_to_strings[EditorVCSInterface::CHANGE_TYPE_NEW] = TTR("New");
|
change_type_to_strings[EditorVCSInterface::CHANGE_TYPE_NEW] = TTR("New");
|
||||||
|
@ -6195,7 +6195,7 @@ VisualShaderEditor::VisualShaderEditor() {
|
|||||||
PopupMenu *varying_menu = varying_button->get_popup();
|
PopupMenu *varying_menu = varying_button->get_popup();
|
||||||
varying_menu->add_item(TTR("Add Varying"), int(VaryingMenuOptions::ADD));
|
varying_menu->add_item(TTR("Add Varying"), int(VaryingMenuOptions::ADD));
|
||||||
varying_menu->add_item(TTR("Remove Varying"), int(VaryingMenuOptions::REMOVE));
|
varying_menu->add_item(TTR("Remove Varying"), int(VaryingMenuOptions::REMOVE));
|
||||||
varying_menu->connect("id_pressed", callable_mp(this, &VisualShaderEditor::_varying_menu_id_pressed));
|
varying_menu->connect(SceneStringName(id_pressed), callable_mp(this, &VisualShaderEditor::_varying_menu_id_pressed));
|
||||||
|
|
||||||
preview_shader = memnew(Button);
|
preview_shader = memnew(Button);
|
||||||
preview_shader->set_theme_type_variation("FlatButton");
|
preview_shader->set_theme_type_variation("FlatButton");
|
||||||
@ -6251,14 +6251,14 @@ VisualShaderEditor::VisualShaderEditor() {
|
|||||||
popup_menu->add_item(TTR("Delete"), NodeMenuOptions::DELETE);
|
popup_menu->add_item(TTR("Delete"), NodeMenuOptions::DELETE);
|
||||||
popup_menu->add_item(TTR("Duplicate"), NodeMenuOptions::DUPLICATE);
|
popup_menu->add_item(TTR("Duplicate"), NodeMenuOptions::DUPLICATE);
|
||||||
popup_menu->add_item(TTR("Clear Copy Buffer"), NodeMenuOptions::CLEAR_COPY_BUFFER);
|
popup_menu->add_item(TTR("Clear Copy Buffer"), NodeMenuOptions::CLEAR_COPY_BUFFER);
|
||||||
popup_menu->connect("id_pressed", callable_mp(this, &VisualShaderEditor::_node_menu_id_pressed));
|
popup_menu->connect(SceneStringName(id_pressed), callable_mp(this, &VisualShaderEditor::_node_menu_id_pressed));
|
||||||
|
|
||||||
connection_popup_menu = memnew(PopupMenu);
|
connection_popup_menu = memnew(PopupMenu);
|
||||||
add_child(connection_popup_menu);
|
add_child(connection_popup_menu);
|
||||||
connection_popup_menu->add_item(TTR("Disconnect"), ConnectionMenuOptions::DISCONNECT);
|
connection_popup_menu->add_item(TTR("Disconnect"), ConnectionMenuOptions::DISCONNECT);
|
||||||
connection_popup_menu->add_item(TTR("Insert New Node"), ConnectionMenuOptions::INSERT_NEW_NODE);
|
connection_popup_menu->add_item(TTR("Insert New Node"), ConnectionMenuOptions::INSERT_NEW_NODE);
|
||||||
connection_popup_menu->add_item(TTR("Insert New Reroute"), ConnectionMenuOptions::INSERT_NEW_REROUTE);
|
connection_popup_menu->add_item(TTR("Insert New Reroute"), ConnectionMenuOptions::INSERT_NEW_REROUTE);
|
||||||
connection_popup_menu->connect("id_pressed", callable_mp(this, &VisualShaderEditor::_connection_menu_id_pressed));
|
connection_popup_menu->connect(SceneStringName(id_pressed), callable_mp(this, &VisualShaderEditor::_connection_menu_id_pressed));
|
||||||
|
|
||||||
///////////////////////////////////////
|
///////////////////////////////////////
|
||||||
// SHADER NODES TREE
|
// SHADER NODES TREE
|
||||||
@ -6280,7 +6280,7 @@ VisualShaderEditor::VisualShaderEditor() {
|
|||||||
tools = memnew(MenuButton);
|
tools = memnew(MenuButton);
|
||||||
filter_hb->add_child(tools);
|
filter_hb->add_child(tools);
|
||||||
tools->set_tooltip_text(TTR("Options"));
|
tools->set_tooltip_text(TTR("Options"));
|
||||||
tools->get_popup()->connect("id_pressed", callable_mp(this, &VisualShaderEditor::_tools_menu_option));
|
tools->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &VisualShaderEditor::_tools_menu_option));
|
||||||
tools->get_popup()->add_item(TTR("Expand All"), EXPAND_ALL);
|
tools->get_popup()->add_item(TTR("Expand All"), EXPAND_ALL);
|
||||||
tools->get_popup()->add_item(TTR("Collapse All"), COLLAPSE_ALL);
|
tools->get_popup()->add_item(TTR("Collapse All"), COLLAPSE_ALL);
|
||||||
|
|
||||||
|
@ -4397,12 +4397,12 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
|
|||||||
filter->add_theme_constant_override("minimum_character_width", 0);
|
filter->add_theme_constant_override("minimum_character_width", 0);
|
||||||
filter->connect("text_changed", callable_mp(this, &SceneTreeDock::_filter_changed));
|
filter->connect("text_changed", callable_mp(this, &SceneTreeDock::_filter_changed));
|
||||||
filter->connect(SceneStringName(gui_input), callable_mp(this, &SceneTreeDock::_filter_gui_input));
|
filter->connect(SceneStringName(gui_input), callable_mp(this, &SceneTreeDock::_filter_gui_input));
|
||||||
filter->get_menu()->connect("id_pressed", callable_mp(this, &SceneTreeDock::_filter_option_selected));
|
filter->get_menu()->connect(SceneStringName(id_pressed), callable_mp(this, &SceneTreeDock::_filter_option_selected));
|
||||||
_append_filter_options_to(filter->get_menu());
|
_append_filter_options_to(filter->get_menu());
|
||||||
|
|
||||||
filter_quick_menu = memnew(PopupMenu);
|
filter_quick_menu = memnew(PopupMenu);
|
||||||
filter_quick_menu->set_theme_type_variation("FlatMenuButton");
|
filter_quick_menu->set_theme_type_variation("FlatMenuButton");
|
||||||
filter_quick_menu->connect("id_pressed", callable_mp(this, &SceneTreeDock::_filter_option_selected));
|
filter_quick_menu->connect(SceneStringName(id_pressed), callable_mp(this, &SceneTreeDock::_filter_option_selected));
|
||||||
filter->add_child(filter_quick_menu);
|
filter->add_child(filter_quick_menu);
|
||||||
|
|
||||||
button_create_script = memnew(Button);
|
button_create_script = memnew(Button);
|
||||||
@ -4429,7 +4429,7 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
|
|||||||
filter_hbc->add_child(button_tree_menu);
|
filter_hbc->add_child(button_tree_menu);
|
||||||
|
|
||||||
PopupMenu *tree_menu = button_tree_menu->get_popup();
|
PopupMenu *tree_menu = button_tree_menu->get_popup();
|
||||||
tree_menu->connect("id_pressed", callable_mp(this, &SceneTreeDock::_tool_selected).bind(false));
|
tree_menu->connect(SceneStringName(id_pressed), callable_mp(this, &SceneTreeDock::_tool_selected).bind(false));
|
||||||
|
|
||||||
button_hb = memnew(HBoxContainer);
|
button_hb = memnew(HBoxContainer);
|
||||||
vbc->add_child(button_hb);
|
vbc->add_child(button_hb);
|
||||||
@ -4549,15 +4549,15 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
|
|||||||
|
|
||||||
menu = memnew(PopupMenu);
|
menu = memnew(PopupMenu);
|
||||||
add_child(menu);
|
add_child(menu);
|
||||||
menu->connect("id_pressed", callable_mp(this, &SceneTreeDock::_tool_selected).bind(false));
|
menu->connect(SceneStringName(id_pressed), callable_mp(this, &SceneTreeDock::_tool_selected).bind(false));
|
||||||
|
|
||||||
menu_subresources = memnew(PopupMenu);
|
menu_subresources = memnew(PopupMenu);
|
||||||
menu_subresources->connect("id_pressed", callable_mp(this, &SceneTreeDock::_tool_selected).bind(false));
|
menu_subresources->connect(SceneStringName(id_pressed), callable_mp(this, &SceneTreeDock::_tool_selected).bind(false));
|
||||||
menu->add_child(menu_subresources);
|
menu->add_child(menu_subresources);
|
||||||
|
|
||||||
menu_properties = memnew(PopupMenu);
|
menu_properties = memnew(PopupMenu);
|
||||||
add_child(menu_properties);
|
add_child(menu_properties);
|
||||||
menu_properties->connect("id_pressed", callable_mp(this, &SceneTreeDock::_property_selected));
|
menu_properties->connect(SceneStringName(id_pressed), callable_mp(this, &SceneTreeDock::_property_selected));
|
||||||
|
|
||||||
clear_inherit_confirm = memnew(ConfirmationDialog);
|
clear_inherit_confirm = memnew(ConfirmationDialog);
|
||||||
clear_inherit_confirm->set_text(TTR("Clear Inheritance? (No Undo!)"));
|
clear_inherit_confirm->set_text(TTR("Clear Inheritance? (No Undo!)"));
|
||||||
|
@ -1275,7 +1275,7 @@ GridMapEditor::GridMapEditor() {
|
|||||||
settings_pick_distance->set_value(EDITOR_GET("editors/grid_map/pick_distance"));
|
settings_pick_distance->set_value(EDITOR_GET("editors/grid_map/pick_distance"));
|
||||||
settings_vbc->add_margin_child(TTR("Pick Distance:"), settings_pick_distance);
|
settings_vbc->add_margin_child(TTR("Pick Distance:"), settings_pick_distance);
|
||||||
|
|
||||||
options->get_popup()->connect("id_pressed", callable_mp(this, &GridMapEditor::_menu_option));
|
options->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &GridMapEditor::_menu_option));
|
||||||
|
|
||||||
HBoxContainer *hb = memnew(HBoxContainer);
|
HBoxContainer *hb = memnew(HBoxContainer);
|
||||||
add_child(hb);
|
add_child(hb);
|
||||||
|
@ -1863,7 +1863,7 @@ ColorPicker::ColorPicker() {
|
|||||||
shape_popup->add_radio_check_item("VHS Circle", SHAPE_VHS_CIRCLE);
|
shape_popup->add_radio_check_item("VHS Circle", SHAPE_VHS_CIRCLE);
|
||||||
shape_popup->add_radio_check_item("OKHSL Circle", SHAPE_OKHSL_CIRCLE);
|
shape_popup->add_radio_check_item("OKHSL Circle", SHAPE_OKHSL_CIRCLE);
|
||||||
shape_popup->set_item_checked(current_shape, true);
|
shape_popup->set_item_checked(current_shape, true);
|
||||||
shape_popup->connect("id_pressed", callable_mp(this, &ColorPicker::set_picker_shape));
|
shape_popup->connect(SceneStringName(id_pressed), callable_mp(this, &ColorPicker::set_picker_shape));
|
||||||
|
|
||||||
add_mode(new ColorModeRGB(this));
|
add_mode(new ColorModeRGB(this));
|
||||||
add_mode(new ColorModeHSV(this));
|
add_mode(new ColorModeHSV(this));
|
||||||
@ -1904,7 +1904,7 @@ ColorPicker::ColorPicker() {
|
|||||||
mode_popup->add_check_item("Colorized Sliders", MODE_MAX);
|
mode_popup->add_check_item("Colorized Sliders", MODE_MAX);
|
||||||
mode_popup->set_item_checked(current_mode, true);
|
mode_popup->set_item_checked(current_mode, true);
|
||||||
mode_popup->set_item_checked(MODE_MAX + 1, true);
|
mode_popup->set_item_checked(MODE_MAX + 1, true);
|
||||||
mode_popup->connect("id_pressed", callable_mp(this, &ColorPicker::_set_mode_popup_value));
|
mode_popup->connect(SceneStringName(id_pressed), callable_mp(this, &ColorPicker::_set_mode_popup_value));
|
||||||
VBoxContainer *vbl = memnew(VBoxContainer);
|
VBoxContainer *vbl = memnew(VBoxContainer);
|
||||||
real_vbox->add_child(vbl);
|
real_vbox->add_child(vbl);
|
||||||
|
|
||||||
|
@ -2469,9 +2469,9 @@ void LineEdit::_generate_context_menu() {
|
|||||||
menu->add_check_item(ETR("Display Control Characters"), MENU_DISPLAY_UCC);
|
menu->add_check_item(ETR("Display Control Characters"), MENU_DISPLAY_UCC);
|
||||||
menu->add_submenu_node_item(ETR("Insert Control Character"), menu_ctl, MENU_SUBMENU_INSERT_UCC);
|
menu->add_submenu_node_item(ETR("Insert Control Character"), menu_ctl, MENU_SUBMENU_INSERT_UCC);
|
||||||
|
|
||||||
menu->connect("id_pressed", callable_mp(this, &LineEdit::menu_option));
|
menu->connect(SceneStringName(id_pressed), callable_mp(this, &LineEdit::menu_option));
|
||||||
menu_dir->connect("id_pressed", callable_mp(this, &LineEdit::menu_option));
|
menu_dir->connect(SceneStringName(id_pressed), callable_mp(this, &LineEdit::menu_option));
|
||||||
menu_ctl->connect("id_pressed", callable_mp(this, &LineEdit::menu_option));
|
menu_ctl->connect(SceneStringName(id_pressed), callable_mp(this, &LineEdit::menu_option));
|
||||||
|
|
||||||
menu->connect(SceneStringName(focus_entered), callable_mp(this, &LineEdit::_validate_caret_can_draw));
|
menu->connect(SceneStringName(focus_entered), callable_mp(this, &LineEdit::_validate_caret_can_draw));
|
||||||
menu->connect(SceneStringName(focus_exited), callable_mp(this, &LineEdit::_validate_caret_can_draw));
|
menu->connect(SceneStringName(focus_exited), callable_mp(this, &LineEdit::_validate_caret_can_draw));
|
||||||
|
@ -2422,7 +2422,7 @@ void PopupMenu::activate_item(int p_idx) {
|
|||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
emit_signal(SNAME("id_pressed"), id);
|
emit_signal(SceneStringName(id_pressed), id);
|
||||||
emit_signal(SNAME("index_pressed"), p_idx);
|
emit_signal(SNAME("index_pressed"), p_idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6309,7 +6309,7 @@ Size2 RichTextLabel::get_minimum_size() const {
|
|||||||
void RichTextLabel::_generate_context_menu() {
|
void RichTextLabel::_generate_context_menu() {
|
||||||
menu = memnew(PopupMenu);
|
menu = memnew(PopupMenu);
|
||||||
add_child(menu, false, INTERNAL_MODE_FRONT);
|
add_child(menu, false, INTERNAL_MODE_FRONT);
|
||||||
menu->connect("id_pressed", callable_mp(this, &RichTextLabel::menu_option));
|
menu->connect(SceneStringName(id_pressed), callable_mp(this, &RichTextLabel::menu_option));
|
||||||
|
|
||||||
menu->add_item(ETR("Copy"), MENU_COPY);
|
menu->add_item(ETR("Copy"), MENU_COPY);
|
||||||
menu->add_item(ETR("Select All"), MENU_SELECT_ALL);
|
menu->add_item(ETR("Select All"), MENU_SELECT_ALL);
|
||||||
|
@ -7182,9 +7182,9 @@ void TextEdit::_generate_context_menu() {
|
|||||||
menu->add_check_item(ETR("Display Control Characters"), MENU_DISPLAY_UCC);
|
menu->add_check_item(ETR("Display Control Characters"), MENU_DISPLAY_UCC);
|
||||||
menu->add_submenu_node_item(ETR("Insert Control Character"), menu_ctl, MENU_SUBMENU_INSERT_UCC);
|
menu->add_submenu_node_item(ETR("Insert Control Character"), menu_ctl, MENU_SUBMENU_INSERT_UCC);
|
||||||
|
|
||||||
menu->connect("id_pressed", callable_mp(this, &TextEdit::menu_option));
|
menu->connect(SceneStringName(id_pressed), callable_mp(this, &TextEdit::menu_option));
|
||||||
menu_dir->connect("id_pressed", callable_mp(this, &TextEdit::menu_option));
|
menu_dir->connect(SceneStringName(id_pressed), callable_mp(this, &TextEdit::menu_option));
|
||||||
menu_ctl->connect("id_pressed", callable_mp(this, &TextEdit::menu_option));
|
menu_ctl->connect(SceneStringName(id_pressed), callable_mp(this, &TextEdit::menu_option));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextEdit::_update_context_menu() {
|
void TextEdit::_update_context_menu() {
|
||||||
|
@ -5821,7 +5821,7 @@ Tree::Tree() {
|
|||||||
line_editor->connect("text_submitted", callable_mp(this, &Tree::_line_editor_submit));
|
line_editor->connect("text_submitted", callable_mp(this, &Tree::_line_editor_submit));
|
||||||
text_editor->connect(SceneStringName(gui_input), callable_mp(this, &Tree::_text_editor_gui_input));
|
text_editor->connect(SceneStringName(gui_input), callable_mp(this, &Tree::_text_editor_gui_input));
|
||||||
popup_editor->connect("popup_hide", callable_mp(this, &Tree::_text_editor_popup_modal_close));
|
popup_editor->connect("popup_hide", callable_mp(this, &Tree::_text_editor_popup_modal_close));
|
||||||
popup_menu->connect("id_pressed", callable_mp(this, &Tree::popup_select));
|
popup_menu->connect(SceneStringName(id_pressed), callable_mp(this, &Tree::popup_select));
|
||||||
value_editor->connect("value_changed", callable_mp(this, &Tree::value_editor_changed));
|
value_editor->connect("value_changed", callable_mp(this, &Tree::value_editor_changed));
|
||||||
|
|
||||||
set_notify_transform(true);
|
set_notify_transform(true);
|
||||||
|
@ -128,4 +128,5 @@ SceneStringNames::SceneStringNames() {
|
|||||||
shader_overrides_group_active = StaticCString::create("_shader_overrides_group_active_");
|
shader_overrides_group_active = StaticCString::create("_shader_overrides_group_active_");
|
||||||
|
|
||||||
pressed = StaticCString::create("pressed");
|
pressed = StaticCString::create("pressed");
|
||||||
|
id_pressed = StaticCString::create("id_pressed");
|
||||||
}
|
}
|
||||||
|
@ -141,6 +141,7 @@ public:
|
|||||||
StringName shader_overrides_group_active;
|
StringName shader_overrides_group_active;
|
||||||
|
|
||||||
StringName pressed;
|
StringName pressed;
|
||||||
|
StringName id_pressed;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SceneStringName(m_name) SceneStringNames::get_singleton()->m_name
|
#define SceneStringName(m_name) SceneStringNames::get_singleton()->m_name
|
||||||
|
Loading…
Reference in New Issue
Block a user