diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/3d/collision_shape_3d.h | 1 | ||||
-rw-r--r-- | scene/3d/light_3d.h | 1 | ||||
-rw-r--r-- | scene/3d/node_3d.h | 1 | ||||
-rw-r--r-- | scene/3d/visual_instance_3d.h | 1 | ||||
-rw-r--r-- | scene/animation/animation_player.h | 1 | ||||
-rw-r--r-- | scene/gui/code_edit.cpp | 30 | ||||
-rw-r--r-- | scene/gui/code_edit.h | 8 | ||||
-rw-r--r-- | scene/gui/control.cpp | 6 | ||||
-rw-r--r-- | scene/gui/control.h | 3 | ||||
-rw-r--r-- | scene/gui/range.cpp | 2 | ||||
-rw-r--r-- | scene/main/http_request.cpp | 6 | ||||
-rw-r--r-- | scene/main/http_request.h | 6 | ||||
-rw-r--r-- | scene/main/node.h | 1 | ||||
-rw-r--r-- | scene/main/viewport.cpp | 10 | ||||
-rw-r--r-- | scene/main/viewport.h | 2 |
15 files changed, 36 insertions, 43 deletions
diff --git a/scene/3d/collision_shape_3d.h b/scene/3d/collision_shape_3d.h index bd5595f974..fbcabf6529 100644 --- a/scene/3d/collision_shape_3d.h +++ b/scene/3d/collision_shape_3d.h @@ -37,7 +37,6 @@ class CollisionObject3D; class CollisionShape3D : public Node3D { GDCLASS(CollisionShape3D, Node3D); - OBJ_CATEGORY("3D Physics Nodes"); Ref<Shape3D> shape; diff --git a/scene/3d/light_3d.h b/scene/3d/light_3d.h index 81c25f01c3..383fa644e5 100644 --- a/scene/3d/light_3d.h +++ b/scene/3d/light_3d.h @@ -35,7 +35,6 @@ class Light3D : public VisualInstance3D { GDCLASS(Light3D, VisualInstance3D); - OBJ_CATEGORY("3D Light Nodes"); public: enum Param { diff --git a/scene/3d/node_3d.h b/scene/3d/node_3d.h index 65d0e071cf..6d857a83ea 100644 --- a/scene/3d/node_3d.h +++ b/scene/3d/node_3d.h @@ -50,7 +50,6 @@ public: class Node3D : public Node { GDCLASS(Node3D, Node); - OBJ_CATEGORY("3D"); public: enum RotationEditMode { diff --git a/scene/3d/visual_instance_3d.h b/scene/3d/visual_instance_3d.h index 1c044ba681..f8fd4378fe 100644 --- a/scene/3d/visual_instance_3d.h +++ b/scene/3d/visual_instance_3d.h @@ -35,7 +35,6 @@ class VisualInstance3D : public Node3D { GDCLASS(VisualInstance3D, Node3D); - OBJ_CATEGORY("3D Visual Nodes"); RID base; RID instance; diff --git a/scene/animation/animation_player.h b/scene/animation/animation_player.h index c4fc69f370..a68f6b9d5b 100644 --- a/scene/animation/animation_player.h +++ b/scene/animation/animation_player.h @@ -62,7 +62,6 @@ public: class AnimationPlayer : public Node { GDCLASS(AnimationPlayer, Node); - OBJ_CATEGORY("Animation Nodes"); public: enum AnimationProcessCallback { diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp index 3fa0cec302..e094c4546b 100644 --- a/scene/gui/code_edit.cpp +++ b/scene/gui/code_edit.cpp @@ -1782,10 +1782,10 @@ void CodeEdit::request_code_completion(bool p_force) { /* Don't re-query if all existing options are quoted types, eg path, signal. */ bool ignored = code_completion_active && !code_completion_options.is_empty(); if (ignored) { - ScriptCodeCompletionOption::Kind kind = ScriptCodeCompletionOption::KIND_PLAIN_TEXT; - const ScriptCodeCompletionOption *previous_option = nullptr; + ScriptLanguage::CodeCompletionKind kind = ScriptLanguage::CODE_COMPLETION_KIND_PLAIN_TEXT; + const ScriptLanguage::CodeCompletionOption *previous_option = nullptr; for (int i = 0; i < code_completion_options.size(); i++) { - const ScriptCodeCompletionOption ¤t_option = code_completion_options[i]; + const ScriptLanguage::CodeCompletionOption ¤t_option = code_completion_options[i]; if (!previous_option) { previous_option = ¤t_option; kind = current_option.kind; @@ -1795,7 +1795,7 @@ void CodeEdit::request_code_completion(bool p_force) { break; } } - ignored = ignored && (kind == ScriptCodeCompletionOption::KIND_FILE_PATH || kind == ScriptCodeCompletionOption::KIND_NODE_PATH || kind == ScriptCodeCompletionOption::KIND_SIGNAL); + ignored = ignored && (kind == ScriptLanguage::CODE_COMPLETION_KIND_FILE_PATH || kind == ScriptLanguage::CODE_COMPLETION_KIND_NODE_PATH || kind == ScriptLanguage::CODE_COMPLETION_KIND_SIGNAL); } if (ignored) { @@ -1818,8 +1818,8 @@ void CodeEdit::request_code_completion(bool p_force) { } void CodeEdit::add_code_completion_option(CodeCompletionKind p_type, const String &p_display_text, const String &p_insert_text, const Color &p_text_color, const RES &p_icon, const Variant &p_value) { - ScriptCodeCompletionOption completion_option; - completion_option.kind = (ScriptCodeCompletionOption::Kind)p_type; + ScriptLanguage::CodeCompletionOption completion_option; + completion_option.kind = (ScriptLanguage::CodeCompletionKind)p_type; completion_option.display = p_display_text; completion_option.insert_text = p_insert_text; completion_option.font_color = p_text_color; @@ -2702,7 +2702,7 @@ void CodeEdit::_filter_code_completion_candidates_impl() { TypedArray<Dictionary> completion_options_sources; completion_options_sources.resize(code_completion_option_sources.size()); int i = 0; - for (const ScriptCodeCompletionOption &E : code_completion_option_sources) { + for (const ScriptLanguage::CodeCompletionOption &E : code_completion_option_sources) { Dictionary option; option["kind"] = E.kind; option["display_text"] = E.display; @@ -2727,8 +2727,8 @@ void CodeEdit::_filter_code_completion_candidates_impl() { /* Convert back into options. */ int max_width = 0; for (i = 0; i < completion_options.size(); i++) { - ScriptCodeCompletionOption option; - option.kind = (ScriptCodeCompletionOption::Kind)(int)completion_options[i].get("kind"); + ScriptLanguage::CodeCompletionOption option; + option.kind = (ScriptLanguage::CodeCompletionKind)(int)completion_options[i].get("kind"); option.display = completion_options[i].get("display_text"); option.insert_text = completion_options[i].get("insert_text"); option.font_color = completion_options[i].get("font_color"); @@ -2821,15 +2821,15 @@ void CodeEdit::_filter_code_completion_candidates_impl() { code_completion_options.clear(); code_completion_base = string_to_complete; - Vector<ScriptCodeCompletionOption> completion_options_casei; - Vector<ScriptCodeCompletionOption> completion_options_substr; - Vector<ScriptCodeCompletionOption> completion_options_substr_casei; - Vector<ScriptCodeCompletionOption> completion_options_subseq; - Vector<ScriptCodeCompletionOption> completion_options_subseq_casei; + Vector<ScriptLanguage::CodeCompletionOption> completion_options_casei; + Vector<ScriptLanguage::CodeCompletionOption> completion_options_substr; + Vector<ScriptLanguage::CodeCompletionOption> completion_options_substr_casei; + Vector<ScriptLanguage::CodeCompletionOption> completion_options_subseq; + Vector<ScriptLanguage::CodeCompletionOption> completion_options_subseq_casei; int max_width = 0; String string_to_complete_lower = string_to_complete.to_lower(); - for (ScriptCodeCompletionOption &option : code_completion_option_sources) { + for (ScriptLanguage::CodeCompletionOption &option : code_completion_option_sources) { if (single_quote && option.display.is_quoted()) { option.display = option.display.unquote().quote("'"); } diff --git a/scene/gui/code_edit.h b/scene/gui/code_edit.h index cb1309ced3..596a065f12 100644 --- a/scene/gui/code_edit.h +++ b/scene/gui/code_edit.h @@ -38,7 +38,7 @@ class CodeEdit : public TextEdit { public: /* Keep enum in sync with: */ - /* /core/object/script_language.h - ScriptCodeCompletionOption::Kind */ + /* /core/object/script_language.h - ScriptLanguage::CodeCompletionKind */ enum CodeCompletionKind { KIND_CLASS, KIND_FUNCTION, @@ -208,15 +208,15 @@ private: Color code_completion_existing_color = Color(0, 0, 0, 0); bool code_completion_active = false; - Vector<ScriptCodeCompletionOption> code_completion_options; + Vector<ScriptLanguage::CodeCompletionOption> code_completion_options; int code_completion_line_ofs = 0; int code_completion_current_selected = 0; int code_completion_longest_line = 0; Rect2i code_completion_rect; Set<char32_t> code_completion_prefixes; - List<ScriptCodeCompletionOption> code_completion_option_submitted; - List<ScriptCodeCompletionOption> code_completion_option_sources; + List<ScriptLanguage::CodeCompletionOption> code_completion_option_submitted; + List<ScriptLanguage::CodeCompletionOption> code_completion_option_sources; String code_completion_base; void _filter_code_completion_candidates_impl(); diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index d2d1b5e9b7..ee35eee35d 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -2937,9 +2937,9 @@ Control::MouseFilter Control::get_mouse_filter() const { return data.mouse_filter; } -void Control::warp_mouse(const Point2 &p_to_pos) { +void Control::warp_mouse(const Point2 &p_position) { ERR_FAIL_COND(!is_inside_tree()); - get_viewport()->warp_mouse(get_global_transform().xform(p_to_pos)); + get_viewport()->warp_mouse(get_global_transform().xform(p_position)); } bool Control::is_text_field() const { @@ -3331,7 +3331,7 @@ void Control::_bind_methods() { ClassDB::bind_method(D_METHOD("set_drag_preview", "control"), &Control::set_drag_preview); ClassDB::bind_method(D_METHOD("is_drag_successful"), &Control::is_drag_successful); - ClassDB::bind_method(D_METHOD("warp_mouse", "to_position"), &Control::warp_mouse); + ClassDB::bind_method(D_METHOD("warp_mouse", "position"), &Control::warp_mouse); ClassDB::bind_method(D_METHOD("update_minimum_size"), &Control::update_minimum_size); diff --git a/scene/gui/control.h b/scene/gui/control.h index becb50a118..4240d52b65 100644 --- a/scene/gui/control.h +++ b/scene/gui/control.h @@ -44,7 +44,6 @@ class Panel; class Control : public CanvasItem { GDCLASS(Control, CanvasItem); - OBJ_CATEGORY("GUI Nodes"); public: enum Anchor { @@ -548,7 +547,7 @@ public: void grab_click_focus(); - void warp_mouse(const Point2 &p_to_pos); + void warp_mouse(const Point2 &p_position); virtual bool is_text_field() const; diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp index 2fb6452a97..2eb41f1631 100644 --- a/scene/gui/range.cpp +++ b/scene/gui/range.cpp @@ -282,7 +282,7 @@ void Range::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_greater"), "set_allow_greater", "is_greater_allowed"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_lesser"), "set_allow_lesser", "is_lesser_allowed"); - GDVIRTUAL_BIND(_value_changed); + GDVIRTUAL_BIND(_value_changed, "new_value"); ADD_LINKED_PROPERTY("min_value", "value"); ADD_LINKED_PROPERTY("min_value", "max_value"); diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp index 700ba761f6..ac10c2bad8 100644 --- a/scene/main/http_request.cpp +++ b/scene/main/http_request.cpp @@ -558,12 +558,12 @@ void HTTPRequest::set_https_proxy(const String &p_host, int p_port) { client->set_https_proxy(p_host, p_port); } -void HTTPRequest::set_timeout(int p_timeout) { +void HTTPRequest::set_timeout(double p_timeout) { ERR_FAIL_COND(p_timeout < 0); timeout = p_timeout; } -int HTTPRequest::get_timeout() { +double HTTPRequest::get_timeout() { return timeout; } @@ -615,7 +615,7 @@ void HTTPRequest::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "accept_gzip"), "set_accept_gzip", "is_accepting_gzip"); ADD_PROPERTY(PropertyInfo(Variant::INT, "body_size_limit", PROPERTY_HINT_RANGE, "-1,2000000000"), "set_body_size_limit", "get_body_size_limit"); ADD_PROPERTY(PropertyInfo(Variant::INT, "max_redirects", PROPERTY_HINT_RANGE, "-1,64"), "set_max_redirects", "get_max_redirects"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "timeout", PROPERTY_HINT_RANGE, "0,86400"), "set_timeout", "get_timeout"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "timeout", PROPERTY_HINT_RANGE, "0,3600,0.1,or_greater"), "set_timeout", "get_timeout"); ADD_SIGNAL(MethodInfo("request_completed", PropertyInfo(Variant::INT, "result"), PropertyInfo(Variant::INT, "response_code"), PropertyInfo(Variant::PACKED_STRING_ARRAY, "headers"), PropertyInfo(Variant::PACKED_BYTE_ARRAY, "body"))); diff --git a/scene/main/http_request.h b/scene/main/http_request.h index 62880fa282..26d648458f 100644 --- a/scene/main/http_request.h +++ b/scene/main/http_request.h @@ -96,7 +96,7 @@ private: int max_redirects = 8; - int timeout = 0; + double timeout = 0; void _redirect_request(const String &p_new_url); @@ -146,8 +146,8 @@ public: Timer *timer; - void set_timeout(int p_timeout); - int get_timeout(); + void set_timeout(double p_timeout); + double get_timeout(); void _timeout(); diff --git a/scene/main/node.h b/scene/main/node.h index f5fbcf6587..196d23c14f 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -43,7 +43,6 @@ class PropertyTweener; class Node : public Object { GDCLASS(Node, Object); - OBJ_CATEGORY("Nodes"); public: enum ProcessMode { diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 7d2032f530..a9138e13b2 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1124,9 +1124,9 @@ Vector2 Viewport::get_mouse_position() const { return gui.last_mouse_pos; } -void Viewport::warp_mouse(const Vector2 &p_pos) { - Vector2 gpos = (get_final_transform().affine_inverse() * _get_input_pre_xform()).affine_inverse().xform(p_pos); - Input::get_singleton()->warp_mouse_position(gpos); +void Viewport::warp_mouse(const Vector2 &p_position) { + Vector2 gpos = (get_final_transform().affine_inverse() * _get_input_pre_xform()).affine_inverse().xform(p_position); + Input::get_singleton()->warp_mouse(gpos); } void Viewport::_gui_sort_roots() { @@ -2698,7 +2698,7 @@ void Viewport::push_input(const Ref<InputEvent> &p_event, bool p_local_coords) { ev = p_event; } - if (is_embedding_subwindows() && _sub_windows_forward_input(p_event)) { + if (is_embedding_subwindows() && _sub_windows_forward_input(ev)) { set_input_as_handled(); return; } @@ -3621,7 +3621,7 @@ void Viewport::_bind_methods() { ClassDB::bind_method(D_METHOD("is_audio_listener_2d"), &Viewport::is_audio_listener_2d); ClassDB::bind_method(D_METHOD("get_mouse_position"), &Viewport::get_mouse_position); - ClassDB::bind_method(D_METHOD("warp_mouse", "to_position"), &Viewport::warp_mouse); + ClassDB::bind_method(D_METHOD("warp_mouse", "position"), &Viewport::warp_mouse); ClassDB::bind_method(D_METHOD("gui_get_drag_data"), &Viewport::gui_get_drag_data); ClassDB::bind_method(D_METHOD("gui_is_dragging"), &Viewport::gui_is_dragging); diff --git a/scene/main/viewport.h b/scene/main/viewport.h index e4912f31c5..d5fca1b881 100644 --- a/scene/main/viewport.h +++ b/scene/main/viewport.h @@ -547,7 +547,7 @@ public: bool is_input_disabled() const; Vector2 get_mouse_position() const; - void warp_mouse(const Vector2 &p_pos); + void warp_mouse(const Vector2 &p_position); void set_physics_object_picking(bool p_enable); bool get_physics_object_picking(); |