diff options
-rw-r--r-- | doc/classes/Button.xml | 2 | ||||
-rw-r--r-- | doc/classes/EditorExportPlugin.xml | 10 | ||||
-rw-r--r-- | drivers/vulkan/SCsub | 4 | ||||
-rw-r--r-- | drivers/vulkan/rendering_context_driver_vulkan.cpp | 9 | ||||
-rw-r--r-- | editor/connections_dialog.cpp | 2 | ||||
-rw-r--r-- | editor/groups_editor.cpp | 1 | ||||
-rw-r--r-- | editor/plugins/sprite_frames_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | platform/web/js/libs/library_godot_javascript_singleton.js | 16 | ||||
-rw-r--r-- | scene/gui/button.cpp | 2 |
9 files changed, 36 insertions, 12 deletions
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml index 98f25ed573..68fb918904 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -119,7 +119,7 @@ Icon modulate [Color] used when the [Button] is being pressed. </theme_item> <theme_item name="align_to_largest_stylebox" data_type="constant" type="int" default="0"> - This constant acts as a boolean. If [code]true[/code], text and icon are always aligned to the largest stylebox margins, otherwise it's aligned to the current button state stylebox margins. + This constant acts as a boolean. If [code]true[/code], the minimum size of the button and text/icon alignment is always based on the largest stylebox margins, otherwise it's based on the current button state stylebox margins. </theme_item> <theme_item name="h_separation" data_type="constant" type="int" default="4"> The horizontal space between [Button]'s icon and text. Negative values will be treated as [code]0[/code] when used. diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml index 3e2b3ea111..4d304cf5fd 100644 --- a/doc/classes/EditorExportPlugin.xml +++ b/doc/classes/EditorExportPlugin.xml @@ -17,7 +17,7 @@ <param index="1" name="features" type="PackedStringArray" /> <description> Return [code]true[/code] if this plugin will customize resources based on the platform and features used. - When enabled, [method _get_customization_configuration_hash], [method _customize_resource] and [method _customize_scene] will be called and must be implemented. + When enabled, [method _get_customization_configuration_hash] and [method _customize_resource] will be called and must be implemented. </description> </method> <method name="_begin_customize_scenes" qualifiers="virtual const"> @@ -25,7 +25,8 @@ <param index="0" name="platform" type="EditorExportPlatform" /> <param index="1" name="features" type="PackedStringArray" /> <description> - Return true if this plugin will customize scenes based on the platform and features used. + Return [code]true[/code] if this plugin will customize scenes based on the platform and features used. + When enabled, [method _get_customization_configuration_hash] and [method _customize_scene] will be called and must be implemented. </description> </method> <method name="_customize_resource" qualifiers="virtual"> @@ -35,6 +36,7 @@ <description> Customize a resource. If changes are made to it, return the same or a new resource. Otherwise, return [code]null[/code]. The [i]path[/i] argument is only used when customizing an actual file, otherwise this means that this resource is part of another one and it will be empty. + Calling [method skip] inside this callback will make the file not included in the export. Implementing this method is required if [method _begin_customize_resources] returns [code]true[/code]. </description> </method> @@ -44,6 +46,7 @@ <param index="1" name="path" type="String" /> <description> Customize a scene. If changes are made to it, return the same or a new scene. Otherwise, return [code]null[/code]. If a new scene is returned, it is up to you to dispose of the old one. + Calling [method skip] inside this callback will make the file not included in the export. Implementing this method is required if [method _begin_customize_scenes] returns [code]true[/code]. </description> </method> @@ -81,8 +84,9 @@ <param index="1" name="type" type="String" /> <param index="2" name="features" type="PackedStringArray" /> <description> - Virtual method to be overridden by the user. Called for each exported file, providing arguments that can be used to identify the file. [param path] is the path of the file, [param type] is the [Resource] represented by the file (e.g. [PackedScene]) and [param features] is the list of features for the export. + Virtual method to be overridden by the user. Called for each exported file, except for imported resources (resources that have an associated [code].import[/code] file). The arguments can be used to identify the file. [param path] is the path of the file, [param type] is the [Resource] represented by the file (e.g. [PackedScene]), and [param features] is the list of features for the export. Calling [method skip] inside this callback will make the file not included in the export. + Use [method _customize_resource] for imported resources that are not handled by this function. </description> </method> <method name="_get_android_dependencies" qualifiers="virtual const"> diff --git a/drivers/vulkan/SCsub b/drivers/vulkan/SCsub index 80d5f35305..1efef5ad77 100644 --- a/drivers/vulkan/SCsub +++ b/drivers/vulkan/SCsub @@ -16,14 +16,14 @@ if env["use_volk"]: if env["platform"] == "android": env.AppendUnique(CPPDEFINES=["VK_USE_PLATFORM_ANDROID_KHR"]) elif env["platform"] == "ios": - env.AppendUnique(CPPDEFINES=["VK_USE_PLATFORM_IOS_MVK"]) + env.AppendUnique(CPPDEFINES=["VK_USE_PLATFORM_IOS_MVK", "VK_USE_PLATFORM_METAL_EXT"]) elif env["platform"] == "linuxbsd": if env["x11"]: env.AppendUnique(CPPDEFINES=["VK_USE_PLATFORM_XLIB_KHR"]) if env["wayland"]: env.AppendUnique(CPPDEFINES=["VK_USE_PLATFORM_WAYLAND_KHR"]) elif env["platform"] == "macos": - env.AppendUnique(CPPDEFINES=["VK_USE_PLATFORM_MACOS_MVK"]) + env.AppendUnique(CPPDEFINES=["VK_USE_PLATFORM_MACOS_MVK", "VK_USE_PLATFORM_METAL_EXT"]) elif env["platform"] == "windows": env.AppendUnique(CPPDEFINES=["VK_USE_PLATFORM_WIN32_KHR"]) diff --git a/drivers/vulkan/rendering_context_driver_vulkan.cpp b/drivers/vulkan/rendering_context_driver_vulkan.cpp index 7cba820978..fe2ff5e0da 100644 --- a/drivers/vulkan/rendering_context_driver_vulkan.cpp +++ b/drivers/vulkan/rendering_context_driver_vulkan.cpp @@ -102,6 +102,10 @@ Error RenderingContextDriverVulkan::_initialize_instance_extensions() { // This extension allows us to use the properties2 features to query additional device capabilities. _register_requested_instance_extension(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME, false); +#if defined(USE_VOLK) && (defined(MACOS_ENABLED) || defined(IOS_ENABLED)) + _register_requested_instance_extension(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME, true); +#endif + // Only enable debug utils in verbose mode or DEV_ENABLED. // End users would get spammed with messages of varying verbosity due to the // mess that thirdparty layers/extensions and drivers seem to leave in their @@ -360,6 +364,11 @@ Error RenderingContextDriverVulkan::_initialize_instance() { VkInstanceCreateInfo instance_info = {}; instance_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; + +#if defined(USE_VOLK) && (defined(MACOS_ENABLED) || defined(IOS_ENABLED)) + instance_info.flags = VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR; +#endif + instance_info.pApplicationInfo = &app_info; instance_info.enabledExtensionCount = enabled_extension_names.size(); instance_info.ppEnabledExtensionNames = enabled_extension_names.ptr(); diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index bfc4d91af7..eb0ab1174b 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -1377,6 +1377,8 @@ void ConnectionsDock::_notification(int p_what) { slot_menu->set_item_icon(slot_menu->get_item_index(SLOT_MENU_DISCONNECT), get_editor_theme_icon(SNAME("Unlinked"))); tree->add_theme_constant_override("icon_max_width", get_theme_constant(SNAME("class_icon_size"), EditorStringName(Editor))); + + update_tree(); } break; case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { diff --git a/editor/groups_editor.cpp b/editor/groups_editor.cpp index 18ac4074da..6cfc035fc9 100644 --- a/editor/groups_editor.cpp +++ b/editor/groups_editor.cpp @@ -369,6 +369,7 @@ void GroupsEditor::_notification(int p_what) { case NOTIFICATION_THEME_CHANGED: { filter->set_right_icon(get_editor_theme_icon("Search")); add->set_icon(get_editor_theme_icon("Add")); + _update_tree(); } break; case NOTIFICATION_VISIBILITY_CHANGED: { if (groups_dirty && is_visible_in_tree()) { diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index 27056a6cc4..48087e3166 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -953,7 +953,7 @@ void SpriteFramesEditor::_sync_animation() { } void SpriteFramesEditor::_select_animation(const String &p_name, bool p_update_node) { - if (!frames->has_animation(p_name)) { + if (frames.is_null() || !frames->has_animation(p_name)) { return; } edited_anim = p_name; diff --git a/platform/web/js/libs/library_godot_javascript_singleton.js b/platform/web/js/libs/library_godot_javascript_singleton.js index b17fde1544..6bb69bca95 100644 --- a/platform/web/js/libs/library_godot_javascript_singleton.js +++ b/platform/web/js/libs/library_godot_javascript_singleton.js @@ -81,11 +81,16 @@ const GodotJSWrapper = { case 0: return null; case 1: - return !!GodotRuntime.getHeapValue(val, 'i64'); - case 2: - return GodotRuntime.getHeapValue(val, 'i64'); + return Boolean(GodotRuntime.getHeapValue(val, 'i64')); + case 2: { + // `heap_value` may be a bigint. + const heap_value = GodotRuntime.getHeapValue(val, 'i64'); + return heap_value >= Number.MIN_SAFE_INTEGER && heap_value <= Number.MAX_SAFE_INTEGER + ? Number(heap_value) + : heap_value; + } case 3: - return GodotRuntime.getHeapValue(val, 'double'); + return Number(GodotRuntime.getHeapValue(val, 'double')); case 4: return GodotRuntime.parseString(GodotRuntime.getHeapValue(val, '*')); case 24: // OBJECT @@ -110,6 +115,9 @@ const GodotJSWrapper = { } GodotRuntime.setHeapValue(p_exchange, p_val, 'double'); return 3; // FLOAT + } else if (type === 'bigint') { + GodotRuntime.setHeapValue(p_exchange, p_val, 'i64'); + return 2; // INT } else if (type === 'string') { const c_str = GodotRuntime.allocString(p_val); GodotRuntime.setHeapValue(p_exchange, c_str, '*'); diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp index 4e738216de..dd344121e1 100644 --- a/scene/gui/button.cpp +++ b/scene/gui/button.cpp @@ -530,7 +530,7 @@ Size2 Button::get_minimum_size_for_text_and_icon(const String &p_text, Ref<Textu } } - return _get_largest_stylebox_size() + minsize; + return (theme_cache.align_to_largest_stylebox ? _get_largest_stylebox_size() : _get_current_stylebox()->get_minimum_size()) + minsize; } void Button::_shape(Ref<TextParagraph> p_paragraph, String p_text) { |