feat: updated engine
This commit is contained in:
parent
cbe99774ff
commit
f4cf6b3999
6607 changed files with 910135 additions and 430025 deletions
|
|
@ -33,6 +33,8 @@
|
|||
#include "core/authors.gen.h"
|
||||
#include "core/donors.gen.h"
|
||||
#include "core/license.gen.h"
|
||||
#include "core/object/callable_mp.h"
|
||||
#include "core/os/os.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_string_names.h"
|
||||
#include "editor/gui/credits_roll.h"
|
||||
|
|
@ -48,6 +50,7 @@
|
|||
#include "scene/gui/tab_container.h"
|
||||
#include "scene/gui/texture_rect.h"
|
||||
#include "scene/gui/tree.h"
|
||||
#include "scene/main/scene_tree.h"
|
||||
#include "scene/resources/style_box.h"
|
||||
|
||||
void EditorAbout::_notification(int p_what) {
|
||||
|
|
@ -120,7 +123,7 @@ void EditorAbout::_item_activated(int p_idx, ItemList *p_il) {
|
|||
OS::get_singleton()->shell_open(val);
|
||||
} else {
|
||||
// Easter egg! :D
|
||||
if (EditorRunBar::get_singleton()->is_playing()) {
|
||||
if (EditorRunBar::get_singleton() && EditorRunBar::get_singleton()->is_playing()) {
|
||||
// Don't allow if the game is running, as it will look weird if it's embedded.
|
||||
EditorToaster::get_singleton()->popup_str(TTR("No distractions for this, close that game first."));
|
||||
return;
|
||||
|
|
@ -154,19 +157,8 @@ Label *EditorAbout::_create_section(Control *p_parent, const String &p_name, con
|
|||
il->set_max_columns(p_flags.has_flag(FLAG_SINGLE_COLUMN) ? 1 : 16);
|
||||
il->add_theme_constant_override("h_separation", 16 * EDSCALE);
|
||||
|
||||
// Don't allow the Easter egg in the Project Manager.
|
||||
if (p_flags.has_flag(FLAG_ALLOW_WEBSITE) || (p_flags.has_flag(FLAG_EASTER_EGG) && EditorNode::get_singleton())) {
|
||||
Ref<StyleBoxEmpty> empty_stylebox = memnew(StyleBoxEmpty);
|
||||
il->add_theme_style_override("focus", empty_stylebox);
|
||||
il->add_theme_style_override("selected", empty_stylebox);
|
||||
|
||||
il->connect("item_activated", callable_mp(this, &EditorAbout::_item_activated).bind(il));
|
||||
} else {
|
||||
il->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
|
||||
il->set_focus_mode(Control::FOCUS_NONE);
|
||||
}
|
||||
|
||||
const char *const *names_ptr = p_src;
|
||||
bool has_website = false;
|
||||
if (p_flags.has_flag(FLAG_ALLOW_WEBSITE)) {
|
||||
il->connect(SceneStringName(resized), callable_mp(this, &EditorAbout::_item_list_resized).bind(il));
|
||||
il->connect(SceneStringName(focus_exited), callable_mp(il, &ItemList::deselect_all));
|
||||
|
|
@ -182,6 +174,7 @@ Label *EditorAbout::_create_section(Control *p_parent, const String &p_name, con
|
|||
il->set_item_tooltip_enabled(-1, false);
|
||||
} else {
|
||||
il->set_item_metadata(-1, website);
|
||||
has_website = true;
|
||||
}
|
||||
|
||||
if (!*names_ptr && name.contains(" anonymous ")) {
|
||||
|
|
@ -195,6 +188,17 @@ Label *EditorAbout::_create_section(Control *p_parent, const String &p_name, con
|
|||
}
|
||||
}
|
||||
|
||||
if ((has_website && p_flags.has_flag(FLAG_ALLOW_WEBSITE)) || p_flags.has_flag(FLAG_EASTER_EGG)) {
|
||||
Ref<StyleBoxEmpty> empty_stylebox = memnew(StyleBoxEmpty);
|
||||
il->add_theme_style_override("focus", empty_stylebox);
|
||||
il->add_theme_style_override("selected", empty_stylebox);
|
||||
|
||||
il->connect("item_activated", callable_mp(this, &EditorAbout::_item_activated).bind(il));
|
||||
} else {
|
||||
il->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
|
||||
il->set_focus_mode(Control::FOCUS_NONE);
|
||||
}
|
||||
|
||||
name_lists.append(il);
|
||||
|
||||
p_parent->add_child(il);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue