diff options
-rw-r--r-- | core/io/http_client.cpp | 19 | ||||
-rw-r--r-- | core/io/http_client.h | 15 | ||||
-rw-r--r-- | doc/classes/HTTPClient.xml | 41 | ||||
-rw-r--r-- | editor/animation_editor.cpp | 4 | ||||
-rw-r--r-- | editor/connections_dialog.cpp | 70 | ||||
-rw-r--r-- | editor/connections_dialog.h | 4 | ||||
-rw-r--r-- | editor/create_dialog.cpp | 2 | ||||
-rw-r--r-- | editor/export_template_manager.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/asset_library_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/particles_2d_editor_plugin.cpp | 13 | ||||
-rw-r--r-- | editor/plugins/particles_editor_plugin.cpp | 42 | ||||
-rw-r--r-- | editor/plugins/particles_editor_plugin.h | 1 | ||||
-rw-r--r-- | editor/plugins/tile_set_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/project_settings_editor.cpp | 4 | ||||
-rw-r--r-- | editor/property_editor.cpp | 8 | ||||
-rw-r--r-- | modules/mono/SCsub | 21 | ||||
-rw-r--r-- | modules/openssl/stream_peer_openssl.cpp | 8 | ||||
-rw-r--r-- | modules/thekla_unwrap/SCsub | 10 | ||||
-rw-r--r-- | scene/2d/animated_sprite.cpp | 27 | ||||
-rw-r--r-- | scene/gui/slider.cpp | 9 | ||||
-rw-r--r-- | thirdparty/thekla_atlas/nvcore/Debug.cpp | 18 | ||||
-rw-r--r-- | thirdparty/thekla_atlas/nvcore/DefsGnucWin32.h | 2 |
22 files changed, 130 insertions, 196 deletions
diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp index 5097898314..9d89baafb1 100644 --- a/core/io/http_client.cpp +++ b/core/io/http_client.cpp @@ -93,7 +93,8 @@ Error HTTPClient::request_raw(Method p_method, const String &p_url, const Vector "DELETE", "OPTIONS", "TRACE", - "CONNECT" + "CONNECT", + "PATCH" }; String request = String(_methods[p_method]) + " " + p_url + " HTTP/1.1\r\n"; @@ -153,7 +154,8 @@ Error HTTPClient::request(Method p_method, const String &p_url, const Vector<Str "DELETE", "OPTIONS", "TRACE", - "CONNECT" + "CONNECT", + "PATCH" }; String request = String(_methods[p_method]) + " " + p_url + " HTTP/1.1\r\n"; @@ -683,6 +685,7 @@ void HTTPClient::_bind_methods() { BIND_ENUM_CONSTANT(METHOD_OPTIONS); BIND_ENUM_CONSTANT(METHOD_TRACE); BIND_ENUM_CONSTANT(METHOD_CONNECT); + BIND_ENUM_CONSTANT(METHOD_PATCH); BIND_ENUM_CONSTANT(METHOD_MAX); BIND_ENUM_CONSTANT(STATUS_DISCONNECTED); @@ -709,6 +712,7 @@ void HTTPClient::_bind_methods() { BIND_ENUM_CONSTANT(RESPONSE_RESET_CONTENT); BIND_ENUM_CONSTANT(RESPONSE_PARTIAL_CONTENT); BIND_ENUM_CONSTANT(RESPONSE_MULTI_STATUS); + BIND_ENUM_CONSTANT(RESPONSE_ALREADY_REPORTED); BIND_ENUM_CONSTANT(RESPONSE_IM_USED); // 3xx redirection @@ -718,7 +722,9 @@ void HTTPClient::_bind_methods() { BIND_ENUM_CONSTANT(RESPONSE_SEE_OTHER); BIND_ENUM_CONSTANT(RESPONSE_NOT_MODIFIED); BIND_ENUM_CONSTANT(RESPONSE_USE_PROXY); + BIND_ENUM_CONSTANT(RESPONSE_SWITCH_PROXY); BIND_ENUM_CONSTANT(RESPONSE_TEMPORARY_REDIRECT); + BIND_ENUM_CONSTANT(RESPONSE_PERMANENT_REDIRECT); // 4xx client error BIND_ENUM_CONSTANT(RESPONSE_BAD_REQUEST); @@ -739,10 +745,16 @@ void HTTPClient::_bind_methods() { BIND_ENUM_CONSTANT(RESPONSE_UNSUPPORTED_MEDIA_TYPE); BIND_ENUM_CONSTANT(RESPONSE_REQUESTED_RANGE_NOT_SATISFIABLE); BIND_ENUM_CONSTANT(RESPONSE_EXPECTATION_FAILED); + BIND_ENUM_CONSTANT(RESPONSE_IM_A_TEAPOT); + BIND_ENUM_CONSTANT(RESPONSE_MISDIRECTED_REQUEST); BIND_ENUM_CONSTANT(RESPONSE_UNPROCESSABLE_ENTITY); BIND_ENUM_CONSTANT(RESPONSE_LOCKED); BIND_ENUM_CONSTANT(RESPONSE_FAILED_DEPENDENCY); BIND_ENUM_CONSTANT(RESPONSE_UPGRADE_REQUIRED); + BIND_ENUM_CONSTANT(RESPONSE_PRECONDITION_REQUIRED); + BIND_ENUM_CONSTANT(RESPONSE_TOO_MANY_REQUESTS); + BIND_ENUM_CONSTANT(RESPONSE_REQUEST_HEADER_FIELDS_TOO_LARGE); + BIND_ENUM_CONSTANT(RESPONSE_UNAVAILABLE_FOR_LEGAL_REASONS); // 5xx server error BIND_ENUM_CONSTANT(RESPONSE_INTERNAL_SERVER_ERROR); @@ -751,6 +763,9 @@ void HTTPClient::_bind_methods() { BIND_ENUM_CONSTANT(RESPONSE_SERVICE_UNAVAILABLE); BIND_ENUM_CONSTANT(RESPONSE_GATEWAY_TIMEOUT); BIND_ENUM_CONSTANT(RESPONSE_HTTP_VERSION_NOT_SUPPORTED); + BIND_ENUM_CONSTANT(RESPONSE_VARIANT_ALSO_NEGOTIATES); BIND_ENUM_CONSTANT(RESPONSE_INSUFFICIENT_STORAGE); + BIND_ENUM_CONSTANT(RESPONSE_LOOP_DETECTED); BIND_ENUM_CONSTANT(RESPONSE_NOT_EXTENDED); + BIND_ENUM_CONSTANT(RESPONSE_NETWORK_AUTH_REQUIRED); } diff --git a/core/io/http_client.h b/core/io/http_client.h index db5dd115bd..2e0a345f1c 100644 --- a/core/io/http_client.h +++ b/core/io/http_client.h @@ -56,6 +56,7 @@ public: RESPONSE_RESET_CONTENT = 205, RESPONSE_PARTIAL_CONTENT = 206, RESPONSE_MULTI_STATUS = 207, + RESPONSE_ALREADY_REPORTED = 208, RESPONSE_IM_USED = 226, // 3xx redirection @@ -65,7 +66,9 @@ public: RESPONSE_SEE_OTHER = 303, RESPONSE_NOT_MODIFIED = 304, RESPONSE_USE_PROXY = 305, + RESPONSE_SWITCH_PROXY = 306, RESPONSE_TEMPORARY_REDIRECT = 307, + RESPONSE_PERMANENT_REDIRECT = 308, // 4xx client error RESPONSE_BAD_REQUEST = 400, @@ -86,10 +89,16 @@ public: RESPONSE_UNSUPPORTED_MEDIA_TYPE = 415, RESPONSE_REQUESTED_RANGE_NOT_SATISFIABLE = 416, RESPONSE_EXPECTATION_FAILED = 417, + RESPONSE_IM_A_TEAPOT = 418, + RESPONSE_MISDIRECTED_REQUEST = 421, RESPONSE_UNPROCESSABLE_ENTITY = 422, RESPONSE_LOCKED = 423, RESPONSE_FAILED_DEPENDENCY = 424, RESPONSE_UPGRADE_REQUIRED = 426, + RESPONSE_PRECONDITION_REQUIRED = 428, + RESPONSE_TOO_MANY_REQUESTS = 429, + RESPONSE_REQUEST_HEADER_FIELDS_TOO_LARGE = 431, + RESPONSE_UNAVAILABLE_FOR_LEGAL_REASONS = 451, // 5xx server error RESPONSE_INTERNAL_SERVER_ERROR = 500, @@ -98,8 +107,11 @@ public: RESPONSE_SERVICE_UNAVAILABLE = 503, RESPONSE_GATEWAY_TIMEOUT = 504, RESPONSE_HTTP_VERSION_NOT_SUPPORTED = 505, + RESPONSE_VARIANT_ALSO_NEGOTIATES = 506, RESPONSE_INSUFFICIENT_STORAGE = 507, + RESPONSE_LOOP_DETECTED = 508, RESPONSE_NOT_EXTENDED = 510, + RESPONSE_NETWORK_AUTH_REQUIRED = 511, }; @@ -113,10 +125,13 @@ public: METHOD_OPTIONS, METHOD_TRACE, METHOD_CONNECT, + METHOD_PATCH, METHOD_MAX + }; enum Status { + STATUS_DISCONNECTED, STATUS_RESOLVING, //resolving hostname (if passed a hostname) STATUS_CANT_RESOLVE, diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index b90c49b5c0..9d4b45a8d7 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -224,7 +224,10 @@ <constant name="METHOD_CONNECT" value="7" enum="Method"> HTTP CONNECT method. The CONNECT method establishes a tunnel to the server identified by the target resource. Rarely used. </constant> - <constant name="METHOD_MAX" value="8" enum="Method"> + <constant name="METHOD_PATCH" value="8" enum="Method"> + HTTP PATCH method. The PATCH method is used to apply partial modifications to a resource. + </constant> + <constant name="METHOD_MAX" value="9" enum="Method"> Marker for end of [code]METHOD_*[/code] enum. Not used. </constant> <constant name="STATUS_DISCONNECTED" value="0" enum="Status"> @@ -290,6 +293,9 @@ <constant name="RESPONSE_MULTI_STATUS" value="207" enum="ResponseCode"> HTTP status code [code]207 Multi-Status[/code] (WebDAV). A Multi-Status response conveys information about multiple resources in situations where multiple status codes might be appropriate. </constant> + <constant name="RESPONSE_ALREADY_REPORTED" value="208" enum="ResponseCode"> + HTTP status code [code]208 Already Reported[/code] (WebDAV). Used inside a DAV: propstat response element to avoid enumerating the internal members of multiple bindings to the same collection repeatedly. + </constant> <constant name="RESPONSE_IM_USED" value="226" enum="ResponseCode"> HTTP status code [code]226 IM Used[/code] (WebDAV). The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance. </constant> @@ -311,9 +317,15 @@ <constant name="RESPONSE_USE_PROXY" value="305" enum="ResponseCode"> HTTP status code [code]305 Use Proxy[/code]. Deprecated. Do not use. </constant> + <constant name="RESPONSE_SWITCH_PROXY" value="306" enum="ResponseCode"> + HTTP status code [code]306 Switch Proxy[/code]. Deprecated. Do not use. + </constant> <constant name="RESPONSE_TEMPORARY_REDIRECT" value="307" enum="ResponseCode"> HTTP status code [code]307 Temporary Redirect[/code]. The target resource resides temporarily under a different URI and the user agent MUST NOT change the request method if it performs an automatic redirection to that URI. </constant> + <constant name="RESPONSE_PERMANENT_REDIRECT" value="308" enum="ResponseCode"> + HTTP status code [code]308 Permanent Redirect[/code]. The target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs. + </constant> <constant name="RESPONSE_BAD_REQUEST" value="400" enum="ResponseCode"> HTTP status code [code]400 Bad Request[/code]. The request was invalid. The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, invalid request contents, or deceptive request routing). </constant> @@ -368,6 +380,12 @@ <constant name="RESPONSE_EXPECTATION_FAILED" value="417" enum="ResponseCode"> HTTP status code [code]417 Expectation Failed[/code]. The expectation given in the request's Expect header field could not be met by at least one of the inbound servers. </constant> + <constant name="RESPONSE_IM_A_TEAPOT" value="418" enum="ResponseCode"> + HTTP status code [code]418 I'm A Teapot[/code]. Any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot". The resulting entity body MAY be short and stout. + </constant> + <constant name="RESPONSE_MISDIRECTED_REQUEST" value="421" enum="ResponseCode"> + HTTP status code [code]421 Misdirected Request[/code]. The request was directed at a server that is not able to produce a response. This can be sent by a server that is not configured to produce responses for the combination of scheme and authority that are included in the request URI. + </constant> <constant name="RESPONSE_UNPROCESSABLE_ENTITY" value="422" enum="ResponseCode"> HTTP status code [code]422 Unprocessable Entity[/code] (WebDAV). The server understands the content type of the request entity (hence a 415 Unsupported Media Type status code is inappropriate), and the syntax of the request entity is correct (thus a 400 Bad Request status code is inappropriate) but was unable to process the contained instructions. </constant> @@ -380,6 +398,18 @@ <constant name="RESPONSE_UPGRADE_REQUIRED" value="426" enum="ResponseCode"> HTTP status code [code]426 Upgrade Required[/code]. The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol. </constant> + <constant name="RESPONSE_PRECONDITION_REQUIRED" value="428" enum="ResponseCode"> + HTTP status code [code]428 Precondition Required[/code]. The origin server requires the request to be conditional. + </constant> + <constant name="RESPONSE_TOO_MANY_REQUESTS" value="429" enum="ResponseCode"> + HTTP status code [code]429 Too Many Requests[/code]. The user has sent too many requests in a given amount of time (see "rate limiting"). Back off and increase time between requests or try again later. + </constant> + <constant name="RESPONSE_REQUEST_HEADER_FIELDS_TOO_LARGE" value="431" enum="ResponseCode"> + HTTP status code [code]431 Rquest Header Fields Too Large[/code]. The server is unwilling to process the request because its header fields are too large. The request MAY be resubmitted after reducing the size of the request header fields. + </constant> + <constant name="RESPONSE_UNAVAILABLE_FOR_LEGAL_REASONS" value="451" enum="ResponseCode"> + HTTP status code [code]451 Response Unavailable For Legal Reasons[/code]. The server is denying access to the resource as a consequence of a legal demand. + </constant> <constant name="RESPONSE_INTERNAL_SERVER_ERROR" value="500" enum="ResponseCode"> HTTP status code [code]500 Internal Server Error[/code]. The server encountered an unexpected condition that prevented it from fulfilling the request. </constant> @@ -398,11 +428,20 @@ <constant name="RESPONSE_HTTP_VERSION_NOT_SUPPORTED" value="505" enum="ResponseCode"> HTTP status code [code]505 HTTP Version Not Supported[/code]. The server does not support, or refuses to support, the major version of HTTP that was used in the request message. </constant> + <constant name="RESPONSE_VARIANT_ALSO_NEGOTIATES" value="506" enum="ResponseCode"> + HTTP status code [code]506 Variant Also Negotiates[/code]. The server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process. + </constant> <constant name="RESPONSE_INSUFFICIENT_STORAGE" value="507" enum="ResponseCode"> HTTP status code [code]507 Insufficient Storage[/code]. The method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request. </constant> + <constant name="RESPONSE_LOOP_DETECTED" value="508" enum="ResponseCode"> + HTTP status code [code]508 Loop Detected[/code]. The server terminated an operation because it encountered an infinite loop while processing a request with "Depth: infinity". This status indicates that the entire operation failed. + </constant> <constant name="RESPONSE_NOT_EXTENDED" value="510" enum="ResponseCode"> HTTP status code [code]510 Not Extended[/code]. The policy for accessing the resource has not been met in the request. The server should send back all the information necessary for the client to issue an extended request. </constant> + <constant name="RESPONSE_NETWORK_AUTH_REQUIRED" value="511" enum="ResponseCode"> + HTTP status code [code]511 Network Authentication Required[/code]. The client needs to authenticate to gain network access. + </constant> </constants> </class> diff --git a/editor/animation_editor.cpp b/editor/animation_editor.cpp index c6757ba98f..c6381864b3 100644 --- a/editor/animation_editor.cpp +++ b/editor/animation_editor.cpp @@ -324,7 +324,7 @@ public: int existing = animation->track_find_key(track, new_time, true); setting = true; - undo_redo->create_action(TTR("Move Add Key"), UndoRedo::MERGE_ENDS); + undo_redo->create_action(TTR("Anim Change Keyframe Time"), UndoRedo::MERGE_ENDS); Variant val = animation->track_get_key_value(track, key); float trans = animation->track_get_key_transition(track, key); @@ -391,7 +391,7 @@ public: } setting = true; - undo_redo->create_action(TTR("Anim Change Value"), UndoRedo::MERGE_ENDS); + undo_redo->create_action(TTR("Anim Change Keyframe Value"), UndoRedo::MERGE_ENDS); Variant prev = animation->track_get_key_value(track, key); undo_redo->add_do_method(animation.ptr(), "track_set_key_value", track, key, value); undo_redo->add_undo_method(animation.ptr(), "track_set_key_value", track, key, prev); diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index cd60455f4f..c095229374 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -88,12 +88,6 @@ public: void ConnectDialog::_notification(int p_what) { - if (p_what == NOTIFICATION_DRAW) { - - //RID ci = get_canvas_item(); - //get_stylebox("panel","PopupMenu")->draw(ci,Rect2(Point2(),get_size())); - } - if (p_what == NOTIFICATION_ENTER_TREE) { bind_editor->edit(cdbinds); } @@ -117,11 +111,6 @@ void ConnectDialog::_tree_node_selected() { dst_path->set_text(node->get_path_to(current)); } -void ConnectDialog::_dst_method_list_selected(int p_idx) { - - //dst_method->set_text( dst_method_list->get_popup()->get_item_text(p_idx)); -} - void ConnectDialog::edit(Node *p_node) { node = p_node; @@ -247,9 +236,7 @@ void ConnectDialog::set_dst_method(const StringName &p_method) { void ConnectDialog::_bind_methods() { - //ClassDB::bind_method("_ok",&ConnectDialog::_ok_pressed); ClassDB::bind_method("_cancel", &ConnectDialog::_cancel_pressed); - //ClassDB::bind_method("_dst_method_list_selected",&ConnectDialog::_dst_method_list_selected); ClassDB::bind_method("_tree_node_selected", &ConnectDialog::_tree_node_selected); ClassDB::bind_method("_add_bind", &ConnectDialog::_add_bind); @@ -355,18 +342,6 @@ ConnectDialog::ConnectDialog() { oneshot->set_text(TTR("Oneshot")); dstm_hb->add_child(oneshot); - /* - realtime = memnew( CheckButton ); - realtime->set_anchor( MARGIN_TOP, ANCHOR_END ); - realtime->set_anchor( MARGIN_BOTTOM, ANCHOR_END ); - realtime->set_anchor( MARGIN_RIGHT, ANCHOR_END ); - realtime->set_begin( Point2( 120, button_margin-10 ) ); - realtime->set_end( Point2( 80, margin ) ); - realtime->set_text("Realtime"); - add_child(realtime); -*/ - - //dst_method_list->get_popup()->connect("id_pressed", this,"_dst_method_list_selected"); tree->connect("node_selected", this, "_tree_node_selected"); set_as_toplevel(true); @@ -377,7 +352,6 @@ ConnectDialog::ConnectDialog() { add_child(error); error->get_ok()->set_text(TTR("Close")); get_ok()->set_text(TTR("Connect")); - //error->get_cancel()->set_text("Close"); } ConnectDialog::~ConnectDialog() { @@ -386,12 +360,6 @@ ConnectDialog::~ConnectDialog() { void ConnectionsDock::_notification(int p_what) { - if (p_what == NOTIFICATION_DRAW) { - - //RID ci = get_canvas_item(); - //get_stylebox("panel","PopupMenu")->draw(ci,Rect2(Point2(),get_size())); - } - if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) { update_tree(); } @@ -478,7 +446,7 @@ void ConnectionsDock::_connect_pressed() { Connection c = item->get_metadata(0); ERR_FAIL_COND(c.source != node); //shouldn't happen but...bugcheck - undo_redo->create_action(TTR("Create Subscription")); + undo_redo->create_action(vformat(TTR("Disconnect '%s' from '%s'"), c.signal, c.method)); undo_redo->add_do_method(node, "disconnect", c.signal, c.target, c.method); undo_redo->add_undo_method(node, "connect", c.signal, c.target, c.method, Vector<Variant>(), c.flags); undo_redo->add_do_method(this, "update_tree"); @@ -491,42 +459,6 @@ void ConnectionsDock::_connect_pressed() { update_tree(); } } -/* -void ConnectionsDock::_remove() { - - if (!tree->get_selected()) - return; - - TreeItem *selected=tree->get_selected(); - if (!selected) - return; - - Dictionary meta=selected->get_metadata(0); - - remove_confirm->set_text(String()+"Remove Connection \""+meta["from_event"].operator String()+"\" ?"); - remove_confirm->popup_centered(Size2(340,80)); -} -*/ -/* -void ConnectionsDock::_remove_confirm() { - - if (!tree->get_selected()) - return; - TreeItem *selected=tree->get_selected(); - if (!selected) - return; - - Dictionary meta=selected->get_metadata(0); - - undo_redo->create_action("Remove Subscription"); - undo_redo->add_do_method(node,"unsubscribe_path_event",meta["from_event"].operator String(),meta["from_path"].operator NodePath(),meta["to_method"].operator String()); - undo_redo->add_undo_method(node,"subscribe_path_event_persist",meta["from_event"].operator String(),meta["from_path"].operator NodePath(),meta["to_method"].operator String(),Array(),false); - undo_redo->add_do_method(this,"update_tree"); - undo_redo->add_undo_method(this,"update_tree"); - undo_redo->commit_action(); - -} -*/ struct _ConnectionsDockMethodInfoSort { diff --git a/editor/connections_dialog.h b/editor/connections_dialog.h index 53f4d857bf..99a83ff599 100644 --- a/editor/connections_dialog.h +++ b/editor/connections_dialog.h @@ -55,7 +55,6 @@ class ConnectDialog : public ConfirmationDialog { LineEdit *dst_path; LineEdit *dst_method; SceneTreeEditor *tree; - //MenuButton *dst_method_list; OptionButton *type_list; CheckButton *deferred; CheckButton *oneshot; @@ -66,7 +65,6 @@ class ConnectDialog : public ConfirmationDialog { void ok_pressed(); void _cancel_pressed(); void _tree_node_selected(); - void _dst_method_list_selected(int p_idx); void _add_bind(); void _remove_bind(); @@ -84,8 +82,6 @@ public: void set_dst_method(const StringName &p_method); void set_dst_node(Node *p_node); - //Button *get_ok() { return ok; } - //Button *get_cancel() { return cancel; } void edit(Node *p_node); ConnectDialog(); diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp index c058d290bf..2584d26fc4 100644 --- a/editor/create_dialog.cpp +++ b/editor/create_dialog.cpp @@ -370,7 +370,7 @@ void CreateDialog::_notification(int p_what) { void CreateDialog::set_base_type(const String &p_base) { base_type = p_base; - set_title(TTR("Create New") + " " + p_base); + set_title(vformat(TTR("Create New %s"), p_base)); _update_search(); } diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp index 2aad4774b0..cdb7256329 100644 --- a/editor/export_template_manager.cpp +++ b/editor/export_template_manager.cpp @@ -385,7 +385,7 @@ void ExportTemplateManager::_http_download_templates_completed(int p_status, int template_list_state->set_text(TTR("No response.")); } break; case HTTPRequest::RESULT_REQUEST_FAILED: { - template_list_state->set_text(TTR("Req. Failed.")); + template_list_state->set_text(TTR("Request Failed.")); } break; case HTTPRequest::RESULT_REDIRECT_LIMIT_REACHED: { template_list_state->set_text(TTR("Redirect Loop.")); @@ -465,7 +465,7 @@ void ExportTemplateManager::_notification(int p_what) { break; case HTTPClient::STATUS_CONNECTING: status = TTR("Connecting.."); break; case HTTPClient::STATUS_CANT_CONNECT: - status = TTR("Can't Conect"); + status = TTR("Can't Connect"); errored = true; break; case HTTPClient::STATUS_CONNECTED: status = TTR("Connected"); break; diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index 3ab8f318a7..f04bc04d92 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -340,7 +340,7 @@ void EditorAssetLibraryItemDownload::_http_download_completed(int p_status, int } break; case HTTPRequest::RESULT_REQUEST_FAILED: { error_text = TTR("Request failed, return code:") + " " + itos(p_code); - status->set_text(TTR("Req. Failed.")); + status->set_text(TTR("Request Failed.")); } break; case HTTPRequest::RESULT_REDIRECT_LIMIT_REACHED: { error_text = TTR("Request failed, too many redirects"); diff --git a/editor/plugins/particles_2d_editor_plugin.cpp b/editor/plugins/particles_2d_editor_plugin.cpp index 5eaa248224..ff8a9f93d6 100644 --- a/editor/plugins/particles_2d_editor_plugin.cpp +++ b/editor/plugins/particles_2d_editor_plugin.cpp @@ -77,11 +77,6 @@ void Particles2DEditorPlugin::_menu_callback(int p_idx) { case MENU_CLEAR_EMISSION_MASK: { emission_mask->popup_centered_minsize(); - - /*undo_redo->create_action(TTR("Clear Emission Mask")); - undo_redo->add_do_method(particles, "set_emission_points", PoolVector<Vector2>()); - undo_redo->add_undo_method(particles, "set_emission_points", particles->get_emission_points()); - undo_redo->commit_action();*/ } break; } } @@ -309,14 +304,6 @@ void Particles2DEditorPlugin::_generate_emission_mask() { } else { pm->set_emission_shape(ParticlesMaterial::EMISSION_SHAPE_POINTS); } - - /*undo_redo->create_action(TTR("Set Emission Mask")); - undo_redo->add_do_method(particles, "set_emission_points", epoints); - undo_redo->add_do_method(particles, "set_emission_half_extents", extents); - undo_redo->add_undo_method(particles, "set_emission_points", particles->get_emission_points()); - undo_redo->add_undo_method(particles, "set_emission_half_extents", particles->get_emission_half_extents()); - undo_redo->commit_action(); - */ } void Particles2DEditorPlugin::_notification(int p_what) { diff --git a/editor/plugins/particles_editor_plugin.cpp b/editor/plugins/particles_editor_plugin.cpp index f4a9960087..52eba099c6 100644 --- a/editor/plugins/particles_editor_plugin.cpp +++ b/editor/plugins/particles_editor_plugin.cpp @@ -40,11 +40,6 @@ void ParticlesEditor::_node_removed(Node *p_node) { } } -void ParticlesEditor::_resource_seleted(const String &p_res) { - - //print_line("selected resource path: "+p_res); -} - void ParticlesEditor::_node_selected(const NodePath &p_path) { Node *sel = get_node(p_path); @@ -84,23 +79,6 @@ void ParticlesEditor::_node_selected(const NodePath &p_path) { emission_dialog->popup_centered(Size2(300, 130)); } -/* - -void ParticlesEditor::_populate() { - - if(!node) - return; - - - if (node->get_particles().is_null()) - return; - - node->get_particles()->set_instance_count(populate_amount->get_text().to_int()); - node->populate_parent(populate_rotate_random->get_val(),populate_tilt_random->get_val(),populate_scale_random->get_text().to_double(),populate_scale->get_text().to_double()); - -} -*/ - void ParticlesEditor::_notification(int p_notification) { if (p_notification == NOTIFICATION_ENTER_TREE) { @@ -132,13 +110,7 @@ void ParticlesEditor::_menu_option(int p_option) { EditorNode::get_singleton()->show_warning(TTR("A processor material of type 'ParticlesMaterial' is required.")); return; } - /* - Node *root = get_scene()->get_root_node(); - ERR_FAIL_COND(!root); - EditorNode *en = Object::cast_to<EditorNode>(root); - ERR_FAIL_COND(!en); - Node * node = en->get_edited_scene(); -*/ + emission_tree_dialog->popup_centered_ratio(); } break; @@ -365,20 +337,14 @@ void ParticlesEditor::_generate_emission_points() { material->set_emission_point_count(point_count); material->set_emission_point_texture(tex); } - - //print_line("point count: "+itos(points.size())); - //node->set_emission_points(points); } void ParticlesEditor::_bind_methods() { ClassDB::bind_method("_menu_option", &ParticlesEditor::_menu_option); - ClassDB::bind_method("_resource_seleted", &ParticlesEditor::_resource_seleted); ClassDB::bind_method("_node_selected", &ParticlesEditor::_node_selected); ClassDB::bind_method("_generate_emission_points", &ParticlesEditor::_generate_emission_points); ClassDB::bind_method("_generate_aabb", &ParticlesEditor::_generate_aabb); - - //ClassDB::bind_method("_populate",&ParticlesEditor::_populate); } ParticlesEditor::ParticlesEditor() { @@ -394,8 +360,6 @@ ParticlesEditor::ParticlesEditor() { options->get_popup()->add_separator(); options->get_popup()->add_item(TTR("Create Emission Points From Mesh"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH); options->get_popup()->add_item(TTR("Create Emission Points From Node"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE); - // options->get_popup()->add_item(TTR("Clear Emitter"), MENU_OPTION_CLEAR_EMISSION_VOLUME); - options->get_popup()->connect("id_pressed", this, "_menu_option"); emission_dialog = memnew(ConfirmationDialog); @@ -420,7 +384,6 @@ ParticlesEditor::ParticlesEditor() { emission_dialog->connect("confirmed", this, "_generate_emission_points"); err_dialog = memnew(ConfirmationDialog); - //err_dialog->get_cancel()->hide(); add_child(err_dialog); emission_file_dialog = memnew(EditorFileDialog); @@ -454,9 +417,6 @@ ParticlesEditor::ParticlesEditor() { add_child(generate_aabb); generate_aabb->connect("confirmed", this, "_generate_aabb"); - - //options->set_anchor(MARGIN_LEFT,Control::ANCHOR_END); - //options->set_anchor(MARGIN_RIGHT,Control::ANCHOR_END); } void ParticlesEditorPlugin::edit(Object *p_object) { diff --git a/editor/plugins/particles_editor_plugin.h b/editor/plugins/particles_editor_plugin.h index 2c8ce88eb2..a65538c7fa 100644 --- a/editor/plugins/particles_editor_plugin.h +++ b/editor/plugins/particles_editor_plugin.h @@ -73,7 +73,6 @@ class ParticlesEditor : public Control { void _generate_aabb(); void _generate_emission_points(); - void _resource_seleted(const String &p_res); void _node_selected(const NodePath &p_path); void _menu_option(int); diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index b8c57fd959..ae726b69ef 100644 --- a/editor/plugins/tile_set_editor_plugin.cpp +++ b/editor/plugins/tile_set_editor_plugin.cpp @@ -244,7 +244,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) { MenuButton *options = memnew(MenuButton); panel->add_child(options); options->set_position(Point2(1, 1)); - options->set_text("Theme"); + options->set_text(TTR("Tile Set")); options->get_popup()->add_item(TTR("Add Item"), MENU_OPTION_ADD_ITEM); options->get_popup()->add_item(TTR("Remove Item"), MENU_OPTION_REMOVE_ITEM); options->get_popup()->add_separator(); diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index 76fd20ca12..1a7b7f3575 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -531,7 +531,7 @@ void ProjectSettingsEditor::_action_button_pressed(Object *p_obj, int p_column, Variant old_val = ProjectSettings::get_singleton()->get(name); int order = ProjectSettings::get_singleton()->get_order(name); - undo_redo->create_action(TTR("Add Input Action")); + undo_redo->create_action(TTR("Erase Input Action")); undo_redo->add_do_method(ProjectSettings::get_singleton(), "clear", name); undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set", name, old_val); undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set_order", name, order); @@ -852,7 +852,7 @@ void ProjectSettingsEditor::_action_add() { Array va; String name = "input/" + action_name->get_text(); - undo_redo->create_action(TTR("Add Input Action Event")); + undo_redo->create_action(TTR("Add Input Action")); undo_redo->add_do_method(ProjectSettings::get_singleton(), "set", name, va); undo_redo->add_undo_method(ProjectSettings::get_singleton(), "clear", name); undo_redo->add_do_method(this, "_update_actions"); diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index 59acd9ded9..d22bee40d9 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -900,10 +900,10 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: int id = TYPE_BASE_ID + idx; if (has_icon(t, "EditorIcons")) { - menu->add_icon_item(get_icon(t, "EditorIcons"), TTR("New") + " " + t, id); + menu->add_icon_item(get_icon(t, "EditorIcons"), vformat(TTR("New %s"), t), id); } else { - menu->add_item(TTR("New") + " " + t, id); + menu->add_item(vformat(TTR("New %s"), t), id); } idx++; @@ -2831,7 +2831,7 @@ void PropertyEditor::update_tree() { class_descr_cache[type] = descr.word_wrap(80); } - sep->set_tooltip(0, TTR("Class:") + " " + p.name + ":\n\n" + class_descr_cache[type]); + sep->set_tooltip(0, TTR("Class:") + " " + p.name + (class_descr_cache[type] == "" ? "" : "\n\n" + class_descr_cache[type])); } continue; @@ -2963,7 +2963,7 @@ void PropertyEditor::update_tree() { descr_cache[classname][propname] = descr; } - item->set_tooltip(0, TTR("Property:") + " " + p.name + "\n\n" + descr); + item->set_tooltip(0, TTR("Property:") + " " + p.name + (descr == "" ? "" : "\n\n" + descr)); } Dictionary d; diff --git a/modules/mono/SCsub b/modules/mono/SCsub index 18a20ecac4..320bbe7090 100644 --- a/modules/mono/SCsub +++ b/modules/mono/SCsub @@ -1,6 +1,9 @@ #!/usr/bin/env python Import('env') +Import('env_modules') + +env_mono = env_modules.Clone() from compat import byte_to_str @@ -43,12 +46,12 @@ def make_cs_files_header(src, dst): header.write('#endif // _CS_FILES_DATA_H') -env.add_source_files(env.modules_sources, '*.cpp') -env.add_source_files(env.modules_sources, 'mono_gd/*.cpp') -env.add_source_files(env.modules_sources, 'utils/*.cpp') +env_mono.add_source_files(env.modules_sources, '*.cpp') +env_mono.add_source_files(env.modules_sources, 'mono_gd/*.cpp') +env_mono.add_source_files(env.modules_sources, 'utils/*.cpp') if env['tools']: - env.add_source_files(env.modules_sources, 'editor/*.cpp') + env_mono.add_source_files(env.modules_sources, 'editor/*.cpp') make_cs_files_header('glue/cs_files', 'glue/cs_compressed.gen.h') vars = Variables() @@ -58,12 +61,12 @@ vars.Update(env) # Glue sources if env['mono_glue']: - env.add_source_files(env.modules_sources, 'glue/*.cpp') + env_mono.add_source_files(env.modules_sources, 'glue/*.cpp') else: - env.Append(CPPDEFINES=['MONO_GLUE_DISABLED']) + env_mono.Append(CPPDEFINES=['MONO_GLUE_DISABLED']) if ARGUMENTS.get('yolo_copy', False): - env.Append(CPPDEFINES=['YOLO_COPY']) + env_mono.Append(CPPDEFINES=['YOLO_COPY']) # Build GodotSharpTools solution @@ -201,8 +204,8 @@ def mono_build_solution(source, target, env): mono_sln_builder = Builder(action = mono_build_solution) -env.Append(BUILDERS={'MonoBuildSolution': mono_sln_builder}) -env.MonoBuildSolution( +env_mono.Append(BUILDERS={'MonoBuildSolution': mono_sln_builder}) +env_mono.MonoBuildSolution( os.path.join(Dir('#bin').abspath, 'GodotSharpTools.dll'), 'editor/GodotSharpTools/GodotSharpTools.sln' ) diff --git a/modules/openssl/stream_peer_openssl.cpp b/modules/openssl/stream_peer_openssl.cpp index 6d1d5485f3..7e8b308cf8 100644 --- a/modules/openssl/stream_peer_openssl.cpp +++ b/modules/openssl/stream_peer_openssl.cpp @@ -412,8 +412,12 @@ void StreamPeerOpenSSL::_print_error(int err) { err = SSL_get_error(ssl, err); switch (err) { - case SSL_ERROR_NONE: ERR_PRINT("NO ERROR: The TLS/SSL I/O operation completed"); break; - case SSL_ERROR_ZERO_RETURN: ERR_PRINT("The TLS/SSL connection has been closed."); + case SSL_ERROR_NONE: + ERR_PRINT("NO ERROR: The TLS/SSL I/O operation completed"); + break; + case SSL_ERROR_ZERO_RETURN: + ERR_PRINT("The TLS/SSL connection has been closed."); + break; case SSL_ERROR_WANT_READ: case SSL_ERROR_WANT_WRITE: ERR_PRINT("The operation did not complete."); diff --git a/modules/thekla_unwrap/SCsub b/modules/thekla_unwrap/SCsub index 0e1600df00..b489fcc9e7 100644 --- a/modules/thekla_unwrap/SCsub +++ b/modules/thekla_unwrap/SCsub @@ -60,11 +60,15 @@ if env['builtin_thekla_atlas']: env_thekla_unwrap.Append(CXXFLAGS="-std=c++11") if env["platform"] == 'x11': - env_thekla_unwrap.Append(CCFLAGS=["-DNV_OS_LINUX"]) + env_thekla_unwrap.Append(CCFLAGS=["-DNV_OS_LINUX", "-DPOSH_COMPILER_GCC"]) elif env["platform"] == 'osx': - env_thekla_unwrap.Append(CCFLAGS=["-DNV_OS_DARWIN"]) + env_thekla_unwrap.Append(CCFLAGS=["-DNV_OS_DARWIN", "-DPOSH_COMPILER_GCC"]) elif env["platform"] == 'windows': - env_thekla_unwrap.Append(CCFLAGS=["-DNV_OS_WIN32"]) + if env.msvc: + env_thekla_unwrap.Append(CCFLAGS=["-DNV_OS_WIN32", "-DNV_CC_MSVC", "-DPOSH_COMPILER_MSVC" ]) + else: + env_thekla_unwrap.Append(CCFLAGS=["-DNV_OS_MINGW", "-DNV_CC_GNUC", "-DPOSH_COMPILER_GCC"]) + env.Append(LIBS=["dbghelp"]) # Godot source files env_thekla_unwrap.add_source_files(env.modules_sources, "*.cpp") diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp index f8f94926b7..de28fef929 100644 --- a/scene/2d/animated_sprite.cpp +++ b/scene/2d/animated_sprite.cpp @@ -355,38 +355,21 @@ void AnimatedSprite::_notification(int p_what) { case NOTIFICATION_DRAW: { - if (frames.is_null()) { - print_line("no draw no faemos"); + if (frames.is_null()) return; - } - - if (frame < 0) { - print_line("no draw frame <0"); + if (frame < 0) return; - } - - if (!frames->has_animation(animation)) { - print_line("no draw no anim: " + String(animation)); + if (!frames->has_animation(animation)) return; - } Ref<Texture> texture = frames->get_frame(animation, frame); - if (texture.is_null()) { - print_line("no draw texture is null"); + if (texture.is_null()) return; - } Ref<Texture> normal = frames->get_normal_frame(animation, frame); - //print_line("DECIDED TO DRAW"); - RID ci = get_canvas_item(); - /* - texture->draw(ci,Point2()); - break; - */ - Size2i s; s = texture->get_size(); Point2 ofs = offset; @@ -403,9 +386,7 @@ void AnimatedSprite::_notification(int p_what) { if (vflip) dst_rect.size.y = -dst_rect.size.y; - //texture->draw_rect(ci,dst_rect,false,modulate); texture->draw_rect_region(ci, dst_rect, Rect2(Vector2(), texture->get_size()), Color(1, 1, 1), false, normal); - //VisualServer::get_singleton()->canvas_item_add_texture_rect_region(ci,dst_rect,texture->get_rid(),src_rect,modulate); } break; } diff --git a/scene/gui/slider.cpp b/scene/gui/slider.cpp index e88742a3e3..665ae8b6dd 100644 --- a/scene/gui/slider.cpp +++ b/scene/gui/slider.cpp @@ -171,13 +171,14 @@ void Slider::_notification(int p_what) { Ref<StyleBox> grabber_area = get_stylebox("grabber_area"); Ref<Texture> grabber = get_icon(editable ? ((mouse_inside || has_focus()) ? "grabber_highlight" : "grabber") : "grabber_disabled"); Ref<Texture> tick = get_icon("tick"); + double ratio = Math::is_nan(get_as_ratio()) ? 0 : get_as_ratio(); if (orientation == VERTICAL) { int widget_width = style->get_minimum_size().width + style->get_center_size().width; float areasize = size.height - grabber->get_size().height; style->draw(ci, Rect2i(Point2i(size.width / 2 - widget_width / 2, 0), Size2i(widget_width, size.height))); - grabber_area->draw(ci, Rect2i(Point2i((size.width - widget_width) / 2, size.height - areasize * get_as_ratio() - grabber->get_size().height / 2), Size2i(widget_width, areasize * get_as_ratio() + grabber->get_size().width / 2))); + grabber_area->draw(ci, Rect2i(Point2i((size.width - widget_width) / 2, size.height - areasize * ratio - grabber->get_size().height / 2), Size2i(widget_width, areasize * ratio + grabber->get_size().width / 2))); /* if (mouse_inside||has_focus()) focus->draw(ci,Rect2i(Point2i(),Size2i(style->get_minimum_size().width+style->get_center_size().width,size.height))); @@ -190,14 +191,14 @@ void Slider::_notification(int p_what) { tick->draw(ci, Point2i((size.width - widget_width) / 2, ofs)); } } - grabber->draw(ci, Point2i(size.width / 2 - grabber->get_size().width / 2, size.height - get_as_ratio() * areasize - grabber->get_size().height)); + grabber->draw(ci, Point2i(size.width / 2 - grabber->get_size().width / 2, size.height - ratio * areasize - grabber->get_size().height)); } else { int widget_height = style->get_minimum_size().height + style->get_center_size().height; float areasize = size.width - grabber->get_size().width; style->draw(ci, Rect2i(Point2i(0, (size.height - widget_height) / 2), Size2i(size.width, widget_height))); - grabber_area->draw(ci, Rect2i(Point2i(0, (size.height - widget_height) / 2), Size2i(areasize * get_as_ratio() + grabber->get_size().width / 2, widget_height))); + grabber_area->draw(ci, Rect2i(Point2i(0, (size.height - widget_height) / 2), Size2i(areasize * ratio + grabber->get_size().width / 2, widget_height))); /* if (mouse_inside||has_focus()) focus->draw(ci,Rect2i(Point2i(),Size2i(size.width,style->get_minimum_size().height+style->get_center_size().height))); @@ -211,7 +212,7 @@ void Slider::_notification(int p_what) { tick->draw(ci, Point2i(ofs, (size.height - widget_height) / 2)); } } - grabber->draw(ci, Point2i(get_as_ratio() * areasize, size.height / 2 - grabber->get_size().height / 2)); + grabber->draw(ci, Point2i(ratio * areasize, size.height / 2 - grabber->get_size().height / 2)); } } break; diff --git a/thirdparty/thekla_atlas/nvcore/Debug.cpp b/thirdparty/thekla_atlas/nvcore/Debug.cpp index 75ac6beb75..113c551de8 100644 --- a/thirdparty/thekla_atlas/nvcore/Debug.cpp +++ b/thirdparty/thekla_atlas/nvcore/Debug.cpp @@ -14,17 +14,15 @@ # define VC_EXTRALEAN # include <windows.h> # include <direct.h> -# if NV_CC_MSVC -# include <crtdbg.h> -# if _MSC_VER < 1300 -# define DECLSPEC_DEPRECATED +# include <crtdbg.h> +# if _MSC_VER < 1300 +# define DECLSPEC_DEPRECATED // VC6: change this path to your Platform SDK headers -# include <dbghelp.h> // must be XP version of file -// include "M:\\dev7\\vs\\devtools\\common\\win32sdk\\include\\dbghelp.h" -# else +# include <dbghelp.h> // must be XP version of file +// include "M:\\dev7\\vs\\devtools\\common\\win32sdk\\include\\dbghelp.h" +# else // VC7: ships with updated headers -# include <dbghelp.h> -# endif +# include <dbghelp.h> # endif # pragma comment(lib,"dbghelp.lib") #endif @@ -110,7 +108,7 @@ namespace #endif -#if (NV_OS_WIN32 && NV_CC_MSVC) || NV_OS_DURANGO +#if NV_OS_WIN32 || NV_OS_DURANGO // We should try to simplify the top level filter as much as possible. // http://www.nynaeve.net/?p=128 diff --git a/thirdparty/thekla_atlas/nvcore/DefsGnucWin32.h b/thirdparty/thekla_atlas/nvcore/DefsGnucWin32.h index f35ed88575..4f97b90f3a 100644 --- a/thirdparty/thekla_atlas/nvcore/DefsGnucWin32.h +++ b/thirdparty/thekla_atlas/nvcore/DefsGnucWin32.h @@ -19,7 +19,7 @@ #endif #define NV_FASTCALL __attribute__((fastcall)) -#define NV_FORCEINLINE __attribute__((always_inline)) +#define NV_FORCEINLINE __attribute__((always_inline)) inline #define NV_DEPRECATED __attribute__((deprecated)) #if __GNUC__ > 2 |