Skip to content

Commit 78c9f8d

Browse files
committed
Merge pull request #103906 from adamscott/revert-builtin-gui-license-notice
Revert "Add built-in GUI to display license notices"
2 parents 899d337 + 1d32584 commit 78c9f8d

File tree

9 files changed

+0
-256
lines changed

9 files changed

+0
-256
lines changed

core/input/input_map.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,6 @@ static const _BuiltinActionDisplayName _builtin_action_display_names[] = {
402402
{ "ui_filedialog_show_hidden", TTRC("Show Hidden") },
403403
{ "ui_swap_input_direction ", TTRC("Swap Input Direction") },
404404
{ "ui_unicode_start", TTRC("Start Unicode Character Input") },
405-
{ "ui_toggle_licenses_dialog", TTRC("Toggle License Notices") },
406405
{ "", ""}
407406
/* clang-format on */
408407
};
@@ -790,12 +789,6 @@ const HashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() {
790789
inputs.push_back(InputEventKey::create_reference(Key::QUOTELEFT | KeyModifierMask::CMD_OR_CTRL));
791790
default_builtin_cache.insert("ui_swap_input_direction", inputs);
792791

793-
// ///// UI Misc Shortcuts /////
794-
795-
inputs = List<Ref<InputEvent>>();
796-
inputs.push_back(InputEventKey::create_reference(Key::L | KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT));
797-
default_builtin_cache.insert("ui_toggle_licenses_dialog", inputs);
798-
799792
return default_builtin_cache;
800793
}
801794

doc/classes/ProjectSettings.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,10 +1403,6 @@
14031403
Default [InputEventAction] to toggle [i]insert mode[/i] in a text field. While in insert mode, inserting new text overrides the character after the cursor, unless the next character is a new line.
14041404
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
14051405
</member>
1406-
<member name="input/ui_toggle_licenses_dialog" type="Dictionary" setter="" getter="">
1407-
Toggles the built-in dialog which displays Godot's third-party notices. This can also be toggled from a script using [member SceneTree.licenses_dialog_visible].
1408-
Since the default shortcut is not usable on mobile platforms, it is recommended to create a button that sets [member SceneTree.licenses_dialog_visible] to [code]true[/code] when pressed in your project's menu. See [url=$DOCS_URL/complying_with_licenses.html]Complying with licenses[/url] in the documentation for more information.
1409-
</member>
14101406
<member name="input/ui_undo" type="Dictionary" setter="" getter="">
14111407
Default [InputEventAction] to undo the most recent action.
14121408
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.

doc/classes/SceneTree.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,6 @@
255255
The root of the scene currently being edited in the editor. This is usually a direct child of [member root].
256256
[b]Note:[/b] This property does nothing in release builds.
257257
</member>
258-
<member name="licenses_dialog_visible" type="bool" setter="set_licenses_dialog_visible" getter="is_licenses_dialog_visible" default="false">
259-
If [code]true[/code], shows the built-in dialog which displays Godot's third-party notices. This dialog can also be toggled by pressing the [member ProjectSettings.input/ui_toggle_licenses_dialog] built-in action. See [url=$DOCS_URL/complying_with_licenses.html]Complying with licenses[/url] in the documentation for more information.
260-
</member>
261258
<member name="multiplayer_poll" type="bool" setter="set_multiplayer_poll_enabled" getter="is_multiplayer_poll_enabled" default="true">
262259
If [code]true[/code] (default value), enables automatic polling of the [MultiplayerAPI] for this SceneTree during [signal process_frame].
263260
If [code]false[/code], you need to manually call [method MultiplayerAPI.poll] to process network packets and deliver RPCs. This allows running RPCs in a different loop (e.g. physics, thread, specific time step) and for manual [Mutex] protection when accessing the [MultiplayerAPI] from threads.

editor/icons/LicensesDialog.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

scene/gui/licenses_dialog.cpp

Lines changed: 0 additions & 150 deletions
This file was deleted.

scene/gui/licenses_dialog.h

Lines changed: 0 additions & 45 deletions
This file was deleted.

scene/main/scene_tree.cpp

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
#include "scene/animation/tween.h"
4242
#include "scene/debugger/scene_debugger.h"
4343
#include "scene/gui/control.h"
44-
#include "scene/gui/licenses_dialog.h"
4544
#include "scene/main/multiplayer_api.h"
4645
#include "scene/main/viewport.h"
4746
#include "scene/resources/environment.h"
@@ -1698,36 +1697,6 @@ bool SceneTree::is_multiplayer_poll_enabled() const {
16981697
return multiplayer_poll;
16991698
}
17001699

1701-
void SceneTree::set_licenses_dialog_visible(bool p_visible) {
1702-
if (p_visible) {
1703-
if (licenses_dialog == nullptr) {
1704-
licenses_dialog = memnew(LicensesDialog);
1705-
// Begin name with an underscore to avoid conflict with project nodes.
1706-
licenses_dialog->set_name("_LicensesDialog");
1707-
get_root()->add_child(licenses_dialog, false, Node::INTERNAL_MODE_BACK);
1708-
} else {
1709-
ERR_PRINT("Licenses dialog already exists.");
1710-
}
1711-
} else {
1712-
if (licenses_dialog != nullptr) {
1713-
// Free when closing to avoid reserving memory during the project's run duration.
1714-
licenses_dialog->queue_free();
1715-
licenses_dialog = nullptr;
1716-
} else {
1717-
ERR_PRINT("Couldn't find licenses dialog to hide.");
1718-
}
1719-
}
1720-
}
1721-
1722-
bool SceneTree::is_licenses_dialog_visible() const {
1723-
if (licenses_dialog) {
1724-
return licenses_dialog->is_visible();
1725-
}
1726-
1727-
// Licenses dialog isn't created yet. Therefore, it's not visible.
1728-
return false;
1729-
}
1730-
17311700
void SceneTree::_bind_methods() {
17321701
ClassDB::bind_method(D_METHOD("get_root"), &SceneTree::get_root);
17331702
ClassDB::bind_method(D_METHOD("has_group", "name"), &SceneTree::has_group);
@@ -1802,9 +1771,6 @@ void SceneTree::_bind_methods() {
18021771
ClassDB::bind_method(D_METHOD("set_multiplayer_poll_enabled", "enabled"), &SceneTree::set_multiplayer_poll_enabled);
18031772
ClassDB::bind_method(D_METHOD("is_multiplayer_poll_enabled"), &SceneTree::is_multiplayer_poll_enabled);
18041773

1805-
ClassDB::bind_method(D_METHOD("set_licenses_dialog_visible", "visible"), &SceneTree::set_licenses_dialog_visible);
1806-
ClassDB::bind_method(D_METHOD("is_licenses_dialog_visible"), &SceneTree::is_licenses_dialog_visible);
1807-
18081774
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "auto_accept_quit"), "set_auto_accept_quit", "is_auto_accept_quit");
18091775
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "quit_on_go_back"), "set_quit_on_go_back", "is_quit_on_go_back");
18101776
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "debug_collisions_hint"), "set_debug_collisions_hint", "is_debugging_collisions_hint");
@@ -1816,7 +1782,6 @@ void SceneTree::_bind_methods() {
18161782
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "root", PROPERTY_HINT_RESOURCE_TYPE, "Node", PROPERTY_USAGE_NONE), "", "get_root");
18171783
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "multiplayer_poll"), "set_multiplayer_poll_enabled", "is_multiplayer_poll_enabled");
18181784
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "physics_interpolation"), "set_physics_interpolation_enabled", "is_physics_interpolation_enabled");
1819-
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "licenses_dialog_visible"), "set_licenses_dialog_visible", "is_licenses_dialog_visible");
18201785

18211786
ADD_SIGNAL(MethodInfo("tree_changed"));
18221787
ADD_SIGNAL(MethodInfo("tree_process_mode_changed")); //editor only signal, but due to API hash it can't be removed in run-time

scene/main/scene_tree.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ class Node;
4343
#ifndef _3D_DISABLED
4444
class Node3D;
4545
#endif
46-
class LicensesDialog;
4746
class Window;
4847
class Material;
4948
class Mesh;
@@ -191,9 +190,6 @@ class SceneTree : public MainLoop {
191190
Node *prev_scene = nullptr;
192191
Node *pending_new_scene = nullptr;
193192

194-
// Initialized lazily and destroyed eagerly to decrease RAM usage, since it contains a lot of text.
195-
LicensesDialog *licenses_dialog = nullptr;
196-
197193
Color debug_collisions_color;
198194
Color debug_collision_contact_color;
199195
Color debug_paths_color;
@@ -433,9 +429,6 @@ class SceneTree : public MainLoop {
433429
void set_multiplayer_poll_enabled(bool p_enabled);
434430
bool is_multiplayer_poll_enabled() const;
435431

436-
void set_licenses_dialog_visible(bool p_visible);
437-
bool is_licenses_dialog_visible() const;
438-
439432
static void add_idle_callback(IdleCallback p_callback);
440433

441434
void set_disable_node_threading(bool p_disable);

scene/main/viewport.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2161,10 +2161,6 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
21612161
}
21622162
}
21632163

2164-
if (!Engine::get_singleton()->is_editor_hint() && !Engine::get_singleton()->is_project_manager_hint() && p_event->is_action_pressed("ui_toggle_licenses_dialog")) {
2165-
SceneTree::get_singleton()->set_licenses_dialog_visible(!SceneTree::get_singleton()->is_licenses_dialog_visible());
2166-
}
2167-
21682164
if (gui.key_focus && !gui.key_focus->is_visible_in_tree()) {
21692165
gui.key_focus->release_focus();
21702166
}

0 commit comments

Comments
 (0)