diff options
-rw-r--r-- | doc/classes/InputEvent.xml | 5 | ||||
-rw-r--r-- | editor/plugins/asset_library_editor_plugin.cpp | 11 |
2 files changed, 11 insertions, 5 deletions
diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml index f2c00908f6..4c8d83adba 100644 --- a/doc/classes/InputEvent.xml +++ b/doc/classes/InputEvent.xml @@ -17,6 +17,8 @@ <argument index="0" name="with_event" type="InputEvent"> </argument> <description> + Returns [code]true[/code] if the given input event and this input event can be added together (only for events of type [InputEventMouseMotion]). + The given input event's position, global position and speed will be copied. The resulting [code]relative[/code] is a sum of both events. Both events' modifiers have to be identical. </description> </method> <method name="as_text" qualifiers="const"> @@ -32,6 +34,7 @@ <argument index="0" name="action" type="String"> </argument> <description> + Returns a value between 0.0 and 1.0 depending on the given actions' state. Useful for getting the value of events of type [InputEventJoypadMotion]. </description> </method> <method name="is_action" qualifiers="const"> @@ -88,6 +91,7 @@ <argument index="0" name="event" type="InputEvent"> </argument> <description> + Returns [code]true[/code] if the given input event is checking for the same key ([InputEventKey]), button ([InputEventJoypadButton]) or action ([InputEventAction]). </description> </method> <method name="xformed_by" qualifiers="const"> @@ -98,6 +102,7 @@ <argument index="1" name="local_ofs" type="Vector2" default="Vector2( 0, 0 )"> </argument> <description> + Returns a copy of the given input event which has been offset by [code]local_ofs[/code] and transformed by [code]xform[/code]. Relevant for events of type [InputEventMouseButton], [InputEventMouseMotion], [InputEventScreenTouch], [InputEventScreenDrag], [InputEventMagnifyGesture] and [InputEventPanGesture]. </description> </method> </methods> diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index 16f24c3c3a..31b11d8bea 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -177,6 +177,8 @@ void EditorAssetLibraryItemDescription::set_image(int p_type, int p_index, const tex->create_from_image(thumbnail); preview_images[i].button->set_icon(tex); + // Make it clearer that clicking it will open an external link + preview_images[i].button->set_default_cursor_shape(CURSOR_POINTING_HAND); } else { preview_images[i].button->set_icon(p_image); } @@ -755,7 +757,7 @@ void EditorAssetLibrary::_image_update(bool use_cache, bool final, const PoolByt float scale_ratio = max_height / (image->get_height() * EDSCALE); if (scale_ratio < 1) { - image->resize(image->get_width() * EDSCALE * scale_ratio, image->get_height() * EDSCALE * scale_ratio, Image::INTERPOLATE_CUBIC); + image->resize(image->get_width() * EDSCALE * scale_ratio, image->get_height() * EDSCALE * scale_ratio, Image::INTERPOLATE_LANCZOS); } } break; case IMAGE_QUEUE_SCREENSHOT: { @@ -763,7 +765,7 @@ void EditorAssetLibrary::_image_update(bool use_cache, bool final, const PoolByt float scale_ratio = max_height / (image->get_height() * EDSCALE); if (scale_ratio < 1) { - image->resize(image->get_width() * EDSCALE * scale_ratio, image->get_height() * EDSCALE * scale_ratio, Image::INTERPOLATE_CUBIC); + image->resize(image->get_width() * EDSCALE * scale_ratio, image->get_height() * EDSCALE * scale_ratio, Image::INTERPOLATE_LANCZOS); } } break; } @@ -1270,9 +1272,8 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const if (p.has("thumbnail")) { _request_image(description->get_instance_id(), p["thumbnail"], IMAGE_QUEUE_THUMBNAIL, i); } - if (is_video) { - //_request_image(description->get_instance_id(),p["link"],IMAGE_QUEUE_SCREENSHOT,i); - } else { + + if (!is_video) { _request_image(description->get_instance_id(), p["link"], IMAGE_QUEUE_SCREENSHOT, i); } } |