summaryrefslogtreecommitdiff
path: root/editor/editor_about.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_about.cpp')
-rw-r--r--editor/editor_about.cpp54
1 files changed, 32 insertions, 22 deletions
diff --git a/editor/editor_about.cpp b/editor/editor_about.cpp
index 360ed620f6..4b09db0a9e 100644
--- a/editor/editor_about.cpp
+++ b/editor/editor_about.cpp
@@ -31,11 +31,11 @@
#include "editor_about.h"
#include "editor_node.h"
-#include "authors.gen.h"
-#include "donors.gen.h"
-#include "license.gen.h"
-#include "version.h"
-#include "version_hash.gen.h"
+#include "core/authors.gen.h"
+#include "core/donors.gen.h"
+#include "core/license.gen.h"
+#include "core/version.h"
+#include "core/version_hash.gen.h"
void EditorAbout::_notification(int p_what) {
@@ -69,7 +69,7 @@ TextureRect *EditorAbout::get_logo() const {
return _logo;
}
-ScrollContainer *EditorAbout::_populate_list(const String &p_name, const List<String> &p_sections, const char **p_src[], const int p_flag_single_column) {
+ScrollContainer *EditorAbout::_populate_list(const String &p_name, const List<String> &p_sections, const char *const *const p_src[], const int p_flag_single_column) {
ScrollContainer *sc = memnew(ScrollContainer);
sc->set_name(p_name);
@@ -82,7 +82,7 @@ ScrollContainer *EditorAbout::_populate_list(const String &p_name, const List<St
for (int i = 0; i < p_sections.size(); i++) {
bool single_column = p_flag_single_column & 1 << i;
- const char **names_ptr = p_src[i];
+ const char *const *names_ptr = p_src[i];
if (*names_ptr) {
Label *lbl = memnew(Label);
@@ -151,7 +151,8 @@ EditorAbout::EditorAbout() {
dev_sections.push_back(TTR("Lead Developer"));
dev_sections.push_back(TTR("Project Manager ")); // " " appended to distinguish between 'project supervisor' and 'project list'
dev_sections.push_back(TTR("Developers"));
- const char **dev_src[] = { dev_founders, dev_lead, dev_manager, dev_names };
+ const char *const *dev_src[] = { AUTHORS_FOUNDERS, AUTHORS_LEAD_DEVELOPERS,
+ AUTHORS_PROJECT_MANAGERS, AUTHORS_DEVELOPERS };
tc->add_child(_populate_list(TTR("Authors"), dev_sections, dev_src, 1));
// Donors
@@ -163,7 +164,8 @@ EditorAbout::EditorAbout() {
donor_sections.push_back(TTR("Gold Donors"));
donor_sections.push_back(TTR("Silver Donors"));
donor_sections.push_back(TTR("Bronze Donors"));
- const char **donor_src[] = { donor_s_plat, donor_s_gold, donor_s_mini, donor_gold, donor_silver, donor_bronze };
+ const char *const *donor_src[] = { DONORS_SPONSOR_PLAT, DONORS_SPONSOR_GOLD,
+ DONORS_SPONSOR_MINI, DONORS_GOLD, DONORS_SILVER, DONORS_BRONZE };
tc->add_child(_populate_list(TTR("Donors"), donor_sections, donor_src, 3));
// License
@@ -172,7 +174,7 @@ EditorAbout::EditorAbout() {
_license_text->set_name(TTR("License"));
_license_text->set_h_size_flags(Control::SIZE_EXPAND_FILL);
_license_text->set_v_size_flags(Control::SIZE_EXPAND_FILL);
- _license_text->set_text(String::utf8(about_license));
+ _license_text->set_text(String::utf8(GODOT_LICENSE_TEXT));
tc->add_child(_license_text);
// Thirdparty License
@@ -186,6 +188,7 @@ EditorAbout::EditorAbout() {
tpl_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
tpl_label->set_autowrap(true);
tpl_label->set_text(TTR("Godot Engine relies on a number of thirdparty free and open source libraries, all compatible with the terms of its MIT license. The following is an exhaustive list of all such thirdparty components with their respective copyright statements and license terms."));
+ tpl_label->set_size(Size2(630, 1) * EDSCALE);
license_thirdparty->add_child(tpl_label);
HSplitContainer *tpl_hbc = memnew(HSplitContainer);
@@ -207,20 +210,27 @@ EditorAbout::EditorAbout() {
tpl_ti_lc->set_selectable(0, false);
int read_idx = 0;
String long_text = "";
- for (int i = 0; i < THIRDPARTY_COUNT; i++) {
+ for (int component_index = 0; component_index < COPYRIGHT_INFO_COUNT; component_index++) {
+ const ComponentCopyright &component = COPYRIGHT_INFO[component_index];
TreeItem *ti = _tpl_tree->create_item(tpl_ti_tp);
- String thirdparty = String(about_thirdparty[i]);
- ti->set_text(0, thirdparty);
- String text = thirdparty + "\n";
- long_text += "- " + thirdparty + "\n\n";
- for (int j = 0; j < about_tp_copyright_count[i]; j++) {
-
- text += "\n Files:\n " + String(about_tp_file[read_idx]).replace("\n", "\n ") + "\n";
- String copyright = String::utf8(" \xc2\xa9 ") + String::utf8(about_tp_copyright[read_idx]).replace("\n", String::utf8("\n \xc2\xa9 "));
+ String component_name = component.name;
+ ti->set_text(0, component_name);
+ String text = component_name + "\n";
+ long_text += "- " + component_name + "\n";
+ for (int part_index = 0; part_index < component.part_count; part_index++) {
+ const ComponentCopyrightPart &part = component.parts[part_index];
+ text += "\n Files:";
+ for (int file_num = 0; file_num < part.file_count; file_num++) {
+ text += "\n " + String(part.files[file_num]);
+ }
+ String copyright;
+ for (int copyright_index = 0; copyright_index < part.copyright_count; copyright_index++) {
+ copyright += String::utf8("\n \xc2\xa9 ") + String::utf8(part.copyright_statements[copyright_index]);
+ }
text += copyright;
long_text += copyright;
- String license = "\n License: " + String(about_tp_license[read_idx]) + "\n";
+ String license = "\n License: " + String(part.license) + "\n";
text += license;
long_text += license + "\n";
read_idx++;
@@ -230,10 +240,10 @@ EditorAbout::EditorAbout() {
for (int i = 0; i < LICENSE_COUNT; i++) {
TreeItem *ti = _tpl_tree->create_item(tpl_ti_lc);
- String licensename = String(about_license_name[i]);
+ String licensename = String(LICENSE_NAMES[i]);
ti->set_text(0, licensename);
long_text += "- " + licensename + "\n\n";
- String licensebody = String(about_license_body[i]);
+ String licensebody = String(LICENSE_BODIES[i]);
ti->set_metadata(0, licensebody);
long_text += " " + licensebody.replace("\n", "\n ") + "\n\n";
}