[Scene] Add SceneStringNames::pressed
This commit is contained in:
@@ -521,7 +521,7 @@ void EditorNode::_update_theme(bool p_skip_creation) {
|
||||
scene_root_parent->add_theme_style_override("panel", theme->get_stylebox(SNAME("Content"), EditorStringName(EditorStyles)));
|
||||
bottom_panel->add_theme_style_override("panel", theme->get_stylebox(SNAME("BottomPanel"), EditorStringName(EditorStyles)));
|
||||
distraction_free->set_icon(theme->get_icon(SNAME("DistractionFree"), EditorStringName(EditorIcons)));
|
||||
distraction_free->add_theme_style_override("pressed", theme->get_stylebox("normal", "FlatMenuButton"));
|
||||
distraction_free->add_theme_style_override(SceneStringName(pressed), theme->get_stylebox("normal", "FlatMenuButton"));
|
||||
|
||||
help_menu->set_item_icon(help_menu->get_item_index(HELP_SEARCH), theme->get_icon(SNAME("HelpSearch"), EditorStringName(EditorIcons)));
|
||||
help_menu->set_item_icon(help_menu->get_item_index(HELP_COPY_SYSTEM_INFO), theme->get_icon(SNAME("ActionCopy"), EditorStringName(EditorIcons)));
|
||||
@@ -3468,7 +3468,7 @@ void EditorNode::add_editor_plugin(EditorPlugin *p_editor, bool p_config_changed
|
||||
icon->connect_changed(callable_mp((Control *)tb, &Control::update_minimum_size));
|
||||
}
|
||||
|
||||
tb->connect("pressed", callable_mp(singleton, &EditorNode::editor_select).bind(singleton->main_editor_buttons.size()));
|
||||
tb->connect(SceneStringName(pressed), callable_mp(singleton, &EditorNode::editor_select).bind(singleton->main_editor_buttons.size()));
|
||||
|
||||
singleton->main_editor_buttons.push_back(tb);
|
||||
singleton->main_editor_button_hb->add_child(tb);
|
||||
@@ -3498,8 +3498,8 @@ void EditorNode::remove_editor_plugin(EditorPlugin *p_editor, bool p_config_chan
|
||||
|
||||
break;
|
||||
} else {
|
||||
singleton->main_editor_buttons[i]->disconnect("pressed", callable_mp(singleton, &EditorNode::editor_select));
|
||||
singleton->main_editor_buttons[i]->connect("pressed", callable_mp(singleton, &EditorNode::editor_select).bind(i - 1));
|
||||
singleton->main_editor_buttons[i]->disconnect(SceneStringName(pressed), callable_mp(singleton, &EditorNode::editor_select));
|
||||
singleton->main_editor_buttons[i]->connect(SceneStringName(pressed), callable_mp(singleton, &EditorNode::editor_select).bind(i - 1));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6652,7 +6652,7 @@ EditorNode::EditorNode() {
|
||||
distraction_free->set_tooltip_text(TTR("Toggle distraction-free mode."));
|
||||
distraction_free->set_toggle_mode(true);
|
||||
scene_tabs->add_extra_button(distraction_free);
|
||||
distraction_free->connect("pressed", callable_mp(this, &EditorNode::_toggle_distraction_free_mode));
|
||||
distraction_free->connect(SceneStringName(pressed), callable_mp(this, &EditorNode::_toggle_distraction_free_mode));
|
||||
|
||||
scene_root_parent = memnew(PanelContainer);
|
||||
scene_root_parent->set_custom_minimum_size(Size2(0, 80) * EDSCALE);
|
||||
@@ -7135,7 +7135,7 @@ EditorNode::EditorNode() {
|
||||
gradle_build_manage_templates = memnew(ConfirmationDialog);
|
||||
gradle_build_manage_templates->set_text(TTR("Android build template is missing, please install relevant templates."));
|
||||
gradle_build_manage_templates->set_ok_button_text(TTR("Manage Templates"));
|
||||
gradle_build_manage_templates->add_button(TTR("Install from file"))->connect("pressed", callable_mp(this, &EditorNode::_menu_option).bind(SETTINGS_INSTALL_ANDROID_BUILD_TEMPLATE));
|
||||
gradle_build_manage_templates->add_button(TTR("Install from file"))->connect(SceneStringName(pressed), callable_mp(this, &EditorNode::_menu_option).bind(SETTINGS_INSTALL_ANDROID_BUILD_TEMPLATE));
|
||||
gradle_build_manage_templates->connect("confirmed", callable_mp(this, &EditorNode::_menu_option).bind(SETTINGS_MANAGE_EXPORT_TEMPLATES));
|
||||
gui_base->add_child(gradle_build_manage_templates);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user