diff options
56 files changed, 4 insertions, 615 deletions
diff --git a/core/io/packet_peer.cpp b/core/io/packet_peer.cpp index b6cc5bf42a..3da494a8ef 100644 --- a/core/io/packet_peer.cpp +++ b/core/io/packet_peer.cpp @@ -151,11 +151,6 @@ void PacketPeer::_bind_methods() { /***************/ -void PacketPeerStream::_set_stream_peer(REF p_peer) { - ERR_FAIL_COND_MSG(p_peer.is_null(), "It's not a reference to a valid Resource object."); - set_stream_peer(p_peer); -} - void PacketPeerStream::_bind_methods() { ClassDB::bind_method(D_METHOD("set_stream_peer", "peer"), &PacketPeerStream::set_stream_peer); ClassDB::bind_method(D_METHOD("get_stream_peer"), &PacketPeerStream::get_stream_peer); @@ -263,10 +258,8 @@ int PacketPeerStream::get_max_packet_size() const { } void PacketPeerStream::set_stream_peer(const Ref<StreamPeer> &p_peer) { - //ERR_FAIL_COND(p_peer.is_null()); - if (p_peer.ptr() != peer.ptr()) { - ring_buffer.advance_read(ring_buffer.data_left()); // reset the ring buffer + ring_buffer.advance_read(ring_buffer.data_left()); // Reset the ring buffer. } peer = p_peer; diff --git a/core/io/packet_peer.h b/core/io/packet_peer.h index f7f080aa43..a25fa03875 100644 --- a/core/io/packet_peer.h +++ b/core/io/packet_peer.h @@ -86,7 +86,6 @@ class PacketPeerStream : public PacketPeer { Error _poll_buffer() const; protected: - void _set_stream_peer(REF p_peer); static void _bind_methods(); public: diff --git a/core/io/resource_importer.cpp b/core/io/resource_importer.cpp index c88331cf9e..9b14d2c763 100644 --- a/core/io/resource_importer.cpp +++ b/core/io/resource_importer.cpp @@ -192,10 +192,6 @@ bool ResourceFormatImporter::recognize_path(const String &p_path, const String & return FileAccess::exists(p_path + ".import"); } -bool ResourceFormatImporter::can_be_imported(const String &p_path) const { - return ResourceFormatLoader::recognize_path(p_path); -} - int ResourceFormatImporter::get_import_order(const String &p_path) const { Ref<ResourceImporter> importer; diff --git a/core/io/resource_importer.h b/core/io/resource_importer.h index 30bbd43c18..1b300bf656 100644 --- a/core/io/resource_importer.h +++ b/core/io/resource_importer.h @@ -70,7 +70,6 @@ public: virtual String get_import_group_file(const String &p_path) const; virtual bool exists(const String &p_path) const; - virtual bool can_be_imported(const String &p_path) const; virtual int get_import_order(const String &p_path) const; String get_internal_resource_path(const String &p_path) const; diff --git a/core/math/vector3.cpp b/core/math/vector3.cpp index 23f5bb88fe..09354d8e79 100644 --- a/core/math/vector3.cpp +++ b/core/math/vector3.cpp @@ -72,39 +72,6 @@ Vector3 Vector3::snapped(Vector3 p_val) const { return v; } -Vector3 Vector3::cubic_interpolaten(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_weight) const { - Vector3 p0 = p_pre_a; - Vector3 p1 = *this; - Vector3 p2 = p_b; - Vector3 p3 = p_post_b; - - { - //normalize - - real_t ab = p0.distance_to(p1); - real_t bc = p1.distance_to(p2); - real_t cd = p2.distance_to(p3); - - if (ab > 0) { - p0 = p1 + (p0 - p1) * (bc / ab); - } - if (cd > 0) { - p3 = p2 + (p3 - p2) * (bc / cd); - } - } - - real_t t = p_weight; - real_t t2 = t * t; - real_t t3 = t2 * t; - - Vector3 out; - out = 0.5 * ((p1 * 2.0) + - (-p0 + p2) * t + - (2.0 * p0 - 5.0 * p1 + 4.0 * p2 - p3) * t2 + - (-p0 + 3.0 * p1 - 3.0 * p2 + p3) * t3); - return out; -} - Vector3 Vector3::cubic_interpolate(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_weight) const { Vector3 p0 = p_pre_a; Vector3 p1 = *this; diff --git a/core/math/vector3.h b/core/math/vector3.h index 69e79627f3..5af84377fd 100644 --- a/core/math/vector3.h +++ b/core/math/vector3.h @@ -89,7 +89,6 @@ struct Vector3 { _FORCE_INLINE_ Vector3 lerp(const Vector3 &p_to, real_t p_weight) const; _FORCE_INLINE_ Vector3 slerp(const Vector3 &p_to, real_t p_weight) const; Vector3 cubic_interpolate(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_weight) const; - Vector3 cubic_interpolaten(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_weight) const; Vector3 move_toward(const Vector3 &p_to, const real_t p_delta) const; _FORCE_INLINE_ Vector3 cross(const Vector3 &p_b) const; diff --git a/core/object/object.cpp b/core/object/object.cpp index 3764316122..681e1188ff 100644 --- a/core/object/object.cpp +++ b/core/object/object.cpp @@ -823,10 +823,6 @@ void Object::property_list_changed_notify() { _change_notify(); } -void Object::cancel_delete() { - _predelete_ok = true; -} - void Object::set_script_and_instance(const Variant &p_script, ScriptInstance *p_instance) { //this function is not meant to be used in any of these ways ERR_FAIL_COND(p_script.is_null()); diff --git a/core/object/object.h b/core/object/object.h index 5bf9600c5a..dc004f38a9 100644 --- a/core/object/object.h +++ b/core/object/object.h @@ -525,8 +525,6 @@ protected: static void get_valid_parents_static(List<String> *p_parents); static void _get_valid_parents_static(List<String> *p_parents); - void cancel_delete(); - virtual void _changed_callback(Object *p_changed, const char *p_prop); //Variant _call_bind(const StringName& p_name, const Variant& p_arg1 = Variant(), const Variant& p_arg2 = Variant(), const Variant& p_arg3 = Variant(), const Variant& p_arg4 = Variant()); diff --git a/core/object/script_language.h b/core/object/script_language.h index ddd884a4f3..f5d65cf42d 100644 --- a/core/object/script_language.h +++ b/core/object/script_language.h @@ -274,8 +274,6 @@ class ScriptCodeCompletionCache { static ScriptCodeCompletionCache *singleton; public: - virtual RES get_cached_resource(const String &p_path) = 0; - static ScriptCodeCompletionCache *get_singleton() { return singleton; } ScriptCodeCompletionCache(); diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 717e4628ae..7411af2280 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -2217,10 +2217,6 @@ void AnimationTrackEdit::draw_bg(int p_clip_left, int p_clip_right) { void AnimationTrackEdit::draw_fg(int p_clip_left, int p_clip_right) { } -void AnimationTrackEdit::draw_texture_clipped(const Ref<Texture2D> &p_texture, const Vector2 &p_pos) { - draw_texture_region_clipped(p_texture, Rect2(p_pos, p_texture->get_size()), Rect2(Point2(), p_texture->get_size())); -} - void AnimationTrackEdit::draw_texture_region_clipped(const Ref<Texture2D> &p_texture, const Rect2 &p_rect, const Rect2 &p_region) { int clip_left = timeline->get_name_limit(); int clip_right = get_size().width - timeline->get_buttons_width(); diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h index 5e12791e34..3cb31fe21e 100644 --- a/editor/animation_track_editor.h +++ b/editor/animation_track_editor.h @@ -207,7 +207,6 @@ public: virtual void draw_fg(int p_clip_left, int p_clip_right); //helper - void draw_texture_clipped(const Ref<Texture2D> &p_texture, const Vector2 &p_pos); void draw_texture_region_clipped(const Ref<Texture2D> &p_texture, const Rect2 &p_rect, const Rect2 &p_region); void draw_rect_clipped(const Rect2 &p_rect, const Color &p_color, bool p_filled = true); diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index 975405aec4..eab1ecf373 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -691,11 +691,6 @@ void EditorData::set_edited_scene_version(uint64_t version, int p_scene_idx) { } } -uint64_t EditorData::get_edited_scene_version() const { - ERR_FAIL_INDEX_V(current_edited_scene, edited_scene.size(), 0); - return edited_scene[current_edited_scene].version; -} - uint64_t EditorData::get_scene_version(int p_idx) const { ERR_FAIL_INDEX_V(p_idx, edited_scene.size(), 0); return edited_scene[p_idx].version; diff --git a/editor/editor_data.h b/editor/editor_data.h index e4ef9f56a5..0d27e06987 100644 --- a/editor/editor_data.h +++ b/editor/editor_data.h @@ -190,7 +190,6 @@ public: void set_scene_path(int p_idx, const String &p_path); Ref<Script> get_scene_root_script(int p_idx) const; void set_edited_scene_version(uint64_t version, int p_scene_idx = -1); - uint64_t get_edited_scene_version() const; uint64_t get_scene_version(int p_idx) const; void clear_edited_scenes(); void set_edited_scene_live_edit_root(const NodePath &p_root); diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index f7cb5428ce..07318c14bc 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -1835,17 +1835,10 @@ void EditorExportPlatformPC::set_debug_32(const String &p_file) { debug_file_32 = p_file; } -void EditorExportPlatformPC::add_platform_feature(const String &p_feature) { - extra_features.insert(p_feature); -} - void EditorExportPlatformPC::get_platform_features(List<String> *r_features) { r_features->push_back("pc"); //all pcs support "pc" r_features->push_back("s3tc"); //all pcs support "s3tc" compression r_features->push_back(get_os_name()); //OS name is a feature - for (Set<String>::Element *E = extra_features.front(); E; E = E->next()) { - r_features->push_back(E->get()); - } } void EditorExportPlatformPC::resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) { diff --git a/editor/editor_export.h b/editor/editor_export.h index 6f835f5a68..584ef17035 100644 --- a/editor/editor_export.h +++ b/editor/editor_export.h @@ -424,8 +424,6 @@ private: String debug_file_32; String debug_file_64; - Set<String> extra_features; - int chmod_flags; FixUpEmbeddedPckFunc fixup_embedded_pck_func; diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 738b88a86b..43f0c9e2bb 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -1044,10 +1044,6 @@ void EditorFileSystem::_thread_func_sources(void *_userdata) { efs->scanning_changes_done = true; } -void EditorFileSystem::get_changed_sources(List<String> *r_changed) { - *r_changed = sources_changed; -} - void EditorFileSystem::scan_changes() { if (first_scan || // Prevent a premature changes scan from inhibiting the first full scan scanning || scanning_changes || thread) { diff --git a/editor/editor_file_system.h b/editor/editor_file_system.h index f89b4db933..a7ab4d6a9a 100644 --- a/editor/editor_file_system.h +++ b/editor/editor_file_system.h @@ -248,7 +248,6 @@ public: float get_scanning_progress() const; void scan(); void scan_changes(); - void get_changed_sources(List<String> *r_changed); void update_file(const String &p_file); EditorFileSystemDirectory *get_filesystem_path(const String &p_path); diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 27be3bcc14..aafe1468da 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -175,7 +175,6 @@ #include "editor/pvrtc_compress.h" #include "editor/quick_open.h" #include "editor/register_exporters.h" -#include "editor/run_settings_dialog.h" #include "editor/settings_config_dialog.h" #include "scene/main/window.h" #include "servers/display_server.h" @@ -2557,9 +2556,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { run_play_current(); } break; - case RUN_SCENE_SETTINGS: { - run_settings_dialog->popup_run_settings(); - } break; case RUN_SETTINGS: { project_settings->popup_project_settings(); } break; @@ -4836,16 +4832,6 @@ Button *EditorNode::add_bottom_panel_item(String p_text, Control *p_item) { return tb; } -bool EditorNode::are_bottom_panels_hidden() const { - for (int i = 0; i < bottom_panel_items.size(); i++) { - if (bottom_panel_items[i].button->is_pressed()) { - return false; - } - } - - return true; -} - void EditorNode::hide_bottom_panel() { for (int i = 0; i < bottom_panel_items.size(); i++) { if (bottom_panel_items[i].control->is_visible()) { @@ -6091,9 +6077,6 @@ EditorNode::EditorNode() { project_settings = memnew(ProjectSettingsEditor(&editor_data)); gui_base->add_child(project_settings); - run_settings_dialog = memnew(RunSettingsDialog); - gui_base->add_child(run_settings_dialog); - export_template_manager = memnew(ExportTemplateManager); gui_base->add_child(export_template_manager); diff --git a/editor/editor_node.h b/editor/editor_node.h index 9d1a890f0e..1260cca045 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -161,7 +161,6 @@ private: RUN_STOP, RUN_PLAY_SCENE, RUN_PLAY_CUSTOM_SCENE, - RUN_SCENE_SETTINGS, RUN_SETTINGS, RUN_PROJECT_DATA_FOLDER, RUN_PROJECT_MANAGER, @@ -312,7 +311,6 @@ private: ConfirmationDialog *remove_android_build_template; EditorSettingsDialog *settings_config_dialog; - RunSettingsDialog *run_settings_dialog; ProjectSettingsEditor *project_settings; PopupMenu *vcs_actions_menu; EditorFileDialog *file; @@ -824,7 +822,6 @@ public: Button *get_pause_button() { return pause_button; } Button *add_bottom_panel_item(String p_text, Control *p_item); - bool are_bottom_panels_hidden() const; void make_bottom_panel_item_visible(Control *p_item); void raise_bottom_panel_item(Control *p_item); void hide_bottom_panel(); diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 757e26f308..cc04ea5a58 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -1539,11 +1539,6 @@ Ref<Shortcut> ED_GET_SHORTCUT(const String &p_path) { return sc; } -struct ShortcutMapping { - const char *path = nullptr; - uint32_t keycode = 0; -}; - Ref<Shortcut> ED_SHORTCUT(const String &p_path, const String &p_name, uint32_t p_keycode) { #ifdef OSX_ENABLED // Use Cmd+Backspace as a general replacement for Delete shortcuts on macOS diff --git a/editor/multi_node_edit.cpp b/editor/multi_node_edit.cpp index 1077aca7b3..a7d5e5149e 100644 --- a/editor/multi_node_edit.cpp +++ b/editor/multi_node_edit.cpp @@ -173,10 +173,6 @@ void MultiNodeEdit::_get_property_list(List<PropertyInfo> *p_list) const { p_list->push_back(PropertyInfo(Variant::OBJECT, "scripts", PROPERTY_HINT_RESOURCE_TYPE, "Script")); } -void MultiNodeEdit::clear_nodes() { - nodes.clear(); -} - void MultiNodeEdit::add_node(const NodePath &p_node) { nodes.push_back(p_node); } diff --git a/editor/multi_node_edit.h b/editor/multi_node_edit.h index 3ccf06153d..7f0fb625ef 100644 --- a/editor/multi_node_edit.h +++ b/editor/multi_node_edit.h @@ -50,7 +50,6 @@ protected: void _get_property_list(List<PropertyInfo> *p_list) const; public: - void clear_nodes(); void add_node(const NodePath &p_node); int get_node_count() const; diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp index 1bbb68d224..800df12199 100644 --- a/editor/plugins/animation_tree_editor_plugin.cpp +++ b/editor/plugins/animation_tree_editor_plugin.cpp @@ -142,9 +142,6 @@ void AnimationTreeEditor::enter_editor(const String &p_path) { edit_path(path); } -void AnimationTreeEditor::_about_to_show_root() { -} - void AnimationTreeEditor::_notification(int p_what) { if (p_what == NOTIFICATION_PROCESS) { ObjectID root; diff --git a/editor/plugins/animation_tree_editor_plugin.h b/editor/plugins/animation_tree_editor_plugin.h index 356a078d99..fd3a449487 100644 --- a/editor/plugins/animation_tree_editor_plugin.h +++ b/editor/plugins/animation_tree_editor_plugin.h @@ -62,7 +62,6 @@ class AnimationTreeEditor : public VBoxContainer { Vector<AnimationTreeNodeEditorPlugin *> editors; void _update_path(); - void _about_to_show_root(); ObjectID current_root; void _path_button_pressed(int p_path); diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 40ded6872a..5982074750 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -1641,17 +1641,6 @@ void ScriptEditor::get_breakpoints(List<String> *p_breakpoints) { } } -void ScriptEditor::ensure_focus_current() { - if (!is_inside_tree()) { - return; - } - - ScriptEditorBase *current = _get_current_editor(); - if (current) { - current->ensure_focus(); - } -} - void ScriptEditor::_members_overview_selected(int p_idx) { ScriptEditorBase *se = _get_current_editor(); if (!se) { diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h index 08c6a2fba7..aafd8cba18 100644 --- a/editor/plugins/script_editor_plugin.h +++ b/editor/plugins/script_editor_plugin.h @@ -453,7 +453,6 @@ public: bool toggle_scripts_panel(); bool is_scripts_panel_toggled(); - void ensure_focus_current(); void apply_scripts() const; void open_script_create_dialog(const String &p_base_name, const String &p_base_path); diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp index 8ab82b63c3..dd53f60014 100644 --- a/editor/plugins/theme_editor_plugin.cpp +++ b/editor/plugins/theme_editor_plugin.cpp @@ -507,13 +507,6 @@ void ThemeEditor::_theme_menu_cbk(int p_option) { theme->set_icon(E->get(), type, import ? base_theme->get_icon(E->get(), type) : Ref<Texture2D>()); } - List<StringName> shaders; - base_theme->get_shader_list(type, &shaders); - - for (List<StringName>::Element *E = shaders.front(); E; E = E->next()) { - theme->set_shader(E->get(), type, import ? base_theme->get_shader(E->get(), type) : Ref<Shader>()); - } - List<StringName> styleboxs; base_theme->get_stylebox_list(type, &styleboxs); diff --git a/editor/run_settings_dialog.cpp b/editor/run_settings_dialog.cpp deleted file mode 100644 index b6dda4c5bb..0000000000 --- a/editor/run_settings_dialog.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/*************************************************************************/ -/* run_settings_dialog.cpp */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/*************************************************************************/ - -#include "run_settings_dialog.h" - -void RunSettingsDialog::popup_run_settings() { - popup_centered(Size2(300, 150)); -} - -void RunSettingsDialog::set_custom_arguments(const String &p_arguments) { - arguments->set_text(p_arguments); -} - -String RunSettingsDialog::get_custom_arguments() const { - return arguments->get_text(); -} - -void RunSettingsDialog::_bind_methods() { - //ClassDB::bind_method("_browse_selected_file",&RunSettingsDialog::_browse_selected_file); -} - -void RunSettingsDialog::_run_mode_changed(int idx) { - if (idx == 0) { - arguments->set_editable(false); - } else { - arguments->set_editable(true); - } -} - -int RunSettingsDialog::get_run_mode() const { - return run_mode->get_selected(); -} - -void RunSettingsDialog::set_run_mode(int p_run_mode) { - run_mode->select(p_run_mode); - arguments->set_editable(p_run_mode); -} - -RunSettingsDialog::RunSettingsDialog() { - /* SNAP DIALOG */ - - VBoxContainer *vbc = memnew(VBoxContainer); - add_child(vbc); - //set_child_rect(vbc); - - run_mode = memnew(OptionButton); - vbc->add_margin_child(TTR("Run Mode:"), run_mode); - run_mode->add_item(TTR("Current Scene")); - run_mode->add_item(TTR("Main Scene")); - run_mode->connect("item_selected", callable_mp(this, &RunSettingsDialog::_run_mode_changed)); - arguments = memnew(LineEdit); - vbc->add_margin_child(TTR("Main Scene Arguments:"), arguments); - arguments->set_editable(false); - - get_ok()->set_text(TTR("Close")); - - set_title(TTR("Scene Run Settings")); -} diff --git a/editor/run_settings_dialog.h b/editor/run_settings_dialog.h deleted file mode 100644 index 4d6d842de0..0000000000 --- a/editor/run_settings_dialog.h +++ /dev/null @@ -1,69 +0,0 @@ -/*************************************************************************/ -/* run_settings_dialog.h */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/*************************************************************************/ - -#ifndef RUN_SETTINGS_DIALOG_H -#define RUN_SETTINGS_DIALOG_H - -#include "scene/gui/check_button.h" -#include "scene/gui/dialogs.h" -#include "scene/gui/file_dialog.h" -#include "scene/gui/line_edit.h" - -class RunSettingsDialog : public AcceptDialog { - GDCLASS(RunSettingsDialog, AcceptDialog); - -public: - enum RunMode { - RUN_LOCAL_SCENE, - RUN_MAIN_SCENE, - }; - -private: - OptionButton *run_mode; - LineEdit *arguments; - - void _run_mode_changed(int idx); - -protected: - static void _bind_methods(); - -public: - int get_run_mode() const; - void set_run_mode(int p_run_mode); - - void set_custom_arguments(const String &p_arguments); - String get_custom_arguments() const; - - void popup_run_settings(); - - RunSettingsDialog(); -}; - -#endif // RUN_SETTINGS_DIALOG_H diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 9c37ae584a..91dffb504f 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -1934,23 +1934,6 @@ void SceneTreeDock::_selection_changed() { _update_script_button(); } -Node *SceneTreeDock::_get_selection_group_tail(Node *p_node, List<Node *> p_list) { - Node *tail = p_node; - Node *parent = tail->get_parent(); - - for (int i = p_node->get_index(); i < parent->get_child_count(); i++) { - Node *sibling = parent->get_child(i); - - if (p_list.find(sibling)) { - tail = sibling; - } else { - break; - } - } - - return tail; -} - void SceneTreeDock::_do_create(Node *p_parent) { Object *c = create_dialog->instance_selected(); diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h index 119a499d0f..2b3593358e 100644 --- a/editor/scene_tree_dock.h +++ b/editor/scene_tree_dock.h @@ -203,7 +203,6 @@ class SceneTreeDock : public VBoxContainer { bool _validate_no_foreign(); void _selection_changed(); void _update_script_button(); - Node *_get_selection_group_tail(Node *p_node, List<Node *> p_list); void _fill_path_renames(Vector<StringName> base_path, Vector<StringName> new_base_path, Node *p_node, List<Pair<NodePath, NodePath>> *p_renames); diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index 3ec012ce3c..685833da55 100644 --- a/editor/scene_tree_editor.cpp +++ b/editor/scene_tree_editor.cpp @@ -829,10 +829,6 @@ void SceneTreeEditor::set_display_foreign_nodes(bool p_display) { _update_tree(); } -bool SceneTreeEditor::get_display_foreign_nodes() const { - return display_foreign; -} - void SceneTreeEditor::set_valid_types(const Vector<StringName> &p_valid) { valid_types = p_valid; } diff --git a/editor/scene_tree_editor.h b/editor/scene_tree_editor.h index 9373ef41f9..e2bf9bc41d 100644 --- a/editor/scene_tree_editor.h +++ b/editor/scene_tree_editor.h @@ -138,7 +138,6 @@ public: void set_undo_redo(UndoRedo *p_undo_redo) { undo_redo = p_undo_redo; }; void set_display_foreign_nodes(bool p_display); - bool get_display_foreign_nodes() const; void set_marked(const Set<Node *> &p_marked, bool p_selectable = false, bool p_children_selectable = true); void set_marked(Node *p_marked, bool p_selectable = false, bool p_children_selectable = true); diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp index 22af8ba985..f8b420b1c8 100644 --- a/platform/server/os_server.cpp +++ b/platform/server/os_server.cpp @@ -49,14 +49,6 @@ const char *OS_Server::get_video_driver_name(int p_driver) const { return "Dummy"; } -int OS_Server::get_audio_driver_count() const { - return 1; -} - -const char *OS_Server::get_audio_driver_name(int p_driver) const { - return "Dummy"; -} - int OS_Server::get_current_video_driver() const { return video_driver_index; } diff --git a/platform/server/os_server.h b/platform/server/os_server.h index bfad89adb8..95b6b5143b 100644 --- a/platform/server/os_server.h +++ b/platform/server/os_server.h @@ -70,8 +70,6 @@ protected: virtual int get_video_driver_count() const; virtual const char *get_video_driver_name(int p_driver) const; virtual int get_current_video_driver() const; - virtual int get_audio_driver_count() const; - virtual const char *get_audio_driver_name(int p_driver) const; virtual void initialize_core(); virtual Error initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver); diff --git a/scene/2d/line_builder.cpp b/scene/2d/line_builder.cpp index f1522dbaeb..e0116d9bad 100644 --- a/scene/2d/line_builder.cpp +++ b/scene/2d/line_builder.cpp @@ -459,39 +459,6 @@ void LineBuilder::strip_begin(Vector2 up, Vector2 down, Color color, float uvx) _last_index[DOWN] = vi + 1; } -void LineBuilder::strip_new_quad(Vector2 up, Vector2 down, Color color, float uvx) { - int vi = vertices.size(); - - vertices.push_back(vertices[_last_index[UP]]); - vertices.push_back(vertices[_last_index[DOWN]]); - vertices.push_back(up); - vertices.push_back(down); - - if (_interpolate_color) { - colors.push_back(color); - colors.push_back(color); - colors.push_back(color); - colors.push_back(color); - } - - if (texture_mode != Line2D::LINE_TEXTURE_NONE) { - uvs.push_back(uvs[_last_index[UP]]); - uvs.push_back(uvs[_last_index[DOWN]]); - uvs.push_back(Vector2(uvx, UP)); - uvs.push_back(Vector2(uvx, DOWN)); - } - - indices.push_back(vi); - indices.push_back(vi + 3); - indices.push_back(vi + 1); - indices.push_back(vi); - indices.push_back(vi + 2); - indices.push_back(vi + 3); - - _last_index[UP] = vi + 2; - _last_index[DOWN] = vi + 3; -} - void LineBuilder::strip_add_quad(Vector2 up, Vector2 down, Color color, float uvx) { int vi = vertices.size(); diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp index b093788d75..37bc032356 100644 --- a/scene/3d/audio_stream_player_3d.cpp +++ b/scene/3d/audio_stream_player_3d.cpp @@ -327,9 +327,6 @@ float AudioStreamPlayer3D::_get_attenuation_db(float p_distance) const { return att; } -void _update_sound() { -} - void AudioStreamPlayer3D::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE) { velocity_tracker->reset(get_global_transform().origin); diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index f9b7d828f4..b471bb9d4e 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -223,13 +223,6 @@ bool Control::_set(const StringName &p_name, const Variant &p_value) { } data.icon_override.erase(dname); notification(NOTIFICATION_THEME_CHANGED); - } else if (name.begins_with("custom_shaders/")) { - String dname = name.get_slicec('/', 1); - if (data.shader_override.has(dname)) { - data.shader_override[dname]->disconnect("changed", callable_mp(this, &Control::_override_changed)); - } - data.shader_override.erase(dname); - notification(NOTIFICATION_THEME_CHANGED); } else if (name.begins_with("custom_styles/")) { String dname = name.get_slicec('/', 1); if (data.style_override.has(dname)) { @@ -264,9 +257,6 @@ bool Control::_set(const StringName &p_name, const Variant &p_value) { if (name.begins_with("custom_icons/")) { String dname = name.get_slicec('/', 1); add_theme_icon_override(dname, p_value); - } else if (name.begins_with("custom_shaders/")) { - String dname = name.get_slicec('/', 1); - add_theme_shader_override(dname, p_value); } else if (name.begins_with("custom_styles/")) { String dname = name.get_slicec('/', 1); add_theme_style_override(dname, p_value); @@ -318,9 +308,6 @@ bool Control::_get(const StringName &p_name, Variant &r_ret) const { if (sname.begins_with("custom_icons/")) { String name = sname.get_slicec('/', 1); r_ret = data.icon_override.has(name) ? Variant(data.icon_override[name]) : Variant(); - } else if (sname.begins_with("custom_shaders/")) { - String name = sname.get_slicec('/', 1); - r_ret = data.shader_override.has(name) ? Variant(data.shader_override[name]) : Variant(); } else if (sname.begins_with("custom_styles/")) { String name = sname.get_slicec('/', 1); r_ret = data.style_override.has(name) ? Variant(data.style_override[name]) : Variant(); @@ -368,18 +355,6 @@ void Control::_get_property_list(List<PropertyInfo> *p_list) const { } { List<StringName> names; - theme->get_shader_list(get_class_name(), &names); - for (List<StringName>::Element *E = names.front(); E; E = E->next()) { - uint32_t hint = PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_CHECKABLE; - if (data.shader_override.has(E->get())) { - hint |= PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_CHECKED; - } - - p_list->push_back(PropertyInfo(Variant::OBJECT, "custom_shaders/" + E->get(), PROPERTY_HINT_RESOURCE_TYPE, "Shader,VisualShader", hint)); - } - } - { - List<StringName> names; theme->get_stylebox_list(get_class_name(), &names); for (List<StringName>::Element *E = names.front(); E; E = E->next()) { uint32_t hint = PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_CHECKABLE; @@ -481,10 +456,6 @@ bool Control::is_layout_rtl() const { } } -void Control::_resize(const Size2 &p_size) { - _size_changed(); -} - //moved theme configuration here, so controls can set up even if still not inside active scene void Control::add_child_notify(Node *p_child) { @@ -901,35 +872,6 @@ Ref<Texture2D> Control::get_icons(Control *p_theme_owner, Window *p_theme_owner_ return Theme::get_default()->get_icon(p_name, p_node_type); } -Ref<Shader> Control::get_theme_shader(const StringName &p_name, const StringName &p_node_type) const { - if (p_node_type == StringName() || p_node_type == get_class_name()) { - const Ref<Shader> *sdr = data.shader_override.getptr(p_name); - if (sdr) { - return *sdr; - } - } - - StringName type = p_node_type ? p_node_type : get_class_name(); - - return get_shaders(data.theme_owner, data.theme_owner_window, p_name, type); -} - -Ref<Shader> Control::get_shaders(Control *p_theme_owner, Window *p_theme_owner_window, const StringName &p_name, const StringName &p_node_type) { - Ref<Shader> shader; - - if (_find_theme_item(p_theme_owner, p_theme_owner_window, shader, &Theme::get_shader, &Theme::has_shader, p_name, p_node_type)) { - return shader; - } - - if (Theme::get_project_default().is_valid()) { - if (Theme::get_project_default()->has_shader(p_name, p_node_type)) { - return Theme::get_project_default()->get_shader(p_name, p_node_type); - } - } - - return Theme::get_default()->get_shader(p_name, p_node_type); -} - Ref<StyleBox> Control::get_theme_stylebox(const StringName &p_name, const StringName &p_node_type) const { if (p_node_type == StringName() || p_node_type == get_class_name()) { const Ref<StyleBox> *style = data.style_override.getptr(p_name); @@ -1078,11 +1020,6 @@ bool Control::has_theme_icon_override(const StringName &p_name) const { return tex != nullptr; } -bool Control::has_theme_shader_override(const StringName &p_name) const { - const Ref<Shader> *sdr = data.shader_override.getptr(p_name); - return sdr != nullptr; -} - bool Control::has_theme_stylebox_override(const StringName &p_name) const { const Ref<StyleBox> *style = data.style_override.getptr(p_name); return style != nullptr; @@ -1133,31 +1070,6 @@ bool Control::has_icons(Control *p_theme_owner, Window *p_theme_owner_window, co return Theme::get_default()->has_icon(p_name, p_node_type); } -bool Control::has_theme_shader(const StringName &p_name, const StringName &p_node_type) const { - if (p_node_type == StringName() || p_node_type == get_class_name()) { - if (has_theme_shader_override(p_name)) { - return true; - } - } - - StringName type = p_node_type ? p_node_type : get_class_name(); - - return has_shaders(data.theme_owner, data.theme_owner_window, p_name, type); -} - -bool Control::has_shaders(Control *p_theme_owner, Window *p_theme_owner_window, const StringName &p_name, const StringName &p_node_type) { - if (_has_theme_item(p_theme_owner, p_theme_owner_window, &Theme::has_shader, p_name, p_node_type)) { - return true; - } - - if (Theme::get_project_default().is_valid()) { - if (Theme::get_project_default()->has_shader(p_name, p_node_type)) { - return true; - } - } - return Theme::get_default()->has_shader(p_name, p_node_type); -} - bool Control::has_theme_stylebox(const StringName &p_name, const StringName &p_node_type) const { if (p_node_type == StringName() || p_node_type == get_class_name()) { if (has_theme_stylebox_override(p_name)) { @@ -1891,23 +1803,6 @@ void Control::add_theme_icon_override(const StringName &p_name, const Ref<Textur notification(NOTIFICATION_THEME_CHANGED); } -void Control::add_theme_shader_override(const StringName &p_name, const Ref<Shader> &p_shader) { - if (data.shader_override.has(p_name)) { - data.shader_override[p_name]->disconnect("changed", callable_mp(this, &Control::_override_changed)); - } - - // clear if "null" is passed instead of a shader - if (p_shader.is_null()) { - data.shader_override.erase(p_name); - } else { - data.shader_override[p_name] = p_shader; - if (data.shader_override[p_name].is_valid()) { - data.shader_override[p_name]->connect("changed", callable_mp(this, &Control::_override_changed), Vector<Variant>(), CONNECT_REFERENCE_COUNTED); - } - } - notification(NOTIFICATION_THEME_CHANGED); -} - void Control::add_theme_style_override(const StringName &p_name, const Ref<StyleBox> &p_style) { if (data.style_override.has(p_name)) { data.style_override[p_name]->disconnect("changed", callable_mp(this, &Control::_override_changed)); @@ -2905,7 +2800,6 @@ void Control::_bind_methods() { ClassDB::bind_method(D_METHOD("get_theme"), &Control::get_theme); ClassDB::bind_method(D_METHOD("add_theme_icon_override", "name", "texture"), &Control::add_theme_icon_override); - ClassDB::bind_method(D_METHOD("add_theme_shader_override", "name", "shader"), &Control::add_theme_shader_override); ClassDB::bind_method(D_METHOD("add_theme_stylebox_override", "name", "stylebox"), &Control::add_theme_style_override); ClassDB::bind_method(D_METHOD("add_theme_font_override", "name", "font"), &Control::add_theme_font_override); ClassDB::bind_method(D_METHOD("add_theme_font_size_override", "name", "font_size"), &Control::add_theme_font_size_override); @@ -2920,7 +2814,6 @@ void Control::_bind_methods() { ClassDB::bind_method(D_METHOD("get_theme_constant", "name", "node_type"), &Control::get_theme_constant, DEFVAL("")); ClassDB::bind_method(D_METHOD("has_theme_icon_override", "name"), &Control::has_theme_icon_override); - ClassDB::bind_method(D_METHOD("has_theme_shader_override", "name"), &Control::has_theme_shader_override); ClassDB::bind_method(D_METHOD("has_theme_stylebox_override", "name"), &Control::has_theme_stylebox_override); ClassDB::bind_method(D_METHOD("has_theme_font_override", "name"), &Control::has_theme_font_override); ClassDB::bind_method(D_METHOD("has_theme_font_size_override", "name"), &Control::has_theme_font_size_override); diff --git a/scene/gui/control.h b/scene/gui/control.h index e1f05dfe64..8496729f05 100644 --- a/scene/gui/control.h +++ b/scene/gui/control.h @@ -212,7 +212,6 @@ private: NodePath focus_prev; HashMap<StringName, Ref<Texture2D>> icon_override; - HashMap<StringName, Ref<Shader>> shader_override; HashMap<StringName, Ref<StyleBox>> style_override; HashMap<StringName, Ref<Font>> font_override; HashMap<StringName, int> font_size_override; @@ -238,7 +237,6 @@ private: void _update_minimum_size(); void _update_scroll(); - void _resize(const Size2 &p_size); void _compute_margins(Rect2 p_rect, const float p_anchors[4], float (&r_margins)[4]); void _compute_anchors(Rect2 p_rect, const float p_margins[4], float (&r_anchors)[4]); @@ -264,7 +262,6 @@ private: _FORCE_INLINE_ static bool _has_theme_item(Control *p_theme_owner, Window *p_theme_owner_window, bool (Theme::*has_func)(const StringName &, const StringName &) const, const StringName &p_name, const StringName &p_node_type); static Ref<Texture2D> get_icons(Control *p_theme_owner, Window *p_theme_owner_window, const StringName &p_name, const StringName &p_node_type = StringName()); - static Ref<Shader> get_shaders(Control *p_theme_owner, Window *p_theme_owner_window, const StringName &p_name, const StringName &p_node_type = StringName()); static Ref<StyleBox> get_styleboxs(Control *p_theme_owner, Window *p_theme_owner_window, const StringName &p_name, const StringName &p_node_type = StringName()); static Ref<Font> get_fonts(Control *p_theme_owner, Window *p_theme_owner_window, const StringName &p_name, const StringName &p_node_type = StringName()); static int get_font_sizes(Control *p_theme_owner, Window *p_theme_owner_window, const StringName &p_name, const StringName &p_node_type = StringName()); @@ -272,7 +269,6 @@ private: static int get_constants(Control *p_theme_owner, Window *p_theme_owner_window, const StringName &p_name, const StringName &p_node_type = StringName()); static bool has_icons(Control *p_theme_owner, Window *p_theme_owner_window, const StringName &p_name, const StringName &p_node_type = StringName()); - static bool has_shaders(Control *p_theme_owner, Window *p_theme_owner_window, const StringName &p_name, const StringName &p_node_type = StringName()); static bool has_styleboxs(Control *p_theme_owner, Window *p_theme_owner_window, const StringName &p_name, const StringName &p_node_type = StringName()); static bool has_fonts(Control *p_theme_owner, Window *p_theme_owner_window, const StringName &p_name, const StringName &p_node_type = StringName()); static bool has_font_sizes(Control *p_theme_owner, Window *p_theme_owner_window, const StringName &p_name, const StringName &p_node_type = StringName()); @@ -456,7 +452,6 @@ public: /* SKINNING */ void add_theme_icon_override(const StringName &p_name, const Ref<Texture2D> &p_icon); - void add_theme_shader_override(const StringName &p_name, const Ref<Shader> &p_shader); void add_theme_style_override(const StringName &p_name, const Ref<StyleBox> &p_style); void add_theme_font_override(const StringName &p_name, const Ref<Font> &p_font); void add_theme_font_size_override(const StringName &p_name, int p_font_size); @@ -464,7 +459,6 @@ public: void add_theme_constant_override(const StringName &p_name, int p_constant); Ref<Texture2D> get_theme_icon(const StringName &p_name, const StringName &p_node_type = StringName()) const; - Ref<Shader> get_theme_shader(const StringName &p_name, const StringName &p_node_type = StringName()) const; Ref<StyleBox> get_theme_stylebox(const StringName &p_name, const StringName &p_node_type = StringName()) const; Ref<Font> get_theme_font(const StringName &p_name, const StringName &p_node_type = StringName()) const; int get_theme_font_size(const StringName &p_name, const StringName &p_node_type = StringName()) const; @@ -472,7 +466,6 @@ public: int get_theme_constant(const StringName &p_name, const StringName &p_node_type = StringName()) const; bool has_theme_icon_override(const StringName &p_name) const; - bool has_theme_shader_override(const StringName &p_name) const; bool has_theme_stylebox_override(const StringName &p_name) const; bool has_theme_font_override(const StringName &p_name) const; bool has_theme_font_size_override(const StringName &p_name) const; @@ -480,7 +473,6 @@ public: bool has_theme_constant_override(const StringName &p_name) const; bool has_theme_icon(const StringName &p_name, const StringName &p_node_type = StringName()) const; - bool has_theme_shader(const StringName &p_name, const StringName &p_node_type = StringName()) const; bool has_theme_stylebox(const StringName &p_name, const StringName &p_node_type = StringName()) const; bool has_theme_font(const StringName &p_name, const StringName &p_node_type = StringName()) const; bool has_theme_font_size(const StringName &p_name, const StringName &p_node_type = StringName()) const; diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 08214b958e..e3b645591c 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -1424,20 +1424,6 @@ bool RichTextLabel::_find_strikethrough(Item *p_item) { return false; } -bool RichTextLabel::_find_by_type(Item *p_item, ItemType p_type) { - ERR_FAIL_INDEX_V((int)p_type, 19, false); - - Item *item = p_item; - - while (item) { - if (item->type == p_type) { - return true; - } - item = item->parent; - } - return false; -} - void RichTextLabel::_fetch_item_fx_stack(Item *p_item, Vector<ItemFX *> &r_stack) { Item *item = p_item; while (item) { diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h index 67a3f466a6..2c74eb741d 100644 --- a/scene/gui/rich_text_label.h +++ b/scene/gui/rich_text_label.h @@ -375,7 +375,6 @@ private: bool _find_strikethrough(Item *p_item); bool _find_meta(Item *p_item, Variant *r_meta, ItemMeta **r_item = nullptr); bool _find_layout_subitem(Item *from, Item *to); - bool _find_by_type(Item *p_item, ItemType p_type); void _fetch_item_fx_stack(Item *p_item, Vector<ItemFX *> &r_stack); static Color _get_color_from_string(const String &p_color_str, const Color &p_default_color); diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp index 9340d98ede..70de63fd40 100644 --- a/scene/gui/scroll_bar.cpp +++ b/scene/gui/scroll_bar.cpp @@ -449,18 +449,6 @@ double ScrollBar::get_area_offset() const { return ofs; } -double ScrollBar::get_click_pos(const Point2 &p_pos) const { - float pos = (orientation == VERTICAL) ? p_pos.y : p_pos.x; - pos -= get_area_offset(); - - float area = get_area_size(); - if (area == 0) { - return 0; - } else { - return pos / area; - } -} - double ScrollBar::get_grabber_offset() const { return (get_area_size()) * get_as_ratio(); } diff --git a/scene/gui/scroll_bar.h b/scene/gui/scroll_bar.h index 75f5ad1647..358ed74965 100644 --- a/scene/gui/scroll_bar.h +++ b/scene/gui/scroll_bar.h @@ -61,7 +61,6 @@ class ScrollBar : public Range { double get_grabber_min_size() const; double get_area_size() const; double get_area_offset() const; - double get_click_pos(const Point2 &p_pos) const; double get_grabber_offset() const; static void set_can_focus_by_default(bool p_can_focus); diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 6bd8003ef0..063a5e7ac1 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -597,12 +597,6 @@ String TreeItem::get_button_tooltip(int p_column, int p_idx) const { return cells[p_column].buttons[p_idx].tooltip; } -int TreeItem::get_button_id(int p_column, int p_idx) const { - ERR_FAIL_INDEX_V(p_column, cells.size(), -1); - ERR_FAIL_INDEX_V(p_idx, cells[p_column].buttons.size(), -1); - return cells[p_column].buttons[p_idx].id; -} - void TreeItem::erase_button(int p_column, int p_idx) { ERR_FAIL_INDEX(p_column, cells.size()); ERR_FAIL_INDEX(p_idx, cells[p_column].buttons.size()); @@ -4081,10 +4075,6 @@ void Tree::set_cursor_can_exit_tree(bool p_enable) { cursor_can_exit_tree = p_enable; } -bool Tree::can_cursor_exit_tree() const { - return cursor_can_exit_tree; -} - void Tree::set_hide_folding(bool p_hide) { hide_folding = p_hide; update(); diff --git a/scene/gui/tree.h b/scene/gui/tree.h index 4c3d03c91a..82422b8be3 100644 --- a/scene/gui/tree.h +++ b/scene/gui/tree.h @@ -227,7 +227,6 @@ public: int get_button_count(int p_column) const; String get_button_tooltip(int p_column, int p_idx) const; Ref<Texture2D> get_button(int p_column, int p_idx) const; - int get_button_id(int p_column, int p_idx) const; void erase_button(int p_column, int p_idx); int get_button_by_id(int p_column, int p_id) const; void set_button(int p_column, int p_idx, const Ref<Texture2D> &p_button); @@ -633,7 +632,6 @@ public: void scroll_to_item(TreeItem *p_item); void set_cursor_can_exit_tree(bool p_enable); - bool can_cursor_exit_tree() const; VScrollBar *get_vscroll_bar() { return v_scroll; } diff --git a/scene/main/window.cpp b/scene/main/window.cpp index d88c8fb3af..ad87139332 100644 --- a/scene/main/window.cpp +++ b/scene/main/window.cpp @@ -1167,11 +1167,6 @@ Ref<Texture2D> Window::get_theme_icon(const StringName &p_name, const StringName return Control::get_icons(theme_owner, theme_owner_window, p_name, type); } -Ref<Shader> Window::get_theme_shader(const StringName &p_name, const StringName &p_type) const { - StringName type = p_type ? p_type : get_class_name(); - return Control::get_shaders(theme_owner, theme_owner_window, p_name, type); -} - Ref<StyleBox> Window::get_theme_stylebox(const StringName &p_name, const StringName &p_type) const { StringName type = p_type ? p_type : get_class_name(); return Control::get_styleboxs(theme_owner, theme_owner_window, p_name, type); @@ -1202,11 +1197,6 @@ bool Window::has_theme_icon(const StringName &p_name, const StringName &p_type) return Control::has_icons(theme_owner, theme_owner_window, p_name, type); } -bool Window::has_theme_shader(const StringName &p_name, const StringName &p_type) const { - StringName type = p_type ? p_type : get_class_name(); - return Control::has_shaders(theme_owner, theme_owner_window, p_name, type); -} - bool Window::has_theme_stylebox(const StringName &p_name, const StringName &p_type) const { StringName type = p_type ? p_type : get_class_name(); return Control::has_styleboxs(theme_owner, theme_owner_window, p_name, type); diff --git a/scene/main/window.h b/scene/main/window.h index a9a17ab9ba..20f8309952 100644 --- a/scene/main/window.h +++ b/scene/main/window.h @@ -253,7 +253,6 @@ public: Rect2i get_usable_parent_rect() const; Ref<Texture2D> get_theme_icon(const StringName &p_name, const StringName &p_type = StringName()) const; - Ref<Shader> get_theme_shader(const StringName &p_name, const StringName &p_type = StringName()) const; Ref<StyleBox> get_theme_stylebox(const StringName &p_name, const StringName &p_type = StringName()) const; Ref<Font> get_theme_font(const StringName &p_name, const StringName &p_type = StringName()) const; int get_theme_font_size(const StringName &p_name, const StringName &p_type = StringName()) const; @@ -261,7 +260,6 @@ public: int get_theme_constant(const StringName &p_name, const StringName &p_type = StringName()) const; bool has_theme_icon(const StringName &p_name, const StringName &p_type = StringName()) const; - bool has_theme_shader(const StringName &p_name, const StringName &p_type = StringName()) const; bool has_theme_stylebox(const StringName &p_name, const StringName &p_type = StringName()) const; bool has_theme_font(const StringName &p_name, const StringName &p_type = StringName()) const; bool has_theme_font_size(const StringName &p_name, const StringName &p_type = StringName()) const; diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index 5ce253f970..09674f3465 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -1481,16 +1481,6 @@ int SceneState::add_name(const StringName &p_name) { return names.size() - 1; } -int SceneState::find_name(const StringName &p_name) const { - for (int i = 0; i < names.size(); i++) { - if (names[i] == p_name) { - return i; - } - } - - return -1; -} - int SceneState::add_value(const Variant &p_value) { variants.push_back(p_value); return variants.size() - 1; diff --git a/scene/resources/packed_scene.h b/scene/resources/packed_scene.h index b8b3f84ecc..fce3891507 100644 --- a/scene/resources/packed_scene.h +++ b/scene/resources/packed_scene.h @@ -172,7 +172,6 @@ public: //build API int add_name(const StringName &p_name); - int find_name(const StringName &p_name) const; int add_value(const Variant &p_value); int add_node_path(const NodePath &p_path); int add_node(int p_parent, int p_owner, int p_type, int p_name, int p_instance, int p_index); diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp index a8bf44c5c0..14197c6c68 100644 --- a/scene/resources/style_box.cpp +++ b/scene/resources/style_box.cpp @@ -404,16 +404,6 @@ void StyleBoxFlat::set_corner_radius_individual(const int radius_top_left, const emit_changed(); } -int StyleBoxFlat::get_corner_radius_min() const { - int smallest = corner_radius[0]; - for (int i = 1; i < 4; i++) { - if (smallest > corner_radius[i]) { - smallest = corner_radius[i]; - } - } - return smallest; -} - void StyleBoxFlat::set_corner_radius(const Corner p_corner, const int radius) { ERR_FAIL_INDEX((int)p_corner, 4); corner_radius[p_corner] = radius; diff --git a/scene/resources/style_box.h b/scene/resources/style_box.h index a1237776c6..7dd806e840 100644 --- a/scene/resources/style_box.h +++ b/scene/resources/style_box.h @@ -184,7 +184,6 @@ public: //CORNER void set_corner_radius_all(int radius); void set_corner_radius_individual(const int radius_top_left, const int radius_top_right, const int radius_botton_right, const int radius_bottom_left); - int get_corner_radius_min() const; void set_corner_radius(Corner p_corner, const int radius); int get_corner_radius(Corner p_corner) const; diff --git a/scene/resources/theme.cpp b/scene/resources/theme.cpp index d130470275..6a752d32e7 100644 --- a/scene/resources/theme.cpp +++ b/scene/resources/theme.cpp @@ -421,52 +421,6 @@ void Theme::get_icon_list(StringName p_node_type, List<StringName> *p_list) cons } } -void Theme::set_shader(const StringName &p_name, const StringName &p_node_type, const Ref<Shader> &p_shader) { - bool new_value = !shader_map.has(p_node_type) || !shader_map[p_node_type].has(p_name); - - shader_map[p_node_type][p_name] = p_shader; - - if (new_value) { - _change_notify(); - emit_changed(); - } -} - -Ref<Shader> Theme::get_shader(const StringName &p_name, const StringName &p_node_type) const { - if (shader_map.has(p_node_type) && shader_map[p_node_type].has(p_name) && shader_map[p_node_type][p_name].is_valid()) { - return shader_map[p_node_type][p_name]; - } else { - return nullptr; - } -} - -bool Theme::has_shader(const StringName &p_name, const StringName &p_node_type) const { - return (shader_map.has(p_node_type) && shader_map[p_node_type].has(p_name) && shader_map[p_node_type][p_name].is_valid()); -} - -void Theme::clear_shader(const StringName &p_name, const StringName &p_node_type) { - ERR_FAIL_COND(!shader_map.has(p_node_type)); - ERR_FAIL_COND(!shader_map[p_node_type].has(p_name)); - - shader_map[p_node_type].erase(p_name); - _change_notify(); - emit_changed(); -} - -void Theme::get_shader_list(const StringName &p_node_type, List<StringName> *p_list) const { - ERR_FAIL_NULL(p_list); - - if (!shader_map.has(p_node_type)) { - return; - } - - const StringName *key = nullptr; - - while ((key = shader_map[p_node_type].next(key))) { - p_list->push_back(*key); - } -} - void Theme::set_stylebox(const StringName &p_name, const StringName &p_node_type, const Ref<StyleBox> &p_style) { //ERR_FAIL_COND(p_style.is_null()); @@ -782,7 +736,6 @@ void Theme::clear() { icon_map.clear(); style_map.clear(); font_map.clear(); - shader_map.clear(); color_map.clear(); constant_map.clear(); @@ -837,7 +790,6 @@ void Theme::copy_theme(const Ref<Theme> &p_other) { color_map = p_other->color_map; constant_map = p_other->constant_map; - shader_map = p_other->shader_map; _change_notify(); emit_changed(); diff --git a/scene/resources/theme.h b/scene/resources/theme.h index 4175e19112..6ac47e8931 100644 --- a/scene/resources/theme.h +++ b/scene/resources/theme.h @@ -34,7 +34,6 @@ #include "core/io/resource.h" #include "core/io/resource_loader.h" #include "scene/resources/font.h" -#include "scene/resources/shader.h" #include "scene/resources/style_box.h" #include "scene/resources/texture.h" @@ -48,7 +47,6 @@ class Theme : public Resource { HashMap<StringName, HashMap<StringName, Ref<StyleBox>>> style_map; HashMap<StringName, HashMap<StringName, Ref<Font>>> font_map; HashMap<StringName, HashMap<StringName, int>> font_size_map; - HashMap<StringName, HashMap<StringName, Ref<Shader>>> shader_map; HashMap<StringName, HashMap<StringName, Color>> color_map; HashMap<StringName, HashMap<StringName, int>> constant_map; @@ -102,12 +100,6 @@ public: void clear_icon(const StringName &p_name, const StringName &p_node_type); void get_icon_list(StringName p_node_type, List<StringName> *p_list) const; - void set_shader(const StringName &p_name, const StringName &p_node_type, const Ref<Shader> &p_shader); - Ref<Shader> get_shader(const StringName &p_name, const StringName &p_node_type) const; - bool has_shader(const StringName &p_name, const StringName &p_node_type) const; - void clear_shader(const StringName &p_name, const StringName &p_node_type); - void get_shader_list(const StringName &p_node_type, List<StringName> *p_list) const; - void set_stylebox(const StringName &p_name, const StringName &p_node_type, const Ref<StyleBox> &p_style); Ref<StyleBox> get_stylebox(const StringName &p_name, const StringName &p_node_type) const; bool has_stylebox(const StringName &p_name, const StringName &p_node_type) const; diff --git a/servers/camera_server.h b/servers/camera_server.h index 54acce006a..e09b883eee 100644 --- a/servers/camera_server.h +++ b/servers/camera_server.h @@ -95,15 +95,16 @@ public: int get_feed_index(int p_id); Ref<CameraFeed> get_feed_by_id(int p_id); - // add and remove feeds + // Add and remove feeds. void add_feed(const Ref<CameraFeed> &p_feed); void remove_feed(const Ref<CameraFeed> &p_feed); - // get our feeds + // Get our feeds. Ref<CameraFeed> get_feed(int p_index); int get_feed_count(); Array get_feeds(); + // Intended for use with custom CameraServer implementation. RID feed_texture(int p_id, FeedImage p_texture); CameraServer(); diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index b971704ce2..b033b09303 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -2184,15 +2184,6 @@ void RenderingServer::_bind_methods() { ADD_SIGNAL(MethodInfo("frame_post_draw")); } -void RenderingServer::_canvas_item_add_style_box(RID p_item, const Rect2 &p_rect, const Rect2 &p_source, RID p_texture, const Vector<float> &p_margins, const Color &p_modulate) { - ERR_FAIL_COND(p_margins.size() != 4); - //canvas_item_add_style_box(p_item,p_rect,p_source,p_texture,Vector2(p_margins[0],p_margins[1]),Vector2(p_margins[2],p_margins[3]),true,p_modulate); -} - -void RenderingServer::_camera_set_orthogonal(RID p_camera, float p_size, float p_z_near, float p_z_far) { - camera_set_orthogonal(p_camera, p_size, p_z_near, p_z_far); -} - void RenderingServer::mesh_add_surface_from_mesh_data(RID p_mesh, const Geometry3D::MeshData &p_mesh_data) { Vector<Vector3> vertices; Vector<Vector3> normals; diff --git a/servers/rendering_server.h b/servers/rendering_server.h index abe3cc6975..5865cc7adf 100644 --- a/servers/rendering_server.h +++ b/servers/rendering_server.h @@ -50,8 +50,6 @@ class RenderingServer : public Object { int mm_policy; bool render_loop_enabled = true; - void _camera_set_orthogonal(RID p_camera, float p_size, float p_z_near, float p_z_far); - void _canvas_item_add_style_box(RID p_item, const Rect2 &p_rect, const Rect2 &p_source, RID p_texture, const Vector<float> &p_margins, const Color &p_modulate = Color(1, 1, 1)); Array _get_array_from_surface(uint32_t p_format, Vector<uint8_t> p_vertex_data, Vector<uint8_t> p_attrib_data, Vector<uint8_t> p_skin_data, int p_vertex_len, Vector<uint8_t> p_index_data, int p_index_len) const; protected: |