feat: updated engine version to 4.4-rc1
This commit is contained in:
parent
ee00efde1f
commit
21ba8e33af
5459 changed files with 1128836 additions and 198305 deletions
|
|
@ -30,8 +30,8 @@
|
|||
|
||||
#include "node_dock.h"
|
||||
|
||||
#include "core/io/config_file.h"
|
||||
#include "editor/connections_dialog.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/themes/editor_scale.h"
|
||||
|
||||
void NodeDock::show_groups() {
|
||||
|
|
@ -48,20 +48,32 @@ void NodeDock::show_connections() {
|
|||
connections->show();
|
||||
}
|
||||
|
||||
void NodeDock::_bind_methods() {
|
||||
void NodeDock::_save_layout_to_config(Ref<ConfigFile> p_layout, const String &p_section) const {
|
||||
p_layout->set_value(p_section, "dock_node_current_tab", int(groups_button->is_pressed()));
|
||||
}
|
||||
|
||||
void NodeDock::_load_layout_from_config(Ref<ConfigFile> p_layout, const String &p_section) {
|
||||
const int current_tab = p_layout->get_value(p_section, "dock_node_current_tab", 0);
|
||||
if (current_tab == 0) {
|
||||
show_connections();
|
||||
} else if (current_tab == 1) {
|
||||
show_groups();
|
||||
}
|
||||
}
|
||||
|
||||
void NodeDock::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_ENTER_TREE:
|
||||
case NOTIFICATION_THEME_CHANGED: {
|
||||
connections_button->set_icon(get_editor_theme_icon(SNAME("Signals")));
|
||||
groups_button->set_icon(get_editor_theme_icon(SNAME("Groups")));
|
||||
connections_button->set_button_icon(get_editor_theme_icon(SNAME("Signals")));
|
||||
groups_button->set_button_icon(get_editor_theme_icon(SNAME("Groups")));
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
NodeDock *NodeDock::singleton = nullptr;
|
||||
void NodeDock::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("_save_layout_to_config"), &NodeDock::_save_layout_to_config);
|
||||
ClassDB::bind_method(D_METHOD("_load_layout_from_config"), &NodeDock::_load_layout_from_config);
|
||||
}
|
||||
|
||||
void NodeDock::update_lists() {
|
||||
connections->update_tree();
|
||||
|
|
@ -97,7 +109,7 @@ NodeDock::NodeDock() {
|
|||
mode_hb->hide();
|
||||
|
||||
connections_button = memnew(Button);
|
||||
connections_button->set_theme_type_variation("FlatButton");
|
||||
connections_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
connections_button->set_text(TTR("Signals"));
|
||||
connections_button->set_toggle_mode(true);
|
||||
connections_button->set_pressed(true);
|
||||
|
|
@ -107,7 +119,7 @@ NodeDock::NodeDock() {
|
|||
connections_button->connect(SceneStringName(pressed), callable_mp(this, &NodeDock::show_connections));
|
||||
|
||||
groups_button = memnew(Button);
|
||||
groups_button->set_theme_type_variation("FlatButton");
|
||||
groups_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
groups_button->set_text(TTR("Groups"));
|
||||
groups_button->set_toggle_mode(true);
|
||||
groups_button->set_pressed(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue