feat: updated engine
This commit is contained in:
parent
cbe99774ff
commit
f4cf6b3999
6607 changed files with 910135 additions and 430025 deletions
|
|
@ -30,6 +30,8 @@
|
|||
|
||||
#include "groups_editor.h"
|
||||
|
||||
#include "core/object/callable_mp.h"
|
||||
#include "core/object/class_db.h"
|
||||
#include "editor/docks/scene_tree_dock.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_string_names.h"
|
||||
|
|
@ -42,7 +44,9 @@
|
|||
#include "scene/gui/check_button.h"
|
||||
#include "scene/gui/grid_container.h"
|
||||
#include "scene/gui/label.h"
|
||||
#include "scene/main/scene_tree.h"
|
||||
#include "scene/resources/packed_scene.h"
|
||||
#include "servers/display/display_server.h"
|
||||
|
||||
static bool can_edit(Node *p_node, const String &p_group) {
|
||||
Node *n = p_node;
|
||||
|
|
@ -65,7 +69,7 @@ static bool can_edit(Node *p_node, const String &p_group) {
|
|||
|
||||
struct _GroupInfoComparator {
|
||||
bool operator()(const Node::GroupInfo &p_a, const Node::GroupInfo &p_b) const {
|
||||
return p_a.name.operator String() < p_b.name.operator String();
|
||||
return p_a.name.string() < p_b.name.string();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -661,6 +665,7 @@ void GroupsEditor::_show_add_group_dialog() {
|
|||
if (!add_group_dialog) {
|
||||
add_group_dialog = memnew(ConfirmationDialog);
|
||||
add_group_dialog->set_title(TTR("Create New Group"));
|
||||
add_group_dialog->set_ok_button_text(TTRC("Create"));
|
||||
add_group_dialog->connect(SceneStringName(confirmed), callable_mp(this, &GroupsEditor::_confirm_add));
|
||||
|
||||
VBoxContainer *vbc = memnew(VBoxContainer);
|
||||
|
|
@ -704,7 +709,7 @@ void GroupsEditor::_show_add_group_dialog() {
|
|||
add_group_dialog->register_text_enter(add_group_description);
|
||||
|
||||
add_validation_panel = memnew(EditorValidationPanel);
|
||||
add_validation_panel->add_line(EditorValidationPanel::MSG_ID_DEFAULT, TTR("Group name is valid."));
|
||||
add_validation_panel->add_line(EditorValidationPanel::MSG_ID_DEFAULT, TTRC("Group name is valid."));
|
||||
add_validation_panel->set_update_callback(callable_mp(this, &GroupsEditor::_check_add));
|
||||
add_validation_panel->set_accept_button(add_group_dialog->get_ok_button());
|
||||
|
||||
|
|
@ -745,7 +750,7 @@ void GroupsEditor::_show_rename_group_dialog() {
|
|||
rename_group_dialog->register_text_enter(rename_group);
|
||||
|
||||
rename_validation_panel = memnew(EditorValidationPanel);
|
||||
rename_validation_panel->add_line(EditorValidationPanel::MSG_ID_DEFAULT, TTR("Group name is valid."));
|
||||
rename_validation_panel->add_line(EditorValidationPanel::MSG_ID_DEFAULT, TTRC("Group name is valid."));
|
||||
rename_validation_panel->set_update_callback(callable_mp(this, &GroupsEditor::_check_rename));
|
||||
rename_validation_panel->set_accept_button(rename_group_dialog->get_ok_button());
|
||||
|
||||
|
|
@ -785,6 +790,7 @@ void GroupsEditor::_show_rename_group_dialog() {
|
|||
void GroupsEditor::_show_remove_group_dialog() {
|
||||
if (!remove_group_dialog) {
|
||||
remove_group_dialog = memnew(ConfirmationDialog);
|
||||
remove_group_dialog->set_ok_button_text(TTRC("Delete"));
|
||||
remove_group_dialog->connect(SceneStringName(confirmed), callable_mp(this, &GroupsEditor::_confirm_delete));
|
||||
|
||||
VBoxContainer *vbox = memnew(VBoxContainer);
|
||||
|
|
@ -832,9 +838,9 @@ void GroupsEditor::_check_rename() {
|
|||
|
||||
void GroupsEditor::_validate_name(const String &p_name, EditorValidationPanel *p_validation_panel) {
|
||||
if (p_name.is_empty()) {
|
||||
p_validation_panel->set_message(EditorValidationPanel::MSG_ID_DEFAULT, TTR("Group can't be empty."), EditorValidationPanel::MSG_ERROR);
|
||||
p_validation_panel->set_message(EditorValidationPanel::MSG_ID_DEFAULT, TTRC("Group can't be empty."), EditorValidationPanel::MSG_ERROR);
|
||||
} else if (_has_group(p_name)) {
|
||||
p_validation_panel->set_message(EditorValidationPanel::MSG_ID_DEFAULT, TTR("Group already exists."), EditorValidationPanel::MSG_ERROR);
|
||||
p_validation_panel->set_message(EditorValidationPanel::MSG_ID_DEFAULT, TTRC("Group already exists."), EditorValidationPanel::MSG_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue