summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/config/engine.cpp4
-rw-r--r--core/config/engine.h2
-rw-r--r--core/core_bind.cpp13
-rw-r--r--core/core_bind.h4
-rw-r--r--core/core_constants.cpp1
-rw-r--r--core/io/resource_loader.cpp26
-rw-r--r--core/object/object.h1
-rw-r--r--core/os/os.h7
-rw-r--r--core/string/locales.h1196
-rw-r--r--core/string/translation.cpp1227
-rw-r--r--core/string/translation.h36
-rw-r--r--core/string/ustring.cpp113
-rw-r--r--core/templates/vector.h23
-rw-r--r--core/variant/array.cpp22
-rw-r--r--core/variant/array.h4
-rw-r--r--core/variant/variant_call.cpp20
-rw-r--r--core/variant/variant_op.h1
-rw-r--r--core/variant/variant_parser.cpp9
-rw-r--r--doc/classes/@GlobalScope.xml5
-rw-r--r--doc/classes/Array.xml13
-rw-r--r--doc/classes/ArrayMesh.xml3
-rw-r--r--doc/classes/Button.xml8
-rw-r--r--doc/classes/CheckBox.xml8
-rw-r--r--doc/classes/CheckButton.xml8
-rw-r--r--doc/classes/CodeEdit.xml10
-rw-r--r--doc/classes/CollisionObject2D.xml2
-rw-r--r--doc/classes/CollisionObject3D.xml2
-rw-r--r--doc/classes/DisplayServer.xml40
-rw-r--r--doc/classes/EditorInspector.xml5
-rw-r--r--doc/classes/Environment.xml9
-rw-r--r--doc/classes/FlowContainer.xml20
-rw-r--r--doc/classes/FontData.xml16
-rw-r--r--doc/classes/GraphNode.xml18
-rw-r--r--doc/classes/HFlowContainer.xml19
-rw-r--r--doc/classes/HSplitContainer.xml2
-rw-r--r--doc/classes/Image.xml2
-rw-r--r--doc/classes/ImporterMesh.xml5
-rw-r--r--doc/classes/ItemList.xml2
-rw-r--r--doc/classes/JSON.xml42
-rw-r--r--doc/classes/LineEdit.xml12
-rw-r--r--doc/classes/LinkButton.xml6
-rw-r--r--doc/classes/MenuButton.xml6
-rw-r--r--doc/classes/OS.xml9
-rw-r--r--doc/classes/OptionButton.xml10
-rw-r--r--doc/classes/PackedByteArray.xml5
-rw-r--r--doc/classes/PackedColorArray.xml5
-rw-r--r--doc/classes/PackedFloat32Array.xml5
-rw-r--r--doc/classes/PackedFloat64Array.xml5
-rw-r--r--doc/classes/PackedInt32Array.xml5
-rw-r--r--doc/classes/PackedInt64Array.xml5
-rw-r--r--doc/classes/PackedScene.xml2
-rw-r--r--doc/classes/PackedStringArray.xml5
-rw-r--r--doc/classes/PackedVector2Array.xml5
-rw-r--r--doc/classes/PackedVector3Array.xml5
-rw-r--r--doc/classes/PopupMenu.xml6
-rw-r--r--doc/classes/ProgressBar.xml2
-rw-r--r--doc/classes/ProjectSettings.xml25
-rw-r--r--doc/classes/RenderingServer.xml11
-rw-r--r--doc/classes/String.xml15
-rw-r--r--doc/classes/TabBar.xml6
-rw-r--r--doc/classes/TabContainer.xml6
-rw-r--r--doc/classes/TextEdit.xml21
-rw-r--r--doc/classes/TextLine.xml3
-rw-r--r--doc/classes/TextParagraph.xml6
-rw-r--r--doc/classes/TextServer.xml36
-rw-r--r--doc/classes/TextServerExtension.xml16
-rw-r--r--doc/classes/TranslationServer.xml54
-rw-r--r--doc/classes/Tree.xml10
-rw-r--r--doc/classes/VFlowContainer.xml19
-rw-r--r--doc/classes/VSplitContainer.xml2
-rw-r--r--doc/classes/Window.xml10
-rw-r--r--doc/classes/XRPose.xml14
-rw-r--r--doc/classes/XRPositionalTracker.xml3
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.cpp2
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.h2
-rw-r--r--drivers/gles3/texture_loader_gles3.cpp2
-rw-r--r--drivers/unix/os_unix.cpp4
-rw-r--r--drivers/unix/os_unix.h4
-rw-r--r--drivers/vulkan/rendering_device_vulkan.cpp6
-rw-r--r--drivers/vulkan/vulkan_context.cpp302
-rw-r--r--drivers/vulkan/vulkan_context.h4
-rw-r--r--editor/animation_track_editor.cpp10
-rw-r--r--editor/create_dialog.cpp77
-rw-r--r--editor/create_dialog.h10
-rw-r--r--editor/debugger/script_editor_debugger.cpp1
-rw-r--r--editor/doc_tools.cpp21
-rw-r--r--editor/editor_asset_installer.cpp3
-rw-r--r--editor/editor_file_system.cpp4
-rw-r--r--editor/editor_file_system.h1
-rw-r--r--editor/editor_help.cpp64
-rw-r--r--editor/editor_help.h12
-rw-r--r--editor/editor_inspector.cpp2
-rw-r--r--editor/editor_locale_dialog.cpp563
-rw-r--r--editor/editor_locale_dialog.h93
-rw-r--r--editor/editor_node.cpp48
-rw-r--r--editor/editor_node.h10
-rw-r--r--editor/editor_plugin.cpp30
-rw-r--r--editor/editor_properties.cpp62
-rw-r--r--editor/editor_properties.h21
-rw-r--r--editor/editor_run.cpp18
-rw-r--r--editor/editor_settings.cpp17
-rw-r--r--editor/editor_themes.cpp27
-rw-r--r--editor/editor_toaster.cpp8
-rw-r--r--editor/editor_toaster.h1
-rw-r--r--editor/filesystem_dock.cpp12
-rw-r--r--editor/icons/HFlowContainer.svg1
-rw-r--r--editor/icons/Notification.svg2
-rw-r--r--editor/icons/NotificationDisabled.svg2
-rw-r--r--editor/icons/VFlowContainer.svg1
-rw-r--r--editor/icons/editor_icons_builders.py2
-rw-r--r--editor/import/dynamicfont_import_settings.cpp425
-rw-r--r--editor/import/dynamicfont_import_settings.h7
-rw-r--r--editor/import/resource_importer_bmfont.cpp742
-rw-r--r--editor/import/resource_importer_csv_translation.cpp3
-rw-r--r--editor/import/resource_importer_scene.cpp77
-rw-r--r--editor/import/resource_importer_scene.h2
-rw-r--r--editor/import/resource_importer_texture.cpp12
-rw-r--r--editor/inspector_dock.cpp34
-rw-r--r--editor/inspector_dock.h4
-rw-r--r--editor/localization_editor.cpp251
-rw-r--r--editor/localization_editor.h17
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.cpp2
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp111
-rw-r--r--editor/plugins/animation_player_editor_plugin.h7
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp99
-rw-r--r--editor/plugins/asset_library_editor_plugin.h18
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp34
-rw-r--r--editor/plugins/canvas_item_editor_plugin.h10
-rw-r--r--editor/plugins/mesh_library_editor_plugin.cpp10
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp57
-rw-r--r--editor/plugins/node_3d_editor_plugin.h13
-rw-r--r--editor/plugins/script_editor_plugin.cpp3
-rw-r--r--editor/plugins/script_editor_plugin.h2
-rw-r--r--editor/plugins/script_text_editor.cpp6
-rw-r--r--editor/plugins/script_text_editor.h2
-rw-r--r--editor/plugins/skeleton_3d_editor_plugin.cpp3
-rw-r--r--editor/plugins/text_editor.cpp6
-rw-r--r--editor/plugins/text_editor.h2
-rw-r--r--editor/property_editor.cpp25
-rw-r--r--editor/property_editor.h3
-rw-r--r--editor/scene_tree_dock.cpp209
-rw-r--r--editor/scene_tree_dock.h3
-rw-r--r--main/main.cpp91
-rw-r--r--methods.py52
-rw-r--r--misc/dist/html/editor.html4
-rw-r--r--misc/dist/html/manifest.json2
-rw-r--r--misc/dist/html/offline.html2
-rw-r--r--misc/dist/osx_template.app/Contents/Info.plist7
-rwxr-xr-xmisc/scripts/clang_format.sh2
-rw-r--r--modules/gdnative/include/nativescript/godot_nativescript.h1
-rw-r--r--modules/gdscript/gdscript_analyzer.cpp3
-rw-r--r--modules/gdscript/gdscript_byte_codegen.cpp1
-rw-r--r--modules/gdscript/gdscript_compiler.cpp2
-rw-r--r--modules/gdscript/gdscript_parser.cpp6
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/params_default_forward_reference.gd9
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/params_default_forward_reference.out2
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/params_default_values.gd35
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/params_default_values.out6
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp8
-rw-r--r--modules/mobile_vr/mobile_vr_interface.cpp4
-rw-r--r--modules/mobile_vr/mobile_vr_interface.h1
-rw-r--r--modules/text_server_adv/text_server_adv.cpp36
-rw-r--r--modules/text_server_adv/text_server_adv.h3
-rw-r--r--modules/text_server_fb/text_server_fb.cpp29
-rw-r--r--modules/text_server_fb/text_server_fb.h3
-rw-r--r--modules/visual_script/editor/visual_script_editor.cpp2
-rw-r--r--modules/visual_script/editor/visual_script_editor.h2
-rw-r--r--modules/webrtc/doc_classes/WebRTCPeerConnection.xml6
-rw-r--r--platform/android/display_server_android.cpp12
-rw-r--r--platform/android/display_server_android.h1
-rw-r--r--platform/android/export/export_plugin.cpp2
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/Godot.java6
-rw-r--r--platform/android/java_godot_wrapper.cpp16
-rw-r--r--platform/android/java_godot_wrapper.h3
-rw-r--r--platform/iphone/display_server_iphone.mm1
-rw-r--r--platform/iphone/export/export_plugin.cpp151
-rw-r--r--platform/javascript/detect.py6
-rw-r--r--platform/javascript/display_server_javascript.cpp1
-rw-r--r--platform/javascript/export/export_plugin.cpp6
-rw-r--r--platform/javascript/os_javascript.cpp4
-rw-r--r--platform/javascript/os_javascript.h4
-rw-r--r--platform/linuxbsd/display_server_x11.cpp15
-rw-r--r--platform/linuxbsd/display_server_x11.h1
-rw-r--r--platform/osx/display_server_osx.h6
-rw-r--r--platform/osx/display_server_osx.mm72
-rw-r--r--platform/osx/export/codesign.cpp1564
-rw-r--r--platform/osx/export/codesign.h369
-rw-r--r--platform/osx/export/export.cpp3
-rw-r--r--platform/osx/export/export_plugin.cpp377
-rw-r--r--platform/osx/export/export_plugin.h5
-rw-r--r--platform/osx/export/lipo.cpp243
-rw-r--r--platform/osx/export/lipo.h76
-rw-r--r--platform/osx/export/macho.cpp556
-rw-r--r--platform/osx/export/macho.h217
-rw-r--r--platform/osx/export/plist.cpp570
-rw-r--r--platform/osx/export/plist.h116
-rw-r--r--platform/osx/os_osx.h2
-rw-r--r--platform/osx/os_osx.mm10
-rw-r--r--platform/uwp/os_uwp.cpp4
-rw-r--r--platform/uwp/os_uwp.h4
-rw-r--r--platform/windows/detect.py20
-rw-r--r--platform/windows/display_server_windows.cpp35
-rw-r--r--platform/windows/display_server_windows.h6
-rw-r--r--platform/windows/os_windows.cpp183
-rw-r--r--platform/windows/os_windows.h5
-rw-r--r--scene/2d/camera_2d.cpp2
-rw-r--r--scene/2d/tile_map.cpp4
-rw-r--r--scene/gui/button.cpp2
-rw-r--r--scene/gui/code_edit.cpp12
-rw-r--r--scene/gui/control.cpp8
-rw-r--r--scene/gui/flow_container.cpp252
-rw-r--r--scene/gui/flow_container.h76
-rw-r--r--scene/gui/gradient_edit.h1
-rw-r--r--scene/gui/graph_node.cpp2
-rw-r--r--scene/gui/label.cpp7
-rw-r--r--scene/gui/line_edit.cpp2
-rw-r--r--scene/gui/link_button.cpp2
-rw-r--r--scene/gui/rich_text_label.cpp51
-rw-r--r--scene/gui/text_edit.cpp50
-rw-r--r--scene/gui/text_edit.h11
-rw-r--r--scene/main/node.cpp14
-rw-r--r--scene/main/viewport.cpp2
-rw-r--r--scene/main/window.cpp6
-rw-r--r--scene/register_scene_types.cpp12
-rw-r--r--scene/resources/default_theme/SCsub17
-rw-r--r--scene/resources/default_theme/add.svg1
-rw-r--r--scene/resources/default_theme/arrow_down.pngbin109 -> 0 bytes
-rw-r--r--scene/resources/default_theme/arrow_down.svg1
-rw-r--r--scene/resources/default_theme/arrow_left.pngbin159 -> 0 bytes
-rw-r--r--scene/resources/default_theme/arrow_left.svg1
-rw-r--r--scene/resources/default_theme/arrow_right.pngbin103 -> 0 bytes
-rw-r--r--scene/resources/default_theme/arrow_right.svg1
-rw-r--r--scene/resources/default_theme/bar_arrow.pngbin208 -> 0 bytes
-rw-r--r--scene/resources/default_theme/bookmark.pngbin160 -> 0 bytes
-rw-r--r--scene/resources/default_theme/bookmark.svg1
-rw-r--r--scene/resources/default_theme/breakpoint.svg1
-rw-r--r--scene/resources/default_theme/button_disabled.pngbin256 -> 0 bytes
-rw-r--r--scene/resources/default_theme/button_focus.pngbin203 -> 0 bytes
-rw-r--r--scene/resources/default_theme/button_hover.pngbin342 -> 0 bytes
-rw-r--r--scene/resources/default_theme/button_normal.pngbin336 -> 0 bytes
-rw-r--r--scene/resources/default_theme/button_pressed.pngbin499 -> 0 bytes
-rw-r--r--scene/resources/default_theme/checked.pngbin363 -> 0 bytes
-rw-r--r--scene/resources/default_theme/checked.svg1
-rw-r--r--scene/resources/default_theme/checked_disabled.pngbin421 -> 0 bytes
-rw-r--r--scene/resources/default_theme/checked_disabled.svg1
-rw-r--r--scene/resources/default_theme/checker_bg.pngbin77 -> 0 bytes
-rw-r--r--scene/resources/default_theme/close.pngbin155 -> 0 bytes
-rw-r--r--scene/resources/default_theme/close.svg1
-rw-r--r--scene/resources/default_theme/close_hl.pngbin155 -> 0 bytes
-rw-r--r--scene/resources/default_theme/close_hl.svg1
-rw-r--r--scene/resources/default_theme/color_picker_bar_arrow.svg1
-rw-r--r--scene/resources/default_theme/color_picker_cursor.svg1
-rw-r--r--scene/resources/default_theme/color_picker_hue.pngbin141 -> 0 bytes
-rw-r--r--scene/resources/default_theme/color_picker_hue.svg1
-rw-r--r--scene/resources/default_theme/color_picker_overbright.svg1
-rw-r--r--scene/resources/default_theme/color_picker_pipette.svg1
-rw-r--r--scene/resources/default_theme/color_picker_sample.pngbin117 -> 0 bytes
-rw-r--r--scene/resources/default_theme/color_picker_sample.svg1
-rw-r--r--scene/resources/default_theme/default_theme.cpp770
-rw-r--r--scene/resources/default_theme/default_theme.h4
-rw-r--r--scene/resources/default_theme/default_theme_icons_builders.py78
-rw-r--r--scene/resources/default_theme/dialog_bg.pngbin1314 -> 0 bytes
-rw-r--r--scene/resources/default_theme/dropdown.pngbin133 -> 0 bytes
-rw-r--r--scene/resources/default_theme/ellipsis.pngbin193 -> 0 bytes
-rw-r--r--scene/resources/default_theme/error_icon.pngbin106 -> 0 bytes
-rw-r--r--scene/resources/default_theme/error_icon.svg1
-rw-r--r--scene/resources/default_theme/error_icon.xpm38
-rw-r--r--scene/resources/default_theme/file.svg1
-rw-r--r--scene/resources/default_theme/focus.pngbin200 -> 0 bytes
-rw-r--r--scene/resources/default_theme/folder.svg1
-rw-r--r--scene/resources/default_theme/folder_up.svg1
-rw-r--r--scene/resources/default_theme/graph_node.pngbin762 -> 0 bytes
-rw-r--r--scene/resources/default_theme/graph_node_breakpoint.pngbin140 -> 0 bytes
-rw-r--r--scene/resources/default_theme/graph_node_close.pngbin152 -> 0 bytes
-rw-r--r--scene/resources/default_theme/graph_node_comment.pngbin382 -> 0 bytes
-rw-r--r--scene/resources/default_theme/graph_node_comment_focus.pngbin373 -> 0 bytes
-rw-r--r--scene/resources/default_theme/graph_node_default.pngbin205 -> 0 bytes
-rw-r--r--scene/resources/default_theme/graph_node_default_focus.pngbin195 -> 0 bytes
-rw-r--r--scene/resources/default_theme/graph_node_position.pngbin140 -> 0 bytes
-rw-r--r--scene/resources/default_theme/graph_node_selected.pngbin827 -> 0 bytes
-rw-r--r--scene/resources/default_theme/graph_port.pngbin167 -> 0 bytes
-rw-r--r--scene/resources/default_theme/graph_port.svg1
-rw-r--r--scene/resources/default_theme/grid_layout.svg1
-rw-r--r--scene/resources/default_theme/grid_minimap.svg1
-rw-r--r--scene/resources/default_theme/grid_snap.svg1
-rw-r--r--scene/resources/default_theme/hseparator.pngbin112 -> 0 bytes
-rw-r--r--scene/resources/default_theme/hslider_bg.pngbin263 -> 0 bytes
-rw-r--r--scene/resources/default_theme/hslider_grabber.pngbin300 -> 0 bytes
-rw-r--r--scene/resources/default_theme/hslider_grabber_disabled.pngbin288 -> 0 bytes
-rw-r--r--scene/resources/default_theme/hslider_grabber_hl.pngbin450 -> 0 bytes
-rw-r--r--scene/resources/default_theme/hslider_tick.pngbin149 -> 0 bytes
-rw-r--r--scene/resources/default_theme/hslider_tick.svg1
-rw-r--r--scene/resources/default_theme/hsplit_bg.pngbin85 -> 0 bytes
-rw-r--r--scene/resources/default_theme/hsplitter.pngbin97 -> 0 bytes
-rw-r--r--scene/resources/default_theme/hsplitter.svg1
-rw-r--r--scene/resources/default_theme/icon_add.pngbin86 -> 0 bytes
-rw-r--r--scene/resources/default_theme/icon_close.pngbin155 -> 0 bytes
-rw-r--r--scene/resources/default_theme/icon_color_pick.pngbin227 -> 0 bytes
-rw-r--r--scene/resources/default_theme/icon_file.pngbin183 -> 0 bytes
-rw-r--r--scene/resources/default_theme/icon_folder.pngbin103 -> 0 bytes
-rw-r--r--scene/resources/default_theme/icon_grid_layout.pngbin2170 -> 0 bytes
-rw-r--r--scene/resources/default_theme/icon_grid_minimap.pngbin640 -> 0 bytes
-rw-r--r--scene/resources/default_theme/icon_parent_folder.pngbin161 -> 0 bytes
-rw-r--r--scene/resources/default_theme/icon_reload.pngbin234 -> 0 bytes
-rw-r--r--scene/resources/default_theme/icon_snap_grid.pngbin226 -> 0 bytes
-rw-r--r--scene/resources/default_theme/icon_visibility.pngbin448 -> 0 bytes
-rw-r--r--scene/resources/default_theme/icon_zoom_less.pngbin76 -> 0 bytes
-rw-r--r--scene/resources/default_theme/icon_zoom_more.pngbin85 -> 0 bytes
-rw-r--r--scene/resources/default_theme/icon_zoom_reset.pngbin108 -> 0 bytes
-rw-r--r--scene/resources/default_theme/indeterminate.pngbin242 -> 0 bytes
-rw-r--r--scene/resources/default_theme/indeterminate.svg1
-rw-r--r--scene/resources/default_theme/line_edit.pngbin176 -> 0 bytes
-rw-r--r--scene/resources/default_theme/line_edit_clear.pngbin158 -> 0 bytes
-rw-r--r--scene/resources/default_theme/line_edit_clear.svg1
-rw-r--r--scene/resources/default_theme/line_edit_disabled.pngbin135 -> 0 bytes
-rwxr-xr-xscene/resources/default_theme/make_header.py73
-rw-r--r--scene/resources/default_theme/mini_checkerboard.pngbin80 -> 0 bytes
-rw-r--r--scene/resources/default_theme/mini_checkerboard.svg1
-rw-r--r--scene/resources/default_theme/option_arrow.pngbin119 -> 0 bytes
-rw-r--r--scene/resources/default_theme/option_button_arrow.svg1
-rw-r--r--scene/resources/default_theme/option_button_disabled.pngbin656 -> 0 bytes
-rw-r--r--scene/resources/default_theme/option_button_disabled_mirrored.pngbin704 -> 0 bytes
-rw-r--r--scene/resources/default_theme/option_button_hover.pngbin667 -> 0 bytes
-rw-r--r--scene/resources/default_theme/option_button_hover_mirrored.pngbin728 -> 0 bytes
-rw-r--r--scene/resources/default_theme/option_button_normal.pngbin668 -> 0 bytes
-rw-r--r--scene/resources/default_theme/option_button_normal_mirrored.pngbin726 -> 0 bytes
-rw-r--r--scene/resources/default_theme/option_button_pressed.pngbin677 -> 0 bytes
-rw-r--r--scene/resources/default_theme/option_button_pressed_mirrored.pngbin736 -> 0 bytes
-rw-r--r--scene/resources/default_theme/overbright_indicator.pngbin210 -> 0 bytes
-rw-r--r--scene/resources/default_theme/panel_bg.pngbin85 -> 0 bytes
-rw-r--r--scene/resources/default_theme/picker_cursor.pngbin300 -> 0 bytes
-rw-r--r--scene/resources/default_theme/popup_bg.pngbin410 -> 0 bytes
-rw-r--r--scene/resources/default_theme/popup_bg_disabled.pngbin362 -> 0 bytes
-rw-r--r--scene/resources/default_theme/popup_window.pngbin921 -> 0 bytes
-rw-r--r--scene/resources/default_theme/progress_bar.pngbin194 -> 0 bytes
-rw-r--r--scene/resources/default_theme/progress_fill.pngbin112 -> 0 bytes
-rw-r--r--scene/resources/default_theme/radio_checked.pngbin257 -> 0 bytes
-rw-r--r--scene/resources/default_theme/radio_checked.svg1
-rw-r--r--scene/resources/default_theme/radio_checked_disabled.pngbin235 -> 0 bytes
-rw-r--r--scene/resources/default_theme/radio_checked_disabled.svg1
-rw-r--r--scene/resources/default_theme/radio_unchecked.pngbin207 -> 0 bytes
-rw-r--r--scene/resources/default_theme/radio_unchecked.svg1
-rw-r--r--scene/resources/default_theme/radio_unchecked_disabled.pngbin183 -> 0 bytes
-rw-r--r--scene/resources/default_theme/radio_unchecked_disabled.svg1
-rw-r--r--scene/resources/default_theme/reload.svg1
-rw-r--r--scene/resources/default_theme/resizer_nw.svg1
-rw-r--r--scene/resources/default_theme/resizer_se.svg1
-rw-r--r--scene/resources/default_theme/scroll_bg.pngbin252 -> 0 bytes
-rw-r--r--scene/resources/default_theme/scroll_button_left.pngbin196 -> 0 bytes
-rw-r--r--scene/resources/default_theme/scroll_button_left.svg1
-rw-r--r--scene/resources/default_theme/scroll_button_left_hl.pngbin200 -> 0 bytes
-rw-r--r--scene/resources/default_theme/scroll_button_left_hl.svg1
-rw-r--r--scene/resources/default_theme/scroll_button_right.pngbin198 -> 0 bytes
-rw-r--r--scene/resources/default_theme/scroll_button_right.svg1
-rw-r--r--scene/resources/default_theme/scroll_button_right_hl.pngbin210 -> 0 bytes
-rw-r--r--scene/resources/default_theme/scroll_button_right_hl.svg1
-rw-r--r--scene/resources/default_theme/scroll_grabber.pngbin264 -> 0 bytes
-rw-r--r--scene/resources/default_theme/scroll_grabber_hl.pngbin275 -> 0 bytes
-rw-r--r--scene/resources/default_theme/scroll_grabber_pressed.pngbin104 -> 0 bytes
-rw-r--r--scene/resources/default_theme/selection.pngbin195 -> 0 bytes
-rw-r--r--scene/resources/default_theme/selection_oof.pngbin196 -> 0 bytes
-rw-r--r--scene/resources/default_theme/slider_grabber.svg1
-rw-r--r--scene/resources/default_theme/slider_grabber_disabled.svg1
-rw-r--r--scene/resources/default_theme/slider_grabber_hl.svg1
-rw-r--r--scene/resources/default_theme/space.pngbin99 -> 0 bytes
-rw-r--r--scene/resources/default_theme/spinbox_updown.pngbin146 -> 0 bytes
-rw-r--r--scene/resources/default_theme/submenu.pngbin103 -> 0 bytes
-rw-r--r--scene/resources/default_theme/submenu_mirrored.pngbin157 -> 0 bytes
-rw-r--r--scene/resources/default_theme/tab.pngbin82 -> 0 bytes
-rw-r--r--scene/resources/default_theme/tab_behind.pngbin282 -> 0 bytes
-rw-r--r--scene/resources/default_theme/tab_close.pngbin158 -> 0 bytes
-rw-r--r--scene/resources/default_theme/tab_container_bg.pngbin336 -> 0 bytes
-rw-r--r--scene/resources/default_theme/tab_current.pngbin754 -> 0 bytes
-rw-r--r--scene/resources/default_theme/tab_disabled.pngbin258 -> 0 bytes
-rw-r--r--scene/resources/default_theme/tab_menu.pngbin111 -> 0 bytes
-rw-r--r--scene/resources/default_theme/tab_menu_hl.pngbin111 -> 0 bytes
-rw-r--r--scene/resources/default_theme/tabs_menu.svg1
-rw-r--r--scene/resources/default_theme/tabs_menu_hl.svg1
-rw-r--r--scene/resources/default_theme/text_edit_ellipsis.svg1
-rw-r--r--scene/resources/default_theme/text_edit_space.svg1
-rw-r--r--scene/resources/default_theme/text_edit_tab.svg1
-rw-r--r--scene/resources/default_theme/theme_data.h517
-rw-r--r--scene/resources/default_theme/toggle_off.pngbin1077 -> 0 bytes
-rw-r--r--scene/resources/default_theme/toggle_off.svg1
-rw-r--r--scene/resources/default_theme/toggle_off_disabled.pngbin932 -> 0 bytes
-rw-r--r--scene/resources/default_theme/toggle_off_disabled.svg1
-rw-r--r--scene/resources/default_theme/toggle_off_disabled_mirrored.pngbin535 -> 0 bytes
-rw-r--r--scene/resources/default_theme/toggle_off_disabled_mirrored.svg1
-rw-r--r--scene/resources/default_theme/toggle_off_mirrored.pngbin1169 -> 0 bytes
-rw-r--r--scene/resources/default_theme/toggle_off_mirrored.svg1
-rw-r--r--scene/resources/default_theme/toggle_on.pngbin1034 -> 0 bytes
-rw-r--r--scene/resources/default_theme/toggle_on.svg1
-rw-r--r--scene/resources/default_theme/toggle_on_disabled.pngbin1039 -> 0 bytes
-rw-r--r--scene/resources/default_theme/toggle_on_disabled.svg1
-rw-r--r--scene/resources/default_theme/toggle_on_disabled_mirrored.pngbin496 -> 0 bytes
-rw-r--r--scene/resources/default_theme/toggle_on_disabled_mirrored.svg1
-rw-r--r--scene/resources/default_theme/toggle_on_mirrored.pngbin1133 -> 0 bytes
-rw-r--r--scene/resources/default_theme/toggle_on_mirrored.svg1
-rw-r--r--scene/resources/default_theme/tooltip_bg.pngbin198 -> 0 bytes
-rw-r--r--scene/resources/default_theme/tree_bg.pngbin176 -> 0 bytes
-rw-r--r--scene/resources/default_theme/tree_bg_disabled.pngbin135 -> 0 bytes
-rw-r--r--scene/resources/default_theme/tree_title.pngbin86 -> 0 bytes
-rw-r--r--scene/resources/default_theme/tree_title_pressed.pngbin86 -> 0 bytes
-rw-r--r--scene/resources/default_theme/unchecked.pngbin222 -> 0 bytes
-rw-r--r--scene/resources/default_theme/unchecked.svg1
-rw-r--r--scene/resources/default_theme/unchecked_disabled.pngbin246 -> 0 bytes
-rw-r--r--scene/resources/default_theme/unchecked_disabled.svg1
-rw-r--r--scene/resources/default_theme/updown.pngbin144 -> 0 bytes
-rw-r--r--scene/resources/default_theme/updown.svg1
-rw-r--r--scene/resources/default_theme/visibility_visible.svg1
-rw-r--r--scene/resources/default_theme/vseparator.pngbin108 -> 0 bytes
-rw-r--r--scene/resources/default_theme/vslider_bg.pngbin276 -> 0 bytes
-rw-r--r--scene/resources/default_theme/vslider_grabber.pngbin245 -> 0 bytes
-rw-r--r--scene/resources/default_theme/vslider_grabber_disabled.pngbin237 -> 0 bytes
-rw-r--r--scene/resources/default_theme/vslider_grabber_hl.pngbin261 -> 0 bytes
-rw-r--r--scene/resources/default_theme/vslider_tick.pngbin145 -> 0 bytes
-rw-r--r--scene/resources/default_theme/vslider_tick.svg1
-rw-r--r--scene/resources/default_theme/vsplit_bg.pngbin85 -> 0 bytes
-rw-r--r--scene/resources/default_theme/vsplitter.pngbin95 -> 0 bytes
-rw-r--r--scene/resources/default_theme/vsplitter.svg1
-rw-r--r--scene/resources/default_theme/window_resizer.pngbin87 -> 0 bytes
-rw-r--r--scene/resources/default_theme/window_resizer_mirrored.pngbin109 -> 0 bytes
-rw-r--r--scene/resources/default_theme/zoom_less.svg1
-rw-r--r--scene/resources/default_theme/zoom_more.svg1
-rw-r--r--scene/resources/default_theme/zoom_reset.svg1
-rw-r--r--scene/resources/environment.cpp22
-rw-r--r--scene/resources/environment.h13
-rw-r--r--scene/resources/font.cpp759
-rw-r--r--scene/resources/font.h9
-rw-r--r--scene/resources/packed_scene.cpp14
-rw-r--r--servers/display_server.cpp22
-rw-r--r--servers/display_server.h6
-rw-r--r--servers/rendering/rasterizer_dummy.h2
-rw-r--r--servers/rendering/renderer_canvas_cull.cpp2
-rw-r--r--servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp1
-rw-r--r--servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.h1
-rw-r--r--servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp1
-rw-r--r--servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.h1
-rw-r--r--servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp9
-rw-r--r--servers/rendering/renderer_rd/renderer_canvas_render_rd.h1
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_environment_rd.cpp2
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_environment_rd.h4
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp10
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_gi_rd.h2
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_render_rd.cpp8
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_render_rd.h3
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_sky_rd.cpp1
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_sky_rd.h1
-rw-r--r--servers/rendering/renderer_rd/renderer_storage_rd.cpp20
-rw-r--r--servers/rendering/renderer_rd/renderer_storage_rd.h5
-rw-r--r--servers/rendering/renderer_scene.h2
-rw-r--r--servers/rendering/renderer_scene_cull.h2
-rw-r--r--servers/rendering/renderer_scene_render.h2
-rw-r--r--servers/rendering/rendering_device.h2
-rw-r--r--servers/rendering/rendering_server_default.h2
-rw-r--r--servers/rendering/shader_compiler.cpp95
-rw-r--r--servers/rendering/shader_language.cpp763
-rw-r--r--servers/rendering/shader_language.h49
-rw-r--r--servers/rendering/shader_warnings.cpp16
-rw-r--r--servers/rendering_server.cpp4
-rw-r--r--servers/rendering_server.h9
-rw-r--r--servers/text/text_server_extension.cpp19
-rw-r--r--servers/text/text_server_extension.h5
-rw-r--r--servers/text_server.cpp4
-rw-r--r--servers/text_server.h7
-rw-r--r--servers/xr/xr_pose.cpp16
-rw-r--r--servers/xr/xr_pose.h13
-rw-r--r--servers/xr/xr_positional_tracker.cpp5
-rw-r--r--servers/xr/xr_positional_tracker.h2
-rw-r--r--tests/core/math/test_vector2.h19
-rw-r--r--tests/core/math/test_vector3.h19
-rw-r--r--tests/core/string/test_string.h8
-rw-r--r--tests/core/templates/test_vector.h25
-rw-r--r--tests/core/variant/test_array.h35
-rw-r--r--tests/scene/test_code_edit.h2
-rw-r--r--tests/servers/test_shader_lang.cpp3
-rw-r--r--tests/test_main.cpp2
-rw-r--r--thirdparty/README.md2
-rw-r--r--thirdparty/thorvg/patches/thorvg-pr1159-mingw-fix.patch73
-rw-r--r--thirdparty/thorvg/patches/thorvg-pr1166-vs2017-minmax.patch49
-rw-r--r--thirdparty/thorvg/src/lib/sw_engine/tvgSwRenderer.cpp9
-rw-r--r--thirdparty/thorvg/src/lib/tvgMath.h6
-rw-r--r--thirdparty/thorvg/src/loaders/svg/tvgSvgLoader.cpp1
-rw-r--r--thirdparty/thorvg/src/loaders/svg/tvgSvgPath.cpp1
-rw-r--r--thirdparty/thorvg/src/loaders/svg/tvgSvgSceneBuilder.cpp1
-rw-r--r--thirdparty/thorvg/src/loaders/svg/tvgSvgUtil.cpp1
-rw-r--r--thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp1
-rw-r--r--thirdparty/thorvg/src/savers/tvg/tvgTvgSaver.cpp2
488 files changed, 10775 insertions, 5441 deletions
diff --git a/core/config/engine.cpp b/core/config/engine.cpp
index 0a13becf6d..d9abf5e5e9 100644
--- a/core/config/engine.cpp
+++ b/core/config/engine.cpp
@@ -186,6 +186,10 @@ bool Engine::is_abort_on_gpu_errors_enabled() const {
return abort_on_gpu_errors;
}
+int32_t Engine::get_gpu_index() const {
+ return gpu_idx;
+}
+
bool Engine::is_validation_layers_enabled() const {
return use_validation_layers;
}
diff --git a/core/config/engine.h b/core/config/engine.h
index 3ec522eafc..65ca58ba1a 100644
--- a/core/config/engine.h
+++ b/core/config/engine.h
@@ -63,6 +63,7 @@ private:
double _physics_interpolation_fraction = 0.0f;
bool abort_on_gpu_errors = false;
bool use_validation_layers = false;
+ int32_t gpu_idx = -1;
uint64_t _process_frames = 0;
bool _in_physics = false;
@@ -135,6 +136,7 @@ public:
bool is_abort_on_gpu_errors_enabled() const;
bool is_validation_layers_enabled() const;
+ int32_t get_gpu_index() const;
Engine();
virtual ~Engine() {}
diff --git a/core/core_bind.cpp b/core/core_bind.cpp
index ef28f43f05..8d03f35617 100644
--- a/core/core_bind.cpp
+++ b/core/core_bind.cpp
@@ -224,14 +224,14 @@ Error OS::shell_open(String p_uri) {
return ::OS::get_singleton()->shell_open(p_uri);
}
-int OS::execute(const String &p_path, const Vector<String> &p_arguments, Array r_output, bool p_read_stderr) {
+int OS::execute(const String &p_path, const Vector<String> &p_arguments, Array r_output, bool p_read_stderr, bool p_open_console) {
List<String> args;
for (int i = 0; i < p_arguments.size(); i++) {
args.push_back(p_arguments[i]);
}
String pipe;
int exitcode = 0;
- Error err = ::OS::get_singleton()->execute(p_path, args, &pipe, &exitcode, p_read_stderr);
+ Error err = ::OS::get_singleton()->execute(p_path, args, &pipe, &exitcode, p_read_stderr, nullptr, p_open_console);
r_output.push_back(pipe);
if (err != OK) {
return -1;
@@ -252,13 +252,13 @@ int OS::create_instance(const Vector<String> &p_arguments) {
return pid;
}
-int OS::create_process(const String &p_path, const Vector<String> &p_arguments) {
+int OS::create_process(const String &p_path, const Vector<String> &p_arguments, bool p_open_console) {
List<String> args;
for (int i = 0; i < p_arguments.size(); i++) {
args.push_back(p_arguments[i]);
}
::OS::ProcessID pid = 0;
- Error err = ::OS::get_singleton()->create_process(p_path, args, &pid);
+ Error err = ::OS::get_singleton()->create_process(p_path, args, &pid, p_open_console);
if (err != OK) {
return -1;
}
@@ -557,8 +557,8 @@ void OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_processor_count"), &OS::get_processor_count);
ClassDB::bind_method(D_METHOD("get_executable_path"), &OS::get_executable_path);
- ClassDB::bind_method(D_METHOD("execute", "path", "arguments", "output", "read_stderr"), &OS::execute, DEFVAL(Array()), DEFVAL(false));
- ClassDB::bind_method(D_METHOD("create_process", "path", "arguments"), &OS::create_process);
+ ClassDB::bind_method(D_METHOD("execute", "path", "arguments", "output", "read_stderr", "open_console"), &OS::execute, DEFVAL(Array()), DEFVAL(false), DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("create_process", "path", "arguments", "open_console"), &OS::create_process, DEFVAL(false));
ClassDB::bind_method(D_METHOD("create_instance", "arguments"), &OS::create_instance);
ClassDB::bind_method(D_METHOD("kill", "pid"), &OS::kill);
ClassDB::bind_method(D_METHOD("shell_open", "uri"), &OS::shell_open);
@@ -623,7 +623,6 @@ void OS::_bind_methods() {
// Those default values need to be specified for the docs generator,
// to avoid using values from the documentation writer's own OS instance.
- ADD_PROPERTY_DEFAULT("exit_code", 0);
ADD_PROPERTY_DEFAULT("low_processor_usage_mode", false);
ADD_PROPERTY_DEFAULT("low_processor_usage_mode_sleep_usec", 6900);
diff --git a/core/core_bind.h b/core/core_bind.h
index c7a406b2f3..ac0e92a87a 100644
--- a/core/core_bind.h
+++ b/core/core_bind.h
@@ -164,8 +164,8 @@ public:
void crash(const String &p_message);
String get_executable_path() const;
- int execute(const String &p_path, const Vector<String> &p_arguments, Array r_output = Array(), bool p_read_stderr = false);
- int create_process(const String &p_path, const Vector<String> &p_arguments);
+ int execute(const String &p_path, const Vector<String> &p_arguments, Array r_output = Array(), bool p_read_stderr = false, bool p_open_console = false);
+ int create_process(const String &p_path, const Vector<String> &p_arguments, bool p_open_console = false);
int create_instance(const Vector<String> &p_arguments);
Error kill(int p_pid);
Error shell_open(String p_uri);
diff --git a/core/core_constants.cpp b/core/core_constants.cpp
index 6f26288eb7..2f5fd05e6a 100644
--- a/core/core_constants.cpp
+++ b/core/core_constants.cpp
@@ -584,6 +584,7 @@ void register_global_constants() {
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_INT_IS_OBJECTID);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_INT_IS_POINTER);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_ARRAY_TYPE);
+ BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_LOCALE_ID);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_MAX);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_NONE);
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp
index 8fe1ac29b3..3e1c9d2e4a 100644
--- a/core/io/resource_loader.cpp
+++ b/core/io/resource_loader.cpp
@@ -806,38 +806,26 @@ String ResourceLoader::_path_remap(const String &p_path, bool *r_translation_rem
// To find the path of the remapped resource, we extract the locale name after
// the last ':' to match the project locale.
- // We also fall back in case of regional locales as done in TranslationServer::translate
- // (e.g. 'ru_RU' -> 'ru' if the former has no specific mapping).
String locale = TranslationServer::get_singleton()->get_locale();
ERR_FAIL_COND_V_MSG(locale.length() < 2, p_path, "Could not remap path '" + p_path + "' for translation as configured locale '" + locale + "' is invalid.");
- String lang = TranslationServer::get_language_code(locale);
Vector<String> &res_remaps = *translation_remaps.getptr(new_path);
- bool near_match = false;
+ int best_score = 0;
for (int i = 0; i < res_remaps.size(); i++) {
int split = res_remaps[i].rfind(":");
if (split == -1) {
continue;
}
-
String l = res_remaps[i].substr(split + 1).strip_edges();
- if (l == locale) { // Exact match.
- new_path = res_remaps[i].left(split);
- break;
- } else if (near_match) {
- continue; // Already found near match, keep going for potential exact match.
- }
-
- // No exact match (e.g. locale 'ru_RU' but remap is 'ru'), let's look further
- // for a near match (same language code, i.e. first 2 or 3 letters before
- // regional code, if included).
- if (TranslationServer::get_language_code(l) == lang) {
- // Language code matches, that's a near match. Keep looking for exact match.
- near_match = true;
+ int score = TranslationServer::get_singleton()->compare_locales(locale, l);
+ if (score > best_score) {
new_path = res_remaps[i].left(split);
- continue;
+ best_score = score;
+ if (score == 10) {
+ break; // Exact match, skip the rest.
+ }
}
}
diff --git a/core/object/object.h b/core/object/object.h
index 602bd3cda1..63130a1aef 100644
--- a/core/object/object.h
+++ b/core/object/object.h
@@ -94,6 +94,7 @@ enum PropertyHint {
PROPERTY_HINT_INT_IS_OBJECTID,
PROPERTY_HINT_ARRAY_TYPE,
PROPERTY_HINT_INT_IS_POINTER,
+ PROPERTY_HINT_LOCALE_ID,
PROPERTY_HINT_MAX,
// When updating PropertyHint, also sync the hardcoded list in VisualScriptEditorVariableEdit
};
diff --git a/core/os/os.h b/core/os/os.h
index b4ad2c7345..36d85da70b 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -149,8 +149,8 @@ public:
virtual int get_low_processor_usage_mode_sleep_usec() const;
virtual String get_executable_path() const;
- virtual Error execute(const String &p_path, const List<String> &p_arguments, String *r_pipe = nullptr, int *r_exitcode = nullptr, bool read_stderr = false, Mutex *p_pipe_mutex = nullptr) = 0;
- virtual Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr) = 0;
+ virtual Error execute(const String &p_path, const List<String> &p_arguments, String *r_pipe = nullptr, int *r_exitcode = nullptr, bool read_stderr = false, Mutex *p_pipe_mutex = nullptr, bool p_open_console = false) = 0;
+ virtual Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr, bool p_open_console = false) = 0;
virtual Error create_instance(const List<String> &p_arguments, ProcessID *r_child_id = nullptr) { return create_process(get_executable_path(), p_arguments, r_child_id); };
virtual Error kill(const ProcessID &p_pid) = 0;
virtual int get_process_id() const;
@@ -295,6 +295,9 @@ public:
virtual void debug_break();
virtual int get_exit_code() const;
+ // `set_exit_code` should only be used from `SceneTree` (or from a similar
+ // level, e.g. from the `Main::start` if leaving without creating a `SceneTree`).
+ // For other components, `SceneTree.quit()` should be used instead.
virtual void set_exit_code(int p_code);
virtual int get_processor_count() const;
diff --git a/core/string/locales.h b/core/string/locales.h
new file mode 100644
index 0000000000..9ef6dee5ac
--- /dev/null
+++ b/core/string/locales.h
@@ -0,0 +1,1196 @@
+/*************************************************************************/
+/* locales.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 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 LOCALES_H
+#define LOCALES_H
+
+// Windows has some weird locale identifiers which do not honor the ISO 639-1
+// standardized nomenclature. Whenever those don't conflict with existing ISO
+// identifiers, we override them.
+//
+// Reference:
+// - https://msdn.microsoft.com/en-us/library/windows/desktop/ms693062(v=vs.85).aspx
+
+static const char *locale_renames[][2] = {
+ { "in", "id" }, // Indonesian
+ { "iw", "he" }, // Hebrew
+ { "no", "nb" }, // Norwegian Bokmål
+ { nullptr, nullptr }
+};
+
+// Additional script information to preferred scripts.
+// Language code, script code, default country, supported countries.
+// Reference:
+// - https://lh.2xlibre.net/locales/
+// - https://www.localeplanet.com/icu/index.html
+// - https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/70feba9f-294e-491e-b6eb-56532684c37f
+
+static const char *locale_scripts[][4] = {
+ { "az", "Latn", "", "AZ" },
+ { "az", "Arab", "", "IR" },
+ { "bs", "Latn", "", "BA" },
+ { "ff", "Latn", "", "BF,CM,GH,GM,GN,GW,LR,MR,NE,NG,SL,SN" },
+ { "pa", "Arab", "PK", "PK" },
+ { "pa", "Guru", "IN", "IN" },
+ { "sd", "Arab", "PK", "PK" },
+ { "sd", "Deva", "IN", "IN" },
+ { "shi", "Tfng", "", "MA" },
+ { "sr", "Cyrl", "", "BA,RS,XK" },
+ { "sr", "Latn", "", "ME" },
+ { "uz", "Latn", "", "UZ" },
+ { "uz", "Arab", "AF", "AF" },
+ { "vai", "Vaii", "", "LR" },
+ { "yue", "Hans", "CN", "CN" },
+ { "yue", "Hant", "HK", "HK" },
+ { "zh", "Hans", "CN", "CN,SG" },
+ { "zh", "Hant", "TW", "HK,MO,TW" },
+ { nullptr, nullptr, nullptr, nullptr }
+};
+
+// Additional mapping for outdated, temporary or exceptionally reserved country codes.
+// Reference:
+// - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
+// - https://www.iso.org/obp/ui/#search/code/
+
+static const char *country_renames[][2] = {
+ { "BU", "MM" }, // Burma, name changed to Myanmar.
+ { "KV", "XK" }, // Kosovo (temporary FIPS code to European Commission code), no official ISO code assigned.
+ { "TP", "TL" }, // East Timor, name changed to Timor-Leste.
+ { "UK", "GB" }, // United Kingdom, exceptionally reserved code.
+ { nullptr, nullptr }
+};
+
+// Country code, country name.
+// Reference:
+// - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
+// - https://www.iso.org/obp/ui/#search/code/
+
+static const char *country_names[][2] = {
+ { "AC", "Ascension Island" }, // Exceptionally reserved.
+ { "AD", "Andorra" },
+ { "AE", "United Arab Emirates" },
+ { "AF", "Afghanistan" },
+ { "AG", "Antigua and Barbuda" },
+ { "AI", "Anguilla" },
+ { "AL", "Albania" },
+ { "AM", "Armenia" },
+ { "AN", "Netherlands Antilles" }, // Transitionally reserved, divided into BQ, CW and SX.
+ { "AO", "Angola" },
+ { "AQ", "Antarctica" },
+ { "AR", "Argentina" },
+ { "AS", "American Samoa" },
+ { "AT", "Austria" },
+ { "AU", "Australia" },
+ { "AW", "Aruba" },
+ { "AX", "Åland Islands" },
+ { "AZ", "Azerbaijan" },
+ { "BA", "Bosnia and Herzegovina" },
+ { "BB", "Barbados" },
+ { "BD", "Bangladesh" },
+ { "BE", "Belgium" },
+ { "BF", "Burkina Faso" },
+ { "BG", "Bulgaria" },
+ { "BH", "Bahrain" },
+ { "BI", "Burundi" },
+ { "BJ", "Benin" },
+ { "BL", "St. Barthélemy" },
+ { "BM", "Bermuda" },
+ { "BN", "Brunei" },
+ { "BO", "Bolivia" },
+ { "BQ", "Caribbean Netherlands" },
+ { "BR", "Brazil" },
+ { "BS", "Bahamas" },
+ { "BT", "Bhutan" },
+ { "BV", "Bouvet Island" },
+ { "BW", "Botswana" },
+ { "BY", "Belarus" },
+ { "BZ", "Belize" },
+ { "CA", "Canada" },
+ { "CC", "Cocos (Keeling) Islands" },
+ { "CD", "Congo - Kinshasa" },
+ { "CF", "Central African Republic" },
+ { "CG", "Congo - Brazzaville" },
+ { "CH", "Switzerland" },
+ { "CI", "Côte d'Ivoire" },
+ { "CK", "Cook Islands" },
+ { "CL", "Chile" },
+ { "CM", "Cameroon" },
+ { "CN", "China" },
+ { "CO", "Colombia" },
+ { "CP", "Clipperton Island" }, // Exceptionally reserved.
+ { "CR", "Costa Rica" },
+ { "CQ", "Island of Sark" }, // Exceptionally reserved.
+ { "CU", "Cuba" },
+ { "CV", "Cabo Verde" },
+ { "CW", "Curaçao" },
+ { "CX", "Christmas Island" },
+ { "CY", "Cyprus" },
+ { "CZ", "Czechia" },
+ { "DE", "Germany" },
+ { "DG", "Diego Garcia" }, // Exceptionally reserved.
+ { "DJ", "Djibouti" },
+ { "DK", "Denmark" },
+ { "DM", "Dominica" },
+ { "DO", "Dominican Republic" },
+ { "DZ", "Algeria" },
+ { "EA", "Ceuta and Melilla" }, // Exceptionally reserved.
+ { "EC", "Ecuador" },
+ { "EE", "Estonia" },
+ { "EG", "Egypt" },
+ { "EH", "Western Sahara" },
+ { "ER", "Eritrea" },
+ { "ES", "Spain" },
+ { "ET", "Ethiopia" },
+ { "EU", "European Union" }, // Exceptionally reserved.
+ { "EZ", "Eurozone" }, // Exceptionally reserved.
+ { "FI", "Finland" },
+ { "FJ", "Fiji" },
+ { "FK", "Falkland Islands" },
+ { "FM", "Micronesia" },
+ { "FO", "Faroe Islands" },
+ { "FR", "France" },
+ { "FX", "France, Metropolitan" }, // Exceptionally reserved.
+ { "GA", "Gabon" },
+ { "GB", "United Kingdom" },
+ { "GD", "Grenada" },
+ { "GE", "Georgia" },
+ { "GF", "French Guiana" },
+ { "GG", "Guernsey" },
+ { "GH", "Ghana" },
+ { "GI", "Gibraltar" },
+ { "GL", "Greenland" },
+ { "GM", "Gambia" },
+ { "GN", "Guinea" },
+ { "GP", "Guadeloupe" },
+ { "GQ", "Equatorial Guinea" },
+ { "GR", "Greece" },
+ { "GS", "South Georgia and South Sandwich Islands" },
+ { "GT", "Guatemala" },
+ { "GU", "Guam" },
+ { "GW", "Guinea-Bissau" },
+ { "GY", "Guyana" },
+ { "HK", "Hong Kong" },
+ { "HM", "Heard Island and McDonald Islands" },
+ { "HN", "Honduras" },
+ { "HR", "Croatia" },
+ { "HT", "Haiti" },
+ { "HU", "Hungary" },
+ { "IC", "Canary Islands" }, // Exceptionally reserved.
+ { "ID", "Indonesia" },
+ { "IE", "Ireland" },
+ { "IL", "Israel" },
+ { "IM", "Isle of Man" },
+ { "IN", "India" },
+ { "IO", "British Indian Ocean Territory" },
+ { "IQ", "Iraq" },
+ { "IR", "Iran" },
+ { "IS", "Iceland" },
+ { "IT", "Italy" },
+ { "JE", "Jersey" },
+ { "JM", "Jamaica" },
+ { "JO", "Jordan" },
+ { "JP", "Japan" },
+ { "KE", "Kenya" },
+ { "KG", "Kyrgyzstan" },
+ { "KH", "Cambodia" },
+ { "KI", "Kiribati" },
+ { "KM", "Comoros" },
+ { "KN", "St. Kitts and Nevis" },
+ { "KP", "North Korea" },
+ { "KR", "South Korea" },
+ { "KW", "Kuwait" },
+ { "KY", "Cayman Islands" },
+ { "KZ", "Kazakhstan" },
+ { "LA", "Laos" },
+ { "LB", "Lebanon" },
+ { "LC", "St. Lucia" },
+ { "LI", "Liechtenstein" },
+ { "LK", "Sri Lanka" },
+ { "LR", "Liberia" },
+ { "LS", "Lesotho" },
+ { "LT", "Lithuania" },
+ { "LU", "Luxembourg" },
+ { "LV", "Latvia" },
+ { "LY", "Libya" },
+ { "MA", "Morocco" },
+ { "MC", "Monaco" },
+ { "MD", "Moldova" },
+ { "ME", "Montenegro" },
+ { "MF", "St. Martin" },
+ { "MG", "Madagascar" },
+ { "MH", "Marshall Islands" },
+ { "MK", "North Macedonia" },
+ { "ML", "Mali" },
+ { "MM", "Myanmar" },
+ { "MN", "Mongolia" },
+ { "MO", "Macao" },
+ { "MP", "Northern Mariana Islands" },
+ { "MQ", "Martinique" },
+ { "MR", "Mauritania" },
+ { "MS", "Montserrat" },
+ { "MT", "Malta" },
+ { "MU", "Mauritius" },
+ { "MV", "Maldives" },
+ { "MW", "Malawi" },
+ { "MX", "Mexico" },
+ { "MY", "Malaysia" },
+ { "MZ", "Mozambique" },
+ { "NA", "Namibia" },
+ { "NC", "New Caledonia" },
+ { "NE", "Niger" },
+ { "NF", "Norfolk Island" },
+ { "NG", "Nigeria" },
+ { "NI", "Nicaragua" },
+ { "NL", "Netherlands" },
+ { "NO", "Norway" },
+ { "NP", "Nepal" },
+ { "NR", "Nauru" },
+ { "NU", "Niue" },
+ { "NZ", "New Zealand" },
+ { "OM", "Oman" },
+ { "PA", "Panama" },
+ { "PE", "Peru" },
+ { "PF", "French Polynesia" },
+ { "PG", "Papua New Guinea" },
+ { "PH", "Philippines" },
+ { "PK", "Pakistan" },
+ { "PL", "Poland" },
+ { "PM", "St. Pierre and Miquelon" },
+ { "PN", "Pitcairn Islands" },
+ { "PR", "Puerto Rico" },
+ { "PS", "Palestine" },
+ { "PT", "Portugal" },
+ { "PW", "Palau" },
+ { "PY", "Paraguay" },
+ { "QA", "Qatar" },
+ { "RE", "Réunion" },
+ { "RO", "Romania" },
+ { "RS", "Serbia" },
+ { "RU", "Russia" },
+ { "RW", "Rwanda" },
+ { "SA", "Saudi Arabia" },
+ { "SB", "Solomon Islands" },
+ { "SC", "Seychelles" },
+ { "SD", "Sudan" },
+ { "SE", "Sweden" },
+ { "SG", "Singapore" },
+ { "SH", "St. Helena, Ascension and Tristan da Cunha" },
+ { "SI", "Slovenia" },
+ { "SJ", "Svalbard and Jan Mayen" },
+ { "SK", "Slovakia" },
+ { "SL", "Sierra Leone" },
+ { "SM", "San Marino" },
+ { "SN", "Senegal" },
+ { "SO", "Somalia" },
+ { "SR", "Suriname" },
+ { "SS", "South Sudan" },
+ { "ST", "Sao Tome and Principe" },
+ { "SV", "El Salvador" },
+ { "SX", "Sint Maarten" },
+ { "SY", "Syria" },
+ { "SZ", "Eswatini" },
+ { "TA", "Tristan da Cunha" }, // Exceptionally reserved.
+ { "TC", "Turks and Caicos Islands" },
+ { "TD", "Chad" },
+ { "TF", "French Southern Territories" },
+ { "TG", "Togo" },
+ { "TH", "Thailand" },
+ { "TJ", "Tajikistan" },
+ { "TK", "Tokelau" },
+ { "TL", "Timor-Leste" },
+ { "TM", "Turkmenistan" },
+ { "TN", "Tunisia" },
+ { "TO", "Tonga" },
+ { "TR", "Turkey" },
+ { "TT", "Trinidad and Tobago" },
+ { "TV", "Tuvalu" },
+ { "TW", "Taiwan" },
+ { "TZ", "Tanzania" },
+ { "UA", "Ukraine" },
+ { "UG", "Uganda" },
+ { "UM", "U.S. Outlying Islands" },
+ { "US", "United States of America" },
+ { "UY", "Uruguay" },
+ { "UZ", "Uzbekistan" },
+ { "VA", "Holy See" },
+ { "VC", "St. Vincent and the Grenadines" },
+ { "VE", "Venezuela" },
+ { "VG", "British Virgin Islands" },
+ { "VI", "U.S. Virgin Islands" },
+ { "VN", "Viet Nam" },
+ { "VU", "Vanuatu" },
+ { "WF", "Wallis and Futuna" },
+ { "WS", "Samoa" },
+ { "XK", "Kosovo" }, // Temporary code, no official ISO code assigned.
+ { "YE", "Yemen" },
+ { "YT", "Mayotte" },
+ { "ZA", "South Africa" },
+ { "ZM", "Zambia" },
+ { "ZW", "Zimbabwe" },
+ { nullptr, nullptr }
+};
+
+// Languages code, language name.
+// Reference:
+// - https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
+// - https://www.localeplanet.com/icu/index.html
+// - https://lh.2xlibre.net/locales/
+
+static const char *language_list[][2] = {
+ { "aa", "Afar" },
+ { "ab", "Abkhazian" },
+ { "ace", "Achinese" },
+ { "ach", "Acoli" },
+ { "ada", "Adangme" },
+ { "ady", "Adyghe" },
+ { "ae", "Avestan" },
+ { "aeb", "Tunisian Arabic" },
+ { "af", "Afrikaans" },
+ { "afh", "Afrihili" },
+ { "agq", "Aghem" },
+ { "ain", "Ainu" },
+ { "agr", "Aguaruna" },
+ { "ak", "Akan" },
+ { "akk", "Akkadian" },
+ { "akz", "Alabama" },
+ { "ale", "Aleut" },
+ { "aln", "Gheg Albanian" },
+ { "alt", "Southern Altai" },
+ { "am", "Amharic" },
+ { "an", "Aragonese" },
+ { "ang", "Old English" },
+ { "anp", "Angika" },
+ { "ar", "Arabic" },
+ { "arc", "Aramaic" },
+ { "arn", "Mapudungun" },
+ { "aro", "Araona" },
+ { "arp", "Arapaho" },
+ { "arq", "Algerian Arabic" },
+ { "ars", "Najdi Arabic" },
+ { "arw", "Arawak" },
+ { "ary", "Moroccan Arabic" },
+ { "arz", "Egyptian Arabic" },
+ { "as", "Assamese" },
+ { "asa", "Asu" },
+ { "ase", "American Sign Language" },
+ { "ast", "Asturian" },
+ { "av", "Avaric" },
+ { "avk", "Kotava" },
+ { "awa", "Awadhi" },
+ { "ayc", "Southern Aymara" },
+ { "ay", "Aymara" },
+ { "az", "Azerbaijani" },
+ { "ba", "Bashkir" },
+ { "bal", "Baluchi" },
+ { "ban", "Balinese" },
+ { "bar", "Bavarian" },
+ { "bas", "Bassa" },
+ { "bax", "Bamun" },
+ { "bbc", "Batak Toba" },
+ { "bbj", "Ghomala" },
+ { "be", "Belarusian" },
+ { "bej", "Beja" },
+ { "bem", "Bemba" },
+ { "ber", "Berber" },
+ { "bew", "Betawi" },
+ { "bez", "Bena" },
+ { "bfd", "Bafut" },
+ { "bfq", "Badaga" },
+ { "bg", "Bulgarian" },
+ { "bhb", "Bhili" },
+ { "bgn", "Western Balochi" },
+ { "bho", "Bhojpuri" },
+ { "bi", "Bislama" },
+ { "bik", "Bikol" },
+ { "bin", "Bini" },
+ { "bjn", "Banjar" },
+ { "bkm", "Kom" },
+ { "bla", "Siksika" },
+ { "bm", "Bambara" },
+ { "bn", "Bengali" },
+ { "bo", "Tibetan" },
+ { "bpy", "Bishnupriya" },
+ { "bqi", "Bakhtiari" },
+ { "br", "Breton" },
+ { "brh", "Brahui" },
+ { "brx", "Bodo" },
+ { "bs", "Bosnian" },
+ { "bss", "Akoose" },
+ { "bua", "Buriat" },
+ { "bug", "Buginese" },
+ { "bum", "Bulu" },
+ { "byn", "Bilin" },
+ { "byv", "Medumba" },
+ { "ca", "Catalan" },
+ { "cad", "Caddo" },
+ { "car", "Carib" },
+ { "cay", "Cayuga" },
+ { "cch", "Atsam" },
+ { "ccp", "Chakma" },
+ { "ce", "Chechen" },
+ { "ceb", "Cebuano" },
+ { "cgg", "Chiga" },
+ { "ch", "Chamorro" },
+ { "chb", "Chibcha" },
+ { "chg", "Chagatai" },
+ { "chk", "Chuukese" },
+ { "chm", "Mari" },
+ { "chn", "Chinook Jargon" },
+ { "cho", "Choctaw" },
+ { "chp", "Chipewyan" },
+ { "chr", "Cherokee" },
+ { "chy", "Cheyenne" },
+ { "cic", "Chickasaw" },
+ { "ckb", "Central Kurdish" },
+ { "csb", "Kashubian" },
+ { "cmn", "Mandarin Chinese" },
+ { "co", "Corsican" },
+ { "cop", "Coptic" },
+ { "cps", "Capiznon" },
+ { "cr", "Cree" },
+ { "crh", "Crimean Tatar" },
+ { "crs", "Seselwa Creole French" },
+ { "cs", "Czech" },
+ { "csb", "Kashubian" },
+ { "cu", "Church Slavic" },
+ { "cv", "Chuvash" },
+ { "cy", "Welsh" },
+ { "da", "Danish" },
+ { "dak", "Dakota" },
+ { "dar", "Dargwa" },
+ { "dav", "Taita" },
+ { "de", "German" },
+ { "del", "Delaware" },
+ { "den", "Slave" },
+ { "dgr", "Dogrib" },
+ { "din", "Dinka" },
+ { "dje", "Zarma" },
+ { "doi", "Dogri" },
+ { "dsb", "Lower Sorbian" },
+ { "dtp", "Central Dusun" },
+ { "dua", "Duala" },
+ { "dum", "Middle Dutch" },
+ { "dv", "Dhivehi" },
+ { "dyo", "Jola-Fonyi" },
+ { "dyu", "Dyula" },
+ { "dz", "Dzongkha" },
+ { "dzg", "Dazaga" },
+ { "ebu", "Embu" },
+ { "ee", "Ewe" },
+ { "efi", "Efik" },
+ { "egl", "Emilian" },
+ { "egy", "Ancient Egyptian" },
+ { "eka", "Ekajuk" },
+ { "el", "Greek" },
+ { "elx", "Elamite" },
+ { "en", "English" },
+ { "enm", "Middle English" },
+ { "eo", "Esperanto" },
+ { "es", "Spanish" },
+ { "esu", "Central Yupik" },
+ { "et", "Estonian" },
+ { "eu", "Basque" },
+ { "ewo", "Ewondo" },
+ { "ext", "Extremaduran" },
+ { "fa", "Persian" },
+ { "fan", "Fang" },
+ { "fat", "Fanti" },
+ { "ff", "Fulah" },
+ { "fi", "Finnish" },
+ { "fil", "Filipino" },
+ { "fit", "Tornedalen Finnish" },
+ { "fj", "Fijian" },
+ { "fo", "Faroese" },
+ { "fon", "Fon" },
+ { "fr", "French" },
+ { "frc", "Cajun French" },
+ { "frm", "Middle French" },
+ { "fro", "Old French" },
+ { "frp", "Arpitan" },
+ { "frr", "Northern Frisian" },
+ { "frs", "Eastern Frisian" },
+ { "fur", "Friulian" },
+ { "fy", "Western Frisian" },
+ { "ga", "Irish" },
+ { "gaa", "Ga" },
+ { "gag", "Gagauz" },
+ { "gan", "Gan Chinese" },
+ { "gay", "Gayo" },
+ { "gba", "Gbaya" },
+ { "gbz", "Zoroastrian Dari" },
+ { "gd", "Scottish Gaelic" },
+ { "gez", "Geez" },
+ { "gil", "Gilbertese" },
+ { "gl", "Galician" },
+ { "glk", "Gilaki" },
+ { "gmh", "Middle High German" },
+ { "gn", "Guarani" },
+ { "goh", "Old High German" },
+ { "gom", "Goan Konkani" },
+ { "gon", "Gondi" },
+ { "gor", "Gorontalo" },
+ { "got", "Gothic" },
+ { "grb", "Grebo" },
+ { "grc", "Ancient Greek" },
+ { "gsw", "Swiss German" },
+ { "gu", "Gujarati" },
+ { "guc", "Wayuu" },
+ { "gur", "Frafra" },
+ { "guz", "Gusii" },
+ { "gv", "Manx" },
+ { "gwi", "Gwichʼin" },
+ { "ha", "Hausa" },
+ { "hai", "Haida" },
+ { "hak", "Hakka Chinese" },
+ { "haw", "Hawaiian" },
+ { "he", "Hebrew" },
+ { "hi", "Hindi" },
+ { "hif", "Fiji Hindi" },
+ { "hil", "Hiligaynon" },
+ { "hit", "Hittite" },
+ { "hmn", "Hmong" },
+ { "ho", "Hiri Motu" },
+ { "hne", "Chhattisgarhi" },
+ { "hr", "Croatian" },
+ { "hsb", "Upper Sorbian" },
+ { "hsn", "Xiang Chinese" },
+ { "ht", "Haitian" },
+ { "hu", "Hungarian" },
+ { "hup", "Hupa" },
+ { "hus", "Huastec" },
+ { "hy", "Armenian" },
+ { "hz", "Herero" },
+ { "ia", "Interlingua" },
+ { "iba", "Iban" },
+ { "ibb", "Ibibio" },
+ { "id", "Indonesian" },
+ { "ie", "Interlingue" },
+ { "ig", "Igbo" },
+ { "ii", "Sichuan Yi" },
+ { "ik", "Inupiaq" },
+ { "ilo", "Iloko" },
+ { "inh", "Ingush" },
+ { "io", "Ido" },
+ { "is", "Icelandic" },
+ { "it", "Italian" },
+ { "iu", "Inuktitut" },
+ { "izh", "Ingrian" },
+ { "ja", "Japanese" },
+ { "jam", "Jamaican Creole English" },
+ { "jbo", "Lojban" },
+ { "jgo", "Ngomba" },
+ { "jmc", "Machame" },
+ { "jpr", "Judeo-Persian" },
+ { "jrb", "Judeo-Arabic" },
+ { "jut", "Jutish" },
+ { "jv", "Javanese" },
+ { "ka", "Georgian" },
+ { "kaa", "Kara-Kalpak" },
+ { "kab", "Kabyle" },
+ { "kac", "Kachin" },
+ { "kaj", "Jju" },
+ { "kam", "Kamba" },
+ { "kaw", "Kawi" },
+ { "kbd", "Kabardian" },
+ { "kbl", "Kanembu" },
+ { "kcg", "Tyap" },
+ { "kde", "Makonde" },
+ { "kea", "Kabuverdianu" },
+ { "ken", "Kenyang" },
+ { "kfo", "Koro" },
+ { "kg", "Kongo" },
+ { "kgp", "Kaingang" },
+ { "kha", "Khasi" },
+ { "kho", "Khotanese" },
+ { "khq", "Koyra Chiini" },
+ { "khw", "Khowar" },
+ { "ki", "Kikuyu" },
+ { "kiu", "Kirmanjki" },
+ { "kj", "Kuanyama" },
+ { "kk", "Kazakh" },
+ { "kkj", "Kako" },
+ { "kl", "Kalaallisut" },
+ { "kln", "Kalenjin" },
+ { "km", "Central Khmer" },
+ { "kmb", "Kimbundu" },
+ { "kn", "Kannada" },
+ { "ko", "Korean" },
+ { "koi", "Komi-Permyak" },
+ { "kok", "Konkani" },
+ { "kos", "Kosraean" },
+ { "kpe", "Kpelle" },
+ { "kr", "Kanuri" },
+ { "krc", "Karachay-Balkar" },
+ { "kri", "Krio" },
+ { "krj", "Kinaray-a" },
+ { "krl", "Karelian" },
+ { "kru", "Kurukh" },
+ { "ks", "Kashmiri" },
+ { "ksb", "Shambala" },
+ { "ksf", "Bafia" },
+ { "ksh", "Colognian" },
+ { "ku", "Kurdish" },
+ { "kum", "Kumyk" },
+ { "kut", "Kutenai" },
+ { "kv", "Komi" },
+ { "kw", "Cornish" },
+ { "ky", "Kirghiz" },
+ { "lag", "Langi" },
+ { "la", "Latin" },
+ { "lad", "Ladino" },
+ { "lag", "Langi" },
+ { "lah", "Lahnda" },
+ { "lam", "Lamba" },
+ { "lb", "Luxembourgish" },
+ { "lez", "Lezghian" },
+ { "lfn", "Lingua Franca Nova" },
+ { "lg", "Ganda" },
+ { "li", "Limburgan" },
+ { "lij", "Ligurian" },
+ { "liv", "Livonian" },
+ { "lkt", "Lakota" },
+ { "lmo", "Lombard" },
+ { "ln", "Lingala" },
+ { "lo", "Lao" },
+ { "lol", "Mongo" },
+ { "lou", "Louisiana Creole" },
+ { "loz", "Lozi" },
+ { "lrc", "Northern Luri" },
+ { "lt", "Lithuanian" },
+ { "ltg", "Latgalian" },
+ { "lu", "Luba-Katanga" },
+ { "lua", "Luba-Lulua" },
+ { "lui", "Luiseno" },
+ { "lun", "Lunda" },
+ { "luo", "Luo" },
+ { "lus", "Mizo" },
+ { "luy", "Luyia" },
+ { "lv", "Latvian" },
+ { "lzh", "Literary Chinese" },
+ { "lzz", "Laz" },
+ { "mad", "Madurese" },
+ { "maf", "Mafa" },
+ { "mag", "Magahi" },
+ { "mai", "Maithili" },
+ { "mak", "Makasar" },
+ { "man", "Mandingo" },
+ { "mas", "Masai" },
+ { "mde", "Maba" },
+ { "mdf", "Moksha" },
+ { "mdr", "Mandar" },
+ { "men", "Mende" },
+ { "mer", "Meru" },
+ { "mfe", "Morisyen" },
+ { "mg", "Malagasy" },
+ { "mga", "Middle Irish" },
+ { "mgh", "Makhuwa-Meetto" },
+ { "mgo", "Metaʼ" },
+ { "mh", "Marshallese" },
+ { "mhr", "Eastern Mari" },
+ { "mi", "Māori" },
+ { "mic", "Mi'kmaq" },
+ { "min", "Minangkabau" },
+ { "miq", "Mískito" },
+ { "mjw", "Karbi" },
+ { "mk", "Macedonian" },
+ { "ml", "Malayalam" },
+ { "mn", "Mongolian" },
+ { "mnc", "Manchu" },
+ { "mni", "Manipuri" },
+ { "mnw", "Mon" },
+ { "mos", "Mossi" },
+ { "moh", "Mohawk" },
+ { "mr", "Marathi" },
+ { "mrj", "Western Mari" },
+ { "ms", "Malay" },
+ { "mt", "Maltese" },
+ { "mua", "Mundang" },
+ { "mus", "Muscogee" },
+ { "mwl", "Mirandese" },
+ { "mwr", "Marwari" },
+ { "mwv", "Mentawai" },
+ { "my", "Burmese" },
+ { "mye", "Myene" },
+ { "myv", "Erzya" },
+ { "mzn", "Mazanderani" },
+ { "na", "Nauru" },
+ { "nah", "Nahuatl" },
+ { "nan", "Min Nan Chinese" },
+ { "nap", "Neapolitan" },
+ { "naq", "Nama" },
+ { "nan", "Min Nan Chinese" },
+ { "nb", "Norwegian Bokmål" },
+ { "nd", "North Ndebele" },
+ { "nds", "Low German" },
+ { "ne", "Nepali" },
+ { "new", "Newari" },
+ { "nhn", "Central Nahuatl" },
+ { "ng", "Ndonga" },
+ { "nia", "Nias" },
+ { "niu", "Niuean" },
+ { "njo", "Ao Naga" },
+ { "nl", "Dutch" },
+ { "nmg", "Kwasio" },
+ { "nn", "Norwegian Nynorsk" },
+ { "nnh", "Ngiemboon" },
+ { "nog", "Nogai" },
+ { "non", "Old Norse" },
+ { "nov", "Novial" },
+ { "nqo", "N'ko" },
+ { "nr", "South Ndebele" },
+ { "nso", "Pedi" },
+ { "nus", "Nuer" },
+ { "nv", "Navajo" },
+ { "nwc", "Classical Newari" },
+ { "ny", "Nyanja" },
+ { "nym", "Nyamwezi" },
+ { "nyn", "Nyankole" },
+ { "nyo", "Nyoro" },
+ { "nzi", "Nzima" },
+ { "oc", "Occitan" },
+ { "oj", "Ojibwa" },
+ { "om", "Oromo" },
+ { "or", "Odia" },
+ { "os", "Ossetic" },
+ { "osa", "Osage" },
+ { "ota", "Ottoman Turkish" },
+ { "pa", "Panjabi" },
+ { "pag", "Pangasinan" },
+ { "pal", "Pahlavi" },
+ { "pam", "Pampanga" },
+ { "pap", "Papiamento" },
+ { "pau", "Palauan" },
+ { "pcd", "Picard" },
+ { "pcm", "Nigerian Pidgin" },
+ { "pdc", "Pennsylvania German" },
+ { "pdt", "Plautdietsch" },
+ { "peo", "Old Persian" },
+ { "pfl", "Palatine German" },
+ { "phn", "Phoenician" },
+ { "pi", "Pali" },
+ { "pl", "Polish" },
+ { "pms", "Piedmontese" },
+ { "pnt", "Pontic" },
+ { "pon", "Pohnpeian" },
+ { "pr", "Pirate" },
+ { "prg", "Prussian" },
+ { "pro", "Old Provençal" },
+ { "prs", "Dari" },
+ { "ps", "Pushto" },
+ { "pt", "Portuguese" },
+ { "qu", "Quechua" },
+ { "quc", "K'iche" },
+ { "qug", "Chimborazo Highland Quichua" },
+ { "quy", "Ayacucho Quechua" },
+ { "quz", "Cusco Quechua" },
+ { "raj", "Rajasthani" },
+ { "rap", "Rapanui" },
+ { "rar", "Rarotongan" },
+ { "rgn", "Romagnol" },
+ { "rif", "Riffian" },
+ { "rm", "Romansh" },
+ { "rn", "Rundi" },
+ { "ro", "Romanian" },
+ { "rof", "Rombo" },
+ { "rom", "Romany" },
+ { "rtm", "Rotuman" },
+ { "ru", "Russian" },
+ { "rue", "Rusyn" },
+ { "rug", "Roviana" },
+ { "rup", "Aromanian" },
+ { "rw", "Kinyarwanda" },
+ { "rwk", "Rwa" },
+ { "sa", "Sanskrit" },
+ { "sad", "Sandawe" },
+ { "sah", "Sakha" },
+ { "sam", "Samaritan Aramaic" },
+ { "saq", "Samburu" },
+ { "sas", "Sasak" },
+ { "sat", "Santali" },
+ { "saz", "Saurashtra" },
+ { "sba", "Ngambay" },
+ { "sbp", "Sangu" },
+ { "sc", "Sardinian" },
+ { "scn", "Sicilian" },
+ { "sco", "Scots" },
+ { "sd", "Sindhi" },
+ { "sdc", "Sassarese Sardinian" },
+ { "sdh", "Southern Kurdish" },
+ { "se", "Northern Sami" },
+ { "see", "Seneca" },
+ { "seh", "Sena" },
+ { "sei", "Seri" },
+ { "sel", "Selkup" },
+ { "ses", "Koyraboro Senni" },
+ { "sg", "Sango" },
+ { "sga", "Old Irish" },
+ { "sgs", "Samogitian" },
+ { "sh", "Serbo-Croatian" },
+ { "shi", "Tachelhit" },
+ { "shn", "Shan" },
+ { "shs", "Shuswap" },
+ { "shu", "Chadian Arabic" },
+ { "si", "Sinhala" },
+ { "sid", "Sidamo" },
+ { "sk", "Slovak" },
+ { "sl", "Slovenian" },
+ { "sli", "Lower Silesian" },
+ { "sly", "Selayar" },
+ { "sm", "Samoan" },
+ { "sma", "Southern Sami" },
+ { "smj", "Lule Sami" },
+ { "smn", "Inari Sami" },
+ { "sms", "Skolt Sami" },
+ { "sn", "Shona" },
+ { "snk", "Soninke" },
+ { "so", "Somali" },
+ { "sog", "Sogdien" },
+ { "son", "Songhai" },
+ { "sq", "Albanian" },
+ { "sr", "Serbian" },
+ { "srn", "Sranan Tongo" },
+ { "srr", "Serer" },
+ { "ss", "Swati" },
+ { "ssy", "Saho" },
+ { "st", "Southern Sotho" },
+ { "stq", "Saterland Frisian" },
+ { "su", "Sundanese" },
+ { "suk", "Sukuma" },
+ { "sus", "Susu" },
+ { "sux", "Sumerian" },
+ { "sv", "Swedish" },
+ { "sw", "Swahili" },
+ { "swb", "Comorian" },
+ { "swc", "Congo Swahili" },
+ { "syc", "Classical Syriac" },
+ { "syr", "Syriac" },
+ { "szl", "Silesian" },
+ { "ta", "Tamil" },
+ { "tcy", "Tulu" },
+ { "te", "Telugu" },
+ { "tem", "Timne" },
+ { "teo", "Teso" },
+ { "ter", "Tereno" },
+ { "tet", "Tetum" },
+ { "tg", "Tajik" },
+ { "th", "Thai" },
+ { "the", "Chitwania Tharu" },
+ { "ti", "Tigrinya" },
+ { "tig", "Tigre" },
+ { "tiv", "Tiv" },
+ { "tk", "Turkmen" },
+ { "tkl", "Tokelau" },
+ { "tkr", "Tsakhur" },
+ { "tl", "Tagalog" },
+ { "tlh", "Klingon" },
+ { "tli", "Tlingit" },
+ { "tly", "Talysh" },
+ { "tmh", "Tamashek" },
+ { "tn", "Tswana" },
+ { "to", "Tongan" },
+ { "tog", "Nyasa Tonga" },
+ { "tpi", "Tok Pisin" },
+ { "tr", "Turkish" },
+ { "tru", "Turoyo" },
+ { "trv", "Taroko" },
+ { "ts", "Tsonga" },
+ { "tsd", "Tsakonian" },
+ { "tsi", "Tsimshian" },
+ { "tt", "Tatar" },
+ { "ttt", "Muslim Tat" },
+ { "tum", "Tumbuka" },
+ { "tvl", "Tuvalu" },
+ { "tw", "Twi" },
+ { "twq", "Tasawaq" },
+ { "ty", "Tahitian" },
+ { "tyv", "Tuvinian" },
+ { "tzm", "Central Atlas Tamazight" },
+ { "udm", "Udmurt" },
+ { "ug", "Uyghur" },
+ { "uga", "Ugaritic" },
+ { "uk", "Ukrainian" },
+ { "umb", "Umbundu" },
+ { "unm", "Unami" },
+ { "ur", "Urdu" },
+ { "uz", "Uzbek" },
+ { "vai", "Vai" },
+ { "ve", "Venda" },
+ { "vec", "Venetian" },
+ { "vep", "Veps" },
+ { "vi", "Vietnamese" },
+ { "vls", "West Flemish" },
+ { "vmf", "Main-Franconian" },
+ { "vo", "Volapük" },
+ { "vot", "Votic" },
+ { "vro", "Võro" },
+ { "vun", "Vunjo" },
+ { "wa", "Walloon" },
+ { "wae", "Walser" },
+ { "wal", "Wolaytta" },
+ { "war", "Waray" },
+ { "was", "Washo" },
+ { "wbp", "Warlpiri" },
+ { "wo", "Wolof" },
+ { "wuu", "Wu Chinese" },
+ { "xal", "Kalmyk" },
+ { "xh", "Xhosa" },
+ { "xmf", "Mingrelian" },
+ { "xog", "Soga" },
+ { "yao", "Yao" },
+ { "yap", "Yapese" },
+ { "yav", "Yangben" },
+ { "ybb", "Yemba" },
+ { "yi", "Yiddish" },
+ { "yo", "Yoruba" },
+ { "yrl", "Nheengatu" },
+ { "yue", "Yue Chinese" },
+ { "yuw", "Papua New Guinea" },
+ { "za", "Zhuang" },
+ { "zap", "Zapotec" },
+ { "zbl", "Blissymbols" },
+ { "zea", "Zeelandic" },
+ { "zen", "Zenaga" },
+ { "zgh", "Standard Moroccan Tamazight" },
+ { "zh", "Chinese" },
+ { "zu", "Zulu" },
+ { "zun", "Zuni" },
+ { "zza", "Zaza" },
+ { nullptr, nullptr }
+};
+
+// Additional regional variants.
+// Variant name, supported languages.
+
+static const char *locale_variants[][2] = {
+ { "valencia", "ca" },
+ { "iqtelif", "tt" },
+ { "saaho", "aa" },
+ { "tradnl", "es" },
+ { nullptr, nullptr },
+};
+
+// Script names and codes (excludes typographic variants, special codes, reserved codes and aliases for combined scripts).
+// Reference:
+// - https://en.wikipedia.org/wiki/ISO_15924
+
+static const char *script_list[][2] = {
+ { "Adlam", "Adlm" },
+ { "Afaka", "Afak" },
+ { "Caucasian Albanian", "Aghb" },
+ { "Ahom", "Ahom" },
+ { "Arabic", "Arab" },
+ { "Imperial Aramaic", "Armi" },
+ { "Armenian", "Armn" },
+ { "Avestan", "Avst" },
+ { "Balinese", "Bali" },
+ { "Bamum", "Bamu" },
+ { "Bassa Vah", "Bass" },
+ { "Batak", "Batk" },
+ { "Bengali", "Beng" },
+ { "Bhaiksuki", "Bhks" },
+ { "Blissymbols", "Blis" },
+ { "Bopomofo", "Bopo" },
+ { "Brahmi", "Brah" },
+ { "Braille", "Brai" },
+ { "Buginese", "Bugi" },
+ { "Buhid", "Buhd" },
+ { "Chakma", "Cakm" },
+ { "Unified Canadian Aboriginal", "Cans" },
+ { "Carian", "Cari" },
+ { "Cham", "Cham" },
+ { "Cherokee", "Cher" },
+ { "Chorasmian", "Chrs" },
+ { "Cirth", "Cirt" },
+ { "Coptic", "Copt" },
+ { "Cypro-Minoan", "Cpmn" },
+ { "Cypriot", "Cprt" },
+ { "Cyrillic", "Cyrl" },
+ { "Devanagari", "Deva" },
+ { "Dives Akuru", "Diak" },
+ { "Dogra", "Dogr" },
+ { "Deseret", "Dsrt" },
+ { "Duployan", "Dupl" },
+ { "Egyptian demotic", "Egyd" },
+ { "Egyptian hieratic", "Egyh" },
+ { "Egyptian hieroglyphs", "Egyp" },
+ { "Elbasan", "Elba" },
+ { "Elymaic", "Elym" },
+ { "Ethiopic", "Ethi" },
+ { "Khutsuri", "Geok" },
+ { "Georgian", "Geor" },
+ { "Glagolitic", "Glag" },
+ { "Gunjala Gondi", "Gong" },
+ { "Masaram Gondi", "Gonm" },
+ { "Gothic", "Goth" },
+ { "Grantha", "Gran" },
+ { "Greek", "Grek" },
+ { "Gujarati", "Gujr" },
+ { "Gurmukhi", "Guru" },
+ { "Hangul", "Hang" },
+ { "Han", "Hani" },
+ { "Hanunoo", "Hano" },
+ { "Simplified", "Hans" },
+ { "Traditional", "Hant" },
+ { "Hatran", "Hatr" },
+ { "Hebrew", "Hebr" },
+ { "Hiragana", "Hira" },
+ { "Anatolian Hieroglyphs", "Hluw" },
+ { "Pahawh Hmong", "Hmng" },
+ { "Nyiakeng Puachue Hmong", "Hmnp" },
+ { "Old Hungarian", "Hung" },
+ { "Indus", "Inds" },
+ { "Old Italic", "Ital" },
+ { "Javanese", "Java" },
+ { "Jurchen", "Jurc" },
+ { "Kayah Li", "Kali" },
+ { "Katakana", "Kana" },
+ { "Kharoshthi", "Khar" },
+ { "Khmer", "Khmr" },
+ { "Khojki", "Khoj" },
+ { "Khitan large script", "Kitl" },
+ { "Khitan small script", "Kits" },
+ { "Kannada", "Knda" },
+ { "Kpelle", "Kpel" },
+ { "Kaithi", "Kthi" },
+ { "Tai Tham", "Lana" },
+ { "Lao", "Laoo" },
+ { "Latin", "Latn" },
+ { "Leke", "Leke" },
+ { "Lepcha", "Lepc" },
+ { "Limbu", "Limb" },
+ { "Linear A", "Lina" },
+ { "Linear B", "Linb" },
+ { "Lisu", "Lisu" },
+ { "Loma", "Loma" },
+ { "Lycian", "Lyci" },
+ { "Lydian", "Lydi" },
+ { "Mahajani", "Mahj" },
+ { "Makasar", "Maka" },
+ { "Mandaic", "Mand" },
+ { "Manichaean", "Mani" },
+ { "Marchen", "Marc" },
+ { "Mayan Hieroglyphs", "Maya" },
+ { "Medefaidrin", "Medf" },
+ { "Mende Kikakui", "Mend" },
+ { "Meroitic Cursive", "Merc" },
+ { "Meroitic Hieroglyphs", "Mero" },
+ { "Malayalam", "Mlym" },
+ { "Modi", "Modi" },
+ { "Mongolian", "Mong" },
+ { "Moon", "Moon" },
+ { "Mro", "Mroo" },
+ { "Meitei Mayek", "Mtei" },
+ { "Multani", "Mult" },
+ { "Myanmar (Burmese)", "Mymr" },
+ { "Nandinagari", "Nand" },
+ { "Old North Arabian", "Narb" },
+ { "Nabataean", "Nbat" },
+ { "Newa", "Newa" },
+ { "Naxi Dongba", "Nkdb" },
+ { "Nakhi Geba", "Nkgb" },
+ { "N'ko", "Nkoo" },
+ { "Nüshu", "Nshu" },
+ { "Ogham", "Ogam" },
+ { "Ol Chiki", "Olck" },
+ { "Old Turkic", "Orkh" },
+ { "Oriya", "Orya" },
+ { "Osage", "Osge" },
+ { "Osmanya", "Osma" },
+ { "Old Uyghur", "Ougr" },
+ { "Palmyrene", "Palm" },
+ { "Pau Cin Hau", "Pauc" },
+ { "Proto-Cuneiform", "Pcun" },
+ { "Proto-Elamite", "Pelm" },
+ { "Old Permic", "Perm" },
+ { "Phags-pa", "Phag" },
+ { "Inscriptional Pahlavi", "Phli" },
+ { "Psalter Pahlavi", "Phlp" },
+ { "Book Pahlavi", "Phlv" },
+ { "Phoenician", "Phnx" },
+ { "Klingon", "Piqd" },
+ { "Miao", "Plrd" },
+ { "Inscriptional Parthian", "Prti" },
+ { "Proto-Sinaitic", "Psin" },
+ { "Ranjana", "Ranj" },
+ { "Rejang", "Rjng" },
+ { "Hanifi Rohingya", "Rohg" },
+ { "Rongorongo", "Roro" },
+ { "Runic", "Runr" },
+ { "Samaritan", "Samr" },
+ { "Sarati", "Sara" },
+ { "Old South Arabian", "Sarb" },
+ { "Saurashtra", "Saur" },
+ { "SignWriting", "Sgnw" },
+ { "Shavian", "Shaw" },
+ { "Sharada", "Shrd" },
+ { "Shuishu", "Shui" },
+ { "Siddham", "Sidd" },
+ { "Khudawadi", "Sind" },
+ { "Sinhala", "Sinh" },
+ { "Sogdian", "Sogd" },
+ { "Old Sogdian", "Sogo" },
+ { "Sora Sompeng", "Sora" },
+ { "Soyombo", "Soyo" },
+ { "Sundanese", "Sund" },
+ { "Syloti Nagri", "Sylo" },
+ { "Syriac", "Syrc" },
+ { "Tagbanwa", "Tagb" },
+ { "Takri", "Takr" },
+ { "Tai Le", "Tale" },
+ { "New Tai Lue", "Talu" },
+ { "Tamil", "Taml" },
+ { "Tangut", "Tang" },
+ { "Tai Viet", "Tavt" },
+ { "Telugu", "Telu" },
+ { "Tengwar", "Teng" },
+ { "Tifinagh", "Tfng" },
+ { "Tagalog", "Tglg" },
+ { "Thaana", "Thaa" },
+ { "Thai", "Thai" },
+ { "Tibetan", "Tibt" },
+ { "Tirhuta", "Tirh" },
+ { "Tangsa", "Tnsa" },
+ { "Toto", "Toto" },
+ { "Ugaritic", "Ugar" },
+ { "Vai", "Vaii" },
+ { "Visible Speech", "Visp" },
+ { "Vithkuqi", "Vith" },
+ { "Warang Citi", "Wara" },
+ { "Wancho", "Wcho" },
+ { "Woleai", "Wole" },
+ { "Old Persian", "Xpeo" },
+ { "Cuneiform", "Xsux" },
+ { "Yezidi", "Yezi" },
+ { "Yi", "Yiii" },
+ { "Zanabazar Square", "Zanb" },
+ { nullptr, nullptr }
+};
+
+#endif // LOCALES_H
diff --git a/core/string/translation.cpp b/core/string/translation.cpp
index 615ecf2432..674098b06c 100644
--- a/core/string/translation.cpp
+++ b/core/string/translation.cpp
@@ -33,793 +33,12 @@
#include "core/config/project_settings.h"
#include "core/io/resource_loader.h"
#include "core/os/os.h"
+#include "core/string/locales.h"
#ifdef TOOLS_ENABLED
#include "main/main.h"
#endif
-// ISO 639-1 language codes (and a couple of three-letter ISO 639-2 codes),
-// with the addition of glibc locales with their regional identifiers.
-// This list must match the language names (in English) of locale_names.
-//
-// References:
-// - https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
-// - https://lh.2xlibre.net/locales/
-// - https://iso639-3.sil.org/
-
-static const char *locale_list[] = {
- "aa", // Afar
- "aa_DJ", // Afar (Djibouti)
- "aa_ER", // Afar (Eritrea)
- "aa_ET", // Afar (Ethiopia)
- "af", // Afrikaans
- "af_ZA", // Afrikaans (South Africa)
- "agr_PE", // Aguaruna (Peru)
- "ak_GH", // Akan (Ghana)
- "am_ET", // Amharic (Ethiopia)
- "an_ES", // Aragonese (Spain)
- "anp_IN", // Angika (India)
- "ar", // Arabic
- "ar_AE", // Arabic (United Arab Emirates)
- "ar_BH", // Arabic (Bahrain)
- "ar_DZ", // Arabic (Algeria)
- "ar_EG", // Arabic (Egypt)
- "ar_IN", // Arabic (India)
- "ar_IQ", // Arabic (Iraq)
- "ar_JO", // Arabic (Jordan)
- "ar_KW", // Arabic (Kuwait)
- "ar_LB", // Arabic (Lebanon)
- "ar_LY", // Arabic (Libya)
- "ar_MA", // Arabic (Morocco)
- "ar_OM", // Arabic (Oman)
- "ar_QA", // Arabic (Qatar)
- "ar_SA", // Arabic (Saudi Arabia)
- "ar_SD", // Arabic (Sudan)
- "ar_SS", // Arabic (South Soudan)
- "ar_SY", // Arabic (Syria)
- "ar_TN", // Arabic (Tunisia)
- "ar_YE", // Arabic (Yemen)
- "as_IN", // Assamese (India)
- "ast_ES", // Asturian (Spain)
- "ayc_PE", // Southern Aymara (Peru)
- "ay_PE", // Aymara (Peru)
- "az", // Azerbaijani
- "az_AZ", // Azerbaijani (Azerbaijan)
- "be", // Belarusian
- "be_BY", // Belarusian (Belarus)
- "bem_ZM", // Bemba (Zambia)
- "ber_DZ", // Berber languages (Algeria)
- "ber_MA", // Berber languages (Morocco)
- "bg", // Bulgarian
- "bg_BG", // Bulgarian (Bulgaria)
- "bhb_IN", // Bhili (India)
- "bho_IN", // Bhojpuri (India)
- "bi_TV", // Bislama (Tuvalu)
- "bn", // Bengali
- "bn_BD", // Bengali (Bangladesh)
- "bn_IN", // Bengali (India)
- "bo", // Tibetan
- "bo_CN", // Tibetan (China)
- "bo_IN", // Tibetan (India)
- "br", // Breton
- "br_FR", // Breton (France)
- "brx_IN", // Bodo (India)
- "bs_BA", // Bosnian (Bosnia and Herzegovina)
- "byn_ER", // Bilin (Eritrea)
- "ca", // Catalan
- "ca_AD", // Catalan (Andorra)
- "ca_ES", // Catalan (Spain)
- "ca_FR", // Catalan (France)
- "ca_IT", // Catalan (Italy)
- "ce_RU", // Chechen (Russia)
- "chr_US", // Cherokee (United States)
- "cmn_TW", // Mandarin Chinese (Taiwan)
- "crh_UA", // Crimean Tatar (Ukraine)
- "csb_PL", // Kashubian (Poland)
- "cs", // Czech
- "cs_CZ", // Czech (Czech Republic)
- "cv_RU", // Chuvash (Russia)
- "cy_GB", // Welsh (United Kingdom)
- "da", // Danish
- "da_DK", // Danish (Denmark)
- "de", // German
- "de_AT", // German (Austria)
- "de_BE", // German (Belgium)
- "de_CH", // German (Switzerland)
- "de_DE", // German (Germany)
- "de_IT", // German (Italy)
- "de_LU", // German (Luxembourg)
- "doi_IN", // Dogri (India)
- "dv_MV", // Dhivehi (Maldives)
- "dz_BT", // Dzongkha (Bhutan)
- "el", // Greek
- "el_CY", // Greek (Cyprus)
- "el_GR", // Greek (Greece)
- "en", // English
- "en_AG", // English (Antigua and Barbuda)
- "en_AU", // English (Australia)
- "en_BW", // English (Botswana)
- "en_CA", // English (Canada)
- "en_DK", // English (Denmark)
- "en_GB", // English (United Kingdom)
- "en_HK", // English (Hong Kong)
- "en_IE", // English (Ireland)
- "en_IL", // English (Israel)
- "en_IN", // English (India)
- "en_NG", // English (Nigeria)
- "en_NZ", // English (New Zealand)
- "en_PH", // English (Philippines)
- "en_SG", // English (Singapore)
- "en_US", // English (United States)
- "en_ZA", // English (South Africa)
- "en_ZM", // English (Zambia)
- "en_ZW", // English (Zimbabwe)
- "eo", // Esperanto
- "es", // Spanish
- "es_AR", // Spanish (Argentina)
- "es_BO", // Spanish (Bolivia)
- "es_CL", // Spanish (Chile)
- "es_CO", // Spanish (Colombia)
- "es_CR", // Spanish (Costa Rica)
- "es_CU", // Spanish (Cuba)
- "es_DO", // Spanish (Dominican Republic)
- "es_EC", // Spanish (Ecuador)
- "es_ES", // Spanish (Spain)
- "es_GT", // Spanish (Guatemala)
- "es_HN", // Spanish (Honduras)
- "es_MX", // Spanish (Mexico)
- "es_NI", // Spanish (Nicaragua)
- "es_PA", // Spanish (Panama)
- "es_PE", // Spanish (Peru)
- "es_PR", // Spanish (Puerto Rico)
- "es_PY", // Spanish (Paraguay)
- "es_SV", // Spanish (El Salvador)
- "es_US", // Spanish (United States)
- "es_UY", // Spanish (Uruguay)
- "es_VE", // Spanish (Venezuela)
- "et", // Estonian
- "et_EE", // Estonian (Estonia)
- "eu", // Basque
- "eu_ES", // Basque (Spain)
- "fa", // Persian
- "fa_IR", // Persian (Iran)
- "ff_SN", // Fulah (Senegal)
- "fi", // Finnish
- "fi_FI", // Finnish (Finland)
- "fil", // Filipino
- "fil_PH", // Filipino (Philippines)
- "fo_FO", // Faroese (Faroe Islands)
- "fr", // French
- "fr_BE", // French (Belgium)
- "fr_CA", // French (Canada)
- "fr_CH", // French (Switzerland)
- "fr_FR", // French (France)
- "fr_LU", // French (Luxembourg)
- "fur_IT", // Friulian (Italy)
- "fy_DE", // Western Frisian (Germany)
- "fy_NL", // Western Frisian (Netherlands)
- "ga", // Irish
- "ga_IE", // Irish (Ireland)
- "gd_GB", // Scottish Gaelic (United Kingdom)
- "gez_ER", // Geez (Eritrea)
- "gez_ET", // Geez (Ethiopia)
- "gl", // Galician
- "gl_ES", // Galician (Spain)
- "gu_IN", // Gujarati (India)
- "gv_GB", // Manx (United Kingdom)
- "hak_TW", // Hakka Chinese (Taiwan)
- "ha_NG", // Hausa (Nigeria)
- "he", // Hebrew
- "he_IL", // Hebrew (Israel)
- "hi", // Hindi
- "hi_IN", // Hindi (India)
- "hne_IN", // Chhattisgarhi (India)
- "hr", // Croatian
- "hr_HR", // Croatian (Croatia)
- "hsb_DE", // Upper Sorbian (Germany)
- "ht_HT", // Haitian (Haiti)
- "hu", // Hungarian
- "hu_HU", // Hungarian (Hungary)
- "hus_MX", // Huastec (Mexico)
- "hy_AM", // Armenian (Armenia)
- "ia_FR", // Interlingua (France)
- "id", // Indonesian
- "id_ID", // Indonesian (Indonesia)
- "ig_NG", // Igbo (Nigeria)
- "ik_CA", // Inupiaq (Canada)
- "is", // Icelandic
- "is_IS", // Icelandic (Iceland)
- "it", // Italian
- "it_CH", // Italian (Switzerland)
- "it_IT", // Italian (Italy)
- "iu_CA", // Inuktitut (Canada)
- "ja", // Japanese
- "ja_JP", // Japanese (Japan)
- "kab_DZ", // Kabyle (Algeria)
- "ka", // Georgian
- "ka_GE", // Georgian (Georgia)
- "kk_KZ", // Kazakh (Kazakhstan)
- "kl_GL", // Kalaallisut (Greenland)
- "km", // Central Khmer
- "km_KH", // Central Khmer (Cambodia)
- "kn_IN", // Kannada (India)
- "kok_IN", // Konkani (India)
- "ko", // Korean
- "ko_KR", // Korean (South Korea)
- "ks_IN", // Kashmiri (India)
- "ku", // Kurdish
- "ku_TR", // Kurdish (Turkey)
- "kw_GB", // Cornish (United Kingdom)
- "ky_KG", // Kirghiz (Kyrgyzstan)
- "lb_LU", // Luxembourgish (Luxembourg)
- "lg_UG", // Ganda (Uganda)
- "li_BE", // Limburgan (Belgium)
- "li_NL", // Limburgan (Netherlands)
- "lij_IT", // Ligurian (Italy)
- "ln_CD", // Lingala (Congo)
- "lo_LA", // Lao (Laos)
- "lt", // Lithuanian
- "lt_LT", // Lithuanian (Lithuania)
- "lv", // Latvian
- "lv_LV", // Latvian (Latvia)
- "lzh_TW", // Literary Chinese (Taiwan)
- "mag_IN", // Magahi (India)
- "mai_IN", // Maithili (India)
- "mg_MG", // Malagasy (Madagascar)
- "mh_MH", // Marshallese (Marshall Islands)
- "mhr_RU", // Eastern Mari (Russia)
- "mi", // Māori
- "mi_NZ", // Māori (New Zealand)
- "miq_NI", // Mískito (Nicaragua)
- "mk", // Macedonian
- "mk_MK", // Macedonian (Macedonia)
- "ml", // Malayalam
- "ml_IN", // Malayalam (India)
- "mni_IN", // Manipuri (India)
- "mn_MN", // Mongolian (Mongolia)
- "mr", // Marathi
- "mr_IN", // Marathi (India)
- "ms", // Malay
- "ms_MY", // Malay (Malaysia)
- "mt", // Maltese
- "mt_MT", // Maltese (Malta)
- "my_MM", // Burmese (Myanmar)
- "myv_RU", // Erzya (Russia)
- "nah_MX", // Nahuatl languages (Mexico)
- "nan_TW", // Min Nan Chinese (Taiwan)
- "nb", // Norwegian Bokmål
- "nb_NO", // Norwegian Bokmål (Norway)
- "nds_DE", // Low German (Germany)
- "nds_NL", // Low German (Netherlands)
- "ne_NP", // Nepali (Nepal)
- "nhn_MX", // Central Nahuatl (Mexico)
- "niu_NU", // Niuean (Niue)
- "niu_NZ", // Niuean (New Zealand)
- "nl", // Dutch
- "nl_AW", // Dutch (Aruba)
- "nl_BE", // Dutch (Belgium)
- "nl_NL", // Dutch (Netherlands)
- "nn", // Norwegian Nynorsk
- "nn_NO", // Norwegian Nynorsk (Norway)
- "nr_ZA", // South Ndebele (South Africa)
- "nso_ZA", // Pedi (South Africa)
- "oc_FR", // Occitan (France)
- "om", // Oromo
- "om_ET", // Oromo (Ethiopia)
- "om_KE", // Oromo (Kenya)
- "or", // Oriya
- "or_IN", // Oriya (India)
- "os_RU", // Ossetian (Russia)
- "pa_IN", // Panjabi (India)
- "pap", // Papiamento
- "pap_AN", // Papiamento (Netherlands Antilles)
- "pap_AW", // Papiamento (Aruba)
- "pap_CW", // Papiamento (Curaçao)
- "pa_PK", // Panjabi (Pakistan)
- "pl", // Polish
- "pl_PL", // Polish (Poland)
- "pr", // Pirate
- "ps_AF", // Pushto (Afghanistan)
- "pt", // Portuguese
- "pt_BR", // Portuguese (Brazil)
- "pt_PT", // Portuguese (Portugal)
- "quy_PE", // Ayacucho Quechua (Peru)
- "quz_PE", // Cusco Quechua (Peru)
- "raj_IN", // Rajasthani (India)
- "ro", // Romanian
- "ro_RO", // Romanian (Romania)
- "ru", // Russian
- "ru_RU", // Russian (Russia)
- "ru_UA", // Russian (Ukraine)
- "rw_RW", // Kinyarwanda (Rwanda)
- "sa_IN", // Sanskrit (India)
- "sat_IN", // Santali (India)
- "sc_IT", // Sardinian (Italy)
- "sco", // Scots
- "sd_IN", // Sindhi (India)
- "se_NO", // Northern Sami (Norway)
- "sgs_LT", // Samogitian (Lithuania)
- "shs_CA", // Shuswap (Canada)
- "sid_ET", // Sidamo (Ethiopia)
- "si", // Sinhala
- "si_LK", // Sinhala (Sri Lanka)
- "sk", // Slovak
- "sk_SK", // Slovak (Slovakia)
- "sl", // Slovenian
- "sl_SI", // Slovenian (Slovenia)
- "so", // Somali
- "so_DJ", // Somali (Djibouti)
- "so_ET", // Somali (Ethiopia)
- "so_KE", // Somali (Kenya)
- "so_SO", // Somali (Somalia)
- "son_ML", // Songhai languages (Mali)
- "sq", // Albanian
- "sq_AL", // Albanian (Albania)
- "sq_KV", // Albanian (Kosovo)
- "sq_MK", // Albanian (Macedonia)
- "sr", // Serbian
- "sr_Cyrl", // Serbian (Cyrillic)
- "sr_Latn", // Serbian (Latin)
- "sr_ME", // Serbian (Montenegro)
- "sr_RS", // Serbian (Serbia)
- "ss_ZA", // Swati (South Africa)
- "st_ZA", // Southern Sotho (South Africa)
- "sv", // Swedish
- "sv_FI", // Swedish (Finland)
- "sv_SE", // Swedish (Sweden)
- "sw_KE", // Swahili (Kenya)
- "sw_TZ", // Swahili (Tanzania)
- "szl_PL", // Silesian (Poland)
- "ta", // Tamil
- "ta_IN", // Tamil (India)
- "ta_LK", // Tamil (Sri Lanka)
- "tcy_IN", // Tulu (India)
- "te", // Telugu
- "te_IN", // Telugu (India)
- "tg_TJ", // Tajik (Tajikistan)
- "the_NP", // Chitwania Tharu (Nepal)
- "th", // Thai
- "th_TH", // Thai (Thailand)
- "ti", // Tigrinya
- "ti_ER", // Tigrinya (Eritrea)
- "ti_ET", // Tigrinya (Ethiopia)
- "tig_ER", // Tigre (Eritrea)
- "tk_TM", // Turkmen (Turkmenistan)
- "tl_PH", // Tagalog (Philippines)
- "tn_ZA", // Tswana (South Africa)
- "tr", // Turkish
- "tr_CY", // Turkish (Cyprus)
- "tr_TR", // Turkish (Turkey)
- "ts_ZA", // Tsonga (South Africa)
- "tt", // Tatar
- "tt_RU", // Tatar (Russia)
- "tzm", // Central Atlas Tamazight
- "tzm_MA", // Central Atlas Tamazight (Marrocos)
- "ug_CN", // Uighur (China)
- "uk", // Ukrainian
- "uk_UA", // Ukrainian (Ukraine)
- "unm_US", // Unami (United States)
- "ur", // Urdu
- "ur_IN", // Urdu (India)
- "ur_PK", // Urdu (Pakistan)
- "uz", // Uzbek
- "uz_UZ", // Uzbek (Uzbekistan)
- "ve_ZA", // Venda (South Africa)
- "vi", // Vietnamese
- "vi_VN", // Vietnamese (Vietnam)
- "wa_BE", // Walloon (Belgium)
- "wae_CH", // Walser (Switzerland)
- "wal_ET", // Wolaytta (Ethiopia)
- "wo_SN", // Wolof (Senegal)
- "xh_ZA", // Xhosa (South Africa)
- "yi_US", // Yiddish (United States)
- "yo_NG", // Yoruba (Nigeria)
- "yue_HK", // Yue Chinese (Hong Kong)
- "zh", // Chinese
- "zh_CN", // Chinese (China)
- "zh_HK", // Chinese (Hong Kong)
- "zh_SG", // Chinese (Singapore)
- "zh_TW", // Chinese (Taiwan)
- "zu_ZA", // Zulu (South Africa)
- nullptr
-};
-
-static const char *locale_names[] = {
- "Afar",
- "Afar (Djibouti)",
- "Afar (Eritrea)",
- "Afar (Ethiopia)",
- "Afrikaans",
- "Afrikaans (South Africa)",
- "Aguaruna (Peru)",
- "Akan (Ghana)",
- "Amharic (Ethiopia)",
- "Aragonese (Spain)",
- "Angika (India)",
- "Arabic",
- "Arabic (United Arab Emirates)",
- "Arabic (Bahrain)",
- "Arabic (Algeria)",
- "Arabic (Egypt)",
- "Arabic (India)",
- "Arabic (Iraq)",
- "Arabic (Jordan)",
- "Arabic (Kuwait)",
- "Arabic (Lebanon)",
- "Arabic (Libya)",
- "Arabic (Morocco)",
- "Arabic (Oman)",
- "Arabic (Qatar)",
- "Arabic (Saudi Arabia)",
- "Arabic (Sudan)",
- "Arabic (South Soudan)",
- "Arabic (Syria)",
- "Arabic (Tunisia)",
- "Arabic (Yemen)",
- "Assamese (India)",
- "Asturian (Spain)",
- "Southern Aymara (Peru)",
- "Aymara (Peru)",
- "Azerbaijani",
- "Azerbaijani (Azerbaijan)",
- "Belarusian",
- "Belarusian (Belarus)",
- "Bemba (Zambia)",
- "Berber languages (Algeria)",
- "Berber languages (Morocco)",
- "Bulgarian",
- "Bulgarian (Bulgaria)",
- "Bhili (India)",
- "Bhojpuri (India)",
- "Bislama (Tuvalu)",
- "Bengali",
- "Bengali (Bangladesh)",
- "Bengali (India)",
- "Tibetan",
- "Tibetan (China)",
- "Tibetan (India)",
- "Breton",
- "Breton (France)",
- "Bodo (India)",
- "Bosnian (Bosnia and Herzegovina)",
- "Bilin (Eritrea)",
- "Catalan",
- "Catalan (Andorra)",
- "Catalan (Spain)",
- "Catalan (France)",
- "Catalan (Italy)",
- "Chechen (Russia)",
- "Cherokee (United States)",
- "Mandarin Chinese (Taiwan)",
- "Crimean Tatar (Ukraine)",
- "Kashubian (Poland)",
- "Czech",
- "Czech (Czech Republic)",
- "Chuvash (Russia)",
- "Welsh (United Kingdom)",
- "Danish",
- "Danish (Denmark)",
- "German",
- "German (Austria)",
- "German (Belgium)",
- "German (Switzerland)",
- "German (Germany)",
- "German (Italy)",
- "German (Luxembourg)",
- "Dogri (India)",
- "Dhivehi (Maldives)",
- "Dzongkha (Bhutan)",
- "Greek",
- "Greek (Cyprus)",
- "Greek (Greece)",
- "English",
- "English (Antigua and Barbuda)",
- "English (Australia)",
- "English (Botswana)",
- "English (Canada)",
- "English (Denmark)",
- "English (United Kingdom)",
- "English (Hong Kong)",
- "English (Ireland)",
- "English (Israel)",
- "English (India)",
- "English (Nigeria)",
- "English (New Zealand)",
- "English (Philippines)",
- "English (Singapore)",
- "English (United States)",
- "English (South Africa)",
- "English (Zambia)",
- "English (Zimbabwe)",
- "Esperanto",
- "Spanish",
- "Spanish (Argentina)",
- "Spanish (Bolivia)",
- "Spanish (Chile)",
- "Spanish (Colombia)",
- "Spanish (Costa Rica)",
- "Spanish (Cuba)",
- "Spanish (Dominican Republic)",
- "Spanish (Ecuador)",
- "Spanish (Spain)",
- "Spanish (Guatemala)",
- "Spanish (Honduras)",
- "Spanish (Mexico)",
- "Spanish (Nicaragua)",
- "Spanish (Panama)",
- "Spanish (Peru)",
- "Spanish (Puerto Rico)",
- "Spanish (Paraguay)",
- "Spanish (El Salvador)",
- "Spanish (United States)",
- "Spanish (Uruguay)",
- "Spanish (Venezuela)",
- "Estonian",
- "Estonian (Estonia)",
- "Basque",
- "Basque (Spain)",
- "Persian",
- "Persian (Iran)",
- "Fulah (Senegal)",
- "Finnish",
- "Finnish (Finland)",
- "Filipino",
- "Filipino (Philippines)",
- "Faroese (Faroe Islands)",
- "French",
- "French (Belgium)",
- "French (Canada)",
- "French (Switzerland)",
- "French (France)",
- "French (Luxembourg)",
- "Friulian (Italy)",
- "Western Frisian (Germany)",
- "Western Frisian (Netherlands)",
- "Irish",
- "Irish (Ireland)",
- "Scottish Gaelic (United Kingdom)",
- "Geez (Eritrea)",
- "Geez (Ethiopia)",
- "Galician",
- "Galician (Spain)",
- "Gujarati (India)",
- "Manx (United Kingdom)",
- "Hakka Chinese (Taiwan)",
- "Hausa (Nigeria)",
- "Hebrew",
- "Hebrew (Israel)",
- "Hindi",
- "Hindi (India)",
- "Chhattisgarhi (India)",
- "Croatian",
- "Croatian (Croatia)",
- "Upper Sorbian (Germany)",
- "Haitian (Haiti)",
- "Hungarian",
- "Hungarian (Hungary)",
- "Huastec (Mexico)",
- "Armenian (Armenia)",
- "Interlingua (France)",
- "Indonesian",
- "Indonesian (Indonesia)",
- "Igbo (Nigeria)",
- "Inupiaq (Canada)",
- "Icelandic",
- "Icelandic (Iceland)",
- "Italian",
- "Italian (Switzerland)",
- "Italian (Italy)",
- "Inuktitut (Canada)",
- "Japanese",
- "Japanese (Japan)",
- "Kabyle (Algeria)",
- "Georgian",
- "Georgian (Georgia)",
- "Kazakh (Kazakhstan)",
- "Kalaallisut (Greenland)",
- "Central Khmer",
- "Central Khmer (Cambodia)",
- "Kannada (India)",
- "Konkani (India)",
- "Korean",
- "Korean (South Korea)",
- "Kashmiri (India)",
- "Kurdish",
- "Kurdish (Turkey)",
- "Cornish (United Kingdom)",
- "Kirghiz (Kyrgyzstan)",
- "Luxembourgish (Luxembourg)",
- "Ganda (Uganda)",
- "Limburgan (Belgium)",
- "Limburgan (Netherlands)",
- "Ligurian (Italy)",
- "Lingala (Congo)",
- "Lao (Laos)",
- "Lithuanian",
- "Lithuanian (Lithuania)",
- "Latvian",
- "Latvian (Latvia)",
- "Literary Chinese (Taiwan)",
- "Magahi (India)",
- "Maithili (India)",
- "Malagasy (Madagascar)",
- "Marshallese (Marshall Islands)",
- "Eastern Mari (Russia)",
- "Māori",
- "Māori (New Zealand)",
- "Mískito (Nicaragua)",
- "Macedonian",
- "Macedonian (Macedonia)",
- "Malayalam",
- "Malayalam (India)",
- "Manipuri (India)",
- "Mongolian (Mongolia)",
- "Marathi",
- "Marathi (India)",
- "Malay",
- "Malay (Malaysia)",
- "Maltese",
- "Maltese (Malta)",
- "Burmese (Myanmar)",
- "Erzya (Russia)",
- "Nahuatl languages (Mexico)",
- "Min Nan Chinese (Taiwan)",
- "Norwegian Bokmål",
- "Norwegian Bokmål (Norway)",
- "Low German (Germany)",
- "Low German (Netherlands)",
- "Nepali (Nepal)",
- "Central Nahuatl (Mexico)",
- "Niuean (Niue)",
- "Niuean (New Zealand)",
- "Dutch",
- "Dutch (Aruba)",
- "Dutch (Belgium)",
- "Dutch (Netherlands)",
- "Norwegian Nynorsk",
- "Norwegian Nynorsk (Norway)",
- "South Ndebele (South Africa)",
- "Pedi (South Africa)",
- "Occitan (France)",
- "Oromo",
- "Oromo (Ethiopia)",
- "Oromo (Kenya)",
- "Oriya",
- "Oriya (India)",
- "Ossetian (Russia)",
- "Panjabi (India)",
- "Papiamento",
- "Papiamento (Netherlands Antilles)",
- "Papiamento (Aruba)",
- "Papiamento (Curaçao)",
- "Panjabi (Pakistan)",
- "Polish",
- "Polish (Poland)",
- "Pirate",
- "Pushto (Afghanistan)",
- "Portuguese",
- "Portuguese (Brazil)",
- "Portuguese (Portugal)",
- "Ayacucho Quechua (Peru)",
- "Cusco Quechua (Peru)",
- "Rajasthani (India)",
- "Romanian",
- "Romanian (Romania)",
- "Russian",
- "Russian (Russia)",
- "Russian (Ukraine)",
- "Kinyarwanda (Rwanda)",
- "Sanskrit (India)",
- "Santali (India)",
- "Sardinian (Italy)",
- "Scots (Scotland)",
- "Sindhi (India)",
- "Northern Sami (Norway)",
- "Samogitian (Lithuania)",
- "Shuswap (Canada)",
- "Sidamo (Ethiopia)",
- "Sinhala",
- "Sinhala (Sri Lanka)",
- "Slovak",
- "Slovak (Slovakia)",
- "Slovenian",
- "Slovenian (Slovenia)",
- "Somali",
- "Somali (Djibouti)",
- "Somali (Ethiopia)",
- "Somali (Kenya)",
- "Somali (Somalia)",
- "Songhai languages (Mali)",
- "Albanian",
- "Albanian (Albania)",
- "Albanian (Kosovo)",
- "Albanian (Macedonia)",
- "Serbian",
- "Serbian (Cyrillic)",
- "Serbian (Latin)",
- "Serbian (Montenegro)",
- "Serbian (Serbia)",
- "Swati (South Africa)",
- "Southern Sotho (South Africa)",
- "Swedish",
- "Swedish (Finland)",
- "Swedish (Sweden)",
- "Swahili (Kenya)",
- "Swahili (Tanzania)",
- "Silesian (Poland)",
- "Tamil",
- "Tamil (India)",
- "Tamil (Sri Lanka)",
- "Tulu (India)",
- "Telugu",
- "Telugu (India)",
- "Tajik (Tajikistan)",
- "Chitwania Tharu (Nepal)",
- "Thai",
- "Thai (Thailand)",
- "Tigrinya",
- "Tigrinya (Eritrea)",
- "Tigrinya (Ethiopia)",
- "Tigre (Eritrea)",
- "Turkmen (Turkmenistan)",
- "Tagalog (Philippines)",
- "Tswana (South Africa)",
- "Turkish",
- "Turkish (Cyprus)",
- "Turkish (Turkey)",
- "Tsonga (South Africa)",
- "Tatar",
- "Tatar (Russia)",
- "Central Atlas Tamazight",
- "Central Atlas Tamazight (Marrocos)",
- "Uighur (China)",
- "Ukrainian",
- "Ukrainian (Ukraine)",
- "Unami (United States)",
- "Urdu",
- "Urdu (India)",
- "Urdu (Pakistan)",
- "Uzbek",
- "Uzbek (Uzbekistan)",
- "Venda (South Africa)",
- "Vietnamese",
- "Vietnamese (Vietnam)",
- "Walloon (Belgium)",
- "Walser (Switzerland)",
- "Wolaytta (Ethiopia)",
- "Wolof (Senegal)",
- "Xhosa (South Africa)",
- "Yiddish (United States)",
- "Yoruba (Nigeria)",
- "Yue Chinese (Hong Kong)",
- "Chinese",
- "Chinese (China)",
- "Chinese (Hong Kong)",
- "Chinese (Singapore)",
- "Chinese (Taiwan)",
- "Zulu (South Africa)",
- nullptr
-};
-
-// Windows has some weird locale identifiers which do not honor the ISO 639-1
-// standardized nomenclature. Whenever those don't conflict with existing ISO
-// identifiers, we override them.
-//
-// Reference:
-// - https://msdn.microsoft.com/en-us/library/windows/desktop/ms693062(v=vs.85).aspx
-
-static const char *locale_renames[][2] = {
- { "in", "id" }, // Indonesian
- { "iw", "he" }, // Hebrew
- { "no", "nb" }, // Norwegian Bokmål
- { "C", "en" }, // "C" is the simple/default/untranslated Computer locale.
- // ASCII-only, English, no currency symbols. Godot treats this as "en".
- // See https://unix.stackexchange.com/a/87763/164141 "The C locale is"...
- { nullptr, nullptr }
-};
-
-///////////////////////////////////////////////
-
Dictionary Translation::_get_messages() const {
Dictionary d;
for (const KeyValue<StringName, StringName> &E : translation_map) {
@@ -849,17 +68,7 @@ void Translation::_set_messages(const Dictionary &p_messages) {
}
void Translation::set_locale(const String &p_locale) {
- String univ_locale = TranslationServer::standardize_locale(p_locale);
-
- if (!TranslationServer::is_locale_valid(univ_locale)) {
- String trimmed_locale = TranslationServer::get_language_code(univ_locale);
-
- ERR_FAIL_COND_MSG(!TranslationServer::is_locale_valid(trimmed_locale), "Invalid locale: " + trimmed_locale + ".");
-
- locale = trimmed_locale;
- } else {
- locale = univ_locale;
- }
+ locale = TranslationServer::get_singleton()->standardize_locale(p_locale);
if (OS::get_singleton()->get_main_loop() && TranslationServer::get_singleton()->get_loaded_locales().has(this)) {
OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_TRANSLATION_CHANGED);
@@ -1004,124 +213,314 @@ static _character_accent_pair _character_to_accented[] = {
{ 'z', U"ź" },
};
-bool TranslationServer::is_locale_valid(const String &p_locale) {
- const char **ptr = locale_list;
+static _FORCE_INLINE_ bool is_upper_case(char32_t c) {
+ return (c >= 'A' && c <= 'Z');
+}
- while (*ptr) {
- if (*ptr == p_locale) {
- return true;
+static _FORCE_INLINE_ bool is_lower_case(char32_t c) {
+ return (c >= 'a' && c <= 'z');
+}
+
+Vector<TranslationServer::LocaleScriptInfo> TranslationServer::locale_script_info;
+
+Map<String, String> TranslationServer::language_map;
+Map<String, String> TranslationServer::script_map;
+Map<String, String> TranslationServer::locale_rename_map;
+Map<String, String> TranslationServer::country_name_map;
+Map<String, String> TranslationServer::variant_map;
+Map<String, String> TranslationServer::country_rename_map;
+
+void TranslationServer::init_locale_info() {
+ // Init locale info.
+ language_map.clear();
+ int idx = 0;
+ while (language_list[idx][0] != nullptr) {
+ language_map[language_list[idx][0]] = String::utf8(language_list[idx][1]);
+ idx++;
+ }
+
+ // Init locale-script map.
+ locale_script_info.clear();
+ idx = 0;
+ while (locale_scripts[idx][0] != nullptr) {
+ LocaleScriptInfo info;
+ info.name = locale_scripts[idx][0];
+ info.script = locale_scripts[idx][1];
+ info.default_country = locale_scripts[idx][2];
+ Vector<String> supported_countries = String(locale_scripts[idx][3]).split(",", false);
+ for (int i = 0; i < supported_countries.size(); i++) {
+ info.supported_countries.insert(supported_countries[i]);
}
- ptr++;
+ locale_script_info.push_back(info);
+ idx++;
}
- return false;
-}
+ // Init supported script list.
+ script_map.clear();
+ idx = 0;
+ while (script_list[idx][0] != nullptr) {
+ script_map[script_list[idx][1]] = String::utf8(script_list[idx][0]);
+ idx++;
+ }
-String TranslationServer::standardize_locale(const String &p_locale) {
- // Replaces '-' with '_' for macOS Sierra-style locales
- String univ_locale = p_locale.replace("-", "_");
+ // Init regional variant map.
+ variant_map.clear();
+ idx = 0;
+ while (locale_variants[idx][0] != nullptr) {
+ variant_map[locale_variants[idx][0]] = locale_variants[idx][1];
+ idx++;
+ }
- // Handles known non-ISO locale names used e.g. on Windows
- int idx = 0;
+ // Init locale renames.
+ locale_rename_map.clear();
+ idx = 0;
while (locale_renames[idx][0] != nullptr) {
- if (locale_renames[idx][0] == univ_locale) {
- univ_locale = locale_renames[idx][1];
- break;
+ if (!String(locale_renames[idx][1]).is_empty()) {
+ locale_rename_map[locale_renames[idx][0]] = locale_renames[idx][1];
}
idx++;
}
- return univ_locale;
+ // Init country names.
+ country_name_map.clear();
+ idx = 0;
+ while (country_names[idx][0] != nullptr) {
+ country_name_map[String(country_names[idx][0])] = String::utf8(country_names[idx][1]);
+ idx++;
+ }
+
+ // Init country renames.
+ country_rename_map.clear();
+ idx = 0;
+ while (country_renames[idx][0] != nullptr) {
+ if (!String(country_renames[idx][1]).is_empty()) {
+ country_rename_map[country_renames[idx][0]] = country_renames[idx][1];
+ }
+ idx++;
+ }
}
-String TranslationServer::get_language_code(const String &p_locale) {
- ERR_FAIL_COND_V_MSG(p_locale.length() < 2, p_locale, "Invalid locale '" + p_locale + "'.");
- // Most language codes are two letters, but some are three,
- // so we have to look for a regional code separator ('_' or '-')
- // to extract the left part.
- // For example we get 'nah_MX' as input and should return 'nah'.
- int split = p_locale.find("_");
- if (split == -1) {
- split = p_locale.find("-");
+String TranslationServer::standardize_locale(const String &p_locale) const {
+ // Replaces '-' with '_' for macOS style locales.
+ String univ_locale = p_locale.replace("-", "_");
+
+ // Extract locale elements.
+ String lang, script, country, variant;
+ Vector<String> locale_elements = univ_locale.get_slice("@", 0).split("_");
+ lang = locale_elements[0];
+ if (locale_elements.size() >= 2) {
+ if (locale_elements[1].length() == 4 && is_upper_case(locale_elements[1][0]) && is_lower_case(locale_elements[1][1]) && is_lower_case(locale_elements[1][2]) && is_lower_case(locale_elements[1][3])) {
+ script = locale_elements[1];
+ }
+ if (locale_elements[1].length() == 2 && is_upper_case(locale_elements[1][0]) && is_upper_case(locale_elements[1][1])) {
+ country = locale_elements[1];
+ }
}
- if (split == -1) { // No separator, so the locale is already only a language code.
- return p_locale;
+ if (locale_elements.size() >= 3) {
+ if (locale_elements[2].length() == 2 && is_upper_case(locale_elements[2][0]) && is_upper_case(locale_elements[2][1])) {
+ country = locale_elements[2];
+ } else if (variant_map.has(locale_elements[2].to_lower()) && variant_map[locale_elements[2].to_lower()] == lang) {
+ variant = locale_elements[2].to_lower();
+ }
+ }
+ if (locale_elements.size() >= 4) {
+ if (variant_map.has(locale_elements[3].to_lower()) && variant_map[locale_elements[3].to_lower()] == lang) {
+ variant = locale_elements[3].to_lower();
+ }
}
- return p_locale.left(split);
-}
-void TranslationServer::set_locale(const String &p_locale) {
- String univ_locale = standardize_locale(p_locale);
+ // Try extract script and variant from the extra part.
+ Vector<String> script_extra = univ_locale.get_slice("@", 1).split(";");
+ for (int i = 0; i < script_extra.size(); i++) {
+ if (script_extra[i].to_lower() == "cyrillic") {
+ script = "Cyrl";
+ break;
+ } else if (script_extra[i].to_lower() == "latin") {
+ script = "Latn";
+ break;
+ } else if (script_extra[i].to_lower() == "devanagari") {
+ script = "Deva";
+ break;
+ } else if (variant_map.has(script_extra[i].to_lower()) && variant_map[script_extra[i].to_lower()] == lang) {
+ variant = script_extra[i].to_lower();
+ }
+ }
- if (!is_locale_valid(univ_locale)) {
- String trimmed_locale = get_language_code(univ_locale);
- print_verbose(vformat("Unsupported locale '%s', falling back to '%s'.", p_locale, trimmed_locale));
+ // Handles known non-ISO language names used e.g. on Windows.
+ if (locale_rename_map.has(lang)) {
+ lang = locale_rename_map[lang];
+ }
- if (!is_locale_valid(trimmed_locale)) {
- ERR_PRINT(vformat("Unsupported locale '%s', falling back to 'en'.", trimmed_locale));
- locale = "en";
- } else {
- locale = trimmed_locale;
+ // Handle country renames.
+ if (country_rename_map.has(country)) {
+ country = country_rename_map[country];
+ }
+
+ // Remove unsupported script codes.
+ if (!script_map.has(script)) {
+ script = "";
+ }
+
+ // Add script code base on language and country codes for some ambiguous cases.
+ if (script.is_empty()) {
+ for (int i = 0; i < locale_script_info.size(); i++) {
+ const LocaleScriptInfo &info = locale_script_info[i];
+ if (info.name == lang) {
+ if (country.is_empty() || info.supported_countries.has(country)) {
+ script = info.script;
+ break;
+ }
+ }
+ }
+ }
+ if (!script.is_empty() && country.is_empty()) {
+ // Add conntry code based on script for some ambiguous cases.
+ for (int i = 0; i < locale_script_info.size(); i++) {
+ const LocaleScriptInfo &info = locale_script_info[i];
+ if (info.name == lang && info.script == script) {
+ country = info.default_country;
+ break;
+ }
+ }
+ }
+
+ // Combine results.
+ String locale = lang;
+ if (!script.is_empty()) {
+ locale = locale + "_" + script;
+ }
+ if (!country.is_empty()) {
+ locale = locale + "_" + country;
+ }
+ if (!variant.is_empty()) {
+ locale = locale + "_" + variant;
+ }
+ return locale;
+}
+
+int TranslationServer::compare_locales(const String &p_locale_a, const String &p_locale_b) const {
+ String locale_a = standardize_locale(p_locale_a);
+ String locale_b = standardize_locale(p_locale_b);
+
+ if (locale_a == locale_b) {
+ // Exact match.
+ return 10;
+ }
+
+ Vector<String> locale_a_elements = locale_a.split("_");
+ Vector<String> locale_b_elements = locale_b.split("_");
+ if (locale_a_elements[0] == locale_b_elements[0]) {
+ // Matching language, both locales have extra parts.
+ // Return number of matching elements.
+ int matching_elements = 1;
+ for (int i = 1; i < locale_a_elements.size(); i++) {
+ for (int j = 1; j < locale_b_elements.size(); j++) {
+ if (locale_a_elements[i] == locale_b_elements[j]) {
+ matching_elements++;
+ }
+ }
}
+ return matching_elements;
} else {
- locale = univ_locale;
+ // No match.
+ return 0;
}
+}
- if (OS::get_singleton()->get_main_loop()) {
- OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_TRANSLATION_CHANGED);
+String TranslationServer::get_locale_name(const String &p_locale) const {
+ String locale = standardize_locale(p_locale);
+
+ String lang, script, country;
+ Vector<String> locale_elements = locale.split("_");
+ lang = locale_elements[0];
+ if (locale_elements.size() >= 2) {
+ if (locale_elements[1].length() == 4 && is_upper_case(locale_elements[1][0]) && is_lower_case(locale_elements[1][1]) && is_lower_case(locale_elements[1][2]) && is_lower_case(locale_elements[1][3])) {
+ script = locale_elements[1];
+ }
+ if (locale_elements[1].length() == 2 && is_upper_case(locale_elements[1][0]) && is_upper_case(locale_elements[1][1])) {
+ country = locale_elements[1];
+ }
+ }
+ if (locale_elements.size() >= 3) {
+ if (locale_elements[2].length() == 2 && is_upper_case(locale_elements[2][0]) && is_upper_case(locale_elements[2][1])) {
+ country = locale_elements[2];
+ }
}
- ResourceLoader::reload_translation_remaps();
+ String name = language_map[lang];
+ if (!script.is_empty()) {
+ name = name + " (" + script_map[script] + ")";
+ }
+ if (!country.is_empty()) {
+ name = name + ", " + country_name_map[country];
+ }
+ return name;
}
-String TranslationServer::get_locale() const {
- return locale;
+Vector<String> TranslationServer::get_all_languages() const {
+ Vector<String> languages;
+
+ for (const Map<String, String>::Element *E = language_map.front(); E; E = E->next()) {
+ languages.push_back(E->key());
+ }
+
+ return languages;
}
-String TranslationServer::get_locale_name(const String &p_locale) const {
- if (!locale_name_map.has(p_locale)) {
- return String();
+String TranslationServer::get_language_name(const String &p_language) const {
+ return language_map[p_language];
+}
+
+Vector<String> TranslationServer::get_all_scripts() const {
+ Vector<String> scripts;
+
+ for (const Map<String, String>::Element *E = script_map.front(); E; E = E->next()) {
+ scripts.push_back(E->key());
}
- return locale_name_map[p_locale];
+
+ return scripts;
}
-Array TranslationServer::get_loaded_locales() const {
- Array locales;
- for (const Set<Ref<Translation>>::Element *E = translations.front(); E; E = E->next()) {
- const Ref<Translation> &t = E->get();
- ERR_FAIL_COND_V(t.is_null(), Array());
- String l = t->get_locale();
+String TranslationServer::get_script_name(const String &p_script) const {
+ return script_map[p_script];
+}
- if (!locales.has(l)) {
- locales.push_back(l);
- }
+Vector<String> TranslationServer::get_all_countries() const {
+ Vector<String> countries;
+
+ for (const Map<String, String>::Element *E = country_name_map.front(); E; E = E->next()) {
+ countries.push_back(E->key());
}
- locales.sort();
- return locales;
+ return countries;
}
-Vector<String> TranslationServer::get_all_locales() {
- Vector<String> locales;
+String TranslationServer::get_country_name(const String &p_country) const {
+ return country_name_map[p_country];
+}
- const char **ptr = locale_list;
+void TranslationServer::set_locale(const String &p_locale) {
+ locale = standardize_locale(p_locale);
- while (*ptr) {
- locales.push_back(*ptr);
- ptr++;
+ if (OS::get_singleton()->get_main_loop()) {
+ OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_TRANSLATION_CHANGED);
}
- return locales;
+ ResourceLoader::reload_translation_remaps();
}
-Vector<String> TranslationServer::get_all_locale_names() {
- Vector<String> locales;
+String TranslationServer::get_locale() const {
+ return locale;
+}
- const char **ptr = locale_names;
+Array TranslationServer::get_loaded_locales() const {
+ Array locales;
+ for (const Set<Ref<Translation>>::Element *E = translations.front(); E; E = E->next()) {
+ const Ref<Translation> &t = E->get();
+ ERR_FAIL_COND_V(t.is_null(), Array());
+ String l = t->get_locale();
- while (*ptr) {
- locales.push_back(String::utf8(*ptr));
- ptr++;
+ locales.push_back(l);
}
return locales;
@@ -1137,23 +536,20 @@ void TranslationServer::remove_translation(const Ref<Translation> &p_translation
Ref<Translation> TranslationServer::get_translation_object(const String &p_locale) {
Ref<Translation> res;
- String lang = get_language_code(p_locale);
- bool near_match_found = false;
+ int best_score = 0;
for (const Set<Ref<Translation>>::Element *E = translations.front(); E; E = E->next()) {
const Ref<Translation> &t = E->get();
ERR_FAIL_COND_V(t.is_null(), nullptr);
String l = t->get_locale();
- // Exact match.
- if (l == p_locale) {
- return t;
- }
-
- // If near match found, keep that match, but keep looking to try to look for perfect match.
- if (get_language_code(l) == lang && !near_match_found) {
+ int score = compare_locales(p_locale, l);
+ if (score > best_score) {
res = t;
- near_match_found = true;
+ best_score = score;
+ if (score == 10) {
+ break; // Exact match, skip the rest.
+ }
}
}
return res;
@@ -1212,52 +608,27 @@ StringName TranslationServer::translate_plural(const StringName &p_message, cons
}
StringName TranslationServer::_get_message_from_translations(const StringName &p_message, const StringName &p_context, const String &p_locale, bool plural, const String &p_message_plural, int p_n) const {
- // Locale can be of the form 'll_CC', i.e. language code and regional code,
- // e.g. 'en_US', 'en_GB', etc. It might also be simply 'll', e.g. 'en'.
- // To find the relevant translation, we look for those with locale starting
- // with the language code, and then if any is an exact match for the long
- // form. If not found, we fall back to a near match (another locale with
- // same language code).
-
- // Note: ResourceLoader::_path_remap reproduces this locale near matching
- // logic, so be sure to propagate changes there when changing things here.
-
StringName res;
- String lang = get_language_code(p_locale);
- bool near_match = false;
+ int best_score = 0;
for (const Set<Ref<Translation>>::Element *E = translations.front(); E; E = E->next()) {
const Ref<Translation> &t = E->get();
ERR_FAIL_COND_V(t.is_null(), p_message);
String l = t->get_locale();
- bool exact_match = (l == p_locale);
- if (!exact_match) {
- if (near_match) {
- continue; // Only near-match once, but keep looking for exact matches.
+ int score = compare_locales(p_locale, l);
+ if (score > best_score) {
+ StringName r;
+ if (!plural) {
+ res = t->get_message(p_message, p_context);
+ } else {
+ res = t->get_plural_message(p_message, p_message_plural, p_n, p_context);
}
- if (get_language_code(l) != lang) {
- continue; // Language code does not match.
+ best_score = score;
+ if (score == 10) {
+ break; // Exact match, skip the rest.
}
}
-
- StringName r;
- if (!plural) {
- r = t->get_message(p_message, p_context);
- } else {
- r = t->get_plural_message(p_message, p_message_plural, p_n, p_context);
- }
-
- if (!r) {
- continue;
- }
- res = r;
-
- if (exact_match) {
- break;
- } else {
- near_match = true;
- }
}
return res;
@@ -1308,18 +679,7 @@ void TranslationServer::setup() {
pseudolocalization_skip_placeholders_enabled = GLOBAL_DEF("internationalization/pseudolocalization/skip_placeholders", true);
#ifdef TOOLS_ENABLED
- {
- String options = "";
- int idx = 0;
- while (locale_list[idx]) {
- if (idx > 0) {
- options += ",";
- }
- options += locale_list[idx];
- idx++;
- }
- ProjectSettings::get_singleton()->set_custom_property_info("internationalization/locale/fallback", PropertyInfo(Variant::STRING, "internationalization/locale/fallback", PROPERTY_HINT_ENUM, options));
- }
+ ProjectSettings::get_singleton()->set_custom_property_info("internationalization/locale/fallback", PropertyInfo(Variant::STRING, "internationalization/locale/fallback", PROPERTY_HINT_LOCALE_ID, ""));
#endif
}
@@ -1574,6 +934,18 @@ void TranslationServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_locale", "locale"), &TranslationServer::set_locale);
ClassDB::bind_method(D_METHOD("get_locale"), &TranslationServer::get_locale);
+ ClassDB::bind_method(D_METHOD("compare_locales", "locale_a", "locale_b"), &TranslationServer::compare_locales);
+ ClassDB::bind_method(D_METHOD("standardize_locale", "locale"), &TranslationServer::standardize_locale);
+
+ ClassDB::bind_method(D_METHOD("get_all_languages"), &TranslationServer::get_all_languages);
+ ClassDB::bind_method(D_METHOD("get_language_name", "language"), &TranslationServer::get_language_name);
+
+ ClassDB::bind_method(D_METHOD("get_all_scripts"), &TranslationServer::get_all_scripts);
+ ClassDB::bind_method(D_METHOD("get_script_name", "script"), &TranslationServer::get_script_name);
+
+ ClassDB::bind_method(D_METHOD("get_all_countries"), &TranslationServer::get_all_countries);
+ ClassDB::bind_method(D_METHOD("get_country_name", "country"), &TranslationServer::get_country_name);
+
ClassDB::bind_method(D_METHOD("get_locale_name", "locale"), &TranslationServer::get_locale_name);
ClassDB::bind_method(D_METHOD("translate", "message", "context"), &TranslationServer::translate, DEFVAL(""));
@@ -1606,8 +978,5 @@ void TranslationServer::load_translations() {
TranslationServer::TranslationServer() {
singleton = this;
-
- for (int i = 0; locale_list[i]; ++i) {
- locale_name_map.insert(locale_list[i], String::utf8(locale_names[i]));
- }
+ init_locale_info();
}
diff --git a/core/string/translation.h b/core/string/translation.h
index e95d15e2ab..947ca4c6d8 100644
--- a/core/string/translation.h
+++ b/core/string/translation.h
@@ -78,8 +78,6 @@ class TranslationServer : public Object {
Ref<Translation> tool_translation;
Ref<Translation> doc_translation;
- Map<String, String> locale_name_map;
-
bool enabled = true;
bool pseudolocalization_enabled = false;
@@ -109,6 +107,23 @@ class TranslationServer : public Object {
static void _bind_methods();
+ struct LocaleScriptInfo {
+ String name;
+ String script;
+ String default_country;
+ Set<String> supported_countries;
+ };
+ static Vector<LocaleScriptInfo> locale_script_info;
+
+ static Map<String, String> language_map;
+ static Map<String, String> script_map;
+ static Map<String, String> locale_rename_map;
+ static Map<String, String> country_name_map;
+ static Map<String, String> country_rename_map;
+ static Map<String, String> variant_map;
+
+ void init_locale_info();
+
public:
_FORCE_INLINE_ static TranslationServer *get_singleton() { return singleton; }
@@ -119,6 +134,15 @@ public:
String get_locale() const;
Ref<Translation> get_translation_object(const String &p_locale);
+ Vector<String> get_all_languages() const;
+ String get_language_name(const String &p_language) const;
+
+ Vector<String> get_all_scripts() const;
+ String get_script_name(const String &p_script) const;
+
+ Vector<String> get_all_countries() const;
+ String get_country_name(const String &p_country) const;
+
String get_locale_name(const String &p_locale) const;
Array get_loaded_locales() const;
@@ -136,11 +160,9 @@ public:
void set_editor_pseudolocalization(bool p_enabled);
void reload_pseudolocalization();
- static Vector<String> get_all_locales();
- static Vector<String> get_all_locale_names();
- static bool is_locale_valid(const String &p_locale);
- static String standardize_locale(const String &p_locale);
- static String get_language_code(const String &p_locale);
+ String standardize_locale(const String &p_locale) const;
+
+ int compare_locales(const String &p_locale_a, const String &p_locale_b) const;
String get_tool_locale();
void set_tool_translation(const Ref<Translation> &p_translation);
diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp
index 0949980713..658dbc98cf 100644
--- a/core/string/ustring.cpp
+++ b/core/string/ustring.cpp
@@ -1527,115 +1527,24 @@ String String::num_uint64(uint64_t p_num, int base, bool capitalize_hex) {
}
String String::num_real(double p_num, bool p_trailing) {
- if (Math::is_nan(p_num)) {
- return "nan";
- }
-
- if (Math::is_inf(p_num)) {
- if (signbit(p_num)) {
- return "-inf";
+ if (p_num == (double)(int64_t)p_num) {
+ if (p_trailing) {
+ return num_int64((int64_t)p_num) + ".0";
} else {
- return "inf";
+ return num_int64((int64_t)p_num);
}
}
-
- String s;
- String sd;
-
- // Integer part.
-
- bool neg = p_num < 0;
- p_num = ABS(p_num);
- int64_t intn = (int64_t)p_num;
-
- // Decimal part.
-
- if (intn != p_num) {
- double dec = p_num - (double)intn;
-
- int digit = 0;
-
#ifdef REAL_T_IS_DOUBLE
- int decimals = 14;
- double tolerance = 1e-14;
+ int decimals = 14;
#else
- int decimals = 6;
- double tolerance = 1e-6;
+ int decimals = 6;
#endif
- // We want to align the digits to the above sane default, so we only
- // need to subtract log10 for numbers with a positive power of ten.
- if (p_num > 10) {
- decimals -= (int)floor(log10(p_num));
- }
-
- if (decimals > MAX_DECIMALS) {
- decimals = MAX_DECIMALS;
- }
-
- // In case the value ends up ending in "99999", we want to add a
- // tiny bit to the value we're checking when deciding when to stop,
- // so we multiply by slightly above 1 (1 + 1e-7 or 1e-15).
- double check_multiplier = 1 + tolerance / 10;
-
- int64_t dec_int = 0;
- int64_t dec_max = 0;
-
- while (true) {
- dec *= 10.0;
- dec_int = dec_int * 10 + (int64_t)dec % 10;
- dec_max = dec_max * 10 + 9;
- digit++;
-
- if ((dec - (double)(int64_t)(dec * check_multiplier)) < tolerance) {
- break;
- }
-
- if (digit == decimals) {
- break;
- }
- }
-
- dec *= 10;
- int last = (int64_t)dec % 10;
-
- if (last > 5) {
- if (dec_int == dec_max) {
- dec_int = 0;
- intn++;
- } else {
- dec_int++;
- }
- }
-
- String decimal;
- for (int i = 0; i < digit; i++) {
- char num[2] = { 0, 0 };
- num[0] = '0' + dec_int % 10;
- decimal = num + decimal;
- dec_int /= 10;
- }
- sd = '.' + decimal;
- } else if (p_trailing) {
- sd = ".0";
- } else {
- sd = "";
+ // We want to align the digits to the above sane default, so we only
+ // need to subtract log10 for numbers with a positive power of ten.
+ if (p_num > 10) {
+ decimals -= (int)floor(log10(p_num));
}
-
- if (intn == 0) {
- s = "0";
- } else {
- while (intn) {
- char32_t num = '0' + (intn % 10);
- intn /= 10;
- s = num + s;
- }
- }
-
- s = s + sd;
- if (neg) {
- s = "-" + s;
- }
- return s;
+ return num(p_num, decimals);
}
String String::num_scientific(double p_num) {
diff --git a/core/templates/vector.h b/core/templates/vector.h
index e53c502f67..bd4c6ade86 100644
--- a/core/templates/vector.h
+++ b/core/templates/vector.h
@@ -42,6 +42,7 @@
#include "core/templates/search_array.h"
#include "core/templates/sort_array.h"
+#include <climits>
#include <initializer_list>
template <class T>
@@ -144,25 +145,29 @@ public:
return ret;
}
- Vector<T> slice(int p_begin, int p_end) const {
+ Vector<T> slice(int p_begin, int p_end = INT_MAX) const {
Vector<T> result;
- if (p_end < 0) {
- p_end += size() + 1;
- }
+ const int s = size();
- ERR_FAIL_INDEX_V(p_begin, size(), result);
- ERR_FAIL_INDEX_V(p_end, size() + 1, result);
+ int begin = CLAMP(p_begin, -s, s);
+ if (begin < 0) {
+ begin += s;
+ }
+ int end = CLAMP(p_end, -s, s);
+ if (end < 0) {
+ end += s;
+ }
- ERR_FAIL_COND_V(p_begin > p_end, result);
+ ERR_FAIL_COND_V(begin > end, result);
- int result_size = p_end - p_begin;
+ int result_size = end - begin;
result.resize(result_size);
const T *const r = ptr();
T *const w = result.ptrw();
for (int i = 0; i < result_size; ++i) {
- w[i] = r[p_begin + i];
+ w[i] = r[begin + i];
}
return result;
diff --git a/core/variant/array.cpp b/core/variant/array.cpp
index 8d20b1bc79..3d2f337442 100644
--- a/core/variant/array.cpp
+++ b/core/variant/array.cpp
@@ -370,20 +370,24 @@ Array Array::slice(int p_begin, int p_end, int p_step, bool p_deep) const {
ERR_FAIL_COND_V_MSG(p_step == 0, result, "Slice step cannot be zero.");
- if (p_end < 0) {
- p_end += size() + 1;
- }
+ const int s = size();
- ERR_FAIL_INDEX_V(p_begin, size(), result);
- ERR_FAIL_INDEX_V(p_end, size() + 1, result);
+ int begin = CLAMP(p_begin, -s, s);
+ if (begin < 0) {
+ begin += s;
+ }
+ int end = CLAMP(p_end, -s, s);
+ if (end < 0) {
+ end += s;
+ }
- ERR_FAIL_COND_V_MSG(p_step > 0 && p_begin > p_end, result, "Slice is positive, but bounds is decreasing");
- ERR_FAIL_COND_V_MSG(p_step < 0 && p_begin < p_end, result, "Slice is negative, but bounds is increasing");
+ ERR_FAIL_COND_V_MSG(p_step > 0 && begin > end, result, "Slice is positive, but bounds is decreasing.");
+ ERR_FAIL_COND_V_MSG(p_step < 0 && begin < end, result, "Slice is negative, but bounds is increasing.");
- int result_size = (p_end - p_begin) / p_step;
+ int result_size = (end - begin) / p_step;
result.resize(result_size);
- for (int src_idx = p_begin, dest_idx = 0; dest_idx < result_size; ++dest_idx) {
+ for (int src_idx = begin, dest_idx = 0; dest_idx < result_size; ++dest_idx) {
result[dest_idx] = p_deep ? get(src_idx).duplicate(true) : get(src_idx);
src_idx += p_step;
}
diff --git a/core/variant/array.h b/core/variant/array.h
index f48444bb39..72bed5932c 100644
--- a/core/variant/array.h
+++ b/core/variant/array.h
@@ -33,6 +33,8 @@
#include "core/typedefs.h"
+#include <climits>
+
class Variant;
class ArrayPrivate;
class Object;
@@ -102,7 +104,7 @@ public:
Array duplicate(bool p_deep = false) const;
Array recursive_duplicate(bool p_deep, int recursion_count) const;
- Array slice(int p_begin, int p_end, int p_step = 1, bool p_deep = false) const;
+ Array slice(int p_begin, int p_end = INT_MAX, int p_step = 1, bool p_deep = false) const;
Array filter(const Callable &p_callable) const;
Array map(const Callable &p_callable) const;
Variant reduce(const Callable &p_callable, const Variant &p_accum) const;
diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp
index ecf5009fb6..8dd48a4c28 100644
--- a/core/variant/variant_call.cpp
+++ b/core/variant/variant_call.cpp
@@ -1838,7 +1838,7 @@ static void _register_variant_builtin_methods() {
bind_method(Array, bsearch_custom, sarray("value", "func", "before"), varray(true));
bind_method(Array, reverse, sarray(), varray());
bind_method(Array, duplicate, sarray("deep"), varray(false));
- bind_method(Array, slice, sarray("begin", "end", "step", "deep"), varray(1, false));
+ bind_method(Array, slice, sarray("begin", "end", "step", "deep"), varray(INT_MAX, 1, false));
bind_method(Array, filter, sarray("method"), varray());
bind_method(Array, map, sarray("method"), varray());
bind_method(Array, reduce, sarray("method", "accum"), varray(Variant()));
@@ -1858,7 +1858,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedByteArray, resize, sarray("new_size"), varray());
bind_method(PackedByteArray, has, sarray("value"), varray());
bind_method(PackedByteArray, reverse, sarray(), varray());
- bind_method(PackedByteArray, slice, sarray("begin", "end"), varray());
+ bind_method(PackedByteArray, slice, sarray("begin", "end"), varray(INT_MAX));
bind_method(PackedByteArray, sort, sarray(), varray());
bind_method(PackedByteArray, bsearch, sarray("value", "before"), varray(true));
bind_method(PackedByteArray, duplicate, sarray(), varray());
@@ -1919,7 +1919,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedInt32Array, resize, sarray("new_size"), varray());
bind_method(PackedInt32Array, has, sarray("value"), varray());
bind_method(PackedInt32Array, reverse, sarray(), varray());
- bind_method(PackedInt32Array, slice, sarray("begin", "end"), varray());
+ bind_method(PackedInt32Array, slice, sarray("begin", "end"), varray(INT_MAX));
bind_method(PackedInt32Array, to_byte_array, sarray(), varray());
bind_method(PackedInt32Array, sort, sarray(), varray());
bind_method(PackedInt32Array, bsearch, sarray("value", "before"), varray(true));
@@ -1939,7 +1939,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedInt64Array, resize, sarray("new_size"), varray());
bind_method(PackedInt64Array, has, sarray("value"), varray());
bind_method(PackedInt64Array, reverse, sarray(), varray());
- bind_method(PackedInt64Array, slice, sarray("begin", "end"), varray());
+ bind_method(PackedInt64Array, slice, sarray("begin", "end"), varray(INT_MAX));
bind_method(PackedInt64Array, to_byte_array, sarray(), varray());
bind_method(PackedInt64Array, sort, sarray(), varray());
bind_method(PackedInt64Array, bsearch, sarray("value", "before"), varray(true));
@@ -1959,7 +1959,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedFloat32Array, resize, sarray("new_size"), varray());
bind_method(PackedFloat32Array, has, sarray("value"), varray());
bind_method(PackedFloat32Array, reverse, sarray(), varray());
- bind_method(PackedFloat32Array, slice, sarray("begin", "end"), varray());
+ bind_method(PackedFloat32Array, slice, sarray("begin", "end"), varray(INT_MAX));
bind_method(PackedFloat32Array, to_byte_array, sarray(), varray());
bind_method(PackedFloat32Array, sort, sarray(), varray());
bind_method(PackedFloat32Array, bsearch, sarray("value", "before"), varray(true));
@@ -1979,7 +1979,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedFloat64Array, resize, sarray("new_size"), varray());
bind_method(PackedFloat64Array, has, sarray("value"), varray());
bind_method(PackedFloat64Array, reverse, sarray(), varray());
- bind_method(PackedFloat64Array, slice, sarray("begin", "end"), varray());
+ bind_method(PackedFloat64Array, slice, sarray("begin", "end"), varray(INT_MAX));
bind_method(PackedFloat64Array, to_byte_array, sarray(), varray());
bind_method(PackedFloat64Array, sort, sarray(), varray());
bind_method(PackedFloat64Array, bsearch, sarray("value", "before"), varray(true));
@@ -1999,7 +1999,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedStringArray, resize, sarray("new_size"), varray());
bind_method(PackedStringArray, has, sarray("value"), varray());
bind_method(PackedStringArray, reverse, sarray(), varray());
- bind_method(PackedStringArray, slice, sarray("begin", "end"), varray());
+ bind_method(PackedStringArray, slice, sarray("begin", "end"), varray(INT_MAX));
bind_method(PackedStringArray, to_byte_array, sarray(), varray());
bind_method(PackedStringArray, sort, sarray(), varray());
bind_method(PackedStringArray, bsearch, sarray("value", "before"), varray(true));
@@ -2019,7 +2019,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedVector2Array, resize, sarray("new_size"), varray());
bind_method(PackedVector2Array, has, sarray("value"), varray());
bind_method(PackedVector2Array, reverse, sarray(), varray());
- bind_method(PackedVector2Array, slice, sarray("begin", "end"), varray());
+ bind_method(PackedVector2Array, slice, sarray("begin", "end"), varray(INT_MAX));
bind_method(PackedVector2Array, to_byte_array, sarray(), varray());
bind_method(PackedVector2Array, sort, sarray(), varray());
bind_method(PackedVector2Array, bsearch, sarray("value", "before"), varray(true));
@@ -2039,7 +2039,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedVector3Array, resize, sarray("new_size"), varray());
bind_method(PackedVector3Array, has, sarray("value"), varray());
bind_method(PackedVector3Array, reverse, sarray(), varray());
- bind_method(PackedVector3Array, slice, sarray("begin", "end"), varray());
+ bind_method(PackedVector3Array, slice, sarray("begin", "end"), varray(INT_MAX));
bind_method(PackedVector3Array, to_byte_array, sarray(), varray());
bind_method(PackedVector3Array, sort, sarray(), varray());
bind_method(PackedVector3Array, bsearch, sarray("value", "before"), varray(true));
@@ -2059,7 +2059,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedColorArray, resize, sarray("new_size"), varray());
bind_method(PackedColorArray, has, sarray("value"), varray());
bind_method(PackedColorArray, reverse, sarray(), varray());
- bind_method(PackedColorArray, slice, sarray("begin", "end"), varray());
+ bind_method(PackedColorArray, slice, sarray("begin", "end"), varray(INT_MAX));
bind_method(PackedColorArray, to_byte_array, sarray(), varray());
bind_method(PackedColorArray, sort, sarray(), varray());
bind_method(PackedColorArray, bsearch, sarray("value", "before"), varray(true));
diff --git a/core/variant/variant_op.h b/core/variant/variant_op.h
index 9791cb67b3..f72a92d31a 100644
--- a/core/variant/variant_op.h
+++ b/core/variant/variant_op.h
@@ -775,6 +775,7 @@ public:
r_valid = true;
}
static inline void validated_evaluate(const Variant *left, const Variant *right, Variant *r_ret) {
+ *r_ret = Array();
_add_arrays(*VariantGetInternalPtr<Array>::get_ptr(r_ret), *VariantGetInternalPtr<Array>::get_ptr(left), *VariantGetInternalPtr<Array>::get_ptr(right));
}
static void ptr_evaluate(const void *left, const void *right, void *r_ret) {
diff --git a/core/variant/variant_parser.cpp b/core/variant/variant_parser.cpp
index 571181f665..57875bf50f 100644
--- a/core/variant/variant_parser.cpp
+++ b/core/variant/variant_parser.cpp
@@ -1649,12 +1649,13 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
dict.get_key_list(&keys);
keys.sort();
+ if (keys.is_empty()) { // Avoid unnecessary line break.
+ p_store_string_func(p_store_string_ud, "{}");
+ break;
+ }
+
p_store_string_func(p_store_string_ud, "{\n");
for (List<Variant>::Element *E = keys.front(); E; E = E->next()) {
- /*
- if (!_check_type(dict[E->get()]))
- continue;
- */
write(E->get(), p_store_string_func, p_store_string_ud, p_encode_res_func, p_encode_res_ud, recursion_count);
p_store_string_func(p_store_string_ud, ": ");
write(dict[E->get()], p_store_string_func, p_store_string_ud, p_encode_res_func, p_encode_res_ud, recursion_count);
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index be7ac1164e..d8c9ca08e8 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -2493,7 +2493,10 @@
</constant>
<constant name="PROPERTY_HINT_ARRAY_TYPE" value="39" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_MAX" value="41" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_LOCALE_ID" value="41" enum="PropertyHint">
+ Hints that a string property is a locale code. Editing it will show a locale dialog for picking language and country.
+ </constant>
+ <constant name="PROPERTY_HINT_MAX" value="42" enum="PropertyHint">
</constant>
<constant name="PROPERTY_USAGE_NONE" value="0" enum="PropertyUsageFlags">
</constant>
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index 5b1861bc9a..57f51c7ccf 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -445,13 +445,14 @@
<method name="slice" qualifiers="const">
<return type="Array" />
<argument index="0" name="begin" type="int" />
- <argument index="1" name="end" type="int" />
+ <argument index="1" name="end" type="int" default="2147483647" />
<argument index="2" name="step" type="int" default="1" />
<argument index="3" name="deep" type="bool" default="false" />
<description>
Returns the slice of the [Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [Array].
- If [code]end[/code] is negative, it will be relative to the end of the array.
- If specified, [code]step[/code] is the relative index between source elements.
+ The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
+ If specified, [code]step[/code] is the relative index between source elements. It can be negative, then [code]begin[/code] must be higher than [code]end[/code]. For example, [code][0, 1, 2, 3, 4, 5].slice(5, 1, -2)[/code] returns [code][5, 3][/code]).
If [code]deep[/code] is true, each element will be copied by value rather than by reference.
</description>
</method>
@@ -470,6 +471,12 @@
// There is no sort support for Godot.Collections.Array
[/csharp]
[/codeblocks]
+ To perform natural order sorting, you can use [method sort_custom] with [method String.naturalnocasecmp_to] as follows:
+ [codeblock]
+ var strings = ["string1", "string2", "string10", "string11"]
+ strings.sort_custom(func(a, b): return a.naturalnocasecmp_to(b) &lt; 0)
+ print(strings) # Prints [string1, string2, string10, string11]
+ [/codeblock]
</description>
</method>
<method name="sort_custom">
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index c986947dfb..fa980d9f75 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -62,8 +62,7 @@
<argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType" />
<argument index="1" name="arrays" type="Array" />
<argument index="2" name="blend_shapes" type="Array" default="[]" />
- <argument index="3" name="lods" type="Dictionary" default="{
-}" />
+ <argument index="3" name="lods" type="Dictionary" default="{}" />
<argument index="4" name="compress_flags" type="int" default="0" />
<description>
Creates a new surface.
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
index 65b66b2fd5..ef4eba62b2 100644
--- a/doc/classes/Button.xml
+++ b/doc/classes/Button.xml
@@ -94,16 +94,16 @@
</member>
</members>
<theme_items>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
Default text [Color] of the [Button].
</theme_item>
- <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
+ <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
Text [Color] used when the [Button] is disabled.
</theme_item>
- <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Text [Color] used when the [Button] is focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color.
</theme_item>
- <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Text [Color] used when the [Button] is being hovered.
</theme_item>
<theme_item name="font_hover_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml
index 6180f56858..3626420589 100644
--- a/doc/classes/CheckBox.xml
+++ b/doc/classes/CheckBox.xml
@@ -14,16 +14,16 @@
<member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" overrides="BaseButton" default="true" />
</members>
<theme_items>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
The [CheckBox] text's font color.
</theme_item>
- <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
+ <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
The [CheckBox] text's font color when it's disabled.
</theme_item>
- <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
The [CheckBox] text's font color when it's focused. Only replaces the normal text color of the checkbox. Disabled, hovered, and pressed states take precedence over this color.
</theme_item>
- <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
The [CheckBox] text's font color when it's hovered.
</theme_item>
<theme_item name="font_hover_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml
index 659fb5126f..74d438f24e 100644
--- a/doc/classes/CheckButton.xml
+++ b/doc/classes/CheckButton.xml
@@ -14,16 +14,16 @@
<member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" overrides="BaseButton" default="true" />
</members>
<theme_items>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
The [CheckButton] text's font color.
</theme_item>
- <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
+ <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
The [CheckButton] text's font color when it's disabled.
</theme_item>
- <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
The [CheckButton] text's font color when it's focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color.
</theme_item>
- <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
The [CheckButton] text's font color when it's hovered.
</theme_item>
<theme_item name="font_hover_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml
index 697b0443f1..289ac2cb28 100644
--- a/doc/classes/CodeEdit.xml
+++ b/doc/classes/CodeEdit.xml
@@ -442,7 +442,7 @@
<member name="auto_brace_completion_highlight_matching" type="bool" setter="set_highlight_matching_braces_enabled" getter="is_highlight_matching_braces_enabled" default="false">
Highlight mismatching brace pairs.
</member>
- <member name="auto_brace_completion_pairs" type="Dictionary" setter="set_auto_brace_completion_pairs" getter="get_auto_brace_completion_pairs" default="{&quot;\&quot;&quot;: &quot;\&quot;&quot;,&quot;&apos;&quot;: &quot;&apos;&quot;,&quot;(&quot;: &quot;)&quot;,&quot;[&quot;: &quot;]&quot;,&quot;{&quot;: &quot;}&quot;}">
+ <member name="auto_brace_completion_pairs" type="Dictionary" setter="set_auto_brace_completion_pairs" getter="get_auto_brace_completion_pairs" default="{ &quot;\&quot;&quot;: &quot;\&quot;&quot;, &quot;&apos;&quot;: &quot;&apos;&quot;, &quot;(&quot;: &quot;)&quot;, &quot;[&quot;: &quot;]&quot;, &quot;{&quot;: &quot;}&quot; }">
Sets the brace pairs to be autocompleted.
</member>
<member name="code_completion_enabled" type="bool" setter="set_code_completion_enabled" getter="is_code_completion_enabled" default="false">
@@ -574,7 +574,7 @@
<theme_item name="caret_background_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
[Color] of the text behind the caret when block caret is enabled.
</theme_item>
- <theme_item name="caret_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="caret_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
[Color] of the caret.
</theme_item>
<theme_item name="code_folding_color" data_type="color" type="Color" default="Color(0.8, 0.8, 0.8, 0.8)">
@@ -601,13 +601,13 @@
<theme_item name="executing_line_color" data_type="color" type="Color" default="Color(0.98, 0.89, 0.27, 1)">
[Color] of the executing icon for executing lines.
</theme_item>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
Sets the font [Color].
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the [CodeEdit].
</theme_item>
- <theme_item name="font_readonly_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)">
+ <theme_item name="font_readonly_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
Sets the font [Color] when [member TextEdit.editable] is disabled.
</theme_item>
<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
@@ -625,7 +625,7 @@
<theme_item name="search_result_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 1)">
[Color] behind the text that matches the search query.
</theme_item>
- <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.49, 0.49, 0.49, 1)">
+ <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.5, 0.5, 0.5, 1)">
Sets the highlight [Color] of text selections.
</theme_item>
<theme_item name="word_highlighted_color" data_type="color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)">
diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml
index 63492bf9a0..828b24be83 100644
--- a/doc/classes/CollisionObject2D.xml
+++ b/doc/classes/CollisionObject2D.xml
@@ -208,7 +208,7 @@
Defines the behavior in physics when [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED]. See [enum DisableMode] for more details about the different modes.
</member>
<member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable" default="true">
- If [code]true[/code], this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one [code]collision_layer[/code] bit to be set.
+ If [code]true[/code], this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one [member collision_layer] bit to be set.
</member>
</members>
<signals>
diff --git a/doc/classes/CollisionObject3D.xml b/doc/classes/CollisionObject3D.xml
index 33305471b8..96912cf469 100644
--- a/doc/classes/CollisionObject3D.xml
+++ b/doc/classes/CollisionObject3D.xml
@@ -183,7 +183,7 @@
If [code]true[/code], the [CollisionObject3D] will continue to receive input events as the mouse is dragged across its shapes.
</member>
<member name="input_ray_pickable" type="bool" setter="set_ray_pickable" getter="is_ray_pickable" default="true">
- If [code]true[/code], the [CollisionObject3D]'s shapes will respond to [RayCast3D]s.
+ If [code]true[/code], this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one [member collision_layer] bit to be set.
</member>
</members>
<signals>
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index a41875385c..6e06bf454c 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -20,6 +20,12 @@
[b]Note:[/b] This method is only implemented on Linux.
</description>
</method>
+ <method name="clipboard_has" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if there is content on the user's clipboard.
+ </description>
+ </method>
<method name="clipboard_set">
<return type="void" />
<argument index="0" name="clipboard" type="String" />
@@ -35,12 +41,6 @@
[b]Note:[/b] This method is only implemented on Linux.
</description>
</method>
- <method name="console_set_visible">
- <return type="void" />
- <argument index="0" name="console_visible" type="bool" />
- <description>
- </description>
- </method>
<method name="create_sub_window">
<return type="int" />
<argument index="0" name="mode" type="int" enum="DisplayServer.WindowMode" />
@@ -281,11 +281,6 @@
<description>
</description>
</method>
- <method name="is_console_visible" qualifiers="const">
- <return type="bool" />
- <description>
- </description>
- </method>
<method name="keyboard_get_current_layout" qualifiers="const">
<return type="int" />
<description>
@@ -332,11 +327,6 @@
[b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
- <method name="mouse_get_absolute_position" qualifiers="const">
- <return type="Vector2i" />
- <description>
- </description>
- </method>
<method name="mouse_get_button_state" qualifiers="const">
<return type="int" enum="MouseButton" />
<description>
@@ -803,23 +793,21 @@
</constant>
<constant name="FEATURE_NATIVE_DIALOG" value="9" enum="Feature">
</constant>
- <constant name="FEATURE_CONSOLE_WINDOW" value="10" enum="Feature">
- </constant>
- <constant name="FEATURE_IME" value="11" enum="Feature">
+ <constant name="FEATURE_IME" value="10" enum="Feature">
</constant>
- <constant name="FEATURE_WINDOW_TRANSPARENCY" value="12" enum="Feature">
+ <constant name="FEATURE_WINDOW_TRANSPARENCY" value="11" enum="Feature">
</constant>
- <constant name="FEATURE_HIDPI" value="13" enum="Feature">
+ <constant name="FEATURE_HIDPI" value="12" enum="Feature">
</constant>
- <constant name="FEATURE_ICON" value="14" enum="Feature">
+ <constant name="FEATURE_ICON" value="13" enum="Feature">
</constant>
- <constant name="FEATURE_NATIVE_ICON" value="15" enum="Feature">
+ <constant name="FEATURE_NATIVE_ICON" value="14" enum="Feature">
</constant>
- <constant name="FEATURE_ORIENTATION" value="16" enum="Feature">
+ <constant name="FEATURE_ORIENTATION" value="15" enum="Feature">
</constant>
- <constant name="FEATURE_SWAP_BUFFERS" value="17" enum="Feature">
+ <constant name="FEATURE_SWAP_BUFFERS" value="16" enum="Feature">
</constant>
- <constant name="FEATURE_CLIPBOARD_PRIMARY" value="19" enum="Feature">
+ <constant name="FEATURE_CLIPBOARD_PRIMARY" value="18" enum="Feature">
</constant>
<constant name="MOUSE_MODE_VISIBLE" value="0" enum="MouseMode">
Makes the mouse cursor visible if it is hidden.
diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml
index 39589138fa..27dab3d422 100644
--- a/doc/classes/EditorInspector.xml
+++ b/doc/classes/EditorInspector.xml
@@ -13,6 +13,11 @@
<member name="horizontal_scroll_mode" type="int" setter="set_horizontal_scroll_mode" getter="get_horizontal_scroll_mode" overrides="ScrollContainer" enum="ScrollContainer.ScrollMode" default="0" />
</members>
<signals>
+ <signal name="edited_object_changed">
+ <description>
+ Emitted when the object being edited by the inspector has changed.
+ </description>
+ </signal>
<signal name="object_id_selected">
<argument index="0" name="id" type="int" />
<description>
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index 2090672acc..dab9d7b054 100644
--- a/doc/classes/Environment.xml
+++ b/doc/classes/Environment.xml
@@ -168,7 +168,8 @@
</member>
<member name="sdfgi_cascade0_distance" type="float" setter="set_sdfgi_cascade0_distance" getter="get_sdfgi_cascade0_distance" default="12.8">
</member>
- <member name="sdfgi_cascades" type="int" setter="set_sdfgi_cascades" getter="get_sdfgi_cascades" enum="Environment.SDFGICascades" default="1">
+ <member name="sdfgi_cascades" type="int" setter="set_sdfgi_cascades" getter="get_sdfgi_cascades" default="6">
+ The number of cascades to use for SDFGI (between 1 and 8). A higher number of cascades allows displaying SDFGI further away while preserving detail up close, at the cost of performance. When using SDFGI on small-scale levels, [member sdfgi_cascades] can often be decreased between [code]1[/code] and [code]4[/code] to improve performance.
</member>
<member name="sdfgi_enabled" type="bool" setter="set_sdfgi_enabled" getter="is_sdfgi_enabled" default="false">
If [code]true[/code], enables signed distance field global illumination for meshes that have their [member GeometryInstance3D.gi_mode] set to [constant GeometryInstance3D.GI_MODE_BAKED]. SDFGI is a real-time global illumination technique that works well with procedurally generated and user-built levels, including in situations where geometry is created during gameplay. The signed distance field is automatically generated around the camera as it moves. Dynamic lights are supported, but dynamic occluders and emissive surfaces are not.
@@ -371,12 +372,6 @@
<constant name="GLOW_BLEND_MODE_MIX" value="4" enum="GlowBlendMode">
Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect.
</constant>
- <constant name="SDFGI_CASCADES_4" value="0" enum="SDFGICascades">
- </constant>
- <constant name="SDFGI_CASCADES_6" value="1" enum="SDFGICascades">
- </constant>
- <constant name="SDFGI_CASCADES_8" value="2" enum="SDFGICascades">
- </constant>
<constant name="SDFGI_Y_SCALE_DISABLED" value="0" enum="SDFGIYScale">
</constant>
<constant name="SDFGI_Y_SCALE_75_PERCENT" value="1" enum="SDFGIYScale">
diff --git a/doc/classes/FlowContainer.xml b/doc/classes/FlowContainer.xml
new file mode 100644
index 0000000000..482d879b09
--- /dev/null
+++ b/doc/classes/FlowContainer.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="FlowContainer" inherits="Container" version="4.0">
+ <brief_description>
+ Base class for flow containers.
+ </brief_description>
+ <description>
+ Arranges child [Control] nodes vertically or horizontally in a left-to-right or top-to-bottom flow.
+ A line is filled with [Control] nodes until no more fit on the same line, similar to text in an autowrapped label.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_line_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the current line count.
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/FontData.xml b/doc/classes/FontData.xml
index 36976f7083..55b715c3fc 100644
--- a/doc/classes/FontData.xml
+++ b/doc/classes/FontData.xml
@@ -306,6 +306,22 @@
Returns [code]true[/code], if font supports given script ([url=https://en.wikipedia.org/wiki/ISO_15924]ISO 15924[/url] code).
</description>
</method>
+ <method name="load_bitmap_font">
+ <return type="int" enum="Error" />
+ <argument index="0" name="path" type="String" />
+ <description>
+ Loads an AngelCode BMFont (.fnt, .font) bitmap font from file [code]path[/code].
+ [b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external fonts at run-time, such as fonts located at the [code]user://[/code] directory.
+ </description>
+ </method>
+ <method name="load_dynamic_font">
+ <return type="int" enum="Error" />
+ <argument index="0" name="path" type="String" />
+ <description>
+ Loads a TrueType (.ttf), OpenType (.otf), WOFF (.woff) or Type 1 (.pfb, .pfm) dynamic font from file [code]path[/code].
+ [b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external fonts at run-time, such as fonts located at the [code]user://[/code] directory.
+ </description>
+ </method>
<method name="remove_cache">
<return type="void" />
<argument index="0" name="cache_index" type="int" />
diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml
index d5780dce2d..c8606cf67f 100644
--- a/doc/classes/GraphNode.xml
+++ b/doc/classes/GraphNode.xml
@@ -292,25 +292,25 @@
</constant>
</constants>
<theme_items>
- <theme_item name="close_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
+ <theme_item name="close_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
The color modulation applied to the close button icon.
</theme_item>
- <theme_item name="resizer_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
+ <theme_item name="resizer_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
The color modulation applied to the resizer icon.
</theme_item>
- <theme_item name="title_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
+ <theme_item name="title_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
Color of the title text.
</theme_item>
- <theme_item name="close_offset" data_type="constant" type="int" default="18">
+ <theme_item name="close_offset" data_type="constant" type="int" default="22">
The vertical offset of the close button.
</theme_item>
- <theme_item name="port_offset" data_type="constant" type="int" default="3">
+ <theme_item name="port_offset" data_type="constant" type="int" default="0">
Horizontal offset for the ports.
</theme_item>
- <theme_item name="separation" data_type="constant" type="int" default="1">
+ <theme_item name="separation" data_type="constant" type="int" default="2">
The vertical distance between ports.
</theme_item>
- <theme_item name="title_offset" data_type="constant" type="int" default="20">
+ <theme_item name="title_offset" data_type="constant" type="int" default="26">
Vertical offset of the title text.
</theme_item>
<theme_item name="title_font" data_type="font" type="Font">
@@ -334,10 +334,6 @@
<theme_item name="commentfocus" data_type="style" type="StyleBox">
The [StyleBox] used when [member comment] is enabled and the [GraphNode] is focused.
</theme_item>
- <theme_item name="defaultfocus" data_type="style" type="StyleBox">
- </theme_item>
- <theme_item name="defaultframe" data_type="style" type="StyleBox">
- </theme_item>
<theme_item name="frame" data_type="style" type="StyleBox">
The default background for [GraphNode].
</theme_item>
diff --git a/doc/classes/HFlowContainer.xml b/doc/classes/HFlowContainer.xml
new file mode 100644
index 0000000000..8ee2da69b7
--- /dev/null
+++ b/doc/classes/HFlowContainer.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="HFlowContainer" inherits="FlowContainer" version="4.0">
+ <brief_description>
+ Horizontal flow container.
+ </brief_description>
+ <description>
+ Horizontal version of [FlowContainer].
+ </description>
+ <tutorials>
+ </tutorials>
+ <theme_items>
+ <theme_item name="hseparation" data_type="constant" type="int" default="4">
+ The horizontal separation of children nodes.
+ </theme_item>
+ <theme_item name="vseparation" data_type="constant" type="int" default="4">
+ The vertical separation of children nodes.
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/HSplitContainer.xml b/doc/classes/HSplitContainer.xml
index f2c505b1bc..6ba079bc66 100644
--- a/doc/classes/HSplitContainer.xml
+++ b/doc/classes/HSplitContainer.xml
@@ -18,7 +18,5 @@
<theme_item name="grabber" data_type="icon" type="Texture2D">
The icon used for the grabber drawn in the middle area.
</theme_item>
- <theme_item name="bg" data_type="style" type="StyleBox">
- </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml
index e7bb1b9825..60d4b664d2 100644
--- a/doc/classes/Image.xml
+++ b/doc/classes/Image.xml
@@ -452,7 +452,7 @@
</method>
</methods>
<members>
- <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{&quot;data&quot;: PackedByteArray(),&quot;format&quot;: &quot;Lum8&quot;,&quot;height&quot;: 0,&quot;mipmaps&quot;: false,&quot;width&quot;: 0}">
+ <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{ &quot;data&quot;: PackedByteArray(), &quot;format&quot;: &quot;Lum8&quot;, &quot;height&quot;: 0, &quot;mipmaps&quot;: false, &quot;width&quot;: 0 }">
Holds all the image's color data in a given format. See [enum Format] constants.
</member>
</members>
diff --git a/doc/classes/ImporterMesh.xml b/doc/classes/ImporterMesh.xml
index ab344f908c..4c323156c9 100644
--- a/doc/classes/ImporterMesh.xml
+++ b/doc/classes/ImporterMesh.xml
@@ -23,8 +23,7 @@
<argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType" />
<argument index="1" name="arrays" type="Array" />
<argument index="2" name="blend_shapes" type="Array" default="[]" />
- <argument index="3" name="lods" type="Dictionary" default="{
-}" />
+ <argument index="3" name="lods" type="Dictionary" default="{}" />
<argument index="4" name="material" type="Material" default="null" />
<argument index="5" name="name" type="String" default="&quot;&quot;" />
<argument index="6" name="flags" type="int" default="0" />
@@ -178,7 +177,7 @@
</method>
</methods>
<members>
- <member name="_data" type="Dictionary" setter="_set_data" getter="_get_data" default="{&quot;surfaces&quot;: []}">
+ <member name="_data" type="Dictionary" setter="_set_data" getter="_get_data" default="{ &quot;surfaces&quot;: [] }">
</member>
</members>
</class>
diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml
index 593d0c9523..c87c5d2868 100644
--- a/doc/classes/ItemList.xml
+++ b/doc/classes/ItemList.xml
@@ -463,7 +463,7 @@
</constant>
</constants>
<theme_items>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.63, 0.63, 0.63, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.65, 0.65, 0.65, 1)">
Default text [Color] of the item.
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml
index 63e6307b39..fed9df8bd8 100644
--- a/doc/classes/JSON.xml
+++ b/doc/classes/JSON.xml
@@ -66,7 +66,7 @@
Converts a [Variant] var to JSON text and returns the result. Useful for serializing data to store or send over the network.
[b]Note:[/b] The JSON specification does not define integer or float types, but only a [i]number[/i] type. Therefore, converting a Variant to JSON text will convert all numerical values to [float] types.
[b]Note:[/b] If [code]full_precision[/code] is true, when stringifying floats, the unreliable digits are stringified in addition to the reliable digits to guarantee exact decoding.
- Use [code]indent[/code] parameter to pretty stringify the output.
+ The [code]indent[/code] parameter controls if and how something is indented, the string used for this parameter will be used where there should be an indent in the output, even spaces like [code]" "[/code] will work. [code]\t[/code] and [code]\n[/code] can also be used for a tab indent, or to make a newline for each indent respectively.
[b]Example output:[/b]
[codeblock]
## JSON.stringify(my_dictionary)
@@ -74,18 +74,34 @@
## JSON.stringify(my_dictionary, "\t")
{
- "name": "my_dictionary",
- "version": "1.0.0",
- "entities": [
- {
- "name": "entity_0",
- "value": "value_0"
- },
- {
- "name": "entity_1",
- "value": "value_1"
- }
- ]
+ "name": "my_dictionary",
+ "version": "1.0.0",
+ "entities": [
+ {
+ "name": "entity_0",
+ "value": "value_0"
+ },
+ {
+ "name": "entity_1",
+ "value": "value_1"
+ }
+ ]
+ }
+
+ ## JSON.stringify(my_dictionary, "...")
+ {
+ ..."name": "my_dictionary",
+ ..."version": "1.0.0",
+ ..."entities": [
+ ......{
+ ........."name": "entity_0",
+ ........."value": "value_0"
+ ......},
+ ......{
+ ........."name": "entity_1",
+ ........."value": "value_1"
+ ......}
+ ...]
}
[/codeblock]
</description>
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml
index ff01ad72fd..224579e8c5 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -382,28 +382,28 @@
</constant>
</constants>
<theme_items>
- <theme_item name="caret_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="caret_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Color of the [LineEdit]'s caret (text cursor). This can be set to a fully transparent color to hide the caret entirely.
</theme_item>
- <theme_item name="clear_button_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="clear_button_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
Color used as default tint for the clear button.
</theme_item>
<theme_item name="clear_button_color_pressed" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Color used for the clear button when it's pressed.
</theme_item>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
Default font color.
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the [LineEdit].
</theme_item>
- <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
+ <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Font color for selected text (inside the selection rectangle).
</theme_item>
- <theme_item name="font_uneditable_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)">
+ <theme_item name="font_uneditable_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
Font color when editing is disabled.
</theme_item>
- <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.49, 0.49, 0.49, 1)">
+ <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.5, 0.5, 0.5, 1)">
Color of the selection rectangle.
</theme_item>
<theme_item name="caret_width" data_type="constant" type="int" default="1">
diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml
index a20db4d7e9..4377fc1036 100644
--- a/doc/classes/LinkButton.xml
+++ b/doc/classes/LinkButton.xml
@@ -66,13 +66,13 @@
</constant>
</constants>
<theme_items>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
Default text [Color] of the [LinkButton].
</theme_item>
- <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Text [Color] used when the [LinkButton] is focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color.
</theme_item>
- <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Text [Color] used when the [LinkButton] is being hovered.
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml
index 632b22c1de..79d1c05be4 100644
--- a/doc/classes/MenuButton.xml
+++ b/doc/classes/MenuButton.xml
@@ -46,16 +46,16 @@
</signal>
</signals>
<theme_items>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
Default text [Color] of the [MenuButton].
</theme_item>
<theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(1, 1, 1, 0.3)">
Text [Color] used when the [MenuButton] is disabled.
</theme_item>
- <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Text [Color] used when the [MenuButton] is focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color.
</theme_item>
- <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Text [Color] used when the [MenuButton] is being hovered.
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 1ed4b335ad..1c44967aba 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -51,8 +51,10 @@
<return type="int" />
<argument index="0" name="path" type="String" />
<argument index="1" name="arguments" type="PackedStringArray" />
+ <argument index="2" name="open_console" type="bool" default="false" />
<description>
Creates a new process that runs independently of Godot. It will not terminate if Godot terminates. The path specified in [code]path[/code] must exist and be executable file or macOS .app bundle. Platform path resolution will be used. The [code]arguments[/code] are used in the given order and separated by a space.
+ On Windows, if [code]open_console[/code] is [code]true[/code] and process is console app, new terminal window will be opened, it's ignored on other platforms.
If the process creation succeeds, the method will return the new process ID, which you can use to monitor the process (and potentially terminate it with [method kill]). If the process creation fails, the method will return [code]-1[/code].
For example, running another instance of the project:
[codeblocks]
@@ -109,8 +111,10 @@
<argument index="1" name="arguments" type="PackedStringArray" />
<argument index="2" name="output" type="Array" default="[]" />
<argument index="3" name="read_stderr" type="bool" default="false" />
+ <argument index="4" name="open_console" type="bool" default="false" />
<description>
Executes a command. The file specified in [code]path[/code] must exist and be executable. Platform path resolution will be used. The [code]arguments[/code] are used in the given order and separated by a space. If an [code]output[/code] [Array] is provided, the complete shell output of the process will be appended as a single [String] element in [code]output[/code]. If [code]read_stderr[/code] is [code]true[/code], the output to the standard error stream will be included too.
+ On Windows, if [code]open_console[/code] is [code]true[/code] and process is console app, new terminal window will be opened, it's ignored on other platforms.
If the command is successfully executed, the method will return the exit code of the command, or [code]-1[/code] if it fails.
[b]Note:[/b] The Godot thread will pause its execution until the executed command terminates. Use [Thread] to create a separate thread that will not pause the Godot thread, or use [method create_process] to create a completely independent process.
For example, to retrieve a list of the working directory's contents:
@@ -124,7 +128,7 @@
int exitCode = OS.Execute("ls", new string[] {"-l", "/tmp"}, output);
[/csharp]
[/codeblocks]
- To execute a composite command, a platform-specific shell can be invoked. For example:
+ If you wish to access a shell built-in or perform a composite command, a platform-specific shell can be invoked. For example:
[codeblocks]
[gdscript]
var output = []
@@ -136,6 +140,9 @@
[/csharp]
[/codeblocks]
[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
+ [b]Note:[/b] To execute a Windows command interpreter built-in command, specify [code]cmd.exe[/code] in [code]path[/code], [code]/c[/code] as the first argument, and the desired command as the second argument.
+ [b]Note:[/b] To execute a PowerShell built-in command, specify [code]powershell.exe[/code] in [code]path[/code], [code]-Command[/code] as the first argument, and the desired command as the second argument.
+ [b]Note:[/b] To execute a Unix shell built-in command, specify shell executable name in [code]path[/code], [code]-c[/code] as the first argument, and the desired command as the second argument.
[b]Note:[/b] On macOS, sandboxed applications are limited to run only embedded helper executables, specified during export.
</description>
</method>
diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml
index 87561917f3..7bb67be4c4 100644
--- a/doc/classes/OptionButton.xml
+++ b/doc/classes/OptionButton.xml
@@ -182,16 +182,16 @@
</signal>
</signals>
<theme_items>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
Default text [Color] of the [OptionButton].
</theme_item>
- <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
+ <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
Text [Color] used when the [OptionButton] is disabled.
</theme_item>
- <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Text [Color] used when the [OptionButton] is focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color.
</theme_item>
- <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Text [Color] used when the [OptionButton] is being hovered.
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
@@ -200,7 +200,7 @@
<theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the [OptionButton] is being pressed.
</theme_item>
- <theme_item name="arrow_margin" data_type="constant" type="int" default="2">
+ <theme_item name="arrow_margin" data_type="constant" type="int" default="4">
The horizontal space between the arrow icon and the right edge of the button.
</theme_item>
<theme_item name="hseparation" data_type="constant" type="int" default="2">
diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml
index 686854ffe8..3dc8307d44 100644
--- a/doc/classes/PackedByteArray.xml
+++ b/doc/classes/PackedByteArray.xml
@@ -369,10 +369,11 @@
<method name="slice" qualifiers="const">
<return type="PackedByteArray" />
<argument index="0" name="begin" type="int" />
- <argument index="1" name="end" type="int" />
+ <argument index="1" name="end" type="int" default="2147483647" />
<description>
Returns the slice of the [PackedByteArray], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedByteArray].
- If [code]end[/code]is negative, it will be relative to the end of the array.
+ The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
<method name="sort">
diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml
index d875549319..8aac7d1bf4 100644
--- a/doc/classes/PackedColorArray.xml
+++ b/doc/classes/PackedColorArray.xml
@@ -132,8 +132,11 @@
<method name="slice" qualifiers="const">
<return type="PackedColorArray" />
<argument index="0" name="begin" type="int" />
- <argument index="1" name="end" type="int" />
+ <argument index="1" name="end" type="int" default="2147483647" />
<description>
+ Returns the slice of the [PackedColorArray], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedColorArray].
+ The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
<method name="sort">
diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml
index 6c77c4bee2..0e66dd7967 100644
--- a/doc/classes/PackedFloat32Array.xml
+++ b/doc/classes/PackedFloat32Array.xml
@@ -133,8 +133,11 @@
<method name="slice" qualifiers="const">
<return type="PackedFloat32Array" />
<argument index="0" name="begin" type="int" />
- <argument index="1" name="end" type="int" />
+ <argument index="1" name="end" type="int" default="2147483647" />
<description>
+ Returns the slice of the [PackedFloat32Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedFloat32Array].
+ The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
<method name="sort">
diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml
index a8282c099a..eaad4fec54 100644
--- a/doc/classes/PackedFloat64Array.xml
+++ b/doc/classes/PackedFloat64Array.xml
@@ -133,8 +133,11 @@
<method name="slice" qualifiers="const">
<return type="PackedFloat64Array" />
<argument index="0" name="begin" type="int" />
- <argument index="1" name="end" type="int" />
+ <argument index="1" name="end" type="int" default="2147483647" />
<description>
+ Returns the slice of the [PackedFloat64Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedFloat64Array].
+ The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
<method name="sort">
diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml
index da26e93b96..ec698ed8e5 100644
--- a/doc/classes/PackedInt32Array.xml
+++ b/doc/classes/PackedInt32Array.xml
@@ -133,8 +133,11 @@
<method name="slice" qualifiers="const">
<return type="PackedInt32Array" />
<argument index="0" name="begin" type="int" />
- <argument index="1" name="end" type="int" />
+ <argument index="1" name="end" type="int" default="2147483647" />
<description>
+ Returns the slice of the [PackedInt32Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedInt32Array].
+ The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
<method name="sort">
diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml
index 9ddf43a837..ec4b3c1209 100644
--- a/doc/classes/PackedInt64Array.xml
+++ b/doc/classes/PackedInt64Array.xml
@@ -133,8 +133,11 @@
<method name="slice" qualifiers="const">
<return type="PackedInt64Array" />
<argument index="0" name="begin" type="int" />
- <argument index="1" name="end" type="int" />
+ <argument index="1" name="end" type="int" default="2147483647" />
<description>
+ Returns the slice of the [PackedInt64Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedInt64Array].
+ The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
<method name="sort">
diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml
index d3a770b35b..4bba6563bb 100644
--- a/doc/classes/PackedScene.xml
+++ b/doc/classes/PackedScene.xml
@@ -104,7 +104,7 @@
</method>
</methods>
<members>
- <member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene" default="{&quot;conn_count&quot;: 0,&quot;conns&quot;: PackedInt32Array(),&quot;editable_instances&quot;: [],&quot;names&quot;: PackedStringArray(),&quot;node_count&quot;: 0,&quot;node_paths&quot;: [],&quot;nodes&quot;: PackedInt32Array(),&quot;variants&quot;: [],&quot;version&quot;: 2}">
+ <member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene" default="{ &quot;conn_count&quot;: 0, &quot;conns&quot;: PackedInt32Array(), &quot;editable_instances&quot;: [], &quot;names&quot;: PackedStringArray(), &quot;node_count&quot;: 0, &quot;node_paths&quot;: [], &quot;nodes&quot;: PackedInt32Array(), &quot;variants&quot;: [], &quot;version&quot;: 2 }">
A dictionary representation of the scene contents.
Available keys include "rnames" and "variants" for resources, "node_count", "nodes", "node_paths" for nodes, "editable_instances" for base scene children overrides, "conn_count" and "conns" for signal connections, and "version" for the format style of the PackedScene.
</member>
diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml
index 439d59dde7..ebe9c591b8 100644
--- a/doc/classes/PackedStringArray.xml
+++ b/doc/classes/PackedStringArray.xml
@@ -133,8 +133,11 @@
<method name="slice" qualifiers="const">
<return type="PackedStringArray" />
<argument index="0" name="begin" type="int" />
- <argument index="1" name="end" type="int" />
+ <argument index="1" name="end" type="int" default="2147483647" />
<description>
+ Returns the slice of the [PackedStringArray], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedStringArray].
+ The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
<method name="sort">
diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml
index 8c4f052016..d72ca4b4bb 100644
--- a/doc/classes/PackedVector2Array.xml
+++ b/doc/classes/PackedVector2Array.xml
@@ -133,8 +133,11 @@
<method name="slice" qualifiers="const">
<return type="PackedVector2Array" />
<argument index="0" name="begin" type="int" />
- <argument index="1" name="end" type="int" />
+ <argument index="1" name="end" type="int" default="2147483647" />
<description>
+ Returns the slice of the [PackedVector2Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedVector2Array].
+ The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
<method name="sort">
diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml
index 8229af984d..cbae0c40e7 100644
--- a/doc/classes/PackedVector3Array.xml
+++ b/doc/classes/PackedVector3Array.xml
@@ -132,8 +132,11 @@
<method name="slice" qualifiers="const">
<return type="PackedVector3Array" />
<argument index="0" name="begin" type="int" />
- <argument index="1" name="end" type="int" />
+ <argument index="1" name="end" type="int" default="2147483647" />
<description>
+ Returns the slice of the [PackedVector3Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedVector3Array].
+ The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
<method name="sort">
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
index b45f62394d..108c674ef7 100644
--- a/doc/classes/PopupMenu.xml
+++ b/doc/classes/PopupMenu.xml
@@ -538,19 +538,19 @@
<theme_item name="font_accelerator_color" data_type="color" type="Color" default="Color(0.7, 0.7, 0.7, 0.8)">
The text [Color] used for shortcuts and accelerators that show next to the menu item name when defined. See [method get_item_accelerator] for more info on accelerators.
</theme_item>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
The default text [Color] for menu items' names.
</theme_item>
<theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.4, 0.4, 0.4, 0.8)">
[Color] used for disabled menu items' text.
</theme_item>
- <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
[Color] used for the hovered text.
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the menu item.
</theme_item>
- <theme_item name="font_separator_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="font_separator_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
[Color] used for labeled separators' text. See [method add_separator].
</theme_item>
<theme_item name="hseparation" data_type="constant" type="int" default="4">
diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml
index 24cc490ce7..923ce0c53e 100644
--- a/doc/classes/ProgressBar.xml
+++ b/doc/classes/ProgressBar.xml
@@ -16,7 +16,7 @@
<member name="step" type="float" setter="set_step" getter="get_step" overrides="Range" default="0.01" />
</members>
<theme_items>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
The color of the text.
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index 9e2d789076..a92afb7ea7 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -487,7 +487,7 @@
</member>
<member name="display/window/handheld/orientation" type="int" setter="" getter="" default="0">
The default screen orientation to use on mobile devices. See [enum DisplayServer.ScreenOrientation] for possible values.
- [b]Note:[/b] When set to a portrait orientation, this project setting does not flip the project resolution's width and height automatically. Instead, you have to set [member display/window/size/width] and [member display/window/size/height] accordingly.
+ [b]Note:[/b] When set to a portrait orientation, this project setting does not flip the project resolution's width and height automatically. Instead, you have to set [member display/window/size/viewport_width] and [member display/window/size/viewport_height] accordingly.
</member>
<member name="display/window/ios/hide_home_indicator" type="bool" setter="" getter="" default="true">
If [code]true[/code], the home indicator is hidden automatically. This only affects iOS devices without a physical home button.
@@ -505,21 +505,23 @@
Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode.
[b]Note:[/b] This setting is ignored on iOS, Android, and HTML5.
</member>
- <member name="display/window/size/height" type="int" setter="" getter="" default="600">
- Sets the game's main viewport height. On desktop platforms, this is the default window size. Stretch mode settings also use this as a reference when enabled.
- </member>
<member name="display/window/size/resizable" type="bool" setter="" getter="" default="true">
Allows the window to be resizable by default.
[b]Note:[/b] This setting is ignored on iOS and Android.
</member>
- <member name="display/window/size/test_height" type="int" setter="" getter="" default="0">
- If greater than zero, overrides the window height when running the game. Useful for testing stretch modes.
+ <member name="display/window/size/viewport_height" type="int" setter="" getter="" default="600">
+ Sets the game's main viewport height. On desktop platforms, this is also the initial window height.
+ </member>
+ <member name="display/window/size/viewport_width" type="int" setter="" getter="" default="1024">
+ Sets the game's main viewport width. On desktop platforms, this is also the initial window width.
</member>
- <member name="display/window/size/test_width" type="int" setter="" getter="" default="0">
- If greater than zero, overrides the window width when running the game. Useful for testing stretch modes.
+ <member name="display/window/size/window_height_override" type="int" setter="" getter="" default="0">
+ On desktop platforms, sets the game's initial window height.
+ [b]Note:[/b] By default, or when set to 0, the initial window height is the [member display/window/size/viewport_height]. This setting is ignored on iOS, Android, and HTML5.
</member>
- <member name="display/window/size/width" type="int" setter="" getter="" default="1024">
- Sets the game's main viewport width. On desktop platforms, this is the default window size. Stretch mode settings also use this as a reference when enabled.
+ <member name="display/window/size/window_width_override" type="int" setter="" getter="" default="0">
+ On desktop platforms, sets the game's initial window width.
+ [b]Note:[/b] By default, or when set to 0, the initial window width is the viewport [member display/window/size/viewport_width]. This setting is ignored on iOS, Android, and HTML5.
</member>
<member name="display/window/vsync/vsync_mode" type="int" setter="" getter="" default="1">
Sets the VSync mode for the main game window.
@@ -560,8 +562,7 @@
<member name="gui/theme/custom_font" type="String" setter="" getter="" default="&quot;&quot;">
Path to a custom [Font] resource to use as default for all GUI elements of the project.
</member>
- <member name="gui/theme/use_hidpi" type="bool" setter="" getter="" default="false">
- If [code]true[/code], makes sure the theme used works with HiDPI.
+ <member name="gui/theme/default_theme_scale" type="float" setter="" getter="" default="1.0">
</member>
<member name="gui/timers/incremental_search_max_interval_msec" type="int" setter="" getter="" default="2000">
Timer setting for incremental search in [Tree], [ItemList], etc. controls (in milliseconds).
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index 5127455b4d..9e78372013 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -1001,7 +1001,7 @@
<return type="void" />
<argument index="0" name="env" type="RID" />
<argument index="1" name="enable" type="bool" />
- <argument index="2" name="cascades" type="int" enum="RenderingServer.EnvironmentSDFGICascades" />
+ <argument index="2" name="cascades" type="int" />
<argument index="3" name="min_cell_size" type="float" />
<argument index="4" name="y_scale" type="int" enum="RenderingServer.EnvironmentSDFGIYScale" />
<argument index="5" name="use_occlusion" type="bool" />
@@ -1838,8 +1838,7 @@
<argument index="1" name="primitive" type="int" enum="RenderingServer.PrimitiveType" />
<argument index="2" name="arrays" type="Array" />
<argument index="3" name="blend_shapes" type="Array" default="[]" />
- <argument index="4" name="lods" type="Dictionary" default="{
-}" />
+ <argument index="4" name="lods" type="Dictionary" default="{}" />
<argument index="5" name="compress_format" type="int" default="0" />
<description>
</description>
@@ -4180,12 +4179,6 @@
<constant name="ENV_SSIL_QUALITY_ULTRA" value="4" enum="EnvironmentSSILQuality">
Highest quality screen-space indirect lighting. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality.
</constant>
- <constant name="ENV_SDFGI_CASCADES_4" value="0" enum="EnvironmentSDFGICascades">
- </constant>
- <constant name="ENV_SDFGI_CASCADES_6" value="1" enum="EnvironmentSDFGICascades">
- </constant>
- <constant name="ENV_SDFGI_CASCADES_8" value="2" enum="EnvironmentSDFGICascades">
- </constant>
<constant name="ENV_SDFGI_Y_SCALE_DISABLED" value="0" enum="EnvironmentSDFGIYScale">
</constant>
<constant name="ENV_SDFGI_Y_SCALE_75_PERCENT" value="1" enum="EnvironmentSDFGIYScale">
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index d86c577e5e..c8e835f0f1 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -684,13 +684,24 @@
<method name="to_float" qualifiers="const">
<return type="float" />
<description>
- Converts a string containing a decimal number into a [code]float[/code].
+ Converts a string containing a decimal number into a [code]float[/code]. The method will stop on the first non-number character except the first [code].[/code] (decimal point), and [code]e[/code] which is used for exponential.
+ [codeblock]
+ print("12.3".to_float()) # 12.3
+ print("1.2.3".to_float()) # 1.2
+ print("12ab3".to_float()) # 12
+ print("1e3".to_float()) # 1000
+ [/codeblock]
</description>
</method>
<method name="to_int" qualifiers="const">
<return type="int" />
<description>
- Converts a string containing an integer number into an [code]int[/code].
+ Converts a string containing an integer number into an [code]int[/code]. The method will remove any non-number character and stop if it encounters a [code].[/code].
+ [codeblock]
+ print("123".to_int()) # 123
+ print("a1b2c3".to_int()) # 123
+ print("1.2.3".to_int()) # 1
+ [/codeblock]
</description>
</method>
<method name="to_lower" qualifiers="const">
diff --git a/doc/classes/TabBar.xml b/doc/classes/TabBar.xml
index 71df40a693..59a4743d80 100644
--- a/doc/classes/TabBar.xml
+++ b/doc/classes/TabBar.xml
@@ -282,16 +282,16 @@
</constant>
</constants>
<theme_items>
- <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
+ <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
Font color of disabled tabs.
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the tab name.
</theme_item>
- <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Font color of the currently selected tab.
</theme_item>
- <theme_item name="font_unselected_color" data_type="color" type="Color" default="Color(0.69, 0.69, 0.69, 1)">
+ <theme_item name="font_unselected_color" data_type="color" type="Color" default="Color(0.7, 0.7, 0.7, 1)">
Font color of the other, unselected tabs.
</theme_item>
<theme_item name="hseparation" data_type="constant" type="int" default="4">
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index d6e1e13505..3b814b6177 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -178,16 +178,16 @@
</constant>
</constants>
<theme_items>
- <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
+ <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
Font color of disabled tabs.
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the tab name.
</theme_item>
- <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Font color of the currently selected tab.
</theme_item>
- <theme_item name="font_unselected_color" data_type="color" type="Color" default="Color(0.69, 0.69, 0.69, 1)">
+ <theme_item name="font_unselected_color" data_type="color" type="Color" default="Color(0.7, 0.7, 0.7, 1)">
Font color of the other, unselected tabs.
</theme_item>
<theme_item name="icon_separation" data_type="constant" type="int" default="4">
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index 3197e59248..5f887a397f 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -729,8 +729,7 @@
<method name="set_gutter_custom_draw">
<return type="void" />
<argument index="0" name="column" type="int" />
- <argument index="1" name="object" type="Object" />
- <argument index="2" name="callback" type="StringName" />
+ <argument index="1" name="draw_callback" type="Callable" />
<description>
Set a custom draw method for the gutter. The callback method must take the following args: [code]line: int, gutter: int, Area: Rect2[/code].
</description>
@@ -907,11 +906,9 @@
</method>
<method name="set_tooltip_request_func">
<return type="void" />
- <argument index="0" name="object" type="Object" />
- <argument index="1" name="callback" type="StringName" />
- <argument index="2" name="data" type="Variant" />
+ <argument index="0" name="callback" type="Callable" />
<description>
- Provide custom tooltip text. The callback method must take the following args: [code]hovered_word: String, data: Variant[/code]
+ Provide custom tooltip text. The callback method must take the following args: [code]hovered_word: String[/code]
</description>
</method>
<method name="swap_lines">
@@ -1222,22 +1219,22 @@
<theme_item name="caret_background_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
[Color] of the text behind the caret when using a block caret.
</theme_item>
- <theme_item name="caret_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="caret_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
[Color] of the caret. This can be set to a fully transparent color to hide the caret entirely.
</theme_item>
<theme_item name="current_line_color" data_type="color" type="Color" default="Color(0.25, 0.25, 0.26, 0.8)">
Background [Color] of the line containing the caret.
</theme_item>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
Sets the font [Color].
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the [TextEdit].
</theme_item>
- <theme_item name="font_readonly_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)">
+ <theme_item name="font_readonly_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
Sets the font [Color] when [member editable] is disabled.
</theme_item>
- <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
+ <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled.
</theme_item>
<theme_item name="search_result_border_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 0.4)">
@@ -1246,10 +1243,10 @@
<theme_item name="search_result_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 1)">
[Color] behind the text that matches the search query.
</theme_item>
- <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.49, 0.49, 0.49, 1)">
+ <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.5, 0.5, 0.5, 1)">
Sets the highlight [Color] of text selections.
</theme_item>
- <theme_item name="word_highlighted_color" data_type="color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)">
+ <theme_item name="word_highlighted_color" data_type="color" type="Color" default="Color(0.5, 0.5, 0.5, 0.25)">
Sets the highlight [Color] of multiple occurrences. [member highlight_all_occurrences] has to be enabled.
</theme_item>
<theme_item name="caret_width" data_type="constant" type="int" default="1">
diff --git a/doc/classes/TextLine.xml b/doc/classes/TextLine.xml
index 1eaccf4604..bf1abf86ae 100644
--- a/doc/classes/TextLine.xml
+++ b/doc/classes/TextLine.xml
@@ -24,8 +24,7 @@
<argument index="0" name="text" type="String" />
<argument index="1" name="fonts" type="Font" />
<argument index="2" name="size" type="int" />
- <argument index="3" name="opentype_features" type="Dictionary" default="{
-}" />
+ <argument index="3" name="opentype_features" type="Dictionary" default="{}" />
<argument index="4" name="language" type="String" default="&quot;&quot;" />
<description>
Adds text span and font to draw it.
diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml
index ff193a0e4b..3d3c0dd6ff 100644
--- a/doc/classes/TextParagraph.xml
+++ b/doc/classes/TextParagraph.xml
@@ -24,8 +24,7 @@
<argument index="0" name="text" type="String" />
<argument index="1" name="fonts" type="Font" />
<argument index="2" name="size" type="int" />
- <argument index="3" name="opentype_features" type="Dictionary" default="{
-}" />
+ <argument index="3" name="opentype_features" type="Dictionary" default="{}" />
<argument index="4" name="language" type="String" default="&quot;&quot;" />
<description>
Adds text span and font to draw it.
@@ -259,8 +258,7 @@
<argument index="1" name="fonts" type="Font" />
<argument index="2" name="size" type="int" />
<argument index="3" name="dropcap_margins" type="Rect2" default="Rect2(0, 0, 0, 0)" />
- <argument index="4" name="opentype_features" type="Dictionary" default="{
-}" />
+ <argument index="4" name="opentype_features" type="Dictionary" default="{}" />
<argument index="5" name="language" type="String" default="&quot;&quot;" />
<description>
Sets drop cap, overrides previously set drop cap. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text.
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index 2117451281..61024ef0c8 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -21,8 +21,8 @@
<argument index="1" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
<description>
Creates new buffer for complex text layout, with the given [code]direction[/code] and [code]orientation[/code]. To free the resulting buffer, use [method free_rid] method.
- [b]Note:[/b] Direction is ignored if server does not support [code]FEATURE_BIDI_LAYOUT[/code] feature.
- [b]Note:[/b] Orientation is ignored if server does not support [code]FEATURE_VERTICAL_LAYOUT[/code] feature.
+ [b]Note:[/b] Direction is ignored if server does not support [constant FEATURE_BIDI_LAYOUT] feature (supported by [TextServerAdvanced]).
+ [b]Note:[/b] Orientation is ignored if server does not support [constant FEATURE_VERTICAL_LAYOUT] feature (supported by [TextServerAdvanced]).
</description>
</method>
<method name="draw_hex_code_box" qualifiers="const">
@@ -913,8 +913,7 @@
<argument index="1" name="text" type="String" />
<argument index="2" name="fonts" type="Array" />
<argument index="3" name="size" type="int" />
- <argument index="4" name="opentype_features" type="Dictionary" default="{
-}" />
+ <argument index="4" name="opentype_features" type="Dictionary" default="{}" />
<argument index="5" name="language" type="String" default="&quot;&quot;" />
<description>
Adds text span and font to draw it to the text buffer.
@@ -1263,7 +1262,7 @@
<argument index="1" name="direction" type="int" enum="TextServer.Direction" default="0" />
<description>
Sets desired text direction. If set to [code]TEXT_DIRECTION_AUTO[/code], direction will be detected based on the buffer contents and current locale.
- [b]Note:[/b] Direction is ignored if server does not support [code]FEATURE_BIDI_LAYOUT[/code] feature.
+ [b]Note:[/b] Direction is ignored if server does not support [constant FEATURE_BIDI_LAYOUT] feature (supported by [TextServerAdvanced]).
</description>
</method>
<method name="shaped_text_set_orientation">
@@ -1272,7 +1271,7 @@
<argument index="1" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
<description>
Sets desired text orientation.
- [b]Note:[/b] Orientation is ignored if server does not support [code]FEATURE_VERTICAL_LAYOUT[/code] feature.
+ [b]Note:[/b] Orientation is ignored if server does not support [constant FEATURE_VERTICAL_LAYOUT] feature (supported by [TextServerAdvanced]).
</description>
</method>
<method name="shaped_text_set_preserve_control">
@@ -1323,6 +1322,26 @@
Aligns shaped text to the given tab-stops.
</description>
</method>
+ <method name="string_to_lower" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="string" type="String" />
+ <argument index="1" name="language" type="String" default="&quot;&quot;" />
+ <description>
+ Returns the string converted to lowercase.
+ [b]Note:[/b] Casing is locale dependent and context sensitive if server support [constant FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION] feature (supported by [TextServerAdvanced]).
+ [b]Note:[/b] The result may be longer or shorter than the original.
+ </description>
+ </method>
+ <method name="string_to_upper" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="string" type="String" />
+ <argument index="1" name="language" type="String" default="&quot;&quot;" />
+ <description>
+ Returns the string converted to uppercase.
+ [b]Note:[/b] Casing is locale dependent and context sensitive if server support [constant FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION] feature (supported by [TextServerAdvanced]).
+ [b]Note:[/b] The result may be longer or shorter than the original.
+ </description>
+ </method>
<method name="strip_diacritics" qualifiers="const">
<return type="String" />
<argument index="0" name="string" type="String" />
@@ -1468,7 +1487,10 @@
<constant name="FEATURE_FONT_VARIABLE" value="64" enum="Feature">
TextServer supports variable fonts.
</constant>
- <constant name="FEATURE_USE_SUPPORT_DATA" value="128" enum="Feature">
+ <constant name="FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION" value="128" enum="Feature">
+ TextServer supports locale dependent and context sensitive case conversion.
+ </constant>
+ <constant name="FEATURE_USE_SUPPORT_DATA" value="256" enum="Feature">
TextServer require external data file for some features.
</constant>
<constant name="CONTOUR_CURVE_TAG_ON" value="1" enum="ContourPointTag">
diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml
index 40a1f89395..8b4825026d 100644
--- a/doc/classes/TextServerExtension.xml
+++ b/doc/classes/TextServerExtension.xml
@@ -1348,6 +1348,22 @@
Updates justification opportunities (spaces, kashidas, etc.).
</description>
</method>
+ <method name="_string_to_lower" qualifiers="virtual const">
+ <return type="String" />
+ <argument index="0" name="string" type="String" />
+ <argument index="1" name="language" type="String" />
+ <description>
+ Returns the string converted to lowercase. Casing is locale dependent and context sensitive. The result may be longer or shorter than the original.
+ </description>
+ </method>
+ <method name="_string_to_upper" qualifiers="virtual const">
+ <return type="String" />
+ <argument index="0" name="string" type="String" />
+ <argument index="1" name="language" type="String" />
+ <description>
+ Returns the string converted to uppercase. Casing is locale dependent and context sensitive. The result may be longer or shorter than the original.
+ </description>
+ </method>
<method name="_tag_to_name" qualifiers="virtual const">
<return type="String" />
<argument index="0" name="tag" type="int" />
diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml
index a1b4404079..c90cb2987c 100644
--- a/doc/classes/TranslationServer.xml
+++ b/doc/classes/TranslationServer.xml
@@ -24,6 +24,46 @@
Clears the server from all translations.
</description>
</method>
+ <method name="compare_locales" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="locale_a" type="String" />
+ <argument index="1" name="locale_b" type="String" />
+ <description>
+ Compares two locales and return similarity score between [code]0[/code](no match) and [code]10[/code](full match).
+ </description>
+ </method>
+ <method name="get_all_countries" qualifiers="const">
+ <return type="PackedStringArray" />
+ <description>
+ Returns array of known country codes.
+ </description>
+ </method>
+ <method name="get_all_languages" qualifiers="const">
+ <return type="PackedStringArray" />
+ <description>
+ Returns array of known language codes.
+ </description>
+ </method>
+ <method name="get_all_scripts" qualifiers="const">
+ <return type="PackedStringArray" />
+ <description>
+ Returns array of known script codes.
+ </description>
+ </method>
+ <method name="get_country_name" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="country" type="String" />
+ <description>
+ Returns readable country name for the [code]country[/code] code.
+ </description>
+ </method>
+ <method name="get_language_name" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="language" type="String" />
+ <description>
+ Returns readable language name for the [code]language[/code] code.
+ </description>
+ </method>
<method name="get_loaded_locales" qualifiers="const">
<return type="Array" />
<description>
@@ -44,6 +84,13 @@
Returns a locale's language and its variant (e.g. [code]"en_US"[/code] would return [code]"English (United States)"[/code]).
</description>
</method>
+ <method name="get_script_name" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="script" type="String" />
+ <description>
+ Returns readable script name for the [code]script[/code] code.
+ </description>
+ </method>
<method name="get_translation_object">
<return type="Translation" />
<argument index="0" name="locale" type="String" />
@@ -80,6 +127,13 @@
If translations have been loaded beforehand for the new locale, they will be applied.
</description>
</method>
+ <method name="standardize_locale" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="locale" type="String" />
+ <description>
+ Retunrs [code]locale[/code] string standardized to match known locales (e.g. [code]en-US[/code] would be matched to [code]en_US[/code]).
+ </description>
+ </method>
<method name="translate" qualifiers="const">
<return type="StringName" />
<argument index="0" name="message" type="StringName" />
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index 10bbdc0301..5130851948 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -467,13 +467,13 @@
<theme_item name="children_hl_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
The [Color] of the relationship lines between the selected [TreeItem] and its children.
</theme_item>
- <theme_item name="custom_button_font_highlight" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+ <theme_item name="custom_button_font_highlight" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Text [Color] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered.
</theme_item>
<theme_item name="drop_position_color" data_type="color" type="Color" default="Color(1, 0.3, 0.2, 1)">
[Color] used to draw possible drop locations. See [enum DropModeFlags] constants for further description of drop locations.
</theme_item>
- <theme_item name="font_color" data_type="color" type="Color" default="Color(0.69, 0.69, 0.69, 1)">
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.7, 0.7, 0.7, 1)">
Default text [Color] of the item.
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
@@ -482,7 +482,7 @@
<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the item is selected.
</theme_item>
- <theme_item name="guide_color" data_type="color" type="Color" default="Color(0, 0, 0, 0.1)">
+ <theme_item name="guide_color" data_type="color" type="Color" default="Color(0.7, 0.7, 0.7, 0.25)">
[Color] of the guideline.
</theme_item>
<theme_item name="parent_hl_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
@@ -491,7 +491,7 @@
<theme_item name="relationship_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
The default [Color] of the relationship lines.
</theme_item>
- <theme_item name="title_button_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ <theme_item name="title_button_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
Default text [Color] of the title button.
</theme_item>
<theme_item name="button_margin" data_type="constant" type="int" default="4">
@@ -509,7 +509,7 @@
<theme_item name="hseparation" data_type="constant" type="int" default="4">
The horizontal space between item cells. This is also used as the margin at the start of an item when folding is disabled.
</theme_item>
- <theme_item name="item_margin" data_type="constant" type="int" default="12">
+ <theme_item name="item_margin" data_type="constant" type="int" default="16">
The horizontal margin at the start of an item. This is used when folding is enabled for the item.
</theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
diff --git a/doc/classes/VFlowContainer.xml b/doc/classes/VFlowContainer.xml
new file mode 100644
index 0000000000..f58075a140
--- /dev/null
+++ b/doc/classes/VFlowContainer.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VFlowContainer" inherits="FlowContainer" version="4.0">
+ <brief_description>
+ Vertical flow container.
+ </brief_description>
+ <description>
+ Vertical version of [FlowContainer].
+ </description>
+ <tutorials>
+ </tutorials>
+ <theme_items>
+ <theme_item name="hseparation" data_type="constant" type="int" default="4">
+ The horizontal separation of children nodes.
+ </theme_item>
+ <theme_item name="vseparation" data_type="constant" type="int" default="4">
+ The vertical separation of children nodes.
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/VSplitContainer.xml b/doc/classes/VSplitContainer.xml
index 6316068e9d..33470ac7be 100644
--- a/doc/classes/VSplitContainer.xml
+++ b/doc/classes/VSplitContainer.xml
@@ -18,7 +18,5 @@
<theme_item name="grabber" data_type="icon" type="Texture2D">
The icon used for the grabber drawn in the middle area.
</theme_item>
- <theme_item name="bg" data_type="style" type="StyleBox">
- </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml
index 75161d3c5b..3bb6603646 100644
--- a/doc/classes/Window.xml
+++ b/doc/classes/Window.xml
@@ -368,6 +368,10 @@
<description>
</description>
</signal>
+ <signal name="theme_changed">
+ <description>
+ </description>
+ </signal>
<signal name="visibility_changed">
<description>
</description>
@@ -439,20 +443,20 @@
</constant>
</constants>
<theme_items>
- <theme_item name="title_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
+ <theme_item name="title_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
</theme_item>
<theme_item name="title_outline_modulate" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The color of the title outline.
</theme_item>
<theme_item name="close_h_ofs" data_type="constant" type="int" default="18">
</theme_item>
- <theme_item name="close_v_ofs" data_type="constant" type="int" default="18">
+ <theme_item name="close_v_ofs" data_type="constant" type="int" default="24">
</theme_item>
<theme_item name="resize_margin" data_type="constant" type="int" default="4">
</theme_item>
<theme_item name="scaleborder_size" data_type="constant" type="int" default="4">
</theme_item>
- <theme_item name="title_height" data_type="constant" type="int" default="20">
+ <theme_item name="title_height" data_type="constant" type="int" default="36">
</theme_item>
<theme_item name="title_outline_size" data_type="constant" type="int" default="0">
The size of the title outline.
diff --git a/doc/classes/XRPose.xml b/doc/classes/XRPose.xml
index 0de2bc9e48..4a09122b40 100644
--- a/doc/classes/XRPose.xml
+++ b/doc/classes/XRPose.xml
@@ -34,8 +34,22 @@
- [code]grip[/code] defines the location where the user grips the controller
- [code]skeleton[/code] defines the root location a hand mesh should be placed when using hand tracking and the animated skeleton supplied by the XR runtime.
</member>
+ <member name="tracking_confidence" type="int" setter="set_tracking_confidence" getter="get_tracking_confidence" enum="XRPose.TrackingConfidence" default="0">
+ The tracking confidence for this pose, provides insight on how accurate the spatial positioning of this record is.
+ </member>
<member name="transform" type="Transform3D" setter="set_transform" getter="get_transform" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)">
The transform containing the original and transform as reported by the XR runtime.
</member>
</members>
+ <constants>
+ <constant name="XR_TRACKING_CONFIDENCE_NONE" value="0" enum="TrackingConfidence">
+ No tracking information is available for this pose.
+ </constant>
+ <constant name="XR_TRACKING_CONFIDENCE_LOW" value="1" enum="TrackingConfidence">
+ Tracking information may be inaccurate or estimated. For instance with inside out tracking this would indicate a controller may be (partially) obscured.
+ </constant>
+ <constant name="XR_TRACKING_CONFIDENCE_HIGH" value="2" enum="TrackingConfidence">
+ Tracking information is deemed accurate and up to date.
+ </constant>
+ </constants>
</class>
diff --git a/doc/classes/XRPositionalTracker.xml b/doc/classes/XRPositionalTracker.xml
index 439bcfc382..c39a4aa7a7 100644
--- a/doc/classes/XRPositionalTracker.xml
+++ b/doc/classes/XRPositionalTracker.xml
@@ -54,8 +54,9 @@
<argument index="1" name="transform" type="Transform3D" />
<argument index="2" name="linear_velocity" type="Vector3" />
<argument index="3" name="angular_velocity" type="Vector3" />
+ <argument index="4" name="tracking_confidence" type="int" enum="XRPose.TrackingConfidence" />
<description>
- Sets the transform, linear velocity and angular velocity for the given pose. This method is called by a [XRInterface] implementation and should not be used directly.
+ Sets the transform, linear velocity, angular velocity and tracking confidence for the given pose. This method is called by a [XRInterface] implementation and should not be used directly.
</description>
</method>
</methods>
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp
index 9e7d4f5435..31dda16b26 100644
--- a/drivers/gles3/rasterizer_scene_gles3.cpp
+++ b/drivers/gles3/rasterizer_scene_gles3.cpp
@@ -234,7 +234,7 @@ void RasterizerSceneGLES3::environment_set_ssil(RID p_env, bool p_enable, float
void RasterizerSceneGLES3::environment_set_ssil_quality(RS::EnvironmentSSILQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) {
}
-void RasterizerSceneGLES3::environment_set_sdfgi(RID p_env, bool p_enable, RS::EnvironmentSDFGICascades p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) {
+void RasterizerSceneGLES3::environment_set_sdfgi(RID p_env, bool p_enable, int p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) {
}
void RasterizerSceneGLES3::environment_set_sdfgi_ray_count(RS::EnvironmentSDFGIRayCount p_ray_count) {
diff --git a/drivers/gles3/rasterizer_scene_gles3.h b/drivers/gles3/rasterizer_scene_gles3.h
index b73c053bc7..0f8c2e88b4 100644
--- a/drivers/gles3/rasterizer_scene_gles3.h
+++ b/drivers/gles3/rasterizer_scene_gles3.h
@@ -126,7 +126,7 @@ public:
void environment_set_ssil(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_sharpness, float p_normal_rejection) override;
void environment_set_ssil_quality(RS::EnvironmentSSILQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) override;
- void environment_set_sdfgi(RID p_env, bool p_enable, RS::EnvironmentSDFGICascades p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) override;
+ void environment_set_sdfgi(RID p_env, bool p_enable, int p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) override;
void environment_set_sdfgi_ray_count(RS::EnvironmentSDFGIRayCount p_ray_count) override;
void environment_set_sdfgi_frames_to_converge(RS::EnvironmentSDFGIFramesToConverge p_frames) override;
diff --git a/drivers/gles3/texture_loader_gles3.cpp b/drivers/gles3/texture_loader_gles3.cpp
index ca52eaeacb..e16e4fe254 100644
--- a/drivers/gles3/texture_loader_gles3.cpp
+++ b/drivers/gles3/texture_loader_gles3.cpp
@@ -78,7 +78,6 @@ void ResourceFormatGLES2Texture::get_recognized_extensions(List<String> *p_exten
p_extensions->push_back("png");
p_extensions->push_back("pvr");
p_extensions->push_back("svg");
- p_extensions->push_back("svgz");
p_extensions->push_back("tga");
p_extensions->push_back("webp");
}
@@ -100,7 +99,6 @@ String ResourceFormatGLES2Texture::get_resource_type(const String &p_path) const
extension == "png" ||
extension == "pvr" ||
extension == "svg" ||
- extension == "svgz" ||
extension == "tga" ||
extension == "webp") {
return "ImageTexture";
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp
index a004bdbe3d..00f84eba8c 100644
--- a/drivers/unix/os_unix.cpp
+++ b/drivers/unix/os_unix.cpp
@@ -249,7 +249,7 @@ uint64_t OS_Unix::get_ticks_usec() const {
return longtime;
}
-Error OS_Unix::execute(const String &p_path, const List<String> &p_arguments, String *r_pipe, int *r_exitcode, bool read_stderr, Mutex *p_pipe_mutex) {
+Error OS_Unix::execute(const String &p_path, const List<String> &p_arguments, String *r_pipe, int *r_exitcode, bool read_stderr, Mutex *p_pipe_mutex, bool p_open_console) {
#ifdef __EMSCRIPTEN__
// Don't compile this code at all to avoid undefined references.
// Actual virtual call goes to OS_JavaScript.
@@ -318,7 +318,7 @@ Error OS_Unix::execute(const String &p_path, const List<String> &p_arguments, St
#endif
}
-Error OS_Unix::create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id) {
+Error OS_Unix::create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id, bool p_open_console) {
#ifdef __EMSCRIPTEN__
// Don't compile this code at all to avoid undefined references.
// Actual virtual call goes to OS_JavaScript.
diff --git a/drivers/unix/os_unix.h b/drivers/unix/os_unix.h
index 5e56091d54..3f0e8a171c 100644
--- a/drivers/unix/os_unix.h
+++ b/drivers/unix/os_unix.h
@@ -81,8 +81,8 @@ public:
virtual void delay_usec(uint32_t p_usec) const override;
virtual uint64_t get_ticks_usec() const override;
- virtual Error execute(const String &p_path, const List<String> &p_arguments, String *r_pipe = nullptr, int *r_exitcode = nullptr, bool read_stderr = false, Mutex *p_pipe_mutex = nullptr) override;
- virtual Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr) override;
+ virtual Error execute(const String &p_path, const List<String> &p_arguments, String *r_pipe = nullptr, int *r_exitcode = nullptr, bool read_stderr = false, Mutex *p_pipe_mutex = nullptr, bool p_open_console = false) override;
+ virtual Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr, bool p_open_console = false) override;
virtual Error kill(const ProcessID &p_pid) override;
virtual int get_process_id() const override;
diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp
index 4d742a36d9..c6592b300b 100644
--- a/drivers/vulkan/rendering_device_vulkan.cpp
+++ b/drivers/vulkan/rendering_device_vulkan.cpp
@@ -8372,11 +8372,11 @@ void RenderingDeviceVulkan::_free_internal(RID p_id) {
} else if (uniform_set_owner.owns(p_id)) {
UniformSet *uniform_set = uniform_set_owner.get_or_null(p_id);
frames[frame].uniform_sets_to_dispose_of.push_back(*uniform_set);
+ uniform_set_owner.free(p_id);
+
if (uniform_set->invalidated_callback != nullptr) {
- uniform_set->invalidated_callback(p_id, uniform_set->invalidated_callback_userdata);
+ uniform_set->invalidated_callback(uniform_set->invalidated_callback_userdata);
}
-
- uniform_set_owner.free(p_id);
} else if (render_pipeline_owner.owns(p_id)) {
RenderPipeline *pipeline = render_pipeline_owner.get_or_null(p_id);
frames[frame].render_pipelines_to_dispose_of.push_back(*pipeline);
diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp
index 75a3ab26ea..e5d577a79f 100644
--- a/drivers/vulkan/vulkan_context.cpp
+++ b/drivers/vulkan/vulkan_context.cpp
@@ -615,7 +615,7 @@ Error VulkanContext::_check_capabilities() {
return OK;
}
-Error VulkanContext::_create_physical_device() {
+Error VulkanContext::_create_instance() {
/* obtain version */
_obtain_vulkan_version();
@@ -678,8 +678,6 @@ Error VulkanContext::_create_physical_device() {
inst_info.pNext = &dbg_report_callback_create_info;
}
- uint32_t gpu_count;
-
VkResult err = vkCreateInstance(&inst_info, nullptr, &inst);
ERR_FAIL_COND_V_MSG(err == VK_ERROR_INCOMPATIBLE_DRIVER, ERR_CANT_CREATE,
"Cannot find a compatible Vulkan installable client driver (ICD).\n\n"
@@ -700,10 +698,85 @@ Error VulkanContext::_create_physical_device() {
volkLoadInstance(inst);
#endif
+ if (enabled_debug_utils) {
+ // Setup VK_EXT_debug_utils function pointers always (we use them for
+ // debug labels and names).
+ CreateDebugUtilsMessengerEXT =
+ (PFN_vkCreateDebugUtilsMessengerEXT)vkGetInstanceProcAddr(inst, "vkCreateDebugUtilsMessengerEXT");
+ DestroyDebugUtilsMessengerEXT =
+ (PFN_vkDestroyDebugUtilsMessengerEXT)vkGetInstanceProcAddr(inst, "vkDestroyDebugUtilsMessengerEXT");
+ SubmitDebugUtilsMessageEXT =
+ (PFN_vkSubmitDebugUtilsMessageEXT)vkGetInstanceProcAddr(inst, "vkSubmitDebugUtilsMessageEXT");
+ CmdBeginDebugUtilsLabelEXT =
+ (PFN_vkCmdBeginDebugUtilsLabelEXT)vkGetInstanceProcAddr(inst, "vkCmdBeginDebugUtilsLabelEXT");
+ CmdEndDebugUtilsLabelEXT =
+ (PFN_vkCmdEndDebugUtilsLabelEXT)vkGetInstanceProcAddr(inst, "vkCmdEndDebugUtilsLabelEXT");
+ CmdInsertDebugUtilsLabelEXT =
+ (PFN_vkCmdInsertDebugUtilsLabelEXT)vkGetInstanceProcAddr(inst, "vkCmdInsertDebugUtilsLabelEXT");
+ SetDebugUtilsObjectNameEXT =
+ (PFN_vkSetDebugUtilsObjectNameEXT)vkGetInstanceProcAddr(inst, "vkSetDebugUtilsObjectNameEXT");
+ if (nullptr == CreateDebugUtilsMessengerEXT || nullptr == DestroyDebugUtilsMessengerEXT ||
+ nullptr == SubmitDebugUtilsMessageEXT || nullptr == CmdBeginDebugUtilsLabelEXT ||
+ nullptr == CmdEndDebugUtilsLabelEXT || nullptr == CmdInsertDebugUtilsLabelEXT ||
+ nullptr == SetDebugUtilsObjectNameEXT) {
+ ERR_FAIL_V_MSG(ERR_CANT_CREATE,
+ "GetProcAddr: Failed to init VK_EXT_debug_utils\n"
+ "GetProcAddr: Failure");
+ }
+
+ err = CreateDebugUtilsMessengerEXT(inst, &dbg_messenger_create_info, nullptr, &dbg_messenger);
+ switch (err) {
+ case VK_SUCCESS:
+ break;
+ case VK_ERROR_OUT_OF_HOST_MEMORY:
+ ERR_FAIL_V_MSG(ERR_CANT_CREATE,
+ "CreateDebugUtilsMessengerEXT: out of host memory\n"
+ "CreateDebugUtilsMessengerEXT Failure");
+ break;
+ default:
+ ERR_FAIL_V_MSG(ERR_CANT_CREATE,
+ "CreateDebugUtilsMessengerEXT: unknown failure\n"
+ "CreateDebugUtilsMessengerEXT Failure");
+ ERR_FAIL_V(ERR_CANT_CREATE);
+ break;
+ }
+ } else if (enabled_debug_report) {
+ CreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT)vkGetInstanceProcAddr(inst, "vkCreateDebugReportCallbackEXT");
+ DebugReportMessageEXT = (PFN_vkDebugReportMessageEXT)vkGetInstanceProcAddr(inst, "vkDebugReportMessageEXT");
+ DestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT)vkGetInstanceProcAddr(inst, "vkDestroyDebugReportCallbackEXT");
+
+ if (nullptr == CreateDebugReportCallbackEXT || nullptr == DebugReportMessageEXT || nullptr == DestroyDebugReportCallbackEXT) {
+ ERR_FAIL_V_MSG(ERR_CANT_CREATE,
+ "GetProcAddr: Failed to init VK_EXT_debug_report\n"
+ "GetProcAddr: Failure");
+ }
+
+ err = CreateDebugReportCallbackEXT(inst, &dbg_report_callback_create_info, nullptr, &dbg_debug_report);
+ switch (err) {
+ case VK_SUCCESS:
+ break;
+ case VK_ERROR_OUT_OF_HOST_MEMORY:
+ ERR_FAIL_V_MSG(ERR_CANT_CREATE,
+ "CreateDebugReportCallbackEXT: out of host memory\n"
+ "CreateDebugReportCallbackEXT Failure");
+ break;
+ default:
+ ERR_FAIL_V_MSG(ERR_CANT_CREATE,
+ "CreateDebugReportCallbackEXT: unknown failure\n"
+ "CreateDebugReportCallbackEXT Failure");
+ ERR_FAIL_V(ERR_CANT_CREATE);
+ break;
+ }
+ }
+
+ return OK;
+}
+
+Error VulkanContext::_create_physical_device(VkSurfaceKHR p_surface) {
/* Make initial call to query gpu_count, then second call for gpu info*/
- err = vkEnumeratePhysicalDevices(inst, &gpu_count, nullptr);
+ uint32_t gpu_count = 0;
+ VkResult err = vkEnumeratePhysicalDevices(inst, &gpu_count, nullptr);
ERR_FAIL_COND_V(err, ERR_CANT_CREATE);
-
ERR_FAIL_COND_V_MSG(gpu_count == 0, ERR_CANT_CREATE,
"vkEnumeratePhysicalDevices reported zero accessible devices.\n\n"
"Do you have a compatible Vulkan installable client driver (ICD) installed?\n"
@@ -716,24 +789,120 @@ Error VulkanContext::_create_physical_device() {
ERR_FAIL_V(ERR_CANT_CREATE);
}
+ static const struct {
+ uint32_t id;
+ const char *name;
+ } vendor_names[] = {
+ { 0x1002, "AMD" },
+ { 0x1010, "ImgTec" },
+ { 0x106B, "Apple" },
+ { 0x10DE, "NVIDIA" },
+ { 0x13B5, "ARM" },
+ { 0x5143, "Qualcomm" },
+ { 0x8086, "Intel" },
+ { 0, nullptr },
+ };
+
// TODO: At least on Linux Laptops integrated GPUs fail with Vulkan in many instances.
// The device should really be a preference, but for now choosing a discrete GPU over the
// integrated one is better than the default.
- // Default to first device
- uint32_t device_index = 0;
-
+ int32_t device_index = -1;
+ int type_selected = -1;
+ print_verbose("Vulkan devices:");
for (uint32_t i = 0; i < gpu_count; ++i) {
VkPhysicalDeviceProperties props;
vkGetPhysicalDeviceProperties(physical_devices[i], &props);
- if (props.deviceType == VkPhysicalDeviceType::VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU) {
- // Prefer discrete GPU.
- device_index = i;
- break;
+ bool present_supported = false;
+
+ uint32_t device_queue_family_count = 0;
+ vkGetPhysicalDeviceQueueFamilyProperties(physical_devices[i], &device_queue_family_count, nullptr);
+ VkQueueFamilyProperties *device_queue_props = (VkQueueFamilyProperties *)malloc(device_queue_family_count * sizeof(VkQueueFamilyProperties));
+ vkGetPhysicalDeviceQueueFamilyProperties(physical_devices[i], &device_queue_family_count, device_queue_props);
+ for (uint32_t j = 0; j < device_queue_family_count; j++) {
+ VkBool32 supports;
+ vkGetPhysicalDeviceSurfaceSupportKHR(physical_devices[i], j, p_surface, &supports);
+ if (supports && ((device_queue_props[j].queueFlags & VK_QUEUE_GRAPHICS_BIT) != 0)) {
+ present_supported = true;
+ } else {
+ continue;
+ }
+ }
+ String name = props.deviceName;
+ String vendor = "Unknown";
+ String dev_type;
+ switch (props.deviceType) {
+ case VkPhysicalDeviceType::VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU: {
+ dev_type = "Discrete";
+ } break;
+ case VkPhysicalDeviceType::VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU: {
+ dev_type = "Integrated";
+ } break;
+ case VkPhysicalDeviceType::VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU: {
+ dev_type = "Virtual";
+ } break;
+ case VkPhysicalDeviceType::VK_PHYSICAL_DEVICE_TYPE_CPU: {
+ dev_type = "CPU";
+ } break;
+ default: {
+ dev_type = "Other";
+ } break;
+ }
+ uint32_t vendor_idx = 0;
+ while (vendor_names[vendor_idx].name != nullptr) {
+ if (props.vendorID == vendor_names[vendor_idx].id) {
+ vendor = vendor_names[vendor_idx].name;
+ break;
+ }
+ vendor_idx++;
+ }
+ free(device_queue_props);
+ print_verbose(" #" + itos(i) + ": " + vendor + " " + name + " - " + (present_supported ? "Supported" : "Unsupported") + ", " + dev_type);
+
+ if (present_supported) { // Select first supported device of preffered type: Discrete > Integrated > Virtual > CPU > Other.
+ switch (props.deviceType) {
+ case VkPhysicalDeviceType::VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU: {
+ if (type_selected < 4) {
+ type_selected = 4;
+ device_index = i;
+ }
+ } break;
+ case VkPhysicalDeviceType::VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU: {
+ if (type_selected < 3) {
+ type_selected = 3;
+ device_index = i;
+ }
+ } break;
+ case VkPhysicalDeviceType::VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU: {
+ if (type_selected < 2) {
+ type_selected = 2;
+ device_index = i;
+ }
+ } break;
+ case VkPhysicalDeviceType::VK_PHYSICAL_DEVICE_TYPE_CPU: {
+ if (type_selected < 1) {
+ type_selected = 1;
+ device_index = i;
+ }
+ } break;
+ default: {
+ if (type_selected < 0) {
+ type_selected = 0;
+ device_index = i;
+ }
+ } break;
+ }
}
}
+ int32_t user_device_index = Engine::get_singleton()->get_gpu_index(); // Force user selected GPU.
+ if (user_device_index >= 0 && user_device_index < (int32_t)gpu_count) {
+ device_index = user_device_index;
+ }
+
+ ERR_FAIL_COND_V_MSG(device_index == -1, ERR_CANT_CREATE, "None of Vulkan devices supports both graphics and present queues.");
+
gpu = physical_devices[device_index];
free(physical_devices);
@@ -746,19 +915,6 @@ Error VulkanContext::_create_physical_device() {
/* Get identifier properties */
vkGetPhysicalDeviceProperties(gpu, &gpu_props);
- static const struct {
- uint32_t id;
- const char *name;
- } vendor_names[] = {
- { 0x1002, "AMD" },
- { 0x1010, "ImgTec" },
- { 0x106B, "Apple" },
- { 0x10DE, "NVIDIA" },
- { 0x13B5, "ARM" },
- { 0x5143, "Qualcomm" },
- { 0x8086, "Intel" },
- { 0, nullptr },
- };
device_name = gpu_props.deviceName;
device_type = gpu_props.deviceType;
pipeline_cache_id = String::hex_encode_buffer(gpu_props.pipelineCacheUUID, VK_UUID_SIZE);
@@ -851,77 +1007,6 @@ Error VulkanContext::_create_physical_device() {
" extension.\n\nDo you have a compatible Vulkan installable client driver (ICD) installed?\n"
"vkCreateInstance Failure");
- if (enabled_debug_utils) {
- // Setup VK_EXT_debug_utils function pointers always (we use them for
- // debug labels and names).
- CreateDebugUtilsMessengerEXT =
- (PFN_vkCreateDebugUtilsMessengerEXT)vkGetInstanceProcAddr(inst, "vkCreateDebugUtilsMessengerEXT");
- DestroyDebugUtilsMessengerEXT =
- (PFN_vkDestroyDebugUtilsMessengerEXT)vkGetInstanceProcAddr(inst, "vkDestroyDebugUtilsMessengerEXT");
- SubmitDebugUtilsMessageEXT =
- (PFN_vkSubmitDebugUtilsMessageEXT)vkGetInstanceProcAddr(inst, "vkSubmitDebugUtilsMessageEXT");
- CmdBeginDebugUtilsLabelEXT =
- (PFN_vkCmdBeginDebugUtilsLabelEXT)vkGetInstanceProcAddr(inst, "vkCmdBeginDebugUtilsLabelEXT");
- CmdEndDebugUtilsLabelEXT =
- (PFN_vkCmdEndDebugUtilsLabelEXT)vkGetInstanceProcAddr(inst, "vkCmdEndDebugUtilsLabelEXT");
- CmdInsertDebugUtilsLabelEXT =
- (PFN_vkCmdInsertDebugUtilsLabelEXT)vkGetInstanceProcAddr(inst, "vkCmdInsertDebugUtilsLabelEXT");
- SetDebugUtilsObjectNameEXT =
- (PFN_vkSetDebugUtilsObjectNameEXT)vkGetInstanceProcAddr(inst, "vkSetDebugUtilsObjectNameEXT");
- if (nullptr == CreateDebugUtilsMessengerEXT || nullptr == DestroyDebugUtilsMessengerEXT ||
- nullptr == SubmitDebugUtilsMessageEXT || nullptr == CmdBeginDebugUtilsLabelEXT ||
- nullptr == CmdEndDebugUtilsLabelEXT || nullptr == CmdInsertDebugUtilsLabelEXT ||
- nullptr == SetDebugUtilsObjectNameEXT) {
- ERR_FAIL_V_MSG(ERR_CANT_CREATE,
- "GetProcAddr: Failed to init VK_EXT_debug_utils\n"
- "GetProcAddr: Failure");
- }
-
- err = CreateDebugUtilsMessengerEXT(inst, &dbg_messenger_create_info, nullptr, &dbg_messenger);
- switch (err) {
- case VK_SUCCESS:
- break;
- case VK_ERROR_OUT_OF_HOST_MEMORY:
- ERR_FAIL_V_MSG(ERR_CANT_CREATE,
- "CreateDebugUtilsMessengerEXT: out of host memory\n"
- "CreateDebugUtilsMessengerEXT Failure");
- break;
- default:
- ERR_FAIL_V_MSG(ERR_CANT_CREATE,
- "CreateDebugUtilsMessengerEXT: unknown failure\n"
- "CreateDebugUtilsMessengerEXT Failure");
- ERR_FAIL_V(ERR_CANT_CREATE);
- break;
- }
- } else if (enabled_debug_report) {
- CreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT)vkGetInstanceProcAddr(inst, "vkCreateDebugReportCallbackEXT");
- DebugReportMessageEXT = (PFN_vkDebugReportMessageEXT)vkGetInstanceProcAddr(inst, "vkDebugReportMessageEXT");
- DestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT)vkGetInstanceProcAddr(inst, "vkDestroyDebugReportCallbackEXT");
-
- if (nullptr == CreateDebugReportCallbackEXT || nullptr == DebugReportMessageEXT || nullptr == DestroyDebugReportCallbackEXT) {
- ERR_FAIL_V_MSG(ERR_CANT_CREATE,
- "GetProcAddr: Failed to init VK_EXT_debug_report\n"
- "GetProcAddr: Failure");
- }
-
- err = CreateDebugReportCallbackEXT(inst, &dbg_report_callback_create_info, nullptr, &dbg_debug_report);
- switch (err) {
- case VK_SUCCESS:
- break;
- case VK_ERROR_OUT_OF_HOST_MEMORY:
- ERR_FAIL_V_MSG(ERR_CANT_CREATE,
- "CreateDebugReportCallbackEXT: out of host memory\n"
- "CreateDebugReportCallbackEXT Failure");
- break;
- default:
- ERR_FAIL_V_MSG(ERR_CANT_CREATE,
- "CreateDebugReportCallbackEXT: unknown failure\n"
- "CreateDebugReportCallbackEXT Failure");
- ERR_FAIL_V(ERR_CANT_CREATE);
- break;
- }
- }
-
/* Call with nullptr data to get count */
vkGetPhysicalDeviceQueueFamilyProperties(gpu, &queue_family_count, nullptr);
ERR_FAIL_COND_V(queue_family_count == 0, ERR_CANT_CREATE);
@@ -957,6 +1042,7 @@ Error VulkanContext::_create_physical_device() {
}
}
+ device_initialized = true;
return OK;
}
@@ -1209,25 +1295,17 @@ bool VulkanContext::_use_validation_layers() {
Error VulkanContext::_window_create(DisplayServer::WindowID p_window_id, DisplayServer::VSyncMode p_vsync_mode, VkSurfaceKHR p_surface, int p_width, int p_height) {
ERR_FAIL_COND_V(windows.has(p_window_id), ERR_INVALID_PARAMETER);
+ if (!device_initialized) {
+ Error err = _create_physical_device(p_surface);
+ ERR_FAIL_COND_V(err != OK, ERR_CANT_CREATE);
+ }
+
if (!queues_initialized) {
// We use a single GPU, but we need a surface to initialize the
// queues, so this process must be deferred until a surface
// is created.
Error err = _initialize_queues(p_surface);
ERR_FAIL_COND_V(err != OK, ERR_CANT_CREATE);
- } else {
- // make sure any of the surfaces supports present (validation layer complains if this is not done).
- bool any_supports_present = false;
- for (uint32_t i = 0; i < queue_family_count; i++) {
- VkBool32 supports;
- fpGetPhysicalDeviceSurfaceSupportKHR(gpu, i, p_surface, &supports);
- if (supports) {
- any_supports_present = true;
- break;
- }
- }
-
- ERR_FAIL_COND_V_MSG(!any_supports_present, ERR_CANT_CREATE, "Surface passed for sub-window creation does not support presenting");
}
Window window;
@@ -1694,12 +1772,12 @@ Error VulkanContext::initialize() {
return FAILED;
}
#endif
- Error err = _create_physical_device();
- if (err) {
+
+ Error err = _create_instance();
+ if (err != OK) {
return err;
}
- device_initialized = true;
return OK;
}
diff --git a/drivers/vulkan/vulkan_context.h b/drivers/vulkan/vulkan_context.h
index 5cac7e7771..67a675f6c6 100644
--- a/drivers/vulkan/vulkan_context.h
+++ b/drivers/vulkan/vulkan_context.h
@@ -224,7 +224,9 @@ private:
const char *pMessage,
void *pUserData);
- Error _create_physical_device();
+ Error _create_instance();
+
+ Error _create_physical_device(VkSurfaceKHR p_surface);
Error _initialize_queues(VkSurfaceKHR p_surface);
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index 13e9d58744..973f74d6cc 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -3375,7 +3375,13 @@ Node *AnimationTrackEditor::get_root() const {
}
void AnimationTrackEditor::update_keying() {
- bool keying_enabled = is_visible_in_tree() && animation.is_valid();
+ bool keying_enabled = false;
+
+ EditorHistory *editor_history = EditorNode::get_singleton()->get_editor_history();
+ if (is_visible_in_tree() && animation.is_valid() && editor_history->get_path_size() > 0) {
+ Object *obj = ObjectDB::get_instance(editor_history->get_path_object(0));
+ keying_enabled = Object::cast_to<Node>(obj) != nullptr;
+ }
if (keying_enabled == keying) {
return;
@@ -4525,8 +4531,6 @@ void AnimationTrackEditor::_notification(int p_what) {
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
update_keying();
- EditorNode::get_singleton()->update_keying();
- emit_signal(SNAME("keying_changed"));
}
}
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index f6b073da3e..d0dfbc7c11 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -170,7 +170,7 @@ void CreateDialog::_update_search() {
root->set_text(0, base_type);
root->set_icon(0, search_options->get_theme_icon(icon_fallback, SNAME("EditorIcons")));
search_options_types[base_type] = root;
- _configure_search_option_item(root, base_type, ClassDB::class_exists(base_type));
+ _configure_search_option_item(root, base_type, ClassDB::class_exists(base_type) ? TypeCategory::CPP_TYPE : TypeCategory::OTHER_TYPE);
const String search_text = search_box->get_text();
bool empty_search = search_text.is_empty();
@@ -185,7 +185,7 @@ void CreateDialog::_update_search() {
// Build the type tree.
for (int i = 0; i < candidates.size(); i++) {
- _add_type(candidates[i], ClassDB::class_exists(candidates[i]));
+ _add_type(candidates[i], ClassDB::class_exists(candidates[i]) ? TypeCategory::CPP_TYPE : TypeCategory::OTHER_TYPE);
}
// Select the best result.
@@ -202,31 +202,80 @@ void CreateDialog::_update_search() {
}
}
-void CreateDialog::_add_type(const String &p_type, bool p_cpp_type) {
+void CreateDialog::_add_type(const String &p_type, const TypeCategory p_type_category) {
if (search_options_types.has(p_type)) {
return;
}
String inherits;
- if (p_cpp_type) {
+
+ TypeCategory inherited_type = TypeCategory::OTHER_TYPE;
+
+ if (p_type_category == TypeCategory::CPP_TYPE) {
inherits = ClassDB::get_parent_class(p_type);
- } else if (ScriptServer::is_global_class(p_type)) {
- inherits = EditorNode::get_editor_data().script_class_get_base(p_type);
+ inherited_type = TypeCategory::CPP_TYPE;
+ } else if (p_type_category == TypeCategory::PATH_TYPE) {
+ ERR_FAIL_COND(!ResourceLoader::exists(p_type, "Script"));
+ Ref<Script> script = ResourceLoader::load(p_type, "Script");
+ ERR_FAIL_COND(script.is_null());
+
+ Ref<Script> base = script->get_base_script();
+ if (base.is_null()) {
+ String extends;
+ script->get_language()->get_global_class_name(script->get_path(), &extends);
+
+ inherits = extends;
+ inherited_type = TypeCategory::CPP_TYPE;
+ } else {
+ inherits = script->get_language()->get_global_class_name(base->get_path());
+ if (inherits.is_empty()) {
+ inherits = base->get_path();
+ inherited_type = TypeCategory::PATH_TYPE;
+ }
+ }
} else {
- inherits = custom_type_parents[p_type];
+ if (ScriptServer::is_global_class(p_type)) {
+ inherits = EditorNode::get_editor_data().script_class_get_base(p_type);
+ if (inherits.is_empty()) {
+ Ref<Script> script = EditorNode::get_editor_data().script_class_load_script(p_type);
+ ERR_FAIL_COND(script.is_null());
+
+ Ref<Script> base = script->get_base_script();
+ if (base.is_null()) {
+ String extends;
+ script->get_language()->get_global_class_name(script->get_path(), &extends);
+
+ inherits = extends;
+ inherited_type = TypeCategory::CPP_TYPE;
+ } else {
+ inherits = base->get_path();
+ inherited_type = TypeCategory::PATH_TYPE;
+ }
+ }
+ } else {
+ inherits = custom_type_parents[p_type];
+ if (ClassDB::class_exists(inherits)) {
+ inherited_type = TypeCategory::CPP_TYPE;
+ }
+ }
}
- _add_type(inherits, p_cpp_type || ClassDB::class_exists(inherits));
+ // Should never happen, but just in case...
+ ERR_FAIL_COND(inherits.is_empty());
+
+ _add_type(inherits, inherited_type);
TreeItem *item = search_options->create_item(search_options_types[inherits]);
search_options_types[p_type] = item;
- _configure_search_option_item(item, p_type, p_cpp_type);
+ _configure_search_option_item(item, p_type, p_type_category);
}
-void CreateDialog::_configure_search_option_item(TreeItem *r_item, const String &p_type, const bool p_cpp_type) {
+void CreateDialog::_configure_search_option_item(TreeItem *r_item, const String &p_type, const TypeCategory p_type_category) {
bool script_type = ScriptServer::is_global_class(p_type);
- if (p_cpp_type) {
+ if (p_type_category == TypeCategory::CPP_TYPE) {
r_item->set_text(0, p_type);
+ } else if (p_type_category == TypeCategory::PATH_TYPE) {
+ r_item->set_text(0, "\"" + p_type + "\"");
} else if (script_type) {
r_item->set_metadata(0, p_type);
r_item->set_text(0, p_type + " (" + ScriptServer::get_global_class_path(p_type).get_file() + ")");
@@ -235,7 +284,9 @@ void CreateDialog::_configure_search_option_item(TreeItem *r_item, const String
r_item->set_text(0, p_type);
}
- bool can_instantiate = (p_cpp_type && ClassDB::can_instantiate(p_type)) || !p_cpp_type;
+ bool can_instantiate = (p_type_category == TypeCategory::CPP_TYPE && ClassDB::can_instantiate(p_type)) ||
+ p_type_category == TypeCategory::OTHER_TYPE;
+
if (!can_instantiate) {
r_item->set_custom_color(0, search_options->get_theme_color(SNAME("disabled_font_color"), SNAME("Editor")));
r_item->set_icon(0, EditorNode::get_singleton()->get_class_icon(p_type, "NodeDisabled"));
@@ -259,7 +310,7 @@ void CreateDialog::_configure_search_option_item(TreeItem *r_item, const String
const String &description = DTR(EditorHelp::get_doc_data()->class_list[p_type].brief_description);
r_item->set_tooltip(0, description);
- if (!p_cpp_type && !script_type) {
+ if (p_type_category == TypeCategory::OTHER_TYPE && !script_type) {
Ref<Texture2D> icon = EditorNode::get_editor_data().get_custom_types()[custom_type_parents[p_type]][custom_type_indices[p_type]].icon;
if (icon.is_valid()) {
r_item->set_icon(0, icon);
diff --git a/editor/create_dialog.h b/editor/create_dialog.h
index a22906c5f0..f905160df3 100644
--- a/editor/create_dialog.h
+++ b/editor/create_dialog.h
@@ -41,6 +41,12 @@
class CreateDialog : public ConfirmationDialog {
GDCLASS(CreateDialog, ConfirmationDialog);
+ enum TypeCategory {
+ CPP_TYPE,
+ PATH_TYPE,
+ OTHER_TYPE
+ };
+
LineEdit *search_box;
Tree *search_options;
@@ -62,8 +68,8 @@ class CreateDialog : public ConfirmationDialog {
void _update_search();
bool _should_hide_type(const String &p_type) const;
- void _add_type(const String &p_current, bool p_cpp_type);
- void _configure_search_option_item(TreeItem *r_item, const String &p_type, const bool p_cpp_type);
+ void _add_type(const String &p_type, const TypeCategory p_type_category);
+ void _configure_search_option_item(TreeItem *r_item, const String &p_type, const TypeCategory p_type_category);
String _top_result(const Vector<String> p_candidates, const String &p_search_text) const;
float _score_type(const String &p_type, const String &p_search) const;
bool _is_type_preferred(const String &p_type) const;
diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp
index c38c10cd10..4349ffc75b 100644
--- a/editor/debugger/script_editor_debugger.cpp
+++ b/editor/debugger/script_editor_debugger.cpp
@@ -1778,7 +1778,6 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
inspector->register_text_enter(search);
inspector->set_use_filter(true);
inspector_vbox->add_child(inspector);
- sc->add_child(inspector);
breakpoints_tree = memnew(Tree);
breakpoints_tree->set_h_size_flags(SIZE_EXPAND_FILL);
diff --git a/editor/doc_tools.cpp b/editor/doc_tools.cpp
index a71e16b66c..6acf654b04 100644
--- a/editor/doc_tools.cpp
+++ b/editor/doc_tools.cpp
@@ -350,7 +350,7 @@ void DocTools::generate(bool p_basic_types) {
List<PropertyInfo> properties;
List<PropertyInfo> own_properties;
if (name == "ProjectSettings") {
- //special case for project settings, so settings can be documented
+ // Special case for project settings, so settings can be documented.
ProjectSettings::get_singleton()->get_property_list(&properties);
own_properties = properties;
} else {
@@ -358,9 +358,12 @@ void DocTools::generate(bool p_basic_types) {
ClassDB::get_property_list(name, &own_properties, true);
}
+ properties.sort();
+ own_properties.sort();
+
List<PropertyInfo>::Element *EO = own_properties.front();
for (const PropertyInfo &E : properties) {
- bool inherited = EO == nullptr;
+ bool inherited = true;
if (EO && EO->get() == E) {
inherited = false;
EO = EO->next();
@@ -410,7 +413,7 @@ void DocTools::generate(bool p_basic_types) {
//used to track uninitialized values using valgrind
//print_line("getting default value for " + String(name) + "." + String(E.name));
if (default_value_valid && default_value.get_type() != Variant::OBJECT) {
- prop.default_value = default_value.get_construct_string().replace("\n", "");
+ prop.default_value = default_value.get_construct_string().replace("\n", " ");
}
StringName setter = ClassDB::get_property_setter(name, E.name);
@@ -522,7 +525,7 @@ void DocTools::generate(bool p_basic_types) {
int darg_idx = i - (E.arguments.size() - E.default_arguments.size());
if (darg_idx >= 0) {
Variant default_arg = E.default_arguments[darg_idx];
- argument.default_value = default_arg.get_construct_string();
+ argument.default_value = default_arg.get_construct_string().replace("\n", " ");
}
method.arguments.push_back(argument);
@@ -585,7 +588,7 @@ void DocTools::generate(bool p_basic_types) {
tid.name = E;
tid.type = "Color";
tid.data_type = "color";
- tid.default_value = Variant(Theme::get_default()->get_color(E, cname)).get_construct_string();
+ tid.default_value = Variant(Theme::get_default()->get_color(E, cname)).get_construct_string().replace("\n", " ");
c.theme_properties.push_back(tid);
}
@@ -757,7 +760,7 @@ void DocTools::generate(bool p_basic_types) {
int darg_idx = mi.default_arguments.size() - mi.arguments.size() + j;
if (darg_idx >= 0) {
Variant default_arg = mi.default_arguments[darg_idx];
- ad.default_value = default_arg.get_construct_string();
+ ad.default_value = default_arg.get_construct_string().replace("\n", " ");
}
method.arguments.push_back(ad);
@@ -801,7 +804,7 @@ void DocTools::generate(bool p_basic_types) {
DocData::PropertyDoc property;
property.name = pi.name;
property.type = Variant::get_type_name(pi.type);
- property.default_value = v.get(pi.name).get_construct_string();
+ property.default_value = v.get(pi.name).get_construct_string().replace("\n", " ");
c.properties.push_back(property);
}
@@ -813,7 +816,7 @@ void DocTools::generate(bool p_basic_types) {
DocData::ConstantDoc constant;
constant.name = E;
Variant value = Variant::get_constant_value(Variant::Type(i), E);
- constant.value = value.get_type() == Variant::INT ? itos(value) : value.get_construct_string();
+ constant.value = value.get_type() == Variant::INT ? itos(value) : value.get_construct_string().replace("\n", " ");
constant.is_value_valid = true;
c.constants.push_back(constant);
}
@@ -930,7 +933,7 @@ void DocTools::generate(bool p_basic_types) {
int darg_idx = j - (mi.arguments.size() - mi.default_arguments.size());
if (darg_idx >= 0) {
Variant default_arg = mi.default_arguments[darg_idx];
- ad.default_value = default_arg.get_construct_string();
+ ad.default_value = default_arg.get_construct_string().replace("\n", " ");
}
md.arguments.push_back(ad);
diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp
index 1de67149c6..b89b20b8cd 100644
--- a/editor/editor_asset_installer.cpp
+++ b/editor/editor_asset_installer.cpp
@@ -140,7 +140,6 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) {
extension_guess["jpeg"] = tree->get_theme_icon(SNAME("ImageTexture"), SNAME("EditorIcons"));
extension_guess["png"] = tree->get_theme_icon(SNAME("ImageTexture"), SNAME("EditorIcons"));
extension_guess["svg"] = tree->get_theme_icon(SNAME("ImageTexture"), SNAME("EditorIcons"));
- extension_guess["svgz"] = tree->get_theme_icon(SNAME("ImageTexture"), SNAME("EditorIcons"));
extension_guess["tga"] = tree->get_theme_icon(SNAME("ImageTexture"), SNAME("EditorIcons"));
extension_guess["webp"] = tree->get_theme_icon(SNAME("ImageTexture"), SNAME("EditorIcons"));
@@ -276,7 +275,7 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) {
asset_contents->set_text(vformat(TTR("Contents of asset \"%s\" - No files conflict with your project:"), asset_name));
}
- popup_centered_ratio();
+ popup_centered_ratio(0.5);
updating = false;
}
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index 703f606c76..5beed352a6 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -1604,6 +1604,10 @@ void EditorFileSystem::update_file(const String &p_file) {
_queue_update_script_classes();
}
+Set<String> EditorFileSystem::get_valid_extensions() const {
+ return valid_extensions;
+}
+
Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector<String> &p_files) {
String importer_name;
diff --git a/editor/editor_file_system.h b/editor/editor_file_system.h
index ecc71e7d42..0c1bfbca47 100644
--- a/editor/editor_file_system.h
+++ b/editor/editor_file_system.h
@@ -272,6 +272,7 @@ public:
void scan();
void scan_changes();
void update_file(const String &p_file);
+ Set<String> get_valid_extensions() const;
EditorFileSystemDirectory *get_filesystem_path(const String &p_path);
String get_file_type(const String &p_file) const;
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index 06e3a63f4a..28cf2ee75f 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -44,18 +44,25 @@
DocTools *EditorHelp::doc = nullptr;
-void EditorHelp::_init_colors() {
- title_color = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
- text_color = get_theme_color(SNAME("default_color"), SNAME("RichTextLabel"));
- headline_color = get_theme_color(SNAME("headline_color"), SNAME("EditorHelp"));
- base_type_color = title_color.lerp(text_color, 0.5);
- comment_color = text_color * Color(1, 1, 1, 0.6);
- symbol_color = comment_color;
- value_color = text_color * Color(1, 1, 1, 0.6);
- qualifier_color = text_color * Color(1, 1, 1, 0.8);
- type_color = get_theme_color(SNAME("accent_color"), SNAME("Editor")).lerp(text_color, 0.5);
- class_desc->add_theme_color_override("selection_color", get_theme_color(SNAME("accent_color"), SNAME("Editor")) * Color(1, 1, 1, 0.4));
- class_desc->add_theme_constant_override("line_separation", Math::round(5 * EDSCALE));
+void EditorHelp::_update_theme() {
+ text_color = get_theme_color("text_color", "EditorHelp");
+ title_color = get_theme_color("title_color", "EditorHelp");
+ headline_color = get_theme_color("headline_color", "EditorHelp");
+ comment_color = get_theme_color("comment_color", "EditorHelp");
+ symbol_color = get_theme_color("symbol_color", "EditorHelp");
+ value_color = get_theme_color("value_color", "EditorHelp");
+ qualifier_color = get_theme_color("qualifier_color", "EditorHelp");
+ type_color = get_theme_color("type_color", "EditorHelp");
+
+ class_desc->add_theme_color_override("selection_color", get_theme_color("selection_color", "EditorHelp"));
+ class_desc->add_theme_constant_override("line_separation", get_theme_constant("line_separation", "EditorHelp"));
+ class_desc->add_theme_constant_override("table_hseparation", get_theme_constant("table_hseparation", "EditorHelp"));
+ class_desc->add_theme_constant_override("table_vseparation", get_theme_constant("table_vseparation", "EditorHelp"));
+
+ doc_font = get_theme_font(SNAME("doc"), SNAME("EditorFonts"));
+ doc_bold_font = get_theme_font(SNAME("doc_bold"), SNAME("EditorFonts"));
+ doc_title_font = get_theme_font(SNAME("doc_title"), SNAME("EditorFonts"));
+ doc_code_font = get_theme_font(SNAME("doc_source"), SNAME("EditorFonts"));
}
void EditorHelp::_search(bool p_search_previous) {
@@ -184,8 +191,7 @@ void EditorHelp::_add_type(const String &p_type, const String &p_enum) {
t = p_enum.get_slice(".", 0);
}
}
- const Color text_color = get_theme_color(SNAME("default_color"), SNAME("RichTextLabel"));
- const Color type_color = get_theme_color(SNAME("accent_color"), SNAME("Editor")).lerp(text_color, 0.5);
+
class_desc->push_color(type_color);
bool add_array = false;
if (can_ref) {
@@ -496,16 +502,11 @@ void EditorHelp::_update_doc() {
method_line.clear();
section_line.clear();
- _init_colors();
-
- DocData::ClassDoc cd = doc->class_list[edited_class]; //make a copy, so we can sort without worrying
-
- Ref<Font> doc_font = get_theme_font(SNAME("doc"), SNAME("EditorFonts"));
- Ref<Font> doc_bold_font = get_theme_font(SNAME("doc_bold"), SNAME("EditorFonts"));
- Ref<Font> doc_title_font = get_theme_font(SNAME("doc_title"), SNAME("EditorFonts"));
- Ref<Font> doc_code_font = get_theme_font(SNAME("doc_source"), SNAME("EditorFonts"));
+ _update_theme();
String link_color_text = title_color.to_html(false);
+ DocData::ClassDoc cd = doc->class_list[edited_class]; // Make a copy, so we can sort without worrying.
+
// Class name
section_line.push_back(Pair<String, int>(TTR("Top"), 0));
class_desc->push_font(doc_title_font);
@@ -1476,11 +1477,9 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
Ref<Font> doc_kbd_font = p_rt->get_theme_font(SNAME("doc_keyboard"), SNAME("EditorFonts"));
Color headline_color = p_rt->get_theme_color(SNAME("headline_color"), SNAME("EditorHelp"));
- Color accent_color = p_rt->get_theme_color(SNAME("accent_color"), SNAME("Editor"));
- Color property_color = p_rt->get_theme_color(SNAME("property_color"), SNAME("Editor"));
- Color link_color = accent_color.lerp(headline_color, 0.8);
- Color code_color = accent_color.lerp(headline_color, 0.6);
- Color kbd_color = accent_color.lerp(property_color, 0.6);
+ Color link_color = p_rt->get_theme_color(SNAME("link_color"), SNAME("EditorHelp"));
+ Color code_color = p_rt->get_theme_color(SNAME("code_color"), SNAME("EditorHelp"));
+ Color kbd_color = p_rt->get_theme_color(SNAME("kbd_color"), SNAME("EditorHelp"));
String bbcode = p_bbcode.dedent().replace("\t", "").replace("\r", "").strip_edges();
@@ -1941,16 +1940,16 @@ void EditorHelpBit::_bind_methods() {
void EditorHelpBit::_notification(int p_what) {
switch (p_what) {
+ case NOTIFICATION_ENTER_TREE:
+ case NOTIFICATION_THEME_CHANGED: {
+ rich_text->add_theme_color_override("selection_color", get_theme_color(SNAME("selection_color"), SNAME("EditorHelp")));
+ } break;
+
case NOTIFICATION_READY: {
rich_text->clear();
_add_text_to_rt(text, rich_text);
} break;
- case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
- rich_text->add_theme_color_override("selection_color", get_theme_color(SNAME("accent_color"), SNAME("Editor")) * Color(1, 1, 1, 0.4));
- } break;
- default:
- break;
}
}
@@ -1964,7 +1963,6 @@ EditorHelpBit::EditorHelpBit() {
rich_text = memnew(RichTextLabel);
add_child(rich_text);
rich_text->connect("meta_clicked", callable_mp(this, &EditorHelpBit::_meta_clicked));
- rich_text->add_theme_color_override("selection_color", get_theme_color(SNAME("accent_color"), SNAME("Editor")) * Color(1, 1, 1, 0.4));
rich_text->set_override_selected_font_color(false);
set_custom_minimum_size(Size2(0, 70 * EDSCALE));
}
diff --git a/editor/editor_help.h b/editor/editor_help.h
index eb879c6d39..377ae05a08 100644
--- a/editor/editor_help.h
+++ b/editor/editor_help.h
@@ -126,17 +126,21 @@ class EditorHelp : public VBoxContainer {
String base_path;
- Color title_color;
Color text_color;
+ Color title_color;
Color headline_color;
- Color base_type_color;
- Color type_color;
Color comment_color;
Color symbol_color;
Color value_color;
Color qualifier_color;
+ Color type_color;
+
+ Ref<Font> doc_font;
+ Ref<Font> doc_bold_font;
+ Ref<Font> doc_title_font;
+ Ref<Font> doc_code_font;
- void _init_colors();
+ void _update_theme();
void _help_callback(const String &p_topic);
void _add_text(const String &p_bbcode);
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index 75e518e050..1e1f25b6d1 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -2905,6 +2905,7 @@ void EditorInspector::edit(Object *p_object) {
object->connect("property_list_changed", callable_mp(this, &EditorInspector::_changed_callback));
update_tree();
}
+ emit_signal("edited_object_changed");
}
void EditorInspector::set_keying(bool p_active) {
@@ -3543,6 +3544,7 @@ void EditorInspector::_bind_methods() {
ADD_SIGNAL(MethodInfo("object_id_selected", PropertyInfo(Variant::INT, "id")));
ADD_SIGNAL(MethodInfo("property_edited", PropertyInfo(Variant::STRING, "property")));
ADD_SIGNAL(MethodInfo("property_toggled", PropertyInfo(Variant::STRING, "property"), PropertyInfo(Variant::BOOL, "checked")));
+ ADD_SIGNAL(MethodInfo("edited_object_changed"));
ADD_SIGNAL(MethodInfo("restart_requested"));
}
diff --git a/editor/editor_locale_dialog.cpp b/editor/editor_locale_dialog.cpp
new file mode 100644
index 0000000000..5c4ece7065
--- /dev/null
+++ b/editor/editor_locale_dialog.cpp
@@ -0,0 +1,563 @@
+/*************************************************************************/
+/* editor_locale_dialog.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 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 "editor_locale_dialog.h"
+
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
+#include "scene/gui/check_button.h"
+#include "scene/gui/line_edit.h"
+#include "scene/gui/option_button.h"
+#include "scene/gui/tree.h"
+
+static _FORCE_INLINE_ bool is_upper_case(char32_t c) {
+ return (c >= 'A' && c <= 'Z');
+}
+
+static _FORCE_INLINE_ bool is_lower_case(char32_t c) {
+ return (c >= 'a' && c <= 'z');
+}
+
+void EditorLocaleDialog::_bind_methods() {
+ ADD_SIGNAL(MethodInfo("locale_selected", PropertyInfo(Variant::STRING, "locale")));
+}
+
+void EditorLocaleDialog::ok_pressed() {
+ if (edit_filters->is_pressed()) {
+ return; // Do not update, if in filter edit mode.
+ }
+
+ String locale;
+ if (lang_code->get_text().is_empty()) {
+ return; // Language code is required.
+ }
+ locale = lang_code->get_text();
+
+ if (!script_code->get_text().is_empty()) {
+ locale += "_" + script_code->get_text();
+ }
+ if (!country_code->get_text().is_empty()) {
+ locale += "_" + country_code->get_text();
+ }
+ if (!variant_code->get_text().is_empty()) {
+ locale += "_" + variant_code->get_text();
+ }
+
+ emit_signal(SNAME("locale_selected"), TranslationServer::get_singleton()->standardize_locale(locale));
+ hide();
+}
+
+void EditorLocaleDialog::_item_selected() {
+ if (updating_lists) {
+ return;
+ }
+
+ if (edit_filters->is_pressed()) {
+ return; // Do not update, if in filter edit mode.
+ }
+
+ TreeItem *l = lang_list->get_selected();
+ if (l) {
+ lang_code->set_text(l->get_metadata(0).operator String());
+ }
+
+ TreeItem *s = script_list->get_selected();
+ if (s) {
+ script_code->set_text(s->get_metadata(0).operator String());
+ }
+
+ TreeItem *c = cnt_list->get_selected();
+ if (c) {
+ country_code->set_text(c->get_metadata(0).operator String());
+ }
+}
+
+void EditorLocaleDialog::_toggle_advanced(bool p_checked) {
+ if (!p_checked) {
+ script_code->set_text("");
+ variant_code->set_text("");
+ }
+ _update_tree();
+}
+
+void EditorLocaleDialog::_post_popup() {
+ ConfirmationDialog::_post_popup();
+
+ if (!locale_set) {
+ lang_code->set_text("");
+ script_code->set_text("");
+ country_code->set_text("");
+ variant_code->set_text("");
+ }
+ edit_filters->set_pressed(false);
+ _update_tree();
+}
+
+void EditorLocaleDialog::_filter_lang_option_changed() {
+ TreeItem *t = lang_list->get_edited();
+ String lang = t->get_metadata(0);
+ bool checked = t->is_checked(0);
+
+ Variant prev;
+ Array f_lang_all;
+
+ if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/language_filter")) {
+ f_lang_all = ProjectSettings::get_singleton()->get("internationalization/locale/language_filter");
+ prev = f_lang_all;
+ }
+
+ int l_idx = f_lang_all.find(lang);
+
+ if (checked) {
+ if (l_idx == -1) {
+ f_lang_all.append(lang);
+ }
+ } else {
+ if (l_idx != -1) {
+ f_lang_all.remove_at(l_idx);
+ }
+ }
+
+ f_lang_all.sort();
+
+ undo_redo->create_action(TTR("Changed Locale Language Filter"));
+ undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/language_filter", f_lang_all);
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/language_filter", prev);
+ undo_redo->commit_action();
+}
+
+void EditorLocaleDialog::_filter_script_option_changed() {
+ TreeItem *t = script_list->get_edited();
+ String script = t->get_metadata(0);
+ bool checked = t->is_checked(0);
+
+ Variant prev;
+ Array f_script_all;
+
+ if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/script_filter")) {
+ f_script_all = ProjectSettings::get_singleton()->get("internationalization/locale/script_filter");
+ prev = f_script_all;
+ }
+
+ int l_idx = f_script_all.find(script);
+
+ if (checked) {
+ if (l_idx == -1) {
+ f_script_all.append(script);
+ }
+ } else {
+ if (l_idx != -1) {
+ f_script_all.remove_at(l_idx);
+ }
+ }
+
+ f_script_all.sort();
+
+ undo_redo->create_action(TTR("Changed Locale Script Filter"));
+ undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/script_filter", f_script_all);
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/script_filter", prev);
+ undo_redo->commit_action();
+}
+
+void EditorLocaleDialog::_filter_cnt_option_changed() {
+ TreeItem *t = cnt_list->get_edited();
+ String cnt = t->get_metadata(0);
+ bool checked = t->is_checked(0);
+
+ Variant prev;
+ Array f_cnt_all;
+
+ if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/country_filter")) {
+ f_cnt_all = ProjectSettings::get_singleton()->get("internationalization/locale/country_filter");
+ prev = f_cnt_all;
+ }
+
+ int l_idx = f_cnt_all.find(cnt);
+
+ if (checked) {
+ if (l_idx == -1) {
+ f_cnt_all.append(cnt);
+ }
+ } else {
+ if (l_idx != -1) {
+ f_cnt_all.remove_at(l_idx);
+ }
+ }
+
+ f_cnt_all.sort();
+
+ undo_redo->create_action(TTR("Changed Locale Country Filter"));
+ undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/country_filter", f_cnt_all);
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/country_filter", prev);
+ undo_redo->commit_action();
+}
+
+void EditorLocaleDialog::_filter_mode_changed(int p_mode) {
+ int f_mode = filter_mode->get_selected_id();
+ Variant prev;
+
+ if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/locale_filter_mode")) {
+ prev = ProjectSettings::get_singleton()->get("internationalization/locale/locale_filter_mode");
+ }
+
+ undo_redo->create_action(TTR("Changed Locale Filter Mode"));
+ undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/locale_filter_mode", f_mode);
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/locale_filter_mode", prev);
+ undo_redo->commit_action();
+
+ _update_tree();
+}
+
+void EditorLocaleDialog::_edit_filters(bool p_checked) {
+ _update_tree();
+}
+
+void EditorLocaleDialog::_update_tree() {
+ updating_lists = true;
+
+ int filter = SHOW_ALL_LOCALES;
+ if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/locale_filter_mode")) {
+ filter = ProjectSettings::get_singleton()->get("internationalization/locale/locale_filter_mode");
+ }
+ Array f_lang_all;
+ if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/language_filter")) {
+ f_lang_all = ProjectSettings::get_singleton()->get("internationalization/locale/language_filter");
+ }
+ Array f_cnt_all;
+ if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/country_filter")) {
+ f_cnt_all = ProjectSettings::get_singleton()->get("internationalization/locale/country_filter");
+ }
+ Array f_script_all;
+ if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/script_filter")) {
+ f_script_all = ProjectSettings::get_singleton()->get("internationalization/locale/script_filter");
+ }
+ bool is_edit_mode = edit_filters->is_pressed();
+
+ filter_mode->select(filter);
+
+ // Hide text advanced edit and disable OK button if in filter edit mode.
+ advanced->set_visible(!is_edit_mode);
+ hb_locale->set_visible(!is_edit_mode && advanced->is_pressed());
+ vb_script_list->set_visible(advanced->is_pressed());
+ get_ok_button()->set_disabled(is_edit_mode);
+
+ // Update language list.
+ lang_list->clear();
+ TreeItem *l_root = lang_list->create_item(nullptr);
+ lang_list->set_hide_root(true);
+
+ Vector<String> languages = TranslationServer::get_singleton()->get_all_languages();
+ for (const String &E : languages) {
+ if (is_edit_mode || (filter == SHOW_ALL_LOCALES) || f_lang_all.has(E) || f_lang_all.is_empty()) {
+ const String &lang = TranslationServer::get_singleton()->get_language_name(E);
+ TreeItem *t = lang_list->create_item(l_root);
+ if (is_edit_mode) {
+ t->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
+ t->set_editable(0, true);
+ t->set_checked(0, f_lang_all.has(E));
+ } else if (lang_code->get_text() == E) {
+ t->select(0);
+ }
+ t->set_text(0, vformat("%s [%s]", lang, E));
+ t->set_metadata(0, E);
+ }
+ }
+
+ // Update script list.
+ script_list->clear();
+ TreeItem *s_root = script_list->create_item(nullptr);
+ script_list->set_hide_root(true);
+
+ if (!is_edit_mode) {
+ TreeItem *t = script_list->create_item(s_root);
+ t->set_text(0, "[Default]");
+ t->set_metadata(0, "");
+ }
+
+ Vector<String> scripts = TranslationServer::get_singleton()->get_all_scripts();
+ for (const String &E : scripts) {
+ if (is_edit_mode || (filter == SHOW_ALL_LOCALES) || f_script_all.has(E) || f_script_all.is_empty()) {
+ const String &script = TranslationServer::get_singleton()->get_script_name(E);
+ TreeItem *t = script_list->create_item(s_root);
+ if (is_edit_mode) {
+ t->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
+ t->set_editable(0, true);
+ t->set_checked(0, f_script_all.has(E));
+ } else if (script_code->get_text() == E) {
+ t->select(0);
+ }
+ t->set_text(0, vformat("%s [%s]", script, E));
+ t->set_metadata(0, E);
+ }
+ }
+
+ // Update country list.
+ cnt_list->clear();
+ TreeItem *c_root = cnt_list->create_item(nullptr);
+ cnt_list->set_hide_root(true);
+
+ if (!is_edit_mode) {
+ TreeItem *t = cnt_list->create_item(c_root);
+ t->set_text(0, "[Default]");
+ t->set_metadata(0, "");
+ }
+
+ Vector<String> countries = TranslationServer::get_singleton()->get_all_countries();
+ for (const String &E : countries) {
+ if (is_edit_mode || (filter == SHOW_ALL_LOCALES) || f_cnt_all.has(E) || f_cnt_all.is_empty()) {
+ const String &cnt = TranslationServer::get_singleton()->get_country_name(E);
+ TreeItem *t = cnt_list->create_item(c_root);
+ if (is_edit_mode) {
+ t->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
+ t->set_editable(0, true);
+ t->set_checked(0, f_cnt_all.has(E));
+ } else if (country_code->get_text() == E) {
+ t->select(0);
+ }
+ t->set_text(0, vformat("%s [%s]", cnt, E));
+ t->set_metadata(0, E);
+ }
+ }
+ updating_lists = false;
+}
+
+void EditorLocaleDialog::set_locale(const String &p_locale) {
+ const String &locale = TranslationServer::get_singleton()->standardize_locale(p_locale);
+ if (locale.is_empty()) {
+ locale_set = false;
+
+ lang_code->set_text("");
+ script_code->set_text("");
+ country_code->set_text("");
+ variant_code->set_text("");
+ } else {
+ locale_set = true;
+
+ Vector<String> locale_elements = p_locale.split("_");
+ lang_code->set_text(locale_elements[0]);
+ if (locale_elements.size() >= 2) {
+ if (locale_elements[1].length() == 4 && is_upper_case(locale_elements[1][0]) && is_lower_case(locale_elements[1][1]) && is_lower_case(locale_elements[1][2]) && is_lower_case(locale_elements[1][3])) {
+ script_code->set_text(locale_elements[1]);
+ advanced->set_pressed(true);
+ }
+ if (locale_elements[1].length() == 2 && is_upper_case(locale_elements[1][0]) && is_upper_case(locale_elements[1][1])) {
+ country_code->set_text(locale_elements[1]);
+ }
+ }
+ if (locale_elements.size() >= 3) {
+ if (locale_elements[2].length() == 2 && is_upper_case(locale_elements[2][0]) && is_upper_case(locale_elements[2][1])) {
+ country_code->set_text(locale_elements[2]);
+ } else {
+ variant_code->set_text(locale_elements[2].to_lower());
+ advanced->set_pressed(true);
+ }
+ }
+ if (locale_elements.size() >= 4) {
+ variant_code->set_text(locale_elements[3].to_lower());
+ advanced->set_pressed(true);
+ }
+ }
+}
+
+void EditorLocaleDialog::popup_locale_dialog() {
+ popup_centered_clamped(Size2(1050, 700) * EDSCALE, 0.8);
+}
+
+EditorLocaleDialog::EditorLocaleDialog() {
+ undo_redo = EditorNode::get_undo_redo();
+
+ set_title(TTR("Select a Locale"));
+
+ VBoxContainer *vb = memnew(VBoxContainer);
+ {
+ HBoxContainer *hb_filter = memnew(HBoxContainer);
+ {
+ filter_mode = memnew(OptionButton);
+ filter_mode->add_item(TTR("Show All Locales"), SHOW_ALL_LOCALES);
+ filter_mode->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ filter_mode->add_item(TTR("Show Selected Locales Only"), SHOW_ONLY_SELECTED_LOCALES);
+ filter_mode->select(0);
+ filter_mode->connect("item_selected", callable_mp(this, &EditorLocaleDialog::_filter_mode_changed));
+ hb_filter->add_child(filter_mode);
+ }
+ {
+ edit_filters = memnew(CheckButton);
+ edit_filters->set_text("Edit Filters");
+ edit_filters->set_toggle_mode(true);
+ edit_filters->set_pressed(false);
+ edit_filters->connect("toggled", callable_mp(this, &EditorLocaleDialog::_edit_filters));
+ hb_filter->add_child(edit_filters);
+ }
+ {
+ advanced = memnew(CheckButton);
+ advanced->set_text("Advanced");
+ advanced->set_toggle_mode(true);
+ advanced->set_pressed(false);
+ advanced->connect("toggled", callable_mp(this, &EditorLocaleDialog::_toggle_advanced));
+ hb_filter->add_child(advanced);
+ }
+ vb->add_child(hb_filter);
+ }
+ {
+ HBoxContainer *hb_lists = memnew(HBoxContainer);
+ hb_lists->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ {
+ VBoxContainer *vb_lang_list = memnew(VBoxContainer);
+ vb_lang_list->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ {
+ Label *lang_lbl = memnew(Label);
+ lang_lbl->set_text(TTR("Language:"));
+ vb_lang_list->add_child(lang_lbl);
+ }
+ {
+ lang_list = memnew(Tree);
+ lang_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ lang_list->connect("cell_selected", callable_mp(this, &EditorLocaleDialog::_item_selected));
+ lang_list->set_columns(1);
+ lang_list->connect("item_edited", callable_mp(this, &EditorLocaleDialog::_filter_lang_option_changed));
+ vb_lang_list->add_child(lang_list);
+ }
+ hb_lists->add_child(vb_lang_list);
+ }
+ {
+ vb_script_list = memnew(VBoxContainer);
+ vb_script_list->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ {
+ Label *script_lbl = memnew(Label);
+ script_lbl->set_text(TTR("Script:"));
+ vb_script_list->add_child(script_lbl);
+ }
+ {
+ script_list = memnew(Tree);
+ script_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ script_list->connect("cell_selected", callable_mp(this, &EditorLocaleDialog::_item_selected));
+ script_list->set_columns(1);
+ script_list->connect("item_edited", callable_mp(this, &EditorLocaleDialog::_filter_script_option_changed));
+ vb_script_list->add_child(script_list);
+ }
+ hb_lists->add_child(vb_script_list);
+ }
+ {
+ VBoxContainer *vb_cnt_list = memnew(VBoxContainer);
+ vb_cnt_list->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ {
+ Label *cnt_lbl = memnew(Label);
+ cnt_lbl->set_text(TTR("Country:"));
+ vb_cnt_list->add_child(cnt_lbl);
+ }
+ {
+ cnt_list = memnew(Tree);
+ cnt_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ cnt_list->connect("cell_selected", callable_mp(this, &EditorLocaleDialog::_item_selected));
+ cnt_list->set_columns(1);
+ cnt_list->connect("item_edited", callable_mp(this, &EditorLocaleDialog::_filter_cnt_option_changed));
+ vb_cnt_list->add_child(cnt_list);
+ }
+ hb_lists->add_child(vb_cnt_list);
+ }
+ vb->add_child(hb_lists);
+ }
+ {
+ hb_locale = memnew(HBoxContainer);
+ hb_locale->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ {
+ {
+ VBoxContainer *vb_language = memnew(VBoxContainer);
+ vb_language->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ {
+ Label *language_lbl = memnew(Label);
+ language_lbl->set_text(TTR("Language"));
+ vb_language->add_child(language_lbl);
+ }
+ {
+ lang_code = memnew(LineEdit);
+ lang_code->set_max_length(3);
+ lang_code->set_tooltip("Language");
+ vb_language->add_child(lang_code);
+ }
+ hb_locale->add_child(vb_language);
+ }
+ {
+ VBoxContainer *vb_script = memnew(VBoxContainer);
+ vb_script->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ {
+ Label *script_lbl = memnew(Label);
+ script_lbl->set_text(TTR("Script"));
+ vb_script->add_child(script_lbl);
+ }
+ {
+ script_code = memnew(LineEdit);
+ script_code->set_max_length(4);
+ script_code->set_tooltip("Script");
+ vb_script->add_child(script_code);
+ }
+ hb_locale->add_child(vb_script);
+ }
+ {
+ VBoxContainer *vb_country = memnew(VBoxContainer);
+ vb_country->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ {
+ Label *country_lbl = memnew(Label);
+ country_lbl->set_text(TTR("Country"));
+ vb_country->add_child(country_lbl);
+ }
+ {
+ country_code = memnew(LineEdit);
+ country_code->set_max_length(2);
+ country_code->set_tooltip("Country");
+ vb_country->add_child(country_code);
+ }
+ hb_locale->add_child(vb_country);
+ }
+ {
+ VBoxContainer *vb_variant = memnew(VBoxContainer);
+ vb_variant->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ {
+ Label *variant_lbl = memnew(Label);
+ variant_lbl->set_text(TTR("Variant"));
+ vb_variant->add_child(variant_lbl);
+ }
+ {
+ variant_code = memnew(LineEdit);
+ variant_code->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ variant_code->set_placeholder("Variant");
+ variant_code->set_tooltip("Variant");
+ vb_variant->add_child(variant_code);
+ }
+ hb_locale->add_child(vb_variant);
+ }
+ }
+ vb->add_child(hb_locale);
+ }
+ add_child(vb);
+ _update_tree();
+
+ get_ok_button()->set_text(TTR("Select"));
+}
diff --git a/editor/editor_locale_dialog.h b/editor/editor_locale_dialog.h
new file mode 100644
index 0000000000..7a4828e83a
--- /dev/null
+++ b/editor/editor_locale_dialog.h
@@ -0,0 +1,93 @@
+/*************************************************************************/
+/* editor_locale_dialog.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 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 EDITOR_LOCALE_DIALOG_H
+#define EDITOR_LOCALE_DIALOG_H
+
+#include "core/string/translation.h"
+#include "scene/gui/dialogs.h"
+
+class Button;
+class HBoxContainer;
+class VBoxContainer;
+class LineEdit;
+class Tree;
+class OptionButton;
+class UndoRedo;
+
+class EditorLocaleDialog : public ConfirmationDialog {
+ GDCLASS(EditorLocaleDialog, ConfirmationDialog);
+
+ enum LocaleFilter {
+ SHOW_ALL_LOCALES,
+ SHOW_ONLY_SELECTED_LOCALES,
+ };
+
+ HBoxContainer *hb_locale = nullptr;
+ VBoxContainer *vb_script_list = nullptr;
+ OptionButton *filter_mode = nullptr;
+ Button *edit_filters = nullptr;
+ Button *advanced = nullptr;
+ LineEdit *lang_code = nullptr;
+ LineEdit *script_code = nullptr;
+ LineEdit *country_code = nullptr;
+ LineEdit *variant_code = nullptr;
+ Tree *lang_list = nullptr;
+ Tree *script_list = nullptr;
+ Tree *cnt_list = nullptr;
+
+ UndoRedo *undo_redo = nullptr;
+
+ bool locale_set = false;
+ bool updating_lists = false;
+
+protected:
+ static void _bind_methods();
+ virtual void _post_popup() override;
+ virtual void ok_pressed() override;
+
+ void _item_selected();
+ void _filter_lang_option_changed();
+ void _filter_script_option_changed();
+ void _filter_cnt_option_changed();
+ void _filter_mode_changed(int p_mode);
+ void _edit_filters(bool p_checked);
+ void _toggle_advanced(bool p_checked);
+
+ void _update_tree();
+
+public:
+ EditorLocaleDialog();
+
+ void set_locale(const String &p_locale);
+ void popup_locale_dialog();
+};
+
+#endif // EDITOR_LOCALE_DIALOG_H
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 9b4b99b32d..e64f60c58d 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -957,9 +957,10 @@ void EditorNode::_fs_changed() {
if (!export_error.is_empty()) {
ERR_PRINT(export_error);
- OS::get_singleton()->set_exit_code(EXIT_FAILURE);
+ _exit_editor(EXIT_FAILURE);
+ } else {
+ _exit_editor(EXIT_SUCCESS);
}
- _exit_editor();
}
}
@@ -1775,7 +1776,7 @@ void EditorNode::restart_editor() {
to_reopen = get_tree()->get_edited_scene_root()->get_scene_file_path();
}
- _exit_editor();
+ _exit_editor(EXIT_SUCCESS);
List<String> args;
args.push_back("--path");
@@ -2306,7 +2307,6 @@ void EditorNode::_edit_current(bool p_skip_foreign) {
}
inspector_dock->update(current_obj);
- inspector_dock->update_keying();
}
void EditorNode::_run(bool p_current, const String &p_custom) {
@@ -2593,13 +2593,21 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
file->set_current_path(path.replacen("." + ext, "." + extensions.front()->get()));
}
}
- } else {
- String existing;
- if (extensions.size()) {
- String root_name(scene->get_name());
- existing = root_name + "." + extensions.front()->get().to_lower();
+ } else if (extensions.size()) {
+ String root_name = scene->get_name();
+ // Very similar to node naming logic.
+ switch (ProjectSettings::get_singleton()->get("editor/scene/scene_naming").operator int()) {
+ case SCENE_NAME_CASING_AUTO:
+ // Use casing of the root node.
+ break;
+ case SCENE_NAME_CASING_PASCAL_CASE: {
+ root_name = root_name.capitalize().replace(" ", "");
+ } break;
+ case SCENE_NAME_CASING_SNAKE_CASE:
+ root_name = root_name.capitalize().replace(" ", "").replace("-", "_").camelcase_to_underscore();
+ break;
}
- file->set_current_path(existing);
+ file->set_current_path(root_name + "." + extensions.front()->get().to_lower());
}
file->popup_file_dialog();
file->set_title(TTR("Save Scene As..."));
@@ -2861,11 +2869,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
DisplayServer::get_singleton()->window_set_mode(DisplayServer::get_singleton()->window_get_mode() == DisplayServer::WINDOW_MODE_FULLSCREEN ? DisplayServer::WINDOW_MODE_WINDOWED : DisplayServer::WINDOW_MODE_FULLSCREEN);
} break;
- case SETTINGS_TOGGLE_CONSOLE: {
- bool was_visible = DisplayServer::get_singleton()->is_console_visible();
- DisplayServer::get_singleton()->console_set_visible(!was_visible);
- EditorSettings::get_singleton()->set_setting("interface/editor/hide_console_window", was_visible);
- } break;
case EDITOR_SCREENSHOT: {
screenshot_timer->start();
} break;
@@ -2997,7 +3000,7 @@ int EditorNode::_next_unsaved_scene(bool p_valid_filename, int p_start) {
return -1;
}
-void EditorNode::_exit_editor() {
+void EditorNode::_exit_editor(int p_exit_code) {
exiting = true;
resource_preview->stop(); // stop early to avoid crashes
_save_docks();
@@ -3005,7 +3008,7 @@ void EditorNode::_exit_editor() {
// Dim the editor window while it's quitting to make it clearer that it's busy
dim_editor(true);
- get_tree()->quit();
+ get_tree()->quit(p_exit_code);
}
void EditorNode::_discard_changes(const String &p_str) {
@@ -3055,12 +3058,12 @@ void EditorNode::_discard_changes(const String &p_str) {
} break;
case FILE_QUIT: {
_menu_option_confirm(RUN_STOP, true);
- _exit_editor();
+ _exit_editor(EXIT_SUCCESS);
} break;
case RUN_PROJECT_MANAGER: {
_menu_option_confirm(RUN_STOP, true);
- _exit_editor();
+ _exit_editor(EXIT_SUCCESS);
String exec = OS::get_singleton()->get_executable_path();
List<String> args;
@@ -5678,6 +5681,8 @@ void EditorNode::_feature_profile_changed() {
}
void EditorNode::_bind_methods() {
+ GLOBAL_DEF("editor/scene/scene_naming", SCENE_NAME_CASING_SNAKE_CASE);
+ ProjectSettings::get_singleton()->set_custom_property_info("editor/scene/scene_naming", PropertyInfo(Variant::INT, "editor/scene/scene_naming", PROPERTY_HINT_ENUM, "Auto,PascalCase,snake_case"));
ClassDB::bind_method("_editor_select", &EditorNode::_editor_select);
ClassDB::bind_method("_node_renamed", &EditorNode::_node_renamed);
ClassDB::bind_method("edit_node", &EditorNode::edit_node);
@@ -6514,11 +6519,6 @@ EditorNode::EditorNode() {
ED_SHORTCUT_OVERRIDE("editor/fullscreen_mode", "macos", KeyModifierMask::CMD | KeyModifierMask::CTRL | Key::F);
p->add_shortcut(ED_GET_SHORTCUT("editor/fullscreen_mode"), SETTINGS_TOGGLE_FULLSCREEN);
-#if defined(WINDOWS_ENABLED) && defined(WINDOWS_SUBSYSTEM_CONSOLE)
- // The console can only be toggled if the application was built for the console subsystem,
- // not the GUI subsystem.
- p->add_item(TTR("Toggle System Console"), SETTINGS_TOGGLE_CONSOLE);
-#endif
p->add_separator();
if (OS::get_singleton()->get_data_path() == OS::get_singleton()->get_config_path()) {
diff --git a/editor/editor_node.h b/editor/editor_node.h
index af7223ffb4..487bde3cb4 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -188,7 +188,6 @@ private:
SETTINGS_MANAGE_FEATURE_PROFILES,
SETTINGS_INSTALL_ANDROID_BUILD_TEMPLATE,
SETTINGS_PICK_MAIN_SCENE,
- SETTINGS_TOGGLE_CONSOLE,
SETTINGS_TOGGLE_FULLSCREEN,
SETTINGS_HELP,
SCENE_TAB_CLOSE,
@@ -217,6 +216,12 @@ private:
TOOL_MENU_BASE = 1000
};
+ enum ScriptNameCasing {
+ SCENE_NAME_CASING_AUTO,
+ SCENE_NAME_CASING_PASCAL_CASE,
+ SCENE_NAME_CASING_SNAKE_CASE
+ };
+
SubViewport *scene_root; // root of the scene being edited
PanelContainer *scene_root_parent;
@@ -530,7 +535,7 @@ private:
void _add_dropped_files_recursive(const Vector<String> &p_files, String to_path);
String _recent_scene;
- void _exit_editor();
+ void _exit_editor(int p_exit_code);
bool convert_old;
@@ -879,7 +884,6 @@ public:
void edit_current() { _edit_current(); };
- void update_keying() const { inspector_dock->update_keying(); };
bool has_scenes_in_session();
int execute_and_show_output(const String &p_title, const String &p_path, const List<String> &p_arguments, bool p_close_on_ok = true, bool p_close_on_errors = false);
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index aeca340cb1..6579b1eb31 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -421,14 +421,10 @@ void EditorPlugin::add_control_to_container(CustomControlContainer p_location, C
} break;
case CONTAINER_SPATIAL_EDITOR_SIDE_LEFT: {
- Node3DEditor::get_singleton()->get_palette_split()->add_child(p_control);
- Node3DEditor::get_singleton()->get_palette_split()->move_child(p_control, 0);
-
+ Node3DEditor::get_singleton()->add_control_to_left_panel(p_control);
} break;
case CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT: {
- Node3DEditor::get_singleton()->get_palette_split()->add_child(p_control);
- Node3DEditor::get_singleton()->get_palette_split()->move_child(p_control, 1);
-
+ Node3DEditor::get_singleton()->add_control_to_right_panel(p_control);
} break;
case CONTAINER_SPATIAL_EDITOR_BOTTOM: {
Node3DEditor::get_singleton()->get_shader_split()->add_child(p_control);
@@ -439,14 +435,10 @@ void EditorPlugin::add_control_to_container(CustomControlContainer p_location, C
} break;
case CONTAINER_CANVAS_EDITOR_SIDE_LEFT: {
- CanvasItemEditor::get_singleton()->get_palette_split()->add_child(p_control);
- CanvasItemEditor::get_singleton()->get_palette_split()->move_child(p_control, 0);
-
+ CanvasItemEditor::get_singleton()->add_control_to_left_panel(p_control);
} break;
case CONTAINER_CANVAS_EDITOR_SIDE_RIGHT: {
- CanvasItemEditor::get_singleton()->get_palette_split()->add_child(p_control);
- CanvasItemEditor::get_singleton()->get_palette_split()->move_child(p_control, 1);
-
+ CanvasItemEditor::get_singleton()->add_control_to_right_panel(p_control);
} break;
case CONTAINER_CANVAS_EDITOR_BOTTOM: {
CanvasItemEditor::get_singleton()->get_bottom_split()->add_child(p_control);
@@ -481,10 +473,11 @@ void EditorPlugin::remove_control_from_container(CustomControlContainer p_locati
Node3DEditor::get_singleton()->remove_control_from_menu_panel(p_control);
} break;
- case CONTAINER_SPATIAL_EDITOR_SIDE_LEFT:
+ case CONTAINER_SPATIAL_EDITOR_SIDE_LEFT: {
+ Node3DEditor::get_singleton()->remove_control_from_left_panel(p_control);
+ } break;
case CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT: {
- Node3DEditor::get_singleton()->get_palette_split()->remove_child(p_control);
-
+ Node3DEditor::get_singleton()->remove_control_from_right_panel(p_control);
} break;
case CONTAINER_SPATIAL_EDITOR_BOTTOM: {
Node3DEditor::get_singleton()->get_shader_split()->remove_child(p_control);
@@ -494,10 +487,11 @@ void EditorPlugin::remove_control_from_container(CustomControlContainer p_locati
CanvasItemEditor::get_singleton()->remove_control_from_menu_panel(p_control);
} break;
- case CONTAINER_CANVAS_EDITOR_SIDE_LEFT:
+ case CONTAINER_CANVAS_EDITOR_SIDE_LEFT: {
+ CanvasItemEditor::get_singleton()->remove_control_from_left_panel(p_control);
+ } break;
case CONTAINER_CANVAS_EDITOR_SIDE_RIGHT: {
- CanvasItemEditor::get_singleton()->get_palette_split()->remove_child(p_control);
-
+ CanvasItemEditor::get_singleton()->remove_control_from_right_panel(p_control);
} break;
case CONTAINER_CANVAS_EDITOR_BOTTOM: {
CanvasItemEditor::get_singleton()->get_bottom_split()->remove_child(p_control);
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 97a38b9200..6bb4b5e81b 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -343,6 +343,64 @@ EditorPropertyTextEnum::EditorPropertyTextEnum() {
add_focusable(cancel_button);
}
+//////////////////// LOCALE ////////////////////////
+
+void EditorPropertyLocale::_locale_selected(const String &p_locale) {
+ emit_changed(get_edited_property(), p_locale);
+ update_property();
+}
+
+void EditorPropertyLocale::_locale_pressed() {
+ if (!dialog) {
+ dialog = memnew(EditorLocaleDialog);
+ dialog->connect("locale_selected", callable_mp(this, &EditorPropertyLocale::_locale_selected));
+ add_child(dialog);
+ }
+
+ String locale_code = get_edited_object()->get(get_edited_property());
+ dialog->set_locale(locale_code);
+ dialog->popup_locale_dialog();
+}
+
+void EditorPropertyLocale::update_property() {
+ String locale_code = get_edited_object()->get(get_edited_property());
+ locale->set_text(locale_code);
+ locale->set_tooltip(locale_code);
+}
+
+void EditorPropertyLocale::setup(const String &p_hint_text) {
+}
+
+void EditorPropertyLocale::_notification(int p_what) {
+ if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
+ locale_edit->set_icon(get_theme_icon(SNAME("Translation"), SNAME("EditorIcons")));
+ }
+}
+
+void EditorPropertyLocale::_locale_focus_exited() {
+ _locale_selected(locale->get_text());
+}
+
+void EditorPropertyLocale::_bind_methods() {
+}
+
+EditorPropertyLocale::EditorPropertyLocale() {
+ HBoxContainer *locale_hb = memnew(HBoxContainer);
+ add_child(locale_hb);
+ locale = memnew(LineEdit);
+ locale_hb->add_child(locale);
+ locale->connect("text_submitted", callable_mp(this, &EditorPropertyLocale::_locale_selected));
+ locale->connect("focus_exited", callable_mp(this, &EditorPropertyLocale::_locale_focus_exited));
+ locale->set_h_size_flags(SIZE_EXPAND_FILL);
+
+ locale_edit = memnew(Button);
+ locale_edit->set_clip_text(true);
+ locale_hb->add_child(locale_edit);
+ add_focusable(locale);
+ dialog = nullptr;
+ locale_edit->connect("pressed", callable_mp(this, &EditorPropertyLocale::_locale_pressed));
+}
+
///////////////////// PATH /////////////////////////
void EditorPropertyPath::_set_read_only(bool p_read_only) {
@@ -3379,6 +3437,10 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
EditorPropertyClassName *editor = memnew(EditorPropertyClassName);
editor->setup("Object", p_hint_text);
return editor;
+ } else if (p_hint == PROPERTY_HINT_LOCALE_ID) {
+ EditorPropertyLocale *editor = memnew(EditorPropertyLocale);
+ editor->setup(p_hint_text);
+ return editor;
} else if (p_hint == PROPERTY_HINT_DIR || p_hint == PROPERTY_HINT_FILE || p_hint == PROPERTY_HINT_SAVE_FILE || p_hint == PROPERTY_HINT_GLOBAL_DIR || p_hint == PROPERTY_HINT_GLOBAL_FILE) {
Vector<String> extensions = p_hint_text.split(",");
bool global = p_hint == PROPERTY_HINT_GLOBAL_DIR || p_hint == PROPERTY_HINT_GLOBAL_FILE;
diff --git a/editor/editor_properties.h b/editor/editor_properties.h
index e62f6823a3..fdb0360d6b 100644
--- a/editor/editor_properties.h
+++ b/editor/editor_properties.h
@@ -33,6 +33,7 @@
#include "editor/create_dialog.h"
#include "editor/editor_inspector.h"
+#include "editor/editor_locale_dialog.h"
#include "editor/editor_resource_picker.h"
#include "editor/editor_spin_slider.h"
#include "editor/property_selector.h"
@@ -153,6 +154,26 @@ public:
EditorPropertyPath();
};
+class EditorPropertyLocale : public EditorProperty {
+ GDCLASS(EditorPropertyLocale, EditorProperty);
+ EditorLocaleDialog *dialog;
+ LineEdit *locale;
+ Button *locale_edit;
+
+ void _locale_selected(const String &p_locale);
+ void _locale_pressed();
+ void _locale_focus_exited();
+
+protected:
+ static void _bind_methods();
+ void _notification(int p_what);
+
+public:
+ void setup(const String &p_hit_string);
+ virtual void update_property() override;
+ EditorPropertyLocale();
+};
+
class EditorPropertyClassName : public EditorProperty {
GDCLASS(EditorPropertyClassName, EditorProperty);
diff --git a/editor/editor_run.cpp b/editor/editor_run.cpp
index 3c1799d80c..574abf85ea 100644
--- a/editor/editor_run.cpp
+++ b/editor/editor_run.cpp
@@ -98,15 +98,15 @@ Error EditorRun::run(const String &p_scene) {
screen_rect.position = DisplayServer::get_singleton()->screen_get_position(screen);
screen_rect.size = DisplayServer::get_singleton()->screen_get_size(screen);
+ Size2 window_size;
+ window_size.x = ProjectSettings::get_singleton()->get("display/window/size/viewport_width");
+ window_size.y = ProjectSettings::get_singleton()->get("display/window/size/viewport_height");
+
Size2 desired_size;
- desired_size.x = ProjectSettings::get_singleton()->get("display/window/size/width");
- desired_size.y = ProjectSettings::get_singleton()->get("display/window/size/height");
-
- Size2 test_size;
- test_size.x = ProjectSettings::get_singleton()->get("display/window/size/test_width");
- test_size.y = ProjectSettings::get_singleton()->get("display/window/size/test_height");
- if (test_size.x > 0 && test_size.y > 0) {
- desired_size = test_size;
+ desired_size.x = ProjectSettings::get_singleton()->get("display/window/size/window_width_override");
+ desired_size.y = ProjectSettings::get_singleton()->get("display/window/size/window_height_override");
+ if (desired_size.x > 0 && desired_size.y > 0) {
+ window_size = desired_size;
}
int window_placement = EditorSettings::get_singleton()->get("run/window_placement/rect");
@@ -136,7 +136,7 @@ Error EditorRun::run(const String &p_scene) {
args.push_back(itos(screen_rect.position.x) + "," + itos(screen_rect.position.y));
} break;
case 1: { // centered
- Vector2 pos = (screen_rect.position) + ((screen_rect.size - desired_size) / 2).floor();
+ Vector2 pos = (screen_rect.position) + ((screen_rect.size - window_size) / 2).floor();
args.push_back("--position");
args.push_back(itos(pos.x) + "," + itos(pos.y));
} break;
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index bb0a2ed7c1..2b98f46c17 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -339,7 +339,6 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
{
String lang_hint = "en";
String host_lang = OS::get_singleton()->get_locale();
- host_lang = TranslationServer::standardize_locale(host_lang);
// Skip locales if Text server lack required features.
Vector<String> locales_to_skip;
@@ -365,6 +364,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
}
String best;
+ int best_score = 0;
for (const String &locale : get_editor_locales()) {
// Skip locales which we can't render properly (see above comment).
// Test against language code without regional variants (e.g. ur_PK).
@@ -376,16 +376,16 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
lang_hint += ",";
lang_hint += locale;
- if (host_lang == locale) {
- best = locale;
- }
-
- if (best.is_empty() && host_lang.begins_with(locale)) {
+ int score = TranslationServer::get_singleton()->compare_locales(host_lang, locale);
+ if (score > best_score) {
best = locale;
+ best_score = score;
+ if (score == 10) {
+ break; // Exact match, skip the rest.
+ }
}
}
-
- if (best.is_empty()) {
+ if (best_score == 0) {
best = "en";
}
@@ -428,7 +428,6 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("interface/editor/separate_distraction_mode", false);
_initial_set("interface/editor/automatically_open_screenshots", true);
EDITOR_SETTING_USAGE(Variant::BOOL, PROPERTY_HINT_NONE, "interface/editor/single_window_mode", false, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED)
- _initial_set("interface/editor/hide_console_window", false);
_initial_set("interface/editor/mouse_extra_buttons_navigate_history", true);
_initial_set("interface/editor/save_each_scene_on_quit", true); // Regression
#ifdef DEV_ENABLED
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 5b7ea65b04..db4161fc3d 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -112,6 +112,7 @@ static Ref<Texture2D> flip_icon(Ref<Texture2D> p_texture, bool p_flip_y = false,
}
#ifdef MODULE_SVG_ENABLED
+// See also `generate_icon()` in `scene/resources/default_theme.cpp`.
static Ref<ImageTexture> editor_generate_icon(int p_index, bool p_convert_color, float p_scale = EDSCALE, float p_saturation = 1.0, Dictionary p_convert_colors = Dictionary()) {
Ref<ImageTexture> icon = memnew(ImageTexture);
Ref<Image> img = memnew(Image);
@@ -1123,6 +1124,12 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_constant("margin_bottom", "MarginContainer", 0);
theme->set_constant("hseparation", "GridContainer", default_margin_size * EDSCALE);
theme->set_constant("vseparation", "GridContainer", default_margin_size * EDSCALE);
+ theme->set_constant("hseparation", "FlowContainer", default_margin_size * EDSCALE);
+ theme->set_constant("vseparation", "FlowContainer", default_margin_size * EDSCALE);
+ theme->set_constant("hseparation", "HFlowContainer", default_margin_size * EDSCALE);
+ theme->set_constant("vseparation", "HFlowContainer", default_margin_size * EDSCALE);
+ theme->set_constant("hseparation", "VFlowContainer", default_margin_size * EDSCALE);
+ theme->set_constant("vseparation", "VFlowContainer", default_margin_size * EDSCALE);
// Window
@@ -1213,7 +1220,22 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("focus", "RichTextLabel", make_empty_stylebox());
theme->set_stylebox("normal", "RichTextLabel", style_tree_bg);
+ // Editor help.
+ theme->set_color("title_color", "EditorHelp", accent_color);
theme->set_color("headline_color", "EditorHelp", mono_color);
+ theme->set_color("text_color", "EditorHelp", font_color);
+ theme->set_color("comment_color", "EditorHelp", font_color * Color(1, 1, 1, 0.6));
+ theme->set_color("symbol_color", "EditorHelp", font_color * Color(1, 1, 1, 0.6));
+ theme->set_color("value_color", "EditorHelp", font_color * Color(1, 1, 1, 0.6));
+ theme->set_color("qualifier_color", "EditorHelp", font_color * Color(1, 1, 1, 0.8));
+ theme->set_color("type_color", "EditorHelp", accent_color.lerp(font_color, 0.5));
+ theme->set_color("selection_color", "EditorHelp", accent_color * Color(1, 1, 1, 0.4));
+ theme->set_color("link_color", "EditorHelp", accent_color.lerp(mono_color, 0.8));
+ theme->set_color("code_color", "EditorHelp", accent_color.lerp(mono_color, 0.6));
+ theme->set_color("kbd_color", "EditorHelp", accent_color.lerp(property_color, 0.6));
+ theme->set_constant("line_separation", "EditorHelp", Math::round(6 * EDSCALE));
+ theme->set_constant("table_hseparation", "EditorHelp", 16 * EDSCALE);
+ theme->set_constant("table_vseparation", "EditorHelp", 6 * EDSCALE);
// Panel
theme->set_stylebox("panel", "Panel", make_flat_stylebox(dark_color_1, 6, 4, 6, 4, corner_width));
@@ -1421,6 +1443,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
style_info_3d_viewport->set_border_width_all(0);
theme->set_stylebox("Information3dViewport", "EditorStyles", style_info_3d_viewport);
+ // Asset Library.
+ theme->set_stylebox("panel", "AssetLib", style_content_panel);
+ theme->set_color("status_color", "AssetLib", Color(0.5, 0.5, 0.5));
+ theme->set_icon("dismiss", "AssetLib", theme->get_icon("Close", "EditorIcons"));
+
// Theme editor.
theme->set_color("preview_picker_overlay_color", "ThemeEditor", Color(0.1, 0.1, 0.1, 0.25));
Color theme_preview_picker_bg_color = accent_color;
diff --git a/editor/editor_toaster.cpp b/editor/editor_toaster.cpp
index df0588c641..6c9e4ab0fc 100644
--- a/editor/editor_toaster.cpp
+++ b/editor/editor_toaster.cpp
@@ -362,6 +362,7 @@ Control *EditorToaster::popup(Control *p_control, Severity p_severity, double p_
close_button->set_flat(true);
close_button->set_icon(get_theme_icon("Close", "EditorIcons"));
close_button->connect("pressed", callable_bind(callable_mp(this, &EditorToaster::close), panel));
+ close_button->connect("theme_changed", callable_bind(callable_mp(this, &EditorToaster::_close_button_theme_changed), close_button));
hbox_container->add_child(close_button);
}
@@ -438,6 +439,13 @@ void EditorToaster::close(Control *p_control) {
toasts[p_control].popped = false;
}
+void EditorToaster::_close_button_theme_changed(Control *p_close_button) {
+ Button *close_button = Object::cast_to<Button>(p_close_button);
+ if (close_button) {
+ close_button->set_icon(get_theme_icon("Close", "EditorIcons"));
+ }
+}
+
EditorToaster *EditorToaster::get_singleton() {
return singleton;
}
diff --git a/editor/editor_toaster.h b/editor/editor_toaster.h
index b626a47d0c..5f220e98c4 100644
--- a/editor/editor_toaster.h
+++ b/editor/editor_toaster.h
@@ -95,6 +95,7 @@ private:
void _set_notifications_enabled(bool p_enabled);
void _repop_old();
void _popup_str(String p_message, Severity p_severity, String p_tooltip);
+ void _close_button_theme_changed(Control *p_close_button);
protected:
static EditorToaster *singleton;
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 0253307d5a..3f15b3f206 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -1472,12 +1472,18 @@ void FileSystemDock::_folder_removed(String p_folder) {
void FileSystemDock::_rename_operation_confirm() {
String new_name = rename_dialog_text->get_text().strip_edges();
+ String old_name = tree->get_selected()->get_text(0);
if (new_name.length() == 0) {
EditorNode::get_singleton()->show_warning(TTR("No name provided."));
return;
} else if (new_name.find("/") != -1 || new_name.find("\\") != -1 || new_name.find(":") != -1) {
EditorNode::get_singleton()->show_warning(TTR("Name contains invalid characters."));
return;
+ } else if (to_rename.is_file && old_name.get_extension() != new_name.get_extension()) {
+ if (!EditorFileSystem::get_singleton()->get_valid_extensions().find(new_name.get_extension())) {
+ EditorNode::get_singleton()->show_warning(TTR("This file extension is not recognized by the editor.\nIf you want to rename it anyway, use your operating system's file manager.\nAfter renaming to an unknown extension, the file won't be shown in the editor anymore."));
+ return;
+ }
}
String old_path = to_rename.path.ends_with("/") ? to_rename.path.substr(0, to_rename.path.length() - 1) : to_rename.path;
@@ -2500,6 +2506,7 @@ void FileSystemDock::_file_and_folders_fill_popup(PopupMenu *p_popup, Vector<Str
String fpath = p_paths[0];
String item_text = fpath.ends_with("/") ? TTR("Open in File Manager") : TTR("Show in File Manager");
p_popup->add_icon_item(get_theme_icon(SNAME("Filesystem"), SNAME("EditorIcons")), item_text, FILE_SHOW_IN_EXPLORER);
+ path = fpath;
}
}
@@ -2536,6 +2543,9 @@ void FileSystemDock::_tree_rmb_empty(const Vector2 &p_pos) {
tree_popup->add_icon_item(get_theme_icon(SNAME("Script"), SNAME("EditorIcons")), TTR("New Script..."), FILE_NEW_SCRIPT);
tree_popup->add_icon_item(get_theme_icon(SNAME("Object"), SNAME("EditorIcons")), TTR("New Resource..."), FILE_NEW_RESOURCE);
tree_popup->add_icon_item(get_theme_icon(SNAME("TextFile"), SNAME("EditorIcons")), TTR("New TextFile..."), FILE_NEW_TEXTFILE);
+ tree_popup->add_separator();
+ tree_popup->add_icon_item(get_theme_icon(SNAME("Filesystem"), SNAME("EditorIcons")), TTR("Open in File Manager"), FILE_SHOW_IN_EXPLORER);
+
tree_popup->set_position(tree->get_screen_position() + p_pos);
tree_popup->reset_size();
tree_popup->popup();
@@ -2575,6 +2585,8 @@ void FileSystemDock::_file_list_rmb_pressed(const Vector2 &p_pos) {
return;
}
+ path = current_path->get_text();
+
file_list_popup->clear();
file_list_popup->reset_size();
diff --git a/editor/icons/HFlowContainer.svg b/editor/icons/HFlowContainer.svg
new file mode 100644
index 0000000000..0ab03f686e
--- /dev/null
+++ b/editor/icons/HFlowContainer.svg
@@ -0,0 +1 @@
+<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M3 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2H3zm0 2h10v10H3V3zm2 1c-.554 0-1 .446-1 1s.446 1 1 1h2c.554 0 1-.446 1-1s-.446-1-1-1H5zm4.996 0c-.554 0-1 .446-1 1s.446 1 1 1H11c.554 0 1-.446 1-1s-.446-1-1-1H9.996zM5 7c-.554 0-1 .446-1 1s.446 1 1 1 1-.446 1-1-.446-1-1-1zm3 0c-.554 0-1 .446-1 1s.446 1 1 1h3c.554 0 1-.446 1-1s-.446-1-1-1H8zm-3.004 3c-.554 0-1 .446-1 1s.446 1 1 1H9c.554 0 1-.446 1-1s-.446-1-1-1H4.996z" style="fill:#8eef97;fill-opacity:1"/></svg>
diff --git a/editor/icons/Notification.svg b/editor/icons/Notification.svg
index 1f1f9c3e15..15695e22a8 100644
--- a/editor/icons/Notification.svg
+++ b/editor/icons/Notification.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m12.089506 1.2353795c-.498141-.2384823-1.095292-.027987-1.333775.4701537-.01372.028981-.02341.059557-.03428.089693-.01467.023016-.02777.046925-.04071.071459-.04899-.00527-.09728-.00862-.146087-.011473-1.4730257-.6255101-3.1777024.0153376-3.8738627 1.4563251l-1.7272425 3.6078572s-.3364181.7034345-.8079671 1.1268133c-.00105.0009371-.00239.00174-.00344.00268-.2721193.1337295-.5707545.185826-.8605632.0470816-.4981411-.2384824-1.0952924-.0279876-1.3337749.4701537-.01605.033526-.029907.066894-.041944.1011828-.018769.030371-.036749.06319-.052515.096122-.2384825.4981412-.027988 1.0952923.4701537 1.3337751l9.0196437 4.318106c.498141.238482 1.095292.02799 1.333775-.470154.01577-.03293.0301-.0675.04191-.1012.0192-.03086.0365-.06257.05255-.0961.238483-.498141.02799-1.095292-.470153-1.333775-.901965-.43181-.03834-2.235739-.03834-2.235739l1.727237-3.6078618c.715447-1.4944233.08396-3.2858776-1.410461-4.0013247.238482-.4981411.02799-1.0952926-.470154-1.333775zm-5.5145786 11.3714015c-.322341.673306-.037829 1.480435.6354753 1.802775.6733031.32234 1.4804334.03783 1.8027749-.635476z" fill="#e6e6e6"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m12.089506 1.2353795c-.498141-.2384823-1.095292-.027987-1.333775.4701537-.01372.028981-.02341.059557-.03428.089693-.01467.023016-.02777.046925-.04071.071459-.04899-.00527-.09728-.00862-.146087-.011473-1.4730257-.6255101-3.1777024.0153376-3.8738627 1.4563251l-1.7272425 3.6078572s-.3364181.7034345-.8079671 1.1268133c-.00105.0009371-.00239.00174-.00344.00268-.2721193.1337295-.5707545.185826-.8605632.0470816-.4981411-.2384824-1.0952924-.0279876-1.3337749.4701537-.01605.033526-.029907.066894-.041944.1011828-.018769.030371-.036749.06319-.052515.096122-.2384825.4981412-.027988 1.0952923.4701537 1.3337751l9.0196437 4.318106c.498141.238482 1.095292.02799 1.333775-.470154.01577-.03293.0301-.0675.04191-.1012.0192-.03086.0365-.06257.05255-.0961.238483-.498141.02799-1.095292-.470153-1.333775-.901965-.43181-.03834-2.235739-.03834-2.235739l1.727237-3.6078618c.715447-1.4944233.08396-3.2858776-1.410461-4.0013247.238482-.4981411.02799-1.0952926-.470154-1.333775zm-5.5145786 11.3714015c-.322341.673306-.037829 1.480435.6354753 1.802775.6733031.32234 1.4804334.03783 1.8027749-.635476z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/NotificationDisabled.svg b/editor/icons/NotificationDisabled.svg
index 0e4465bee8..294682a42c 100644
--- a/editor/icons/NotificationDisabled.svg
+++ b/editor/icons/NotificationDisabled.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m11.705078 1.1386719c-.389281-.0180576-.770356.1928007-.949219.5664062-.01372.028981-.024286.0597078-.035156.0898438-.01467.023016-.026122.0477316-.039062.0722656-.04899-.00527-.097678-.0088657-.146485-.0117187-1.4730253-.6255102-3.1788394.0160437-3.8749998 1.4570312l-1.7265624 3.6074219s-.3370448.7035743-.8085938 1.1269531l-.0019531.0019531c-.2721193.1337295-.5715196.1856194-.8613281.046875-.4981413-.2384824-1.0955019-.0274382-1.3339844.4707031-.01605.0335262-.0289787.0672737-.0410156.1015626-.0187691.0303709-.0369684.0627711-.0527344.0957031-.2384825.4981412-.0293917 1.0955019.46875 1.3339841l.3398437.16211 10.8984379-6.9394535c-.263272-.3070418-.592225-.5660832-.980469-.7519531.238482-.4981411.027441-1.0935489-.470703-1.3320313-.124536-.0596206-.255006-.091637-.384766-.0976562zm2.435547 2.8652343a.94188849 1 0 0 0 -.566406.1386719l-12.1171878 7.7148439a.94188849 1 0 0 0 -.3222656 1.373047.94188849 1 0 0 0 1.2910156.341797l12.1171878-7.7148441a.94188849 1 0 0 0 .322265-1.3710938.94188849 1 0 0 0 -.724609-.4824219zm-.509766 3.2753907-7.3867184 4.7050781 5.0781254 2.431641c.498141.238482 1.095501.027442 1.333984-.470704.01577-.03293.031159-.067862.042969-.101562.0192-.03086.036684-.062173.052734-.095703.238483-.498141.02744-1.095501-.470703-1.333985-.901965-.431809-.039063-2.236328-.039062-2.236328zm-7.0566402 5.3281251c-.322341.673306-.0365856 1.480394.6367187 1.802734.6733031.32234 1.4803929.036588 1.8027344-.636718z" fill="#e6e6e6"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m11.705078 1.1386719c-.389281-.0180576-.770356.1928007-.949219.5664062-.01372.028981-.024286.0597078-.035156.0898438-.01467.023016-.026122.0477316-.039062.0722656-.04899-.00527-.097678-.0088657-.146485-.0117187-1.4730253-.6255102-3.1788394.0160437-3.8749998 1.4570312l-1.7265624 3.6074219s-.3370448.7035743-.8085938 1.1269531l-.0019531.0019531c-.2721193.1337295-.5715196.1856194-.8613281.046875-.4981413-.2384824-1.0955019-.0274382-1.3339844.4707031-.01605.0335262-.0289787.0672737-.0410156.1015626-.0187691.0303709-.0369684.0627711-.0527344.0957031-.2384825.4981412-.0293917 1.0955019.46875 1.3339841l.3398437.16211 10.8984379-6.9394535c-.263272-.3070418-.592225-.5660832-.980469-.7519531.238482-.4981411.027441-1.0935489-.470703-1.3320313-.124536-.0596206-.255006-.091637-.384766-.0976562zm2.435547 2.8652343a.94188849 1 0 0 0 -.566406.1386719l-12.1171878 7.7148439a.94188849 1 0 0 0 -.3222656 1.373047.94188849 1 0 0 0 1.2910156.341797l12.1171878-7.7148441a.94188849 1 0 0 0 .322265-1.3710938.94188849 1 0 0 0 -.724609-.4824219zm-.509766 3.2753907-7.3867184 4.7050781 5.0781254 2.431641c.498141.238482 1.095501.027442 1.333984-.470704.01577-.03293.031159-.067862.042969-.101562.0192-.03086.036684-.062173.052734-.095703.238483-.498141.02744-1.095501-.470703-1.333985-.901965-.431809-.039063-2.236328-.039062-2.236328zm-7.0566402 5.3281251c-.322341.673306-.0365856 1.480394.6367187 1.802734.6733031.32234 1.4803929.036588 1.8027344-.636718z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/VFlowContainer.svg b/editor/icons/VFlowContainer.svg
new file mode 100644
index 0000000000..9023bf2245
--- /dev/null
+++ b/editor/icons/VFlowContainer.svg
@@ -0,0 +1 @@
+<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M3 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2H3zm0 2h10v10H3V3zm7.998.998c-.554 0-1 .446-1 1v4.004c0 .554.446 1 1 1s1-.446 1-1V4.998c0-.554-.446-1-1-1zm-6 .004c-.554 0-1 .446-1 1v2c0 .554.446 1 1 1s1-.446 1-1v-2c0-.554-.446-1-1-1zm3 0c-.554 0-1 .446-1 1s.446 1 1 1 1-.446 1-1-.446-1-1-1zm0 3c-.554 0-1 .446-1 1v3c0 .554.446 1 1 1s1-.446 1-1v-3c0-.554-.446-1-1-1zm-3 1.996c-.554 0-1 .446-1 1v1.004c0 .554.446 1 1 1s1-.446 1-1V9.998c0-.554-.446-1-1-1z" style="fill:#8eef97;fill-opacity:1"/></svg>
diff --git a/editor/icons/editor_icons_builders.py b/editor/icons/editor_icons_builders.py
index d7145abe50..fb9a57c429 100644
--- a/editor/icons/editor_icons_builders.py
+++ b/editor/icons/editor_icons_builders.py
@@ -8,7 +8,7 @@ import os
from io import StringIO
from platform_methods import subprocess_main
-
+# See also `scene/resources/default_theme/default_theme_icons_builders.py`.
def make_editor_icons_action(target, source, env):
dst = target[0]
diff --git a/editor/import/dynamicfont_import_settings.cpp b/editor/import/dynamicfont_import_settings.cpp
index 3151496bec..f4b1468314 100644
--- a/editor/import/dynamicfont_import_settings.cpp
+++ b/editor/import/dynamicfont_import_settings.cpp
@@ -442,398 +442,6 @@ void DynamicFontImportSettings::_add_glyph_range_item(int32_t p_start, int32_t p
}
/*************************************************************************/
-/* Languages and scripts */
-/*************************************************************************/
-
-struct CodeInfo {
- String name;
- String code;
-};
-
-static CodeInfo langs[] = {
- { U"Custom", U"xx" },
- { U"-", U"-" },
- { U"Abkhazian", U"ab" },
- { U"Afar", U"aa" },
- { U"Afrikaans", U"af" },
- { U"Akan", U"ak" },
- { U"Albanian", U"sq" },
- { U"Amharic", U"am" },
- { U"Arabic", U"ar" },
- { U"Aragonese", U"an" },
- { U"Armenian", U"hy" },
- { U"Assamese", U"as" },
- { U"Avaric", U"av" },
- { U"Avestan", U"ae" },
- { U"Aymara", U"ay" },
- { U"Azerbaijani", U"az" },
- { U"Bambara", U"bm" },
- { U"Bashkir", U"ba" },
- { U"Basque", U"eu" },
- { U"Belarusian", U"be" },
- { U"Bengali", U"bn" },
- { U"Bihari", U"bh" },
- { U"Bislama", U"bi" },
- { U"Bosnian", U"bs" },
- { U"Breton", U"br" },
- { U"Bulgarian", U"bg" },
- { U"Burmese", U"my" },
- { U"Catalan", U"ca" },
- { U"Chamorro", U"ch" },
- { U"Chechen", U"ce" },
- { U"Chichewa", U"ny" },
- { U"Chinese", U"zh" },
- { U"Chuvash", U"cv" },
- { U"Cornish", U"kw" },
- { U"Corsican", U"co" },
- { U"Cree", U"cr" },
- { U"Croatian", U"hr" },
- { U"Czech", U"cs" },
- { U"Danish", U"da" },
- { U"Divehi", U"dv" },
- { U"Dutch", U"nl" },
- { U"Dzongkha", U"dz" },
- { U"English", U"en" },
- { U"Esperanto", U"eo" },
- { U"Estonian", U"et" },
- { U"Ewe", U"ee" },
- { U"Faroese", U"fo" },
- { U"Fijian", U"fj" },
- { U"Finnish", U"fi" },
- { U"French", U"fr" },
- { U"Fulah", U"ff" },
- { U"Galician", U"gl" },
- { U"Georgian", U"ka" },
- { U"German", U"de" },
- { U"Greek", U"el" },
- { U"Guarani", U"gn" },
- { U"Gujarati", U"gu" },
- { U"Haitian", U"ht" },
- { U"Hausa", U"ha" },
- { U"Hebrew", U"he" },
- { U"Herero", U"hz" },
- { U"Hindi", U"hi" },
- { U"Hiri Motu", U"ho" },
- { U"Hungarian", U"hu" },
- { U"Interlingua", U"ia" },
- { U"Indonesian", U"id" },
- { U"Interlingue", U"ie" },
- { U"Irish", U"ga" },
- { U"Igbo", U"ig" },
- { U"Inupiaq", U"ik" },
- { U"Ido", U"io" },
- { U"Icelandic", U"is" },
- { U"Italian", U"it" },
- { U"Inuktitut", U"iu" },
- { U"Japanese", U"ja" },
- { U"Javanese", U"jv" },
- { U"Kalaallisut", U"kl" },
- { U"Kannada", U"kn" },
- { U"Kanuri", U"kr" },
- { U"Kashmiri", U"ks" },
- { U"Kazakh", U"kk" },
- { U"Central Khmer", U"km" },
- { U"Kikuyu", U"ki" },
- { U"Kinyarwanda", U"rw" },
- { U"Kirghiz", U"ky" },
- { U"Komi", U"kv" },
- { U"Kongo", U"kg" },
- { U"Korean", U"ko" },
- { U"Kurdish", U"ku" },
- { U"Kuanyama", U"kj" },
- { U"Latin", U"la" },
- { U"Luxembourgish", U"lb" },
- { U"Ganda", U"lg" },
- { U"Limburgan", U"li" },
- { U"Lingala", U"ln" },
- { U"Lao", U"lo" },
- { U"Lithuanian", U"lt" },
- { U"Luba-Katanga", U"lu" },
- { U"Latvian", U"lv" },
- { U"Man", U"gv" },
- { U"Macedonian", U"mk" },
- { U"Malagasy", U"mg" },
- { U"Malay", U"ms" },
- { U"Malayalam", U"ml" },
- { U"Maltese", U"mt" },
- { U"Maori", U"mi" },
- { U"Marathi", U"mr" },
- { U"Marshallese", U"mh" },
- { U"Mongolian", U"mn" },
- { U"Nauru", U"na" },
- { U"Navajo", U"nv" },
- { U"North Ndebele", U"nd" },
- { U"Nepali", U"ne" },
- { U"Ndonga", U"ng" },
- { U"Norwegian Bokmål", U"nb" },
- { U"Norwegian Nynorsk", U"nn" },
- { U"Norwegian", U"no" },
- { U"Sichuan Yi, Nuosu", U"ii" },
- { U"South Ndebele", U"nr" },
- { U"Occitan", U"oc" },
- { U"Ojibwa", U"oj" },
- { U"Church Slavic", U"cu" },
- { U"Oromo", U"om" },
- { U"Oriya", U"or" },
- { U"Ossetian", U"os" },
- { U"Punjabi", U"pa" },
- { U"Pali", U"pi" },
- { U"Persian", U"fa" },
- { U"Polish", U"pl" },
- { U"Pashto", U"ps" },
- { U"Portuguese", U"pt" },
- { U"Quechua", U"qu" },
- { U"Romansh", U"rm" },
- { U"Rundi", U"rn" },
- { U"Romanian", U"ro" },
- { U"Russian", U"ru" },
- { U"Sanskrit", U"sa" },
- { U"Sardinian", U"sc" },
- { U"Sindhi", U"sd" },
- { U"Northern Sami", U"se" },
- { U"Samoan", U"sm" },
- { U"Sango", U"sg" },
- { U"Serbian", U"sr" },
- { U"Gaelic", U"gd" },
- { U"Shona", U"sn" },
- { U"Sinhala", U"si" },
- { U"Slovak", U"sk" },
- { U"Slovenian", U"sl" },
- { U"Somali", U"so" },
- { U"Southern Sotho", U"st" },
- { U"Spanish", U"es" },
- { U"Sundanese", U"su" },
- { U"Swahili", U"sw" },
- { U"Swati", U"ss" },
- { U"Swedish", U"sv" },
- { U"Tamil", U"ta" },
- { U"Telugu", U"te" },
- { U"Tajik", U"tg" },
- { U"Thai", U"th" },
- { U"Tigrinya", U"ti" },
- { U"Tibetan", U"bo" },
- { U"Turkmen", U"tk" },
- { U"Tagalog", U"tl" },
- { U"Tswana", U"tn" },
- { U"Tonga", U"to" },
- { U"Turkish", U"tr" },
- { U"Tsonga", U"ts" },
- { U"Tatar", U"tt" },
- { U"Twi", U"tw" },
- { U"Tahitian", U"ty" },
- { U"Uighur", U"ug" },
- { U"Ukrainian", U"uk" },
- { U"Urdu", U"ur" },
- { U"Uzbek", U"uz" },
- { U"Venda", U"ve" },
- { U"Vietnamese", U"vi" },
- { U"Volapük", U"vo" },
- { U"Walloon", U"wa" },
- { U"Welsh", U"cy" },
- { U"Wolof", U"wo" },
- { U"Western Frisian", U"fy" },
- { U"Xhosa", U"xh" },
- { U"Yiddish", U"yi" },
- { U"Yoruba", U"yo" },
- { U"Zhuang", U"za" },
- { U"Zulu", U"zu" },
- { String(), String() }
-};
-
-static CodeInfo scripts[] = {
- { U"Custom", U"Qaaa" },
- { U"-", U"-" },
- { U"Adlam", U"Adlm" },
- { U"Afaka", U"Afak" },
- { U"Caucasian Albanian", U"Aghb" },
- { U"Ahom", U"Ahom" },
- { U"Arabic", U"Arab" },
- { U"Imperial Aramaic", U"Armi" },
- { U"Armenian", U"Armn" },
- { U"Avestan", U"Avst" },
- { U"Balinese", U"Bali" },
- { U"Bamum", U"Bamu" },
- { U"Bassa Vah", U"Bass" },
- { U"Batak", U"Batk" },
- { U"Bengali", U"Beng" },
- { U"Bhaiksuki", U"Bhks" },
- { U"Blissymbols", U"Blis" },
- { U"Bopomofo", U"Bopo" },
- { U"Brahmi", U"Brah" },
- { U"Braille", U"Brai" },
- { U"Buginese", U"Bugi" },
- { U"Buhid", U"Buhd" },
- { U"Chakma", U"Cakm" },
- { U"Unified Canadian Aboriginal", U"Cans" },
- { U"Carian", U"Cari" },
- { U"Cham", U"Cham" },
- { U"Cherokee", U"Cher" },
- { U"Chorasmian", U"Chrs" },
- { U"Cirth", U"Cirt" },
- { U"Coptic", U"Copt" },
- { U"Cypro-Minoan", U"Cpmn" },
- { U"Cypriot", U"Cprt" },
- { U"Cyrillic", U"Cyrl" },
- { U"Devanagari", U"Deva" },
- { U"Dives Akuru", U"Diak" },
- { U"Dogra", U"Dogr" },
- { U"Deseret", U"Dsrt" },
- { U"Duployan", U"Dupl" },
- { U"Egyptian demotic", U"Egyd" },
- { U"Egyptian hieratic", U"Egyh" },
- { U"Egyptian hieroglyphs", U"Egyp" },
- { U"Elbasan", U"Elba" },
- { U"Elymaic", U"Elym" },
- { U"Ethiopic", U"Ethi" },
- { U"Khutsuri", U"Geok" },
- { U"Georgian", U"Geor" },
- { U"Glagolitic", U"Glag" },
- { U"Gunjala Gondi", U"Gong" },
- { U"Masaram Gondi", U"Gonm" },
- { U"Gothic", U"Goth" },
- { U"Grantha", U"Gran" },
- { U"Greek", U"Grek" },
- { U"Gujarati", U"Gujr" },
- { U"Gurmukhi", U"Guru" },
- { U"Hangul", U"Hang" },
- { U"Han", U"Hani" },
- { U"Hanunoo", U"Hano" },
- { U"Hatran", U"Hatr" },
- { U"Hebrew", U"Hebr" },
- { U"Hiragana", U"Hira" },
- { U"Anatolian Hieroglyphs", U"Hluw" },
- { U"Pahawh Hmong", U"Hmng" },
- { U"Nyiakeng Puachue Hmong", U"Hmnp" },
- { U"Old Hungarian", U"Hung" },
- { U"Indus", U"Inds" },
- { U"Old Italic", U"Ital" },
- { U"Javanese", U"Java" },
- { U"Jurchen", U"Jurc" },
- { U"Kayah Li", U"Kali" },
- { U"Katakana", U"Kana" },
- { U"Kharoshthi", U"Khar" },
- { U"Khmer", U"Khmr" },
- { U"Khojki", U"Khoj" },
- { U"Khitan large script", U"Kitl" },
- { U"Khitan small script", U"Kits" },
- { U"Kannada", U"Knda" },
- { U"Kpelle", U"Kpel" },
- { U"Kaithi", U"Kthi" },
- { U"Tai Tham", U"Lana" },
- { U"Lao", U"Laoo" },
- { U"Latin", U"Latn" },
- { U"Leke", U"Leke" },
- { U"Lepcha", U"Lepc" },
- { U"Limbu", U"Limb" },
- { U"Linear A", U"Lina" },
- { U"Linear B", U"Linb" },
- { U"Lisu", U"Lisu" },
- { U"Loma", U"Loma" },
- { U"Lycian", U"Lyci" },
- { U"Lydian", U"Lydi" },
- { U"Mahajani", U"Mahj" },
- { U"Makasar", U"Maka" },
- { U"Mandaic", U"Mand" },
- { U"Manichaean", U"Mani" },
- { U"Marchen", U"Marc" },
- { U"Mayan Hieroglyphs", U"Maya" },
- { U"Medefaidrin", U"Medf" },
- { U"Mende Kikakui", U"Mend" },
- { U"Meroitic Cursive", U"Merc" },
- { U"Meroitic Hieroglyphs", U"Mero" },
- { U"Malayalam", U"Mlym" },
- { U"Modi", U"Modi" },
- { U"Mongolian", U"Mong" },
- { U"Moon", U"Moon" },
- { U"Mro", U"Mroo" },
- { U"Meitei Mayek", U"Mtei" },
- { U"Multani", U"Mult" },
- { U"Myanmar (Burmese)", U"Mymr" },
- { U"Nandinagari", U"Nand" },
- { U"Old North Arabian", U"Narb" },
- { U"Nabataean", U"Nbat" },
- { U"Newa", U"Newa" },
- { U"Naxi Dongba", U"Nkdb" },
- { U"Nakhi Geba", U"Nkgb" },
- { U"N’Ko", U"Nkoo" },
- { U"Nüshu", U"Nshu" },
- { U"Ogham", U"Ogam" },
- { U"Ol Chiki", U"Olck" },
- { U"Old Turkic", U"Orkh" },
- { U"Oriya", U"Orya" },
- { U"Osage", U"Osge" },
- { U"Osmanya", U"Osma" },
- { U"Old Uyghur", U"Ougr" },
- { U"Palmyrene", U"Palm" },
- { U"Pau Cin Hau", U"Pauc" },
- { U"Proto-Cuneiform", U"Pcun" },
- { U"Proto-Elamite", U"Pelm" },
- { U"Old Permic", U"Perm" },
- { U"Phags-pa", U"Phag" },
- { U"Inscriptional Pahlavi", U"Phli" },
- { U"Psalter Pahlavi", U"Phlp" },
- { U"Book Pahlavi", U"Phlv" },
- { U"Phoenician", U"Phnx" },
- { U"Klingon", U"Piqd" },
- { U"Miao", U"Plrd" },
- { U"Inscriptional Parthian", U"Prti" },
- { U"Proto-Sinaitic", U"Psin" },
- { U"Ranjana", U"Ranj" },
- { U"Rejang", U"Rjng" },
- { U"Hanifi Rohingya", U"Rohg" },
- { U"Rongorongo", U"Roro" },
- { U"Runic", U"Runr" },
- { U"Samaritan", U"Samr" },
- { U"Sarati", U"Sara" },
- { U"Old South Arabian", U"Sarb" },
- { U"Saurashtra", U"Saur" },
- { U"SignWriting", U"Sgnw" },
- { U"Shavian", U"Shaw" },
- { U"Sharada", U"Shrd" },
- { U"Shuishu", U"Shui" },
- { U"Siddham", U"Sidd" },
- { U"Khudawadi", U"Sind" },
- { U"Sinhala", U"Sinh" },
- { U"Sogdian", U"Sogd" },
- { U"Old Sogdian", U"Sogo" },
- { U"Sora Sompeng", U"Sora" },
- { U"Soyombo", U"Soyo" },
- { U"Sundanese", U"Sund" },
- { U"Syloti Nagri", U"Sylo" },
- { U"Syriac", U"Syrc" },
- { U"Tagbanwa", U"Tagb" },
- { U"Takri", U"Takr" },
- { U"Tai Le", U"Tale" },
- { U"New Tai Lue", U"Talu" },
- { U"Tamil", U"Taml" },
- { U"Tangut", U"Tang" },
- { U"Tai Viet", U"Tavt" },
- { U"Telugu", U"Telu" },
- { U"Tengwar", U"Teng" },
- { U"Tifinagh", U"Tfng" },
- { U"Tagalog", U"Tglg" },
- { U"Thaana", U"Thaa" },
- { U"Thai", U"Thai" },
- { U"Tibetan", U"Tibt" },
- { U"Tirhuta", U"Tirh" },
- { U"Tangsa", U"Tnsa" },
- { U"Toto", U"Toto" },
- { U"Ugaritic", U"Ugar" },
- { U"Vai", U"Vaii" },
- { U"Visible Speech", U"Visp" },
- { U"Vithkuqi", U"Vith" },
- { U"Warang Citi", U"Wara" },
- { U"Wancho", U"Wcho" },
- { U"Woleai", U"Wole" },
- { U"Old Persian", U"Xpeo" },
- { U"Cuneiform", U"Xsux" },
- { U"Yezidi", U"Yezi" },
- { U"Yi", U"Yiii" },
- { U"Zanabazar Square", U"Zanb" },
- { String(), String() }
-};
-
-/*************************************************************************/
/* Page 1 callbacks: Rendering Options */
/*************************************************************************/
@@ -1159,19 +767,17 @@ void DynamicFontImportSettings::_range_update(int32_t p_start, int32_t p_end) {
/*************************************************************************/
void DynamicFontImportSettings::_lang_add() {
- menu_langs->set_position(lang_list->get_screen_position() + lang_list->get_local_mouse_position());
- menu_langs->reset_size();
- menu_langs->popup();
+ locale_select->popup_locale_dialog();
}
-void DynamicFontImportSettings::_lang_add_item(int p_option) {
+void DynamicFontImportSettings::_lang_add_item(const String &p_locale) {
TreeItem *lang_item = lang_list->create_item(lang_list_root);
ERR_FAIL_NULL(lang_item);
lang_item->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
lang_item->set_editable(0, true);
lang_item->set_checked(0, false);
- lang_item->set_text(1, langs[p_option].code);
+ lang_item->set_text(1, p_locale);
lang_item->set_editable(1, true);
lang_item->add_button(2, lang_list->get_theme_icon("Remove", "EditorIcons"), BUTTON_REMOVE_VAR, false, TTR("Remove"));
lang_item->set_button_color(2, 0, Color(1, 1, 1, 0.75));
@@ -1230,7 +836,7 @@ void DynamicFontImportSettings::_script_add_item(int p_option) {
script_item->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
script_item->set_editable(0, true);
script_item->set_checked(0, false);
- script_item->set_text(1, scripts[p_option].code);
+ script_item->set_text(1, script_codes[p_option]);
script_item->set_editable(1, true);
script_item->add_button(2, lang_list->get_theme_icon("Remove", "EditorIcons"), BUTTON_REMOVE_VAR, false, TTR("Remove"));
script_item->set_button_color(2, 0, Color(1, 1, 1, 0.75));
@@ -1688,26 +1294,15 @@ DynamicFontImportSettings::DynamicFontImportSettings() {
// Popup menus
- menu_langs = memnew(PopupMenu);
- menu_langs->set_name("Language");
- for (int i = 0; !langs[i].name.is_empty(); i++) {
- if (langs[i].name == "-") {
- menu_langs->add_separator();
- } else {
- menu_langs->add_item(langs[i].name + " (" + langs[i].code + ")", i);
- }
- }
- add_child(menu_langs);
- menu_langs->connect("id_pressed", callable_mp(this, &DynamicFontImportSettings::_lang_add_item));
+ locale_select = memnew(EditorLocaleDialog);
+ locale_select->connect("locale_selected", callable_mp(this, &DynamicFontImportSettings::_lang_add_item));
+ add_child(locale_select);
menu_scripts = memnew(PopupMenu);
menu_scripts->set_name("Script");
- for (int i = 0; !scripts[i].name.is_empty(); i++) {
- if (scripts[i].name == "-") {
- menu_scripts->add_separator();
- } else {
- menu_scripts->add_item(scripts[i].name + " (" + scripts[i].code + ")", i);
- }
+ script_codes = TranslationServer::get_singleton()->get_all_scripts();
+ for (int i = 0; i < script_codes.size(); i++) {
+ menu_scripts->add_item(TranslationServer::get_singleton()->get_script_name(script_codes[i]) + " (" + script_codes[i] + ")", i);
}
add_child(menu_scripts);
menu_scripts->connect("id_pressed", callable_mp(this, &DynamicFontImportSettings::_script_add_item));
diff --git a/editor/import/dynamicfont_import_settings.h b/editor/import/dynamicfont_import_settings.h
index 89665ae476..5d37f58b9b 100644
--- a/editor/import/dynamicfont_import_settings.h
+++ b/editor/import/dynamicfont_import_settings.h
@@ -33,6 +33,7 @@
#include "editor/editor_file_dialog.h"
#include "editor/editor_inspector.h"
+#include "editor/editor_locale_dialog.h"
#include "editor/import/resource_importer_dynamicfont.h"
@@ -67,6 +68,9 @@ class DynamicFontImportSettings : public ConfirmationDialog {
List<ResourceImporter::ImportOption> options_variations;
List<ResourceImporter::ImportOption> options_general;
+ EditorLocaleDialog *locale_select;
+ Vector<String> script_codes;
+
// Root layout
Label *label_warn = nullptr;
TabContainer *main_pages = nullptr;
@@ -122,7 +126,6 @@ class DynamicFontImportSettings : public ConfirmationDialog {
Button *add_script = nullptr;
Button *add_ot = nullptr;
- PopupMenu *menu_langs = nullptr;
PopupMenu *menu_scripts = nullptr;
PopupMenu *menu_ot = nullptr;
PopupMenu *menu_ot_ss = nullptr;
@@ -142,7 +145,7 @@ class DynamicFontImportSettings : public ConfirmationDialog {
Label *label_ot = nullptr;
void _lang_add();
- void _lang_add_item(int p_option);
+ void _lang_add_item(const String &p_locale);
void _lang_remove(Object *p_item, int p_column, int p_id);
void _script_add();
diff --git a/editor/import/resource_importer_bmfont.cpp b/editor/import/resource_importer_bmfont.cpp
index fa560e8eb1..8a655fbc0c 100644
--- a/editor/import/resource_importer_bmfont.cpp
+++ b/editor/import/resource_importer_bmfont.cpp
@@ -30,7 +30,6 @@
#include "resource_importer_bmfont.h"
-#include "core/io/image_loader.h"
#include "core/io/resource_saver.h"
String ResourceImporterBMFont::get_importer_name() const {
@@ -64,749 +63,14 @@ void ResourceImporterBMFont::get_import_options(const String &p_path, List<Impor
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "compress"), true));
}
-void _convert_packed_8bit(Ref<FontData> &r_font, Ref<Image> &p_source, int p_page, int p_sz) {
- int w = p_source->get_width();
- int h = p_source->get_height();
-
- PackedByteArray imgdata = p_source->get_data();
- const uint8_t *r = imgdata.ptr();
-
- PackedByteArray imgdata_r;
- imgdata_r.resize(w * h * 2);
- uint8_t *wr = imgdata_r.ptrw();
-
- PackedByteArray imgdata_g;
- imgdata_g.resize(w * h * 2);
- uint8_t *wg = imgdata_g.ptrw();
-
- PackedByteArray imgdata_b;
- imgdata_b.resize(w * h * 2);
- uint8_t *wb = imgdata_b.ptrw();
-
- PackedByteArray imgdata_a;
- imgdata_a.resize(w * h * 2);
- uint8_t *wa = imgdata_a.ptrw();
-
- for (int i = 0; i < h; i++) {
- for (int j = 0; j < w; j++) {
- int ofs_src = (i * w + j) * 4;
- int ofs_dst = (i * w + j) * 2;
- wr[ofs_dst + 0] = 255;
- wr[ofs_dst + 1] = r[ofs_src + 0];
- wg[ofs_dst + 0] = 255;
- wg[ofs_dst + 1] = r[ofs_src + 1];
- wb[ofs_dst + 0] = 255;
- wb[ofs_dst + 1] = r[ofs_src + 2];
- wa[ofs_dst + 0] = 255;
- wa[ofs_dst + 1] = r[ofs_src + 3];
- }
- }
- Ref<Image> img_r = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_r));
- r_font->set_texture_image(0, Vector2i(p_sz, 0), p_page * 4 + 0, img_r);
- Ref<Image> img_g = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_g));
- r_font->set_texture_image(0, Vector2i(p_sz, 0), p_page * 4 + 1, img_g);
- Ref<Image> img_b = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_b));
- r_font->set_texture_image(0, Vector2i(p_sz, 0), p_page * 4 + 2, img_b);
- Ref<Image> img_a = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_a));
- r_font->set_texture_image(0, Vector2i(p_sz, 0), p_page * 4 + 3, img_a);
-}
-
-void _convert_packed_4bit(Ref<FontData> &r_font, Ref<Image> &p_source, int p_page, int p_sz) {
- int w = p_source->get_width();
- int h = p_source->get_height();
-
- PackedByteArray imgdata = p_source->get_data();
- const uint8_t *r = imgdata.ptr();
-
- PackedByteArray imgdata_r;
- imgdata_r.resize(w * h * 2);
- uint8_t *wr = imgdata_r.ptrw();
-
- PackedByteArray imgdata_g;
- imgdata_g.resize(w * h * 2);
- uint8_t *wg = imgdata_g.ptrw();
-
- PackedByteArray imgdata_b;
- imgdata_b.resize(w * h * 2);
- uint8_t *wb = imgdata_b.ptrw();
-
- PackedByteArray imgdata_a;
- imgdata_a.resize(w * h * 2);
- uint8_t *wa = imgdata_a.ptrw();
-
- PackedByteArray imgdata_ro;
- imgdata_ro.resize(w * h * 2);
- uint8_t *wro = imgdata_ro.ptrw();
-
- PackedByteArray imgdata_go;
- imgdata_go.resize(w * h * 2);
- uint8_t *wgo = imgdata_go.ptrw();
-
- PackedByteArray imgdata_bo;
- imgdata_bo.resize(w * h * 2);
- uint8_t *wbo = imgdata_bo.ptrw();
-
- PackedByteArray imgdata_ao;
- imgdata_ao.resize(w * h * 2);
- uint8_t *wao = imgdata_ao.ptrw();
-
- for (int i = 0; i < h; i++) {
- for (int j = 0; j < w; j++) {
- int ofs_src = (i * w + j) * 4;
- int ofs_dst = (i * w + j) * 2;
- wr[ofs_dst + 0] = 255;
- wro[ofs_dst + 0] = 255;
- if (r[ofs_src + 0] > 0x0F) {
- wr[ofs_dst + 1] = (r[ofs_src + 0] - 0x0F) * 2;
- wro[ofs_dst + 1] = 0;
- } else {
- wr[ofs_dst + 1] = 0;
- wro[ofs_dst + 1] = r[ofs_src + 0] * 2;
- }
- wg[ofs_dst + 0] = 255;
- wgo[ofs_dst + 0] = 255;
- if (r[ofs_src + 1] > 0x0F) {
- wg[ofs_dst + 1] = (r[ofs_src + 1] - 0x0F) * 2;
- wgo[ofs_dst + 1] = 0;
- } else {
- wg[ofs_dst + 1] = 0;
- wgo[ofs_dst + 1] = r[ofs_src + 1] * 2;
- }
- wb[ofs_dst + 0] = 255;
- wbo[ofs_dst + 0] = 255;
- if (r[ofs_src + 2] > 0x0F) {
- wb[ofs_dst + 1] = (r[ofs_src + 2] - 0x0F) * 2;
- wbo[ofs_dst + 1] = 0;
- } else {
- wb[ofs_dst + 1] = 0;
- wbo[ofs_dst + 1] = r[ofs_src + 2] * 2;
- }
- wa[ofs_dst + 0] = 255;
- wao[ofs_dst + 0] = 255;
- if (r[ofs_src + 3] > 0x0F) {
- wa[ofs_dst + 1] = (r[ofs_src + 3] - 0x0F) * 2;
- wao[ofs_dst + 1] = 0;
- } else {
- wa[ofs_dst + 1] = 0;
- wao[ofs_dst + 1] = r[ofs_src + 3] * 2;
- }
- }
- }
- Ref<Image> img_r = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_r));
- r_font->set_texture_image(0, Vector2i(p_sz, 0), p_page * 4 + 0, img_r);
- Ref<Image> img_g = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_g));
- r_font->set_texture_image(0, Vector2i(p_sz, 0), p_page * 4 + 1, img_g);
- Ref<Image> img_b = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_b));
- r_font->set_texture_image(0, Vector2i(p_sz, 0), p_page * 4 + 2, img_b);
- Ref<Image> img_a = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_a));
- r_font->set_texture_image(0, Vector2i(p_sz, 0), p_page * 4 + 3, img_a);
-
- Ref<Image> img_ro = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_ro));
- r_font->set_texture_image(0, Vector2i(p_sz, 1), p_page * 4 + 0, img_ro);
- Ref<Image> img_go = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_go));
- r_font->set_texture_image(0, Vector2i(p_sz, 1), p_page * 4 + 1, img_go);
- Ref<Image> img_bo = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_bo));
- r_font->set_texture_image(0, Vector2i(p_sz, 1), p_page * 4 + 2, img_bo);
- Ref<Image> img_ao = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_ao));
- r_font->set_texture_image(0, Vector2i(p_sz, 1), p_page * 4 + 3, img_ao);
-}
-
-void _convert_rgba_4bit(Ref<FontData> &r_font, Ref<Image> &p_source, int p_page, int p_sz) {
- int w = p_source->get_width();
- int h = p_source->get_height();
-
- PackedByteArray imgdata = p_source->get_data();
- const uint8_t *r = imgdata.ptr();
-
- PackedByteArray imgdata_g;
- imgdata_g.resize(w * h * 4);
- uint8_t *wg = imgdata_g.ptrw();
-
- PackedByteArray imgdata_o;
- imgdata_o.resize(w * h * 4);
- uint8_t *wo = imgdata_o.ptrw();
-
- for (int i = 0; i < h; i++) {
- for (int j = 0; j < w; j++) {
- int ofs = (i * w + j) * 4;
-
- if (r[ofs + 0] > 0x7F) {
- wg[ofs + 0] = r[ofs + 0];
- wo[ofs + 0] = 0;
- } else {
- wg[ofs + 0] = 0;
- wo[ofs + 0] = r[ofs + 0] * 2;
- }
- if (r[ofs + 1] > 0x7F) {
- wg[ofs + 1] = r[ofs + 1];
- wo[ofs + 1] = 0;
- } else {
- wg[ofs + 1] = 0;
- wo[ofs + 1] = r[ofs + 1] * 2;
- }
- if (r[ofs + 2] > 0x7F) {
- wg[ofs + 2] = r[ofs + 2];
- wo[ofs + 2] = 0;
- } else {
- wg[ofs + 2] = 0;
- wo[ofs + 2] = r[ofs + 2] * 2;
- }
- if (r[ofs + 3] > 0x7F) {
- wg[ofs + 3] = r[ofs + 3];
- wo[ofs + 3] = 0;
- } else {
- wg[ofs + 3] = 0;
- wo[ofs + 3] = r[ofs + 3] * 2;
- }
- }
- }
- Ref<Image> img_g = memnew(Image(w, h, 0, Image::FORMAT_RGBA8, imgdata_g));
- r_font->set_texture_image(0, Vector2i(p_sz, 0), p_page, img_g);
-
- Ref<Image> img_o = memnew(Image(w, h, 0, Image::FORMAT_RGBA8, imgdata_o));
- r_font->set_texture_image(0, Vector2i(p_sz, 1), p_page, img_o);
-}
-
-void _convert_mono_8bit(Ref<FontData> &r_font, Ref<Image> &p_source, int p_page, int p_ch, int p_sz, int p_ol) {
- int w = p_source->get_width();
- int h = p_source->get_height();
-
- PackedByteArray imgdata = p_source->get_data();
- const uint8_t *r = imgdata.ptr();
-
- int size = 4;
- if (p_source->get_format() == Image::FORMAT_L8) {
- size = 1;
- p_ch = 0;
- }
-
- PackedByteArray imgdata_g;
- imgdata_g.resize(w * h * 2);
- uint8_t *wg = imgdata_g.ptrw();
-
- for (int i = 0; i < h; i++) {
- for (int j = 0; j < w; j++) {
- int ofs_src = (i * w + j) * size;
- int ofs_dst = (i * w + j) * 2;
- wg[ofs_dst + 0] = 255;
- wg[ofs_dst + 1] = r[ofs_src + p_ch];
- }
- }
- Ref<Image> img_g = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_g));
- r_font->set_texture_image(0, Vector2i(p_sz, p_ol), p_page, img_g);
-}
-
-void _convert_mono_4bit(Ref<FontData> &r_font, Ref<Image> &p_source, int p_page, int p_ch, int p_sz, int p_ol) {
- int w = p_source->get_width();
- int h = p_source->get_height();
-
- PackedByteArray imgdata = p_source->get_data();
- const uint8_t *r = imgdata.ptr();
-
- int size = 4;
- if (p_source->get_format() == Image::FORMAT_L8) {
- size = 1;
- p_ch = 0;
- }
-
- PackedByteArray imgdata_g;
- imgdata_g.resize(w * h * 2);
- uint8_t *wg = imgdata_g.ptrw();
-
- PackedByteArray imgdata_o;
- imgdata_o.resize(w * h * 2);
- uint8_t *wo = imgdata_o.ptrw();
-
- for (int i = 0; i < h; i++) {
- for (int j = 0; j < w; j++) {
- int ofs_src = (i * w + j) * size;
- int ofs_dst = (i * w + j) * 2;
- wg[ofs_dst + 0] = 255;
- wo[ofs_dst + 0] = 255;
- if (r[ofs_src + p_ch] > 0x7F) {
- wg[ofs_dst + 1] = r[ofs_src + p_ch];
- wo[ofs_dst + 1] = 0;
- } else {
- wg[ofs_dst + 1] = 0;
- wo[ofs_dst + 1] = r[ofs_src + p_ch] * 2;
- }
- }
- }
- Ref<Image> img_g = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_g));
- r_font->set_texture_image(0, Vector2i(p_sz, 0), p_page, img_g);
-
- Ref<Image> img_o = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_o));
- r_font->set_texture_image(0, Vector2i(p_sz, p_ol), p_page, img_o);
-}
-
Error ResourceImporterBMFont::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
print_verbose("Importing BMFont font from: " + p_source_file);
Ref<FontData> font;
font.instantiate();
- font->set_antialiased(false);
- font->set_multichannel_signed_distance_field(false);
- font->set_force_autohinter(false);
- font->set_hinting(TextServer::HINTING_NONE);
- font->set_oversampling(1.0f);
-
- FileAccessRef f = FileAccess::open(p_source_file, FileAccess::READ);
- if (f == nullptr) {
- ERR_FAIL_V_MSG(ERR_CANT_CREATE, TTR("Cannot open font from file ") + "\"" + p_source_file + "\".");
- }
-
- int base_size = 16;
- int height = 0;
- int ascent = 0;
- int outline = 0;
- uint32_t st_flags = 0;
- String font_name;
-
- bool packed = false;
- uint8_t ch[4] = { 0, 0, 0, 0 }; // RGBA
- int first_gl_ch = -1;
- int first_ol_ch = -1;
- int first_cm_ch = -1;
-
- unsigned char magic[4];
- f->get_buffer((unsigned char *)&magic, 4);
- if (magic[0] == 'B' && magic[1] == 'M' && magic[2] == 'F') {
- // Binary BMFont file.
- ERR_FAIL_COND_V_MSG(magic[3] != 3, ERR_CANT_CREATE, vformat(TTR("Version %d of BMFont is not supported."), (int)magic[3]));
-
- uint8_t block_type = f->get_8();
- uint32_t block_size = f->get_32();
- while (!f->eof_reached()) {
- uint64_t off = f->get_position();
- switch (block_type) {
- case 1: /* info */ {
- ERR_FAIL_COND_V_MSG(block_size < 15, ERR_CANT_CREATE, TTR("Invalid BMFont info block size."));
- base_size = f->get_16();
- uint8_t flags = f->get_8();
- ERR_FAIL_COND_V_MSG(flags & 0x02, ERR_CANT_CREATE, TTR("Non-unicode version of BMFont is not supported."));
- if (flags & (1 << 3)) {
- st_flags |= TextServer::FONT_BOLD;
- }
- if (flags & (1 << 2)) {
- st_flags |= TextServer::FONT_ITALIC;
- }
- f->get_8(); // non-unicode charset, skip
- f->get_16(); // stretch_h, skip
- f->get_8(); // aa, skip
- f->get_32(); // padding, skip
- f->get_16(); // spacing, skip
- outline = f->get_8();
- // font name
- PackedByteArray name_data;
- name_data.resize(block_size - 14);
- f->get_buffer(name_data.ptrw(), block_size - 14);
- font_name = String::utf8((const char *)name_data.ptr(), block_size - 14);
- font->set_fixed_size(base_size);
- } break;
- case 2: /* common */ {
- ERR_FAIL_COND_V_MSG(block_size != 15, ERR_CANT_CREATE, TTR("Invalid BMFont common block size."));
- height = f->get_16();
- ascent = f->get_16();
- f->get_32(); // scale, skip
- f->get_16(); // pages, skip
- uint8_t flags = f->get_8();
- packed = (flags & 0x01);
- ch[3] = f->get_8();
- ch[0] = f->get_8();
- ch[1] = f->get_8();
- ch[2] = f->get_8();
- for (int i = 0; i < 4; i++) {
- if (ch[i] == 0 && first_gl_ch == -1) {
- first_gl_ch = i;
- }
- if (ch[i] == 1 && first_ol_ch == -1) {
- first_ol_ch = i;
- }
- if (ch[i] == 2 && first_cm_ch == -1) {
- first_cm_ch = i;
- }
- }
- } break;
- case 3: /* pages */ {
- int page = 0;
- CharString cs;
- char32_t c = f->get_8();
- while (!f->eof_reached() && f->get_position() <= off + block_size) {
- if (c == '\0') {
- String base_dir = p_source_file.get_base_dir();
- String file = base_dir.plus_file(String::utf8(cs.ptr(), cs.length()));
- if (RenderingServer::get_singleton() != nullptr) {
- Ref<Image> img;
- img.instantiate();
- Error err = ImageLoader::load_image(file, img);
- ERR_FAIL_COND_V_MSG(err != OK, ERR_FILE_CANT_READ, TTR("Can't load font texture: ") + "\"" + file + "\".");
-
- if (packed) {
- if (ch[3] == 0) { // 4 x 8 bit monochrome, no outline
- outline = 0;
- ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
- _convert_packed_8bit(font, img, page, base_size);
- } else if ((ch[3] == 2) && (outline > 0)) { // 4 x 4 bit monochrome, gl + outline
- ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
- _convert_packed_4bit(font, img, page, base_size);
- } else {
- ERR_FAIL_V_MSG(ERR_CANT_CREATE, TTR("Unsupported BMFont texture format."));
- }
- } else {
- if ((ch[0] == 0) && (ch[1] == 0) && (ch[2] == 0) && (ch[3] == 0)) { // RGBA8 color, no outline
- outline = 0;
- ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
- font->set_texture_image(0, Vector2i(base_size, 0), page, img);
- } else if ((ch[0] == 2) && (ch[1] == 2) && (ch[2] == 2) && (ch[3] == 2) && (outline > 0)) { // RGBA4 color, gl + outline
- ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
- _convert_rgba_4bit(font, img, page, base_size);
- } else if ((first_gl_ch >= 0) && (first_ol_ch >= 0) && (outline > 0)) { // 1 x 8 bit monochrome, gl + outline
- ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8 && img->get_format() != Image::FORMAT_L8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
- _convert_mono_8bit(font, img, page, first_gl_ch, base_size, 0);
- _convert_mono_8bit(font, img, page, first_ol_ch, base_size, 1);
- } else if ((first_cm_ch >= 0) && (outline > 0)) { // 1 x 4 bit monochrome, gl + outline
- ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8 && img->get_format() != Image::FORMAT_L8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
- _convert_mono_4bit(font, img, page, first_cm_ch, base_size, 1);
- } else if (first_gl_ch >= 0) { // 1 x 8 bit monochrome, no outline
- outline = 0;
- ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8 && img->get_format() != Image::FORMAT_L8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
- _convert_mono_8bit(font, img, page, first_gl_ch, base_size, 0);
- } else {
- ERR_FAIL_V_MSG(ERR_CANT_CREATE, TTR("Unsupported BMFont texture format."));
- }
- }
- }
- page++;
- cs = "";
- } else {
- cs += c;
- }
- c = f->get_8();
- }
- } break;
- case 4: /* chars */ {
- int char_count = block_size / 20;
- for (int i = 0; i < char_count; i++) {
- Vector2 advance;
- Vector2 size;
- Vector2 offset;
- Rect2 uv_rect;
-
- char32_t idx = f->get_32();
- uv_rect.position.x = (int16_t)f->get_16();
- uv_rect.position.y = (int16_t)f->get_16();
- uv_rect.size.width = (int16_t)f->get_16();
- size.width = uv_rect.size.width;
- uv_rect.size.height = (int16_t)f->get_16();
- size.height = uv_rect.size.height;
- offset.x = (int16_t)f->get_16();
- offset.y = (int16_t)f->get_16() - ascent;
- advance.x = (int16_t)f->get_16();
- if (advance.x < 0) {
- advance.x = size.width + 1;
- }
-
- int texture_idx = f->get_8();
- uint8_t channel = f->get_8();
-
- ERR_FAIL_COND_V_MSG(!packed && channel != 15, ERR_CANT_CREATE, TTR("Invalid glyph channel."));
- int ch_off = 0;
- switch (channel) {
- case 1:
- ch_off = 2;
- break; // B
- case 2:
- ch_off = 1;
- break; // G
- case 4:
- ch_off = 0;
- break; // R
- case 8:
- ch_off = 3;
- break; // A
- default:
- ch_off = 0;
- break;
- }
- font->set_glyph_advance(0, base_size, idx, advance);
- font->set_glyph_offset(0, Vector2i(base_size, 0), idx, offset);
- font->set_glyph_size(0, Vector2i(base_size, 0), idx, size);
- font->set_glyph_uv_rect(0, Vector2i(base_size, 0), idx, uv_rect);
- font->set_glyph_texture_idx(0, Vector2i(base_size, 0), idx, texture_idx * (packed ? 4 : 1) + ch_off);
- if (outline > 0) {
- font->set_glyph_offset(0, Vector2i(base_size, 1), idx, offset);
- font->set_glyph_size(0, Vector2i(base_size, 1), idx, size);
- font->set_glyph_uv_rect(0, Vector2i(base_size, 1), idx, uv_rect);
- font->set_glyph_texture_idx(0, Vector2i(base_size, 1), idx, texture_idx * (packed ? 4 : 1) + ch_off);
- }
- }
- } break;
- case 5: /* kerning */ {
- int pair_count = block_size / 10;
- for (int i = 0; i < pair_count; i++) {
- Vector2i kpk;
- kpk.x = f->get_32();
- kpk.y = f->get_32();
- font->set_kerning(0, base_size, kpk, Vector2((int16_t)f->get_16(), 0));
- }
- } break;
- default: {
- ERR_FAIL_V_MSG(ERR_CANT_CREATE, TTR("Invalid BMFont block type."));
- } break;
- }
- f->seek(off + block_size);
- block_type = f->get_8();
- block_size = f->get_32();
- }
-
- } else {
- // Text BMFont file.
- f->seek(0);
- while (true) {
- String line = f->get_line();
-
- int delimiter = line.find(" ");
- String type = line.substr(0, delimiter);
- int pos = delimiter + 1;
- Map<String, String> keys;
-
- while (pos < line.size() && line[pos] == ' ') {
- pos++;
- }
-
- while (pos < line.size()) {
- int eq = line.find("=", pos);
- if (eq == -1) {
- break;
- }
- String key = line.substr(pos, eq - pos);
- int end = -1;
- String value;
- if (line[eq + 1] == '"') {
- end = line.find("\"", eq + 2);
- if (end == -1) {
- break;
- }
- value = line.substr(eq + 2, end - 1 - eq - 1);
- pos = end + 1;
- } else {
- end = line.find(" ", eq + 1);
- if (end == -1) {
- end = line.size();
- }
- value = line.substr(eq + 1, end - eq);
- pos = end;
- }
-
- while (pos < line.size() && line[pos] == ' ') {
- pos++;
- }
-
- keys[key] = value;
- }
-
- if (type == "info") {
- if (keys.has("size")) {
- base_size = keys["size"].to_int();
- font->set_fixed_size(base_size);
- }
- if (keys.has("outline")) {
- outline = keys["outline"].to_int();
- }
- if (keys.has("bold")) {
- if (keys["bold"].to_int()) {
- st_flags |= TextServer::FONT_BOLD;
- }
- }
- if (keys.has("italic")) {
- if (keys["italic"].to_int()) {
- st_flags |= TextServer::FONT_ITALIC;
- }
- }
- if (keys.has("face")) {
- font_name = keys["face"];
- }
- ERR_FAIL_COND_V_MSG((!keys.has("unicode") || keys["unicode"].to_int() != 1), ERR_CANT_CREATE, TTR("Non-unicode version of BMFont is not supported."));
- } else if (type == "common") {
- if (keys.has("lineHeight")) {
- height = keys["lineHeight"].to_int();
- }
- if (keys.has("base")) {
- ascent = keys["base"].to_int();
- }
- if (keys.has("packed")) {
- packed = (keys["packed"].to_int() == 1);
- }
- if (keys.has("alphaChnl")) {
- ch[3] = keys["alphaChnl"].to_int();
- }
- if (keys.has("redChnl")) {
- ch[0] = keys["redChnl"].to_int();
- }
- if (keys.has("greenChnl")) {
- ch[1] = keys["greenChnl"].to_int();
- }
- if (keys.has("blueChnl")) {
- ch[2] = keys["blueChnl"].to_int();
- }
- for (int i = 0; i < 4; i++) {
- if (ch[i] == 0 && first_gl_ch == -1) {
- first_gl_ch = i;
- }
- if (ch[i] == 1 && first_ol_ch == -1) {
- first_ol_ch = i;
- }
- if (ch[i] == 2 && first_cm_ch == -1) {
- first_cm_ch = i;
- }
- }
- } else if (type == "page") {
- int page = 0;
- if (keys.has("id")) {
- page = keys["id"].to_int();
- }
- if (keys.has("file")) {
- String base_dir = p_source_file.get_base_dir();
- String file = base_dir.plus_file(keys["file"]);
- if (RenderingServer::get_singleton() != nullptr) {
- Ref<Image> img;
- img.instantiate();
- Error err = ImageLoader::load_image(file, img);
- ERR_FAIL_COND_V_MSG(err != OK, ERR_FILE_CANT_READ, TTR("Can't load font texture: ") + "\"" + file + "\".");
- if (packed) {
- if (ch[3] == 0) { // 4 x 8 bit monochrome, no outline
- outline = 0;
- ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
- _convert_packed_8bit(font, img, page, base_size);
- } else if ((ch[3] == 2) && (outline > 0)) { // 4 x 4 bit monochrome, gl + outline
- ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
- _convert_packed_4bit(font, img, page, base_size);
- } else {
- ERR_FAIL_V_MSG(ERR_CANT_CREATE, TTR("Unsupported BMFont texture format."));
- }
- } else {
- if ((ch[0] == 0) && (ch[1] == 0) && (ch[2] == 0) && (ch[3] == 0)) { // RGBA8 color, no outline
- outline = 0;
- ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
- font->set_texture_image(0, Vector2i(base_size, 0), page, img);
- } else if ((ch[0] == 2) && (ch[1] == 2) && (ch[2] == 2) && (ch[3] == 2) && (outline > 0)) { // RGBA4 color, gl + outline
- ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
- _convert_rgba_4bit(font, img, page, base_size);
- } else if ((first_gl_ch >= 0) && (first_ol_ch >= 0) && (outline > 0)) { // 1 x 8 bit monochrome, gl + outline
- ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8 && img->get_format() != Image::FORMAT_L8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
- _convert_mono_8bit(font, img, page, first_gl_ch, base_size, 0);
- _convert_mono_8bit(font, img, page, first_ol_ch, base_size, 1);
- } else if ((first_cm_ch >= 0) && (outline > 0)) { // 1 x 4 bit monochrome, gl + outline
- ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8 && img->get_format() != Image::FORMAT_L8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
- _convert_mono_4bit(font, img, page, first_cm_ch, base_size, 1);
- } else if (first_gl_ch >= 0) { // 1 x 8 bit monochrome, no outline
- outline = 0;
- ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8 && img->get_format() != Image::FORMAT_L8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
- _convert_mono_8bit(font, img, page, first_gl_ch, base_size, 0);
- } else {
- ERR_FAIL_V_MSG(ERR_CANT_CREATE, TTR("Unsupported BMFont texture format."));
- }
- }
- }
- }
- } else if (type == "char") {
- char32_t idx = 0;
- Vector2 advance;
- Vector2 size;
- Vector2 offset;
- Rect2 uv_rect;
- int texture_idx = -1;
- uint8_t channel = 15;
-
- if (keys.has("id")) {
- idx = keys["id"].to_int();
- }
- if (keys.has("x")) {
- uv_rect.position.x = keys["x"].to_int();
- }
- if (keys.has("y")) {
- uv_rect.position.y = keys["y"].to_int();
- }
- if (keys.has("width")) {
- uv_rect.size.width = keys["width"].to_int();
- size.width = keys["width"].to_int();
- }
- if (keys.has("height")) {
- uv_rect.size.height = keys["height"].to_int();
- size.height = keys["height"].to_int();
- }
- if (keys.has("xoffset")) {
- offset.x = keys["xoffset"].to_int();
- }
- if (keys.has("yoffset")) {
- offset.y = keys["yoffset"].to_int() - ascent;
- }
- if (keys.has("page")) {
- texture_idx = keys["page"].to_int();
- }
- if (keys.has("xadvance")) {
- advance.x = keys["xadvance"].to_int();
- }
- if (advance.x < 0) {
- advance.x = size.width + 1;
- }
- if (keys.has("chnl")) {
- channel = keys["chnl"].to_int();
- }
-
- ERR_FAIL_COND_V_MSG(!packed && channel != 15, ERR_CANT_CREATE, TTR("Invalid glyph channel."));
- int ch_off = 0;
- switch (channel) {
- case 1:
- ch_off = 2;
- break; // B
- case 2:
- ch_off = 1;
- break; // G
- case 4:
- ch_off = 0;
- break; // R
- case 8:
- ch_off = 3;
- break; // A
- default:
- ch_off = 0;
- break;
- }
- font->set_glyph_advance(0, base_size, idx, advance);
- font->set_glyph_offset(0, Vector2i(base_size, 0), idx, offset);
- font->set_glyph_size(0, Vector2i(base_size, 0), idx, size);
- font->set_glyph_uv_rect(0, Vector2i(base_size, 0), idx, uv_rect);
- font->set_glyph_texture_idx(0, Vector2i(base_size, 0), idx, texture_idx * (packed ? 4 : 1) + ch_off);
- if (outline > 0) {
- font->set_glyph_offset(0, Vector2i(base_size, 1), idx, offset);
- font->set_glyph_size(0, Vector2i(base_size, 1), idx, size);
- font->set_glyph_uv_rect(0, Vector2i(base_size, 1), idx, uv_rect);
- font->set_glyph_texture_idx(0, Vector2i(base_size, 1), idx, texture_idx * (packed ? 4 : 1) + ch_off);
- }
- } else if (type == "kerning") {
- Vector2i kpk;
- if (keys.has("first")) {
- kpk.x = keys["first"].to_int();
- }
- if (keys.has("second")) {
- kpk.y = keys["second"].to_int();
- }
- if (keys.has("amount")) {
- font->set_kerning(0, base_size, kpk, Vector2(keys["amount"].to_int(), 0));
- }
- }
-
- if (f->eof_reached()) {
- break;
- }
- }
- }
- font->set_font_name(font_name);
- font->set_font_style(st_flags);
- font->set_ascent(0, base_size, ascent);
- font->set_descent(0, base_size, height - ascent);
+ Error err = font->load_bitmap_font(p_source_file);
+ ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot load font to file \"" + p_source_file + "\".");
int flg = ResourceSaver::SaverFlags::FLAG_BUNDLE_RESOURCES | ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS;
if ((bool)p_options["compress"]) {
@@ -814,7 +78,7 @@ Error ResourceImporterBMFont::import(const String &p_source_file, const String &
}
print_verbose("Saving to: " + p_save_path + ".fontdata");
- Error err = ResourceSaver::save(p_save_path + ".fontdata", font, flg);
+ err = ResourceSaver::save(p_save_path + ".fontdata", font, flg);
ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot save font to file \"" + p_save_path + ".res\".");
print_verbose("Done saving to: " + p_save_path + ".fontdata");
return OK;
diff --git a/editor/import/resource_importer_csv_translation.cpp b/editor/import/resource_importer_csv_translation.cpp
index 448b318c64..f0ee14bdcb 100644
--- a/editor/import/resource_importer_csv_translation.cpp
+++ b/editor/import/resource_importer_csv_translation.cpp
@@ -99,8 +99,7 @@ Error ResourceImporterCSVTranslation::import(const String &p_source_file, const
Vector<Ref<Translation>> translations;
for (int i = 1; i < line.size(); i++) {
- String locale = line[i];
- ERR_FAIL_COND_V_MSG(!TranslationServer::is_locale_valid(locale), ERR_PARSE_ERROR, "Error importing CSV translation: '" + locale + "' is not a valid locale.");
+ String locale = TranslationServer::get_singleton()->standardize_locale(line[i]);
locales.push_back(locale);
Ref<Translation> translation;
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index e801cd4553..b6624a8cfa 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -370,16 +370,17 @@ static void _pre_gen_shape_list(Ref<ImporterMesh> &mesh, Vector<Ref<Shape3D>> &r
}
}
-Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map) {
- // children first
+Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, List<Pair<NodePath, Node *>> &r_node_renames) {
+ // Children first.
for (int i = 0; i < p_node->get_child_count(); i++) {
- Node *r = _pre_fix_node(p_node->get_child(i), p_root, collision_map);
+ Node *r = _pre_fix_node(p_node->get_child(i), p_root, collision_map, r_node_renames);
if (!r) {
- i--; //was erased
+ i--; // Was erased.
}
}
String name = p_node->get_name();
+ NodePath original_path = p_root->get_path_to(p_node); // Used to detect renames due to import hints.
bool isroot = p_node == p_root;
@@ -414,14 +415,21 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I
}
if (Object::cast_to<AnimationPlayer>(p_node)) {
- //remove animations referencing non-importable nodes
AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(p_node);
+ // Node paths in animation tracks are relative to the following path (this is used to fix node paths below).
+ Node *ap_root = ap->get_node(ap->get_root());
+ NodePath path_prefix = p_root->get_path_to(ap_root);
+
+ bool nodes_were_renamed = r_node_renames.size() != 0;
+
List<StringName> anims;
ap->get_animation_list(&anims);
for (const StringName &E : anims) {
Ref<Animation> anim = ap->get_animation(E);
ERR_CONTINUE(anim.is_null());
+
+ // Remove animation tracks referencing non-importable nodes.
for (int i = 0; i < anim->get_track_count(); i++) {
NodePath path = anim->track_get_path(i);
@@ -435,6 +443,27 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I
}
}
+ // Fix node paths in animations, in case nodes were renamed earlier due to import hints.
+ if (nodes_were_renamed) {
+ for (int i = 0; i < anim->get_track_count(); i++) {
+ NodePath path = anim->track_get_path(i);
+ // Convert track path to absolute node path without subnames (some manual work because we are not in the scene tree).
+ Vector<StringName> absolute_path_names = path_prefix.get_names();
+ absolute_path_names.append_array(path.get_names());
+ NodePath absolute_path(absolute_path_names, false);
+ absolute_path.simplify();
+ // Fix paths to renamed nodes.
+ for (const Pair<NodePath, Node *> &F : r_node_renames) {
+ if (F.first == absolute_path) {
+ NodePath new_path(ap_root->get_path_to(F.second).get_names(), path.get_subnames(), false);
+ print_verbose(vformat("Fix: Correcting node path in animation track: %s should be %s", path, new_path));
+ anim->track_set_path(i, new_path);
+ break; // Only one match is possible.
+ }
+ }
+ }
+ }
+
String animname = E;
const int loop_string_count = 3;
static const char *loop_strings[loop_string_count] = { "loop_mode", "loop", "cycle" };
@@ -452,13 +481,22 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I
if (isroot) {
return p_node;
}
+
+ String fixed_name;
+ if (_teststr(name, "colonly")) {
+ fixed_name = _fixstr(name, "colonly");
+ } else if (_teststr(name, "convcolonly")) {
+ fixed_name = _fixstr(name, "convcolonly");
+ }
+
+ ERR_FAIL_COND_V(fixed_name.is_empty(), nullptr);
+
ImporterMeshInstance3D *mi = Object::cast_to<ImporterMeshInstance3D>(p_node);
if (mi) {
Ref<ImporterMesh> mesh = mi->get_mesh();
if (mesh.is_valid()) {
Vector<Ref<Shape3D>> shapes;
- String fixed_name;
if (collision_map.has(mesh)) {
shapes = collision_map[mesh];
} else if (_teststr(name, "colonly")) {
@@ -469,14 +507,6 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I
collision_map[mesh] = shapes;
}
- if (_teststr(name, "colonly")) {
- fixed_name = _fixstr(name, "colonly");
- } else if (_teststr(name, "convcolonly")) {
- fixed_name = _fixstr(name, "convcolonly");
- }
-
- ERR_FAIL_COND_V(fixed_name.is_empty(), nullptr);
-
if (shapes.size()) {
StaticBody3D *col = memnew(StaticBody3D);
col->set_transform(mi->get_transform());
@@ -492,11 +522,11 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I
} else if (p_node->has_meta("empty_draw_type")) {
String empty_draw_type = String(p_node->get_meta("empty_draw_type"));
StaticBody3D *sb = memnew(StaticBody3D);
- sb->set_name(_fixstr(name, "colonly"));
+ sb->set_name(fixed_name);
Object::cast_to<Node3D>(sb)->set_transform(Object::cast_to<Node3D>(p_node)->get_transform());
p_node->replace_by(sb);
memdelete(p_node);
- p_node = nullptr;
+ p_node = sb;
CollisionShape3D *colshape = memnew(CollisionShape3D);
if (empty_draw_type == "CUBE") {
BoxShape3D *boxShape = memnew(BoxShape3D);
@@ -635,6 +665,14 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I
}
}
+ if (p_node) {
+ NodePath new_path = p_root->get_path_to(p_node);
+ if (new_path != original_path) {
+ print_verbose(vformat("Fix: Renamed %s to %s", original_path, new_path));
+ r_node_renames.push_back({ original_path, p_node });
+ }
+ }
+
return p_node;
}
@@ -1828,8 +1866,8 @@ Node *ResourceImporterScene::pre_import(const String &p_source_file) {
}
Map<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> collision_map;
-
- _pre_fix_node(scene, scene, collision_map);
+ List<Pair<NodePath, Node *>> node_renames;
+ _pre_fix_node(scene, scene, collision_map, node_renames);
return scene;
}
@@ -1904,8 +1942,9 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
Set<Ref<ImporterMesh>> scanned_meshes;
Map<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> collision_map;
+ List<Pair<NodePath, Node *>> node_renames;
- _pre_fix_node(scene, scene, collision_map);
+ _pre_fix_node(scene, scene, collision_map, node_renames);
for (int i = 0; i < post_importer_plugins.size(); i++) {
post_importer_plugins.write[i]->pre_process(scene, p_options);
diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h
index 00d095eac1..066e8b603b 100644
--- a/editor/import/resource_importer_scene.h
+++ b/editor/import/resource_importer_scene.h
@@ -261,7 +261,7 @@ public:
// Import scenes *after* everything else (such as textures).
virtual int get_import_order() const override { return ResourceImporter::IMPORT_ORDER_SCENE; }
- Node *_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map);
+ Node *_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, List<Pair<NodePath, Node *>> &r_node_renames);
Node *_post_fix_node(Node *p_node, Node *p_root, Map<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Set<Ref<ImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps);
Ref<Animation> _save_animation_to_file(Ref<Animation> anim, bool p_save_to_file, String p_save_to_path, bool p_keep_custom_tracks);
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp
index af4c2625c3..f21012258c 100644
--- a/editor/import/resource_importer_texture.cpp
+++ b/editor/import/resource_importer_texture.cpp
@@ -211,14 +211,17 @@ void ResourceImporterTexture::get_import_options(const String &p_path, List<Impo
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "mipmaps/generate"), (p_preset == PRESET_3D ? true : false)));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "mipmaps/limit", PROPERTY_HINT_RANGE, "-1,256"), -1));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "roughness/mode", PROPERTY_HINT_ENUM, "Detect,Disabled,Red,Green,Blue,Alpha,Gray"), 0));
- r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "roughness/src_normal", PROPERTY_HINT_FILE, "*.bmp,*.dds,*.exr,*.jpeg,*.jpg,*.hdr,*.png,*.svg,*.svgz,*.tga,*.webp"), ""));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "roughness/src_normal", PROPERTY_HINT_FILE, "*.bmp,*.dds,*.exr,*.jpeg,*.jpg,*.hdr,*.png,*.svg,*.tga,*.webp"), ""));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "process/fix_alpha_border"), p_preset != PRESET_3D));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "process/premult_alpha"), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "process/normal_map_invert_y"), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "process/HDR_as_SRGB"), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "process/size_limit", PROPERTY_HINT_RANGE, "0,4096,1"), 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "detect_3d/compress_to", PROPERTY_HINT_ENUM, "Disabled,VRAM Compressed,Basis Universal"), (p_preset == PRESET_DETECT) ? 1 : 0));
- r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "svg/scale", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 1.0));
+
+ if (p_path.get_extension() == "svg") {
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "svg/scale", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 1.0));
+ }
}
void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image> &p_image, CompressMode p_compress_mode, Image::UsedChannels p_channels, Image::CompressMode p_compress_format, float p_lossy_quality) {
@@ -408,11 +411,14 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
int size_limit = p_options["process/size_limit"];
bool hdr_as_srgb = p_options["process/HDR_as_SRGB"];
int normal = p_options["compress/normal_map"];
- float scale = p_options["svg/scale"];
int hdr_compression = p_options["compress/hdr_compression"];
int bptc_ldr = p_options["compress/bptc_ldr"];
int roughness = p_options["roughness/mode"];
String normal_map = p_options["roughness/src_normal"];
+ float scale = 1.0;
+ if (p_options.has("svg/scale")) {
+ scale = p_options["svg/scale"];
+ }
Ref<Image> normal_image;
Image::RoughnessChannel roughness_channel = Image::ROUGHNESS_CHANNEL_R;
diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp
index f56e868286..ce4e51e54c 100644
--- a/editor/inspector_dock.cpp
+++ b/editor/inspector_dock.cpp
@@ -382,20 +382,6 @@ void InspectorDock::_menu_expandall() {
inspector->expand_all_folding();
}
-void InspectorDock::_property_keyed(const String &p_keyed, const Variant &p_value, bool p_advance) {
- AnimationPlayerEditor::get_singleton()->get_track_editor()->insert_value_key(p_keyed, p_value, p_advance);
-}
-
-void InspectorDock::_transform_keyed(Object *sp, const String &p_sub, const Transform3D &p_key) {
- Node3D *s = Object::cast_to<Node3D>(sp);
- if (!s) {
- return;
- }
- AnimationPlayerEditor::get_singleton()->get_track_editor()->insert_transform_key(s, p_sub, Animation::TYPE_POSITION_3D, p_key.origin);
- AnimationPlayerEditor::get_singleton()->get_track_editor()->insert_transform_key(s, p_sub, Animation::TYPE_ROTATION_3D, p_key.basis.get_rotation_quaternion());
- AnimationPlayerEditor::get_singleton()->get_track_editor()->insert_transform_key(s, p_sub, Animation::TYPE_SCALE_3D, p_key.basis.get_scale());
-}
-
void InspectorDock::_warning_pressed() {
warning_dialog->popup_centered();
}
@@ -440,9 +426,6 @@ void InspectorDock::_notification(int p_what) {
}
void InspectorDock::_bind_methods() {
- ClassDB::bind_method("update_keying", &InspectorDock::update_keying);
- ClassDB::bind_method("_transform_keyed", &InspectorDock::_transform_keyed); // Still used by some connect_compat.
-
ClassDB::bind_method("_unref_resource", &InspectorDock::_unref_resource);
ClassDB::bind_method("_paste_resource", &InspectorDock::_paste_resource);
ClassDB::bind_method("_copy_resource", &InspectorDock::_copy_resource);
@@ -547,22 +530,6 @@ void InspectorDock::go_back() {
_edit_back();
}
-void InspectorDock::update_keying() {
- bool valid = false;
-
- if (AnimationPlayerEditor::get_singleton()->get_track_editor()->has_keying()) {
- EditorHistory *editor_history = EditorNode::get_singleton()->get_editor_history();
- if (editor_history->get_path_size() >= 1) {
- Object *obj = ObjectDB::get_instance(editor_history->get_path_object(0));
- if (Object::cast_to<Node>(obj)) {
- valid = true;
- }
- }
- }
-
- inspector->set_keying(valid);
-}
-
InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) {
set_name("Inspector");
@@ -716,7 +683,6 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) {
inspector->set_use_filter(true); // TODO: check me
inspector->connect("resource_selected", callable_mp(this, &InspectorDock::_resource_selected));
- inspector->connect("property_keyed", callable_mp(this, &InspectorDock::_property_keyed));
}
InspectorDock::~InspectorDock() {
diff --git a/editor/inspector_dock.h b/editor/inspector_dock.h
index 94e4f67348..2f120c93b4 100644
--- a/editor/inspector_dock.h
+++ b/editor/inspector_dock.h
@@ -117,16 +117,12 @@ class InspectorDock : public VBoxContainer {
void _select_history(int p_idx);
void _prepare_history();
- void _property_keyed(const String &p_keyed, const Variant &p_value, bool p_advance);
- void _transform_keyed(Object *sp, const String &p_sub, const Transform3D &p_key);
-
protected:
static void _bind_methods();
void _notification(int p_what);
public:
void go_back();
- void update_keying();
void edit_resource(const Ref<Resource> &p_resource);
void open_resource(const String &p_type);
void clear();
diff --git a/editor/localization_editor.cpp b/editor/localization_editor.cpp
index a902b070f4..1e9e2fc09b 100644
--- a/editor/localization_editor.cpp
+++ b/editor/localization_editor.cpp
@@ -32,6 +32,7 @@
#include "core/string/translation.h"
#include "editor_node.h"
+#include "editor_scale.h"
#include "editor_translation_parser.h"
#include "pot_generator.h"
#include "scene/gui/control.h"
@@ -175,10 +176,27 @@ void LocalizationEditor::_translation_res_select() {
if (updating_translations) {
return;
}
-
call_deferred(SNAME("update_translations"));
}
+void LocalizationEditor::_translation_res_option_popup(bool p_arrow_clicked) {
+ TreeItem *ed = translation_remap_options->get_edited();
+ ERR_FAIL_COND(!ed);
+
+ locale_select->set_locale(ed->get_tooltip(1));
+ locale_select->popup_locale_dialog();
+}
+
+void LocalizationEditor::_translation_res_option_selected(const String &p_locale) {
+ TreeItem *ed = translation_remap_options->get_edited();
+ ERR_FAIL_COND(!ed);
+
+ ed->set_text(1, TranslationServer::get_singleton()->get_locale_name(p_locale));
+ ed->set_tooltip(1, p_locale);
+
+ LocalizationEditor::_translation_res_option_changed();
+}
+
void LocalizationEditor::_translation_res_option_changed() {
if (updating_translations) {
return;
@@ -198,20 +216,11 @@ void LocalizationEditor::_translation_res_option_changed() {
String key = k->get_metadata(0);
int idx = ed->get_metadata(0);
String path = ed->get_metadata(1);
- int which = ed->get_range(1);
-
- Vector<String> langs = TranslationServer::get_all_locales();
-
- ERR_FAIL_INDEX(which, langs.size());
+ String locale = ed->get_tooltip(1);
ERR_FAIL_COND(!remaps.has(key));
PackedStringArray r = remaps[key];
- ERR_FAIL_INDEX(idx, r.size());
- if (translation_locales_idxs_remap.size() > which) {
- r.set(idx, path + ":" + langs[translation_locales_idxs_remap[which]]);
- } else {
- r.set(idx, path + ":" + langs[which]);
- }
+ r.set(idx, path + ":" + locale);
remaps[key] = r;
updating_translations = true;
@@ -289,86 +298,6 @@ void LocalizationEditor::_translation_res_option_delete(Object *p_item, int p_co
undo_redo->commit_action();
}
-void LocalizationEditor::_translation_filter_option_changed() {
- int sel_id = translation_locale_filter_mode->get_selected_id();
- TreeItem *t = translation_filter->get_edited();
- String locale = t->get_tooltip(0);
- bool checked = t->is_checked(0);
-
- Variant prev;
- Array f_locales_all;
-
- if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/locale_filter")) {
- f_locales_all = ProjectSettings::get_singleton()->get("internationalization/locale/locale_filter");
- prev = f_locales_all;
-
- if (f_locales_all.size() != 2) {
- f_locales_all.clear();
- f_locales_all.append(sel_id);
- f_locales_all.append(Array());
- }
- } else {
- f_locales_all.append(sel_id);
- f_locales_all.append(Array());
- }
-
- Array f_locales = f_locales_all[1];
- int l_idx = f_locales.find(locale);
-
- if (checked) {
- if (l_idx == -1) {
- f_locales.append(locale);
- }
- } else {
- if (l_idx != -1) {
- f_locales.remove_at(l_idx);
- }
- }
-
- f_locales.sort();
-
- undo_redo->create_action(TTR("Changed Locale Filter"));
- undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/locale_filter", f_locales_all);
- undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/locale_filter", prev);
- undo_redo->add_do_method(this, "update_translations");
- undo_redo->add_undo_method(this, "update_translations");
- undo_redo->add_do_method(this, "emit_signal", localization_changed);
- undo_redo->add_undo_method(this, "emit_signal", localization_changed);
- undo_redo->commit_action();
-}
-
-void LocalizationEditor::_translation_filter_mode_changed(int p_mode) {
- int sel_id = translation_locale_filter_mode->get_selected_id();
-
- Variant prev;
- Array f_locales_all;
-
- if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/locale_filter")) {
- f_locales_all = ProjectSettings::get_singleton()->get("internationalization/locale/locale_filter");
- prev = f_locales_all;
-
- if (f_locales_all.size() != 2) {
- f_locales_all.clear();
- f_locales_all.append(sel_id);
- f_locales_all.append(Array());
- } else {
- f_locales_all[0] = sel_id;
- }
- } else {
- f_locales_all.append(sel_id);
- f_locales_all.append(Array());
- }
-
- undo_redo->create_action(TTR("Changed Locale Filter Mode"));
- undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/locale_filter", f_locales_all);
- undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/locale_filter", prev);
- undo_redo->add_do_method(this, "update_translations");
- undo_redo->add_undo_method(this, "update_translations");
- undo_redo->add_do_method(this, "emit_signal", localization_changed);
- undo_redo->add_undo_method(this, "emit_signal", localization_changed);
- undo_redo->commit_action();
-}
-
void LocalizationEditor::_pot_add(const PackedStringArray &p_paths) {
PackedStringArray pot_translations = ProjectSettings::get_singleton()->get("internationalization/locale/translations_pot_files");
for (int i = 0; i < p_paths.size(); i++) {
@@ -452,64 +381,6 @@ void LocalizationEditor::update_translations() {
}
}
- Vector<String> langs = TranslationServer::get_all_locales();
- Vector<String> names = TranslationServer::get_all_locale_names();
-
- // Update filter tab
- Array l_filter_all;
-
- bool is_arr_empty = true;
- if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/locale_filter")) {
- l_filter_all = ProjectSettings::get_singleton()->get("internationalization/locale/locale_filter");
-
- if (l_filter_all.size() == 2) {
- translation_locale_filter_mode->select(l_filter_all[0]);
- is_arr_empty = false;
- }
- }
- if (is_arr_empty) {
- l_filter_all.append(0);
- l_filter_all.append(Array());
- translation_locale_filter_mode->select(0);
- }
-
- int filter_mode = l_filter_all[0];
- Array l_filter = l_filter_all[1];
-
- int s = names.size();
- bool is_short_list_when_show_all_selected = filter_mode == SHOW_ALL_LOCALES && translation_filter_treeitems.size() < s;
- bool is_full_list_when_show_only_selected = filter_mode == SHOW_ONLY_SELECTED_LOCALES && translation_filter_treeitems.size() == s;
- bool should_recreate_locales_list = is_short_list_when_show_all_selected || is_full_list_when_show_only_selected;
-
- if (!translation_locales_list_created || should_recreate_locales_list) {
- translation_locales_list_created = true;
- translation_filter->clear();
- root = translation_filter->create_item(nullptr);
- translation_filter->set_hide_root(true);
- translation_filter_treeitems.clear();
- for (int i = 0; i < s; i++) {
- String n = names[i];
- String l = langs[i];
- bool is_checked = l_filter.has(l);
- if (filter_mode == SHOW_ONLY_SELECTED_LOCALES && !is_checked) {
- continue;
- }
-
- TreeItem *t = translation_filter->create_item(root);
- t->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
- t->set_text(0, vformat("[%s] %s", l, n));
- t->set_editable(0, true);
- t->set_tooltip(0, l);
- t->set_checked(0, is_checked);
- translation_filter_treeitems.push_back(t);
- }
- } else {
- for (int i = 0; i < translation_filter_treeitems.size(); i++) {
- TreeItem *t = translation_filter_treeitems[i];
- t->set_checked(0, l_filter.has(t->get_tooltip(0)));
- }
- }
-
// Update translation remaps.
String remap_selected;
if (translation_remap->get_selected()) {
@@ -524,32 +395,6 @@ void LocalizationEditor::update_translations() {
translation_remap_options->set_hide_root(true);
translation_res_option_add_button->set_disabled(true);
- translation_locales_idxs_remap.clear();
- translation_locales_idxs_remap.resize(l_filter.size());
- int fl_idx_count = translation_locales_idxs_remap.size();
-
- String langnames = "";
- int l_idx = 0;
- for (int i = 0; i < names.size(); i++) {
- if (filter_mode == SHOW_ONLY_SELECTED_LOCALES && fl_idx_count != 0) {
- if (l_filter.size() > 0) {
- if (l_filter.find(langs[i]) != -1) {
- if (langnames.length() > 0) {
- langnames += ",";
- }
- langnames += vformat("[%s] %s", langs[i], names[i]);
- translation_locales_idxs_remap.write[l_idx] = i;
- l_idx++;
- }
- }
- } else {
- if (i > 0) {
- langnames += ",";
- }
- langnames += vformat("[%s] %s", langs[i], names[i]);
- }
- }
-
if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/translation_remaps")) {
Dictionary remaps = ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps");
List<Variant> rk;
@@ -584,21 +429,11 @@ void LocalizationEditor::update_translations() {
t2->set_tooltip(0, path);
t2->set_metadata(0, j);
t2->add_button(0, get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), 0, false, TTR("Remove"));
- t2->set_cell_mode(1, TreeItem::CELL_MODE_RANGE);
- t2->set_text(1, langnames);
+ t2->set_cell_mode(1, TreeItem::CELL_MODE_CUSTOM);
+ t2->set_text(1, TranslationServer::get_singleton()->get_locale_name(locale));
t2->set_editable(1, true);
t2->set_metadata(1, path);
- int idx = langs.find(locale);
- if (idx < 0) {
- idx = 0;
- }
-
- int f_idx = translation_locales_idxs_remap.find(idx);
- if (f_idx != -1 && fl_idx_count > 0 && filter_mode == SHOW_ONLY_SELECTED_LOCALES) {
- t2->set_range(1, f_idx);
- } else {
- t2->set_range(1, idx);
- }
+ t2->set_tooltip(1, locale);
}
}
}
@@ -637,9 +472,6 @@ LocalizationEditor::LocalizationEditor() {
updating_translations = false;
localization_changed = "localization_changed";
- translation_locales_idxs_remap = Vector<int>();
- translation_locales_list_created = false;
-
TabContainer *translations = memnew(TabContainer);
translations->set_tab_alignment(TabContainer::ALIGNMENT_LEFT);
translations->set_v_size_flags(Control::SIZE_EXPAND_FILL);
@@ -669,6 +501,10 @@ LocalizationEditor::LocalizationEditor() {
translation_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
tmc->add_child(translation_list);
+ locale_select = memnew(EditorLocaleDialog);
+ locale_select->connect("locale_selected", callable_mp(this, &LocalizationEditor::_translation_res_option_selected));
+ add_child(locale_select);
+
translation_file_open = memnew(EditorFileDialog);
translation_file_open->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILES);
translation_file_open->connect("files_selected", callable_mp(this, &LocalizationEditor::_translation_add));
@@ -731,10 +567,11 @@ LocalizationEditor::LocalizationEditor() {
translation_remap_options->set_column_expand(0, true);
translation_remap_options->set_column_clip_content(0, true);
translation_remap_options->set_column_expand(1, false);
- translation_remap_options->set_column_clip_content(1, true);
- translation_remap_options->set_column_custom_minimum_width(1, 200);
+ translation_remap_options->set_column_clip_content(1, false);
+ translation_remap_options->set_column_custom_minimum_width(1, 250);
translation_remap_options->connect("item_edited", callable_mp(this, &LocalizationEditor::_translation_res_option_changed));
translation_remap_options->connect("button_pressed", callable_mp(this, &LocalizationEditor::_translation_res_option_delete));
+ translation_remap_options->connect("custom_popup_edited", callable_mp(this, &LocalizationEditor::_translation_res_option_popup));
tmc->add_child(translation_remap_options);
translation_res_option_file_open_dialog = memnew(EditorFileDialog);
@@ -745,32 +582,6 @@ LocalizationEditor::LocalizationEditor() {
{
VBoxContainer *tvb = memnew(VBoxContainer);
- tvb->set_name(TTR("Locales Filter"));
- translations->add_child(tvb);
-
- VBoxContainer *tmc = memnew(VBoxContainer);
- tmc->set_v_size_flags(Control::SIZE_EXPAND_FILL);
- tvb->add_child(tmc);
-
- translation_locale_filter_mode = memnew(OptionButton);
- translation_locale_filter_mode->add_item(TTR("Show All Locales"), SHOW_ALL_LOCALES);
- translation_locale_filter_mode->add_item(TTR("Show Selected Locales Only"), SHOW_ONLY_SELECTED_LOCALES);
- translation_locale_filter_mode->select(0);
- translation_locale_filter_mode->connect("item_selected", callable_mp(this, &LocalizationEditor::_translation_filter_mode_changed));
- tmc->add_margin_child(TTR("Filter mode:"), translation_locale_filter_mode);
-
- Label *l = memnew(Label(TTR("Locales:")));
- l->set_theme_type_variation("HeaderSmall");
- tmc->add_child(l);
- translation_filter = memnew(Tree);
- translation_filter->set_v_size_flags(Control::SIZE_EXPAND_FILL);
- translation_filter->set_columns(1);
- translation_filter->connect("item_edited", callable_mp(this, &LocalizationEditor::_translation_filter_option_changed));
- tmc->add_child(translation_filter);
- }
-
- {
- VBoxContainer *tvb = memnew(VBoxContainer);
tvb->set_name(TTR("POT Generation"));
translations->add_child(tvb);
diff --git a/editor/localization_editor.h b/editor/localization_editor.h
index 4c77aca397..cad07dd336 100644
--- a/editor/localization_editor.h
+++ b/editor/localization_editor.h
@@ -33,18 +33,15 @@
#include "core/object/undo_redo.h"
#include "editor_file_dialog.h"
+#include "editor_locale_dialog.h"
#include "scene/gui/tree.h"
class LocalizationEditor : public VBoxContainer {
GDCLASS(LocalizationEditor, VBoxContainer);
- enum LocaleFilter {
- SHOW_ALL_LOCALES,
- SHOW_ONLY_SELECTED_LOCALES,
- };
-
Tree *translation_list;
+ EditorLocaleDialog *locale_select;
EditorFileDialog *translation_file_open;
Button *translation_res_option_add_button;
@@ -52,11 +49,6 @@ class LocalizationEditor : public VBoxContainer {
EditorFileDialog *translation_res_option_file_open_dialog;
Tree *translation_remap;
Tree *translation_remap_options;
- Tree *translation_filter;
- bool translation_locales_list_created;
- OptionButton *translation_locale_filter_mode;
- Vector<TreeItem *> translation_filter_treeitems;
- Vector<int> translation_locales_idxs_remap;
Tree *translation_pot_list;
EditorFileDialog *pot_file_open_dialog;
@@ -78,9 +70,8 @@ class LocalizationEditor : public VBoxContainer {
void _translation_res_option_add(const PackedStringArray &p_paths);
void _translation_res_option_changed();
void _translation_res_option_delete(Object *p_item, int p_column, int p_button);
-
- void _translation_filter_option_changed();
- void _translation_filter_mode_changed(int p_mode);
+ void _translation_res_option_popup(bool p_arrow_clicked);
+ void _translation_res_option_selected(const String &p_locale);
void _pot_add(const PackedStringArray &p_paths);
void _pot_delete(Object *p_item, int p_column, int p_button);
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp
index 10e2f5f1d0..71db40a829 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp
@@ -103,7 +103,7 @@ void AnimationNodeBlendTreeEditor::_property_changed(const StringName &p_propert
}
void AnimationNodeBlendTreeEditor::_update_graph() {
- if (updating) {
+ if (updating || blend_tree.is_null()) {
return;
}
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index 4ce9f40a5e..dcc549ec2a 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -301,7 +301,6 @@ void AnimationPlayerEditor::_animation_selected(int p_which) {
autoplay->set_pressed(current == player->get_autoplay());
AnimationPlayerEditor::get_singleton()->get_track_editor()->update_keying();
- EditorNode::get_singleton()->update_keying();
_animation_key_editor_seek(timeline_position, false);
}
@@ -829,7 +828,6 @@ void AnimationPlayerEditor::_update_player() {
if (!player) {
AnimationPlayerEditor::get_singleton()->get_track_editor()->update_keying();
- EditorNode::get_singleton()->update_keying();
return;
}
@@ -967,16 +965,7 @@ void AnimationPlayerEditor::_animation_duplicate() {
return;
}
- Ref<Animation> new_anim = memnew(Animation);
- List<PropertyInfo> plist;
- anim->get_property_list(&plist);
- for (const PropertyInfo &E : plist) {
- if (E.usage & PROPERTY_USAGE_STORAGE) {
- new_anim->set(E.name, anim->get(E.name));
- }
- }
- new_anim->set_path("");
-
+ Ref<Animation> new_anim = _animation_clone(anim);
String new_name = current;
while (player->has_animation(new_name)) {
new_name = new_name + " (copy)";
@@ -1000,6 +989,44 @@ void AnimationPlayerEditor::_animation_duplicate() {
}
}
+Ref<Animation> AnimationPlayerEditor::_animation_clone(Ref<Animation> p_anim) {
+ Ref<Animation> new_anim = memnew(Animation);
+ List<PropertyInfo> plist;
+ p_anim->get_property_list(&plist);
+
+ for (const PropertyInfo &E : plist) {
+ if (E.usage & PROPERTY_USAGE_STORAGE) {
+ new_anim->set(E.name, p_anim->get(E.name));
+ }
+ }
+ new_anim->set_path("");
+
+ return new_anim;
+}
+
+void AnimationPlayerEditor::_animation_paste(Ref<Animation> p_anim) {
+ String name = p_anim->get_name();
+ if (name.is_empty()) {
+ name = TTR("Pasted Animation");
+ }
+
+ int idx = 1;
+ String base = name;
+ while (player->has_animation(name)) {
+ idx++;
+ name = base + " " + itos(idx);
+ }
+
+ undo_redo->create_action(TTR("Paste Animation"));
+ undo_redo->add_do_method(player, "add_animation", name, p_anim);
+ undo_redo->add_undo_method(player, "remove_animation", name);
+ undo_redo->add_do_method(this, "_animation_player_changed", player);
+ undo_redo->add_undo_method(this, "_animation_player_changed", player);
+ undo_redo->commit_action();
+
+ _select_anim_by_name(name);
+}
+
void AnimationPlayerEditor::_seek_value_changed(float p_value, bool p_set, bool p_timeline_only) {
if (updating || !player || player->is_playing()) {
return;
@@ -1135,31 +1162,22 @@ void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
case TOOL_PASTE_ANIM: {
Ref<Animation> anim2 = EditorSettings::get_singleton()->get_resource_clipboard();
if (!anim2.is_valid()) {
- error_dialog->set_text(TTR("No animation resource on clipboard!"));
+ error_dialog->set_text(TTR("No animation resource in clipboard!"));
error_dialog->popup_centered();
return;
}
-
- String name = anim2->get_name();
- if (name.is_empty()) {
- name = TTR("Pasted Animation");
- }
-
- int idx = 1;
- String base = name;
- while (player->has_animation(name)) {
- idx++;
- name = base + " " + itos(idx);
+ Ref<Animation> new_anim = _animation_clone(anim2);
+ _animation_paste(new_anim);
+ } break;
+ case TOOL_PASTE_ANIM_REF: {
+ Ref<Animation> anim2 = EditorSettings::get_singleton()->get_resource_clipboard();
+ if (!anim2.is_valid()) {
+ error_dialog->set_text(TTR("No animation resource in clipboard!"));
+ error_dialog->popup_centered();
+ return;
}
- undo_redo->create_action(TTR("Paste Animation"));
- undo_redo->add_do_method(player, "add_animation", name, anim2);
- undo_redo->add_undo_method(player, "remove_animation", name);
- undo_redo->add_do_method(this, "_animation_player_changed", player);
- undo_redo->add_undo_method(this, "_animation_player_changed", player);
- undo_redo->commit_action();
-
- _select_anim_by_name(name);
+ _animation_paste(anim2);
} break;
case TOOL_EDIT_RESOURCE: {
if (!animation->get_item_count()) {
@@ -1587,6 +1605,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
tool_anim->get_popup()->add_separator();
tool_anim->get_popup()->add_shortcut(ED_SHORTCUT("animation_player_editor/copy_animation", TTR("Copy")), TOOL_COPY_ANIM);
tool_anim->get_popup()->add_shortcut(ED_SHORTCUT("animation_player_editor/paste_animation", TTR("Paste")), TOOL_PASTE_ANIM);
+ tool_anim->get_popup()->add_shortcut(ED_SHORTCUT("animation_player_editor/paste_animation_as_reference", TTR("Paste As Reference")), TOOL_PASTE_ANIM_REF);
tool_anim->get_popup()->add_separator();
tool_anim->get_popup()->add_shortcut(ED_SHORTCUT("animation_player_editor/duplicate_animation", TTR("Duplicate")), TOOL_DUPLICATE_ANIM);
tool_anim->get_popup()->add_separator();
@@ -1774,11 +1793,39 @@ AnimationPlayerEditor::~AnimationPlayerEditor() {
void AnimationPlayerEditorPlugin::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
+ Node3DEditor::get_singleton()->connect("transform_key_request", callable_mp(this, &AnimationPlayerEditorPlugin::_transform_key_request));
+ editor->get_inspector()->connect("property_keyed", callable_mp(this, &AnimationPlayerEditorPlugin::_property_keyed));
+ anim_editor->get_track_editor()->connect("keying_changed", callable_mp(this, &AnimationPlayerEditorPlugin::_update_keying));
+ editor->get_inspector()->connect("edited_object_changed", callable_mp(anim_editor->get_track_editor(), &AnimationTrackEditor::update_keying));
set_force_draw_over_forwarding_enabled();
} break;
}
}
+void AnimationPlayerEditorPlugin::_property_keyed(const String &p_keyed, const Variant &p_value, bool p_advance) {
+ if (!anim_editor->get_track_editor()->has_keying()) {
+ return;
+ }
+ anim_editor->get_track_editor()->insert_value_key(p_keyed, p_value, p_advance);
+}
+
+void AnimationPlayerEditorPlugin::_transform_key_request(Object *sp, const String &p_sub, const Transform3D &p_key) {
+ if (!anim_editor->get_track_editor()->has_keying()) {
+ return;
+ }
+ Node3D *s = Object::cast_to<Node3D>(sp);
+ if (!s) {
+ return;
+ }
+ anim_editor->get_track_editor()->insert_transform_key(s, p_sub, Animation::TYPE_POSITION_3D, p_key.origin);
+ anim_editor->get_track_editor()->insert_transform_key(s, p_sub, Animation::TYPE_ROTATION_3D, p_key.basis.get_rotation_quaternion());
+ anim_editor->get_track_editor()->insert_transform_key(s, p_sub, Animation::TYPE_SCALE_3D, p_key.basis.get_scale());
+}
+
+void AnimationPlayerEditorPlugin::_update_keying() {
+ editor->get_inspector()->set_keying(anim_editor->get_track_editor()->has_keying());
+}
+
void AnimationPlayerEditorPlugin::edit(Object *p_object) {
anim_editor->set_undo_redo(&get_undo_redo());
if (!p_object) {
diff --git a/editor/plugins/animation_player_editor_plugin.h b/editor/plugins/animation_player_editor_plugin.h
index 4e7ea46c1d..06dca11aff 100644
--- a/editor/plugins/animation_player_editor_plugin.h
+++ b/editor/plugins/animation_player_editor_plugin.h
@@ -60,6 +60,7 @@ class AnimationPlayerEditor : public VBoxContainer {
TOOL_REMOVE_ANIM,
TOOL_COPY_ANIM,
TOOL_PASTE_ANIM,
+ TOOL_PASTE_ANIM_REF,
TOOL_EDIT_RESOURCE
};
@@ -183,6 +184,8 @@ class AnimationPlayerEditor : public VBoxContainer {
void _animation_blend();
void _animation_edit();
void _animation_duplicate();
+ Ref<Animation> _animation_clone(const Ref<Animation> p_anim);
+ void _animation_paste(const Ref<Animation> p_anim);
void _animation_resource_edit();
void _scale_changed(const String &p_scale);
void _save_animation(String p_file);
@@ -252,6 +255,10 @@ class AnimationPlayerEditorPlugin : public EditorPlugin {
protected:
void _notification(int p_what);
+ void _property_keyed(const String &p_keyed, const Variant &p_value, bool p_advance);
+ void _transform_key_request(Object *sp, const String &p_sub, const Transform3D &p_key);
+ void _update_keying();
+
public:
virtual Dictionary get_state() const override { return anim_editor->get_state(); }
virtual void set_state(const Dictionary &p_state) override { anim_editor->set_state(p_state); }
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index e6ca8e2401..07f0a83c6e 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -369,19 +369,19 @@ void EditorAssetLibraryItemDownload::_http_download_completed(int p_status, int
download_error->set_text(TTR("Asset Download Error:") + "\n" + error_text);
download_error->popup_centered();
// Let the user retry the download.
- retry->show();
+ retry_button->show();
return;
}
- install->set_disabled(false);
- status->set_text(TTR("Success!"));
+ install_button->set_disabled(false);
+ status->set_text(TTR("Ready to install!"));
// Make the progress bar invisible but don't reflow other Controls around it.
progress->set_modulate(Color(0, 0, 0, 0));
set_process(false);
// Automatically prompt for installation once the download is completed.
- _install();
+ install();
}
void EditorAssetLibraryItemDownload::configure(const String &p_title, int p_asset_id, const Ref<Texture2D> &p_preview, const String &p_download_url, const String &p_sha256_hash) {
@@ -398,11 +398,11 @@ void EditorAssetLibraryItemDownload::configure(const String &p_title, int p_asse
void EditorAssetLibraryItemDownload::_notification(int p_what) {
switch (p_what) {
- // FIXME: The editor crashes if 'NOTICATION_THEME_CHANGED' is used.
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("TabContainer")));
- dismiss->set_normal_texture(get_theme_icon(SNAME("Close"), SNAME("EditorIcons")));
+ panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("AssetLib")));
+ status->add_theme_color_override("font_color", get_theme_color(SNAME("status_color"), SNAME("AssetLib")));
+ dismiss_button->set_normal_texture(get_theme_icon(SNAME("dismiss"), SNAME("AssetLib")));
} break;
case NOTIFICATION_PROCESS: {
// Make the progress bar visible again when retrying the download.
@@ -462,7 +462,11 @@ void EditorAssetLibraryItemDownload::_close() {
queue_delete();
}
-void EditorAssetLibraryItemDownload::_install() {
+bool EditorAssetLibraryItemDownload::can_install() const {
+ return !install_button->is_disabled();
+}
+
+void EditorAssetLibraryItemDownload::install() {
String file = download->get_download_file();
if (external_install) {
@@ -476,7 +480,7 @@ void EditorAssetLibraryItemDownload::_install() {
void EditorAssetLibraryItemDownload::_make_request() {
// Hide the Retry button if we've just pressed it.
- retry->hide();
+ retry_button->hide();
download->cancel_request();
download->set_download_file(EditorPaths::get_singleton()->get_cache_dir().plus_file("tmp_asset_" + itos(asset_id)) + ".zip");
@@ -494,9 +498,14 @@ void EditorAssetLibraryItemDownload::_bind_methods() {
}
EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
+ panel = memnew(PanelContainer);
+ add_child(panel);
+
HBoxContainer *hb = memnew(HBoxContainer);
- add_child(hb);
+ panel->add_child(hb);
icon = memnew(TextureRect);
+ icon->set_stretch_mode(TextureRect::STRETCH_KEEP_ASPECT_CENTERED);
+ icon->set_v_size_flags(0);
hb->add_child(icon);
VBoxContainer *vb = memnew(VBoxContainer);
@@ -509,9 +518,9 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
title_hb->add_child(title);
title->set_h_size_flags(Control::SIZE_EXPAND_FILL);
- dismiss = memnew(TextureButton);
- dismiss->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDownload::_close));
- title_hb->add_child(dismiss);
+ dismiss_button = memnew(TextureButton);
+ dismiss_button->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDownload::_close));
+ title_hb->add_child(dismiss_button);
title->set_clip_text(true);
@@ -519,7 +528,6 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
status = memnew(Label(TTR("Idle")));
vb->add_child(status);
- status->add_theme_color_override("font_color", Color(0.5, 0.5, 0.5));
progress = memnew(ProgressBar);
vb->add_child(progress);
@@ -527,32 +535,32 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
vb->add_child(hb2);
hb2->add_spacer();
- install = memnew(Button);
- install->set_text(TTR("Install..."));
- install->set_disabled(true);
- install->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDownload::_install));
+ install_button = memnew(Button);
+ install_button->set_text(TTR("Install..."));
+ install_button->set_disabled(true);
+ install_button->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDownload::install));
- retry = memnew(Button);
- retry->set_text(TTR("Retry"));
- retry->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDownload::_make_request));
+ retry_button = memnew(Button);
+ retry_button->set_text(TTR("Retry"));
+ retry_button->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDownload::_make_request));
// Only show the Retry button in case of a failure.
- retry->hide();
+ retry_button->hide();
- hb2->add_child(retry);
- hb2->add_child(install);
+ hb2->add_child(retry_button);
+ hb2->add_child(install_button);
set_custom_minimum_size(Size2(310, 0) * EDSCALE);
download = memnew(HTTPRequest);
- add_child(download);
+ panel->add_child(download);
download->connect("request_completed", callable_mp(this, &EditorAssetLibraryItemDownload::_http_download_completed));
setup_http_request(download);
download_error = memnew(AcceptDialog);
- add_child(download_error);
+ panel->add_child(download_error);
download_error->set_title(TTR("Download Error"));
asset_installer = memnew(EditorAssetInstaller);
- add_child(asset_installer);
+ panel->add_child(asset_installer);
asset_installer->connect("confirmed", callable_mp(this, &EditorAssetLibraryItemDownload::_close));
prev_status = -1;
@@ -638,14 +646,10 @@ void EditorAssetLibrary::unhandled_key_input(const Ref<InputEvent> &p_event) {
void EditorAssetLibrary::_install_asset() {
ERR_FAIL_COND(!description);
- for (int i = 0; i < downloads_hb->get_child_count(); i++) {
- EditorAssetLibraryItemDownload *d = Object::cast_to<EditorAssetLibraryItemDownload>(downloads_hb->get_child(i));
- if (d && d->get_asset_id() == description->get_asset_id()) {
- if (EditorNode::get_singleton() != nullptr) {
- EditorNode::get_singleton()->show_warning(TTR("Download for this asset is already in progress!"));
- }
- return;
- }
+ EditorAssetLibraryItemDownload *d = _get_asset_in_progress(description->get_asset_id());
+ if (d) {
+ d->install();
+ return;
}
EditorAssetLibraryItemDownload *download = memnew(EditorAssetLibraryItemDownload);
@@ -1263,6 +1267,20 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const
description->configure(r["title"], r["asset_id"], category_map[r["category_id"]], r["category_id"], r["author"], r["author_id"], r["cost"], r["version"], r["version_string"], r["description"], r["download_url"], r["browse_url"], r["download_hash"]);
+ EditorAssetLibraryItemDownload *download_item = _get_asset_in_progress(description->get_asset_id());
+ if (download_item) {
+ if (download_item->can_install()) {
+ description->get_ok_button()->set_text(TTR("Install"));
+ description->get_ok_button()->set_disabled(false);
+ } else {
+ description->get_ok_button()->set_text(TTR("Downloading..."));
+ description->get_ok_button()->set_disabled(true);
+ }
+ } else {
+ description->get_ok_button()->set_text(TTR("Download"));
+ description->get_ok_button()->set_disabled(false);
+ }
+
if (r.has("icon_url") && !r["icon_url"].operator String().is_empty()) {
_request_image(description->get_instance_id(), r["icon_url"], IMAGE_QUEUE_ICON, 0);
}
@@ -1320,6 +1338,17 @@ void EditorAssetLibrary::_manage_plugins() {
ProjectSettingsEditor::get_singleton()->set_plugins_page();
}
+EditorAssetLibraryItemDownload *EditorAssetLibrary::_get_asset_in_progress(int p_asset_id) const {
+ for (int i = 0; i < downloads_hb->get_child_count(); i++) {
+ EditorAssetLibraryItemDownload *d = Object::cast_to<EditorAssetLibraryItemDownload>(downloads_hb->get_child(i));
+ if (d && d->get_asset_id() == p_asset_id) {
+ return d;
+ }
+ }
+
+ return nullptr;
+}
+
void EditorAssetLibrary::_install_external_asset(String p_zip_path, String p_title) {
emit_signal(SNAME("install_asset"), p_zip_path, p_title);
}
diff --git a/editor/plugins/asset_library_editor_plugin.h b/editor/plugins/asset_library_editor_plugin.h
index d797608c24..29d26411f3 100644
--- a/editor/plugins/asset_library_editor_plugin.h
+++ b/editor/plugins/asset_library_editor_plugin.h
@@ -39,6 +39,7 @@
#include "scene/gui/grid_container.h"
#include "scene/gui/line_edit.h"
#include "scene/gui/link_button.h"
+#include "scene/gui/margin_container.h"
#include "scene/gui/option_button.h"
#include "scene/gui/panel_container.h"
#include "scene/gui/progress_bar.h"
@@ -126,15 +127,16 @@ public:
EditorAssetLibraryItemDescription();
};
-class EditorAssetLibraryItemDownload : public PanelContainer {
- GDCLASS(EditorAssetLibraryItemDownload, PanelContainer);
+class EditorAssetLibraryItemDownload : public MarginContainer {
+ GDCLASS(EditorAssetLibraryItemDownload, MarginContainer);
+ PanelContainer *panel;
TextureRect *icon;
Label *title;
ProgressBar *progress;
- Button *install;
- Button *retry;
- TextureButton *dismiss;
+ Button *install_button;
+ Button *retry_button;
+ TextureButton *dismiss_button;
AcceptDialog *download_error;
HTTPRequest *download;
@@ -151,7 +153,6 @@ class EditorAssetLibraryItemDownload : public PanelContainer {
EditorAssetInstaller *asset_installer;
void _close();
- void _install();
void _make_request();
void _http_download_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data);
@@ -163,6 +164,10 @@ public:
void set_external_install(bool p_enable) { external_install = p_enable; }
int get_asset_id() { return asset_id; }
void configure(const String &p_title, int p_asset_id, const Ref<Texture2D> &p_preview, const String &p_download_url, const String &p_sha256_hash);
+
+ bool can_install() const;
+ void install();
+
EditorAssetLibraryItemDownload();
};
@@ -286,6 +291,7 @@ class EditorAssetLibrary : public PanelContainer {
void _api_request(const String &p_request, RequestType p_request_type, const String &p_arguments = "");
void _http_request_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data);
void _filter_debounce_timer_timeout();
+ EditorAssetLibraryItemDownload *_get_asset_in_progress(int p_asset_id) const;
void _repository_changed(int p_repository_id);
void _support_toggled(int p_support);
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index cb84e7ea65..14f488f096 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -3517,7 +3517,7 @@ void CanvasItemEditor::_draw_axis() {
Color area_axis_color = EditorSettings::get_singleton()->get("editors/2d/viewport_border_color");
- Size2 screen_size = Size2(ProjectSettings::get_singleton()->get("display/window/size/width"), ProjectSettings::get_singleton()->get("display/window/size/height"));
+ Size2 screen_size = Size2(ProjectSettings::get_singleton()->get("display/window/size/viewport_width"), ProjectSettings::get_singleton()->get("display/window/size/viewport_height"));
Vector2 screen_endpoints[4] = {
transform.xform(Vector2(0, 0)),
@@ -4010,7 +4010,7 @@ void CanvasItemEditor::_update_scrollbars() {
Size2 vmin = v_scroll->get_minimum_size();
// Get the visible frame.
- Size2 screen_rect = Size2(ProjectSettings::get_singleton()->get("display/window/size/width"), ProjectSettings::get_singleton()->get("display/window/size/height"));
+ Size2 screen_rect = Size2(ProjectSettings::get_singleton()->get("display/window/size/viewport_width"), ProjectSettings::get_singleton()->get("display/window/size/viewport_height"));
Rect2 local_rect = Rect2(Point2(), viewport->get_size() - Size2(vmin.width, hmin.height));
// Calculate scrollable area.
@@ -5129,8 +5129,22 @@ void CanvasItemEditor::remove_control_from_menu_panel(Control *p_control) {
hbc_context_menu->remove_child(p_control);
}
-HSplitContainer *CanvasItemEditor::get_palette_split() {
- return palette_split;
+void CanvasItemEditor::add_control_to_left_panel(Control *p_control) {
+ left_panel_split->add_child(p_control);
+ left_panel_split->move_child(p_control, 0);
+}
+
+void CanvasItemEditor::add_control_to_right_panel(Control *p_control) {
+ right_panel_split->add_child(p_control);
+ right_panel_split->move_child(p_control, 1);
+}
+
+void CanvasItemEditor::remove_control_from_left_panel(Control *p_control) {
+ left_panel_split->remove_child(p_control);
+}
+
+void CanvasItemEditor::remove_control_from_right_panel(Control *p_control) {
+ right_panel_split->remove_child(p_control);
}
VSplitContainer *CanvasItemEditor::get_bottom_split() {
@@ -5221,12 +5235,16 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
add_child(bottom_split);
bottom_split->set_v_size_flags(Control::SIZE_EXPAND_FILL);
- palette_split = memnew(HSplitContainer);
- bottom_split->add_child(palette_split);
- palette_split->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ left_panel_split = memnew(HSplitContainer);
+ bottom_split->add_child(left_panel_split);
+ left_panel_split->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+
+ right_panel_split = memnew(HSplitContainer);
+ left_panel_split->add_child(right_panel_split);
+ right_panel_split->set_v_size_flags(Control::SIZE_EXPAND_FILL);
viewport_scrollable = memnew(Control);
- palette_split->add_child(viewport_scrollable);
+ right_panel_split->add_child(viewport_scrollable);
viewport_scrollable->set_mouse_filter(MOUSE_FILTER_PASS);
viewport_scrollable->set_clip_contents(true);
viewport_scrollable->set_v_size_flags(Control::SIZE_EXPAND_FILL);
diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h
index 8bba5130d4..d58fb17356 100644
--- a/editor/plugins/canvas_item_editor_plugin.h
+++ b/editor/plugins/canvas_item_editor_plugin.h
@@ -527,7 +527,8 @@ private:
void _update_override_camera_button(bool p_game_running);
- HSplitContainer *palette_split;
+ HSplitContainer *left_panel_split;
+ HSplitContainer *right_panel_split;
VSplitContainer *bottom_split;
void _update_context_menu_stylebox();
@@ -571,7 +572,12 @@ public:
void add_control_to_menu_panel(Control *p_control);
void remove_control_from_menu_panel(Control *p_control);
- HSplitContainer *get_palette_split();
+ void add_control_to_left_panel(Control *p_control);
+ void remove_control_from_left_panel(Control *p_control);
+
+ void add_control_to_right_panel(Control *p_control);
+ void remove_control_from_right_panel(Control *p_control);
+
VSplitContainer *get_bottom_split();
Control *get_viewport_control() { return viewport; }
diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp
index d82d0c6ffc..95786176ee 100644
--- a/editor/plugins/mesh_library_editor_plugin.cpp
+++ b/editor/plugins/mesh_library_editor_plugin.cpp
@@ -136,9 +136,11 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
continue;
}
- //Transform3D shape_transform = sb->shape_owner_get_transform(E);
-
- //shape_transform.set_origin(shape_transform.get_origin() - phys_offset);
+ Transform3D shape_transform;
+ if (p_apply_xforms) {
+ shape_transform = mi->get_transform();
+ }
+ shape_transform *= sb->get_transform() * sb->shape_owner_get_transform(E);
for (int k = 0; k < sb->shape_owner_get_shape_count(E); k++) {
Ref<Shape3D> collision = sb->shape_owner_get_shape(E, k);
@@ -147,7 +149,7 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
}
MeshLibrary::ShapeData shape_data;
shape_data.shape = collision;
- shape_data.local_transform = sb->get_transform() * sb->shape_owner_get_transform(E);
+ shape_data.local_transform = shape_transform;
collisions.push_back(shape_data);
}
}
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 6ea8fba9b5..44f8d1a2bb 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -3064,7 +3064,7 @@ void Node3DEditorViewport::_draw() {
Math::round(2 * EDSCALE));
}
if (previewing) {
- Size2 ss = Size2(ProjectSettings::get_singleton()->get("display/window/size/width"), ProjectSettings::get_singleton()->get("display/window/size/height"));
+ Size2 ss = Size2(ProjectSettings::get_singleton()->get("display/window/size/viewport_width"), ProjectSettings::get_singleton()->get("display/window/size/viewport_height"));
float aspect = ss.aspect();
Size2 s = get_size();
@@ -6880,8 +6880,46 @@ VSplitContainer *Node3DEditor::get_shader_split() {
return shader_split;
}
-HSplitContainer *Node3DEditor::get_palette_split() {
- return palette_split;
+void Node3DEditor::add_control_to_left_panel(Control *p_control) {
+ left_panel_split->add_child(p_control);
+ left_panel_split->move_child(p_control, 0);
+}
+
+void Node3DEditor::add_control_to_right_panel(Control *p_control) {
+ right_panel_split->add_child(p_control);
+ right_panel_split->move_child(p_control, 1);
+}
+
+void Node3DEditor::remove_control_from_left_panel(Control *p_control) {
+ left_panel_split->remove_child(p_control);
+}
+
+void Node3DEditor::remove_control_from_right_panel(Control *p_control) {
+ right_panel_split->remove_child(p_control);
+}
+
+void Node3DEditor::move_control_to_left_panel(Control *p_control) {
+ ERR_FAIL_NULL(p_control);
+ if (p_control->get_parent() == left_panel_split) {
+ return;
+ }
+
+ ERR_FAIL_COND(p_control->get_parent() != right_panel_split);
+ right_panel_split->remove_child(p_control);
+
+ add_control_to_left_panel(p_control);
+}
+
+void Node3DEditor::move_control_to_right_panel(Control *p_control) {
+ ERR_FAIL_NULL(p_control);
+ if (p_control->get_parent() == right_panel_split) {
+ return;
+ }
+
+ ERR_FAIL_COND(p_control->get_parent() != left_panel_split);
+ left_panel_split->remove_child(p_control);
+
+ add_control_to_right_panel(p_control);
}
void Node3DEditor::_request_gizmo(Object *p_obj) {
@@ -7534,13 +7572,17 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) {
/* REST OF MENU */
- palette_split = memnew(HSplitContainer);
- palette_split->set_v_size_flags(SIZE_EXPAND_FILL);
- vbc->add_child(palette_split);
+ left_panel_split = memnew(HSplitContainer);
+ left_panel_split->set_v_size_flags(SIZE_EXPAND_FILL);
+ vbc->add_child(left_panel_split);
+
+ right_panel_split = memnew(HSplitContainer);
+ right_panel_split->set_v_size_flags(SIZE_EXPAND_FILL);
+ left_panel_split->add_child(right_panel_split);
shader_split = memnew(VSplitContainer);
shader_split->set_h_size_flags(SIZE_EXPAND_FILL);
- palette_split->add_child(shader_split);
+ right_panel_split->add_child(shader_split);
viewport_base = memnew(Node3DEditorViewportContainer);
shader_split->add_child(viewport_base);
viewport_base->set_v_size_flags(SIZE_EXPAND_FILL);
@@ -8001,7 +8043,6 @@ Node3DEditorPlugin::Node3DEditorPlugin(EditorNode *p_node) {
editor->get_main_control()->add_child(spatial_editor);
spatial_editor->hide();
- spatial_editor->connect("transform_key_request", Callable(editor->get_inspector_dock(), "_transform_keyed"));
}
Node3DEditorPlugin::~Node3DEditorPlugin() {
diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h
index da560f4d83..20a782c8a8 100644
--- a/editor/plugins/node_3d_editor_plugin.h
+++ b/editor/plugins/node_3d_editor_plugin.h
@@ -527,7 +527,8 @@ private:
Node3DEditorViewportContainer *viewport_base;
Node3DEditorViewport *viewports[VIEWPORTS_COUNT];
VSplitContainer *shader_split;
- HSplitContainer *palette_split;
+ HSplitContainer *left_panel_split;
+ HSplitContainer *right_panel_split;
/////
@@ -801,8 +802,16 @@ public:
void add_control_to_menu_panel(Control *p_control);
void remove_control_from_menu_panel(Control *p_control);
+ void add_control_to_left_panel(Control *p_control);
+ void remove_control_from_left_panel(Control *p_control);
+
+ void add_control_to_right_panel(Control *p_control);
+ void remove_control_from_right_panel(Control *p_control);
+
+ void move_control_to_left_panel(Control *p_control);
+ void move_control_to_right_panel(Control *p_control);
+
VSplitContainer *get_shader_split();
- HSplitContainer *get_palette_split();
Node3D *get_single_selected_node() { return selected; }
bool is_current_selected_gizmo(const EditorNode3DGizmo *p_gizmo);
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index f1e5e7612b..468f5aeb18 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -2347,7 +2347,7 @@ bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_gra
// If we delete a script within the filesystem, the original resource path
// is lost, so keep it as metadata to figure out the exact tab to delete.
se->set_meta("_edit_res_path", p_resource->get_path());
- se->set_tooltip_request_func("_get_debug_tooltip", this);
+ se->set_tooltip_request_func(callable_mp(this, &ScriptEditor::_get_debug_tooltip));
if (se->get_edit_menu()) {
se->get_edit_menu()->hide();
menu_hb->add_child(se->get_edit_menu());
@@ -3547,7 +3547,6 @@ void ScriptEditor::_bind_methods() {
ClassDB::bind_method("_goto_script_line2", &ScriptEditor::_goto_script_line2);
ClassDB::bind_method("_copy_script_path", &ScriptEditor::_copy_script_path);
- ClassDB::bind_method("_get_debug_tooltip", &ScriptEditor::_get_debug_tooltip);
ClassDB::bind_method("_update_script_connections", &ScriptEditor::_update_script_connections);
ClassDB::bind_method("_help_class_open", &ScriptEditor::_help_class_open);
ClassDB::bind_method("_live_auto_reload_running_scripts", &ScriptEditor::_live_auto_reload_running_scripts);
diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h
index ca409e15ca..4093054b2c 100644
--- a/editor/plugins/script_editor_plugin.h
+++ b/editor/plugins/script_editor_plugin.h
@@ -165,7 +165,7 @@ public:
virtual bool show_members_overview() = 0;
- virtual void set_tooltip_request_func(String p_method, Object *p_obj) = 0;
+ virtual void set_tooltip_request_func(const Callable &p_toolip_callback) = 0;
virtual Control *get_edit_menu() = 0;
virtual void clear_edit_menu() = 0;
virtual void set_find_replace_bar(FindReplaceBar *p_bar) = 0;
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index ab094f4dc6..b765091d2b 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -1375,8 +1375,10 @@ void ScriptTextEditor::clear_breakpoints() {
code_editor->get_text_editor()->clear_breakpointed_lines();
}
-void ScriptTextEditor::set_tooltip_request_func(String p_method, Object *p_obj) {
- code_editor->get_text_editor()->set_tooltip_request_func(p_obj, p_method, this);
+void ScriptTextEditor::set_tooltip_request_func(const Callable &p_toolip_callback) {
+ Variant args[1] = { this };
+ const Variant *argp[] = { &args[0] };
+ code_editor->get_text_editor()->set_tooltip_request_func(p_toolip_callback.bind(argp, 1));
}
void ScriptTextEditor::set_debugger_active(bool p_active) {
diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h
index 6e67444489..bc674ce964 100644
--- a/editor/plugins/script_text_editor.h
+++ b/editor/plugins/script_text_editor.h
@@ -233,7 +233,7 @@ public:
virtual bool show_members_overview() override;
- virtual void set_tooltip_request_func(String p_method, Object *p_obj) override;
+ virtual void set_tooltip_request_func(const Callable &p_toolip_callback) override;
virtual void set_debugger_active(bool p_active) override;
diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp
index e1b27cb045..169ce29438 100644
--- a/editor/plugins/skeleton_3d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_3d_editor_plugin.cpp
@@ -149,6 +149,9 @@ void BoneTransformEditor::set_target(const String &p_prop) {
void BoneTransformEditor::_property_keyed(const String &p_path, bool p_advance) {
AnimationTrackEditor *te = AnimationPlayerEditor::get_singleton()->get_track_editor();
+ if (!te->has_keying()) {
+ return;
+ }
PackedStringArray split = p_path.split("/");
if (split.size() == 3 && split[0] == "bones") {
int bone_idx = split[1].to_int();
diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp
index 12d13571f8..940f269803 100644
--- a/editor/plugins/text_editor.cpp
+++ b/editor/plugins/text_editor.cpp
@@ -272,8 +272,10 @@ void TextEditor::update_settings() {
code_editor->update_editor_settings();
}
-void TextEditor::set_tooltip_request_func(String p_method, Object *p_obj) {
- code_editor->get_text_editor()->set_tooltip_request_func(p_obj, p_method, this);
+void TextEditor::set_tooltip_request_func(const Callable &p_toolip_callback) {
+ Variant args[1] = { this };
+ const Variant *argp[] = { &args[0] };
+ code_editor->get_text_editor()->set_tooltip_request_func(p_toolip_callback.bind(argp, 1));
}
Control *TextEditor::get_edit_menu() {
diff --git a/editor/plugins/text_editor.h b/editor/plugins/text_editor.h
index d3fb0c0a16..d03385d79e 100644
--- a/editor/plugins/text_editor.h
+++ b/editor/plugins/text_editor.h
@@ -135,7 +135,7 @@ public:
virtual bool show_members_overview() override;
virtual bool can_lose_focus_on_node_selection() override { return true; }
virtual void set_debugger_active(bool p_active) override;
- virtual void set_tooltip_request_func(String p_method, Object *p_obj) override;
+ virtual void set_tooltip_request_func(const Callable &p_toolip_callback) override;
virtual void add_callback(const String &p_function, PackedStringArray p_args) override;
void update_toggle_scripts_button() override;
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 481ff1a781..c971bb6473 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -506,12 +506,16 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
} break;
case Variant::STRING: {
- if (hint == PROPERTY_HINT_FILE || hint == PROPERTY_HINT_GLOBAL_FILE) {
+ if (hint == PROPERTY_HINT_LOCALE_ID) {
+ List<String> names;
+ names.push_back(TTR("Locale..."));
+ names.push_back(TTR("Clear"));
+ config_action_buttons(names);
+ } else if (hint == PROPERTY_HINT_FILE || hint == PROPERTY_HINT_GLOBAL_FILE) {
List<String> names;
names.push_back(TTR("File..."));
names.push_back(TTR("Clear"));
config_action_buttons(names);
-
} else if (hint == PROPERTY_HINT_DIR || hint == PROPERTY_HINT_GLOBAL_DIR) {
List<String> names;
names.push_back(TTR("Dir..."));
@@ -1034,6 +1038,14 @@ void CustomPropertyEditor::_file_selected(String p_file) {
}
}
+void CustomPropertyEditor::_locale_selected(String p_locale) {
+ if (type == Variant::STRING && hint == PROPERTY_HINT_LOCALE_ID) {
+ v = p_locale;
+ emit_signal(SNAME("variant_changed"));
+ hide();
+ }
+}
+
void CustomPropertyEditor::_type_create_selected(int p_idx) {
if (type == Variant::INT || type == Variant::FLOAT) {
float newval = 0;
@@ -1177,7 +1189,8 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
case Variant::STRING: {
if (hint == PROPERTY_HINT_MULTILINE_TEXT) {
hide();
-
+ } else if (hint == PROPERTY_HINT_LOCALE_ID) {
+ locale->popup_locale_dialog();
} else if (hint == PROPERTY_HINT_FILE || hint == PROPERTY_HINT_GLOBAL_FILE) {
if (p_which == 0) {
if (hint == PROPERTY_HINT_FILE) {
@@ -1821,6 +1834,12 @@ CustomPropertyEditor::CustomPropertyEditor() {
file->connect("file_selected", callable_mp(this, &CustomPropertyEditor::_file_selected));
file->connect("dir_selected", callable_mp(this, &CustomPropertyEditor::_file_selected));
+ locale = memnew(EditorLocaleDialog);
+ value_vbox->add_child(locale);
+ locale->hide();
+
+ locale->connect("locale_selected", callable_mp(this, &CustomPropertyEditor::_locale_selected));
+
error = memnew(ConfirmationDialog);
error->set_title(TTR("Error!"));
value_vbox->add_child(error);
diff --git a/editor/property_editor.h b/editor/property_editor.h
index 9d88aaf26d..298acb3c01 100644
--- a/editor/property_editor.h
+++ b/editor/property_editor.h
@@ -32,6 +32,7 @@
#define PROPERTY_EDITOR_H
#include "editor/editor_file_dialog.h"
+#include "editor/editor_locale_dialog.h"
#include "editor/scene_tree_editor.h"
#include "scene/gui/button.h"
#include "scene/gui/check_box.h"
@@ -97,6 +98,7 @@ class CustomPropertyEditor : public PopupPanel {
PopupMenu *menu;
SceneTreeDialog *scene_tree;
EditorFileDialog *file;
+ EditorLocaleDialog *locale;
ConfirmationDialog *error;
String name;
Variant::Type type;
@@ -136,6 +138,7 @@ class CustomPropertyEditor : public PopupPanel {
void _text_edit_changed();
void _file_selected(String p_file);
+ void _locale_selected(String p_locale);
void _modified(String p_string);
real_t _parse_real_expression(String text);
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index 2e72b17651..c9acb7b668 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -361,8 +361,12 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
tree->edit_selected();
}
} break;
- case TOOL_NEW:
- case TOOL_REPARENT_TO_NEW_NODE: {
+ case TOOL_REPARENT_TO_NEW_NODE:
+ if (!_validate_no_foreign()) {
+ break;
+ }
+ [[fallthrough]];
+ case TOOL_NEW: {
if (!profile_allow_editing) {
break;
}
@@ -441,8 +445,11 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
break;
}
+ bool was_empty = false;
if (!node_clipboard.is_empty()) {
_clear_clipboard();
+ } else {
+ was_empty = true;
}
clipboard_source_scene = editor->get_edited_scene()->get_scene_file_path();
@@ -460,81 +467,13 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
if (p_tool == TOOL_CUT) {
_delete_confirm(true);
}
- } break;
- case TOOL_PASTE: {
- if (node_clipboard.is_empty() || !edited_scene) {
- break;
- }
-
- bool has_cycle = false;
- if (!edited_scene->get_scene_file_path().is_empty()) {
- for (Node *E : node_clipboard) {
- if (edited_scene->get_scene_file_path() == E->get_scene_file_path()) {
- has_cycle = true;
- break;
- }
- }
- }
-
- if (has_cycle) {
- current_option = -1;
- accept->set_text(TTR("Can't paste root node into the same scene."));
- accept->popup_centered();
- break;
- }
-
- Node *paste_parent = edited_scene;
- List<Node *> selection = editor_selection->get_selected_node_list();
- if (selection.size() > 0) {
- paste_parent = selection.back()->get();
- }
-
- Node *owner = paste_parent->get_owner();
- if (!owner) {
- owner = paste_parent;
- }
- editor_data->get_undo_redo().create_action(TTR("Paste Node(s)"));
- editor_data->get_undo_redo().add_do_method(editor_selection, "clear");
-
- Map<RES, RES> resource_remap;
- String target_scene = editor->get_edited_scene()->get_scene_file_path();
- if (target_scene != clipboard_source_scene) {
- if (!clipboard_resource_remap.has(target_scene)) {
- Map<RES, RES> remap;
- for (Node *E : node_clipboard) {
- _create_remap_for_node(E, remap);
- }
- clipboard_resource_remap[target_scene] = remap;
- }
- resource_remap = clipboard_resource_remap[target_scene];
+ if (was_empty) {
+ _update_create_root_dialog();
}
-
- for (Node *node : node_clipboard) {
- Map<const Node *, Node *> duplimap;
-
- Node *dup = node->duplicate_from_editor(duplimap, resource_remap);
-
- ERR_CONTINUE(!dup);
-
- editor_data->get_undo_redo().add_do_method(paste_parent, "add_child", dup, true);
-
- for (KeyValue<const Node *, Node *> &E2 : duplimap) {
- Node *d = E2.value;
- editor_data->get_undo_redo().add_do_method(d, "set_owner", owner);
- }
-
- editor_data->get_undo_redo().add_do_method(dup, "set_owner", owner);
- editor_data->get_undo_redo().add_do_method(editor_selection, "add_node", dup);
- editor_data->get_undo_redo().add_undo_method(paste_parent, "remove_child", dup);
- editor_data->get_undo_redo().add_do_reference(dup);
-
- if (node_clipboard.size() == 1) {
- editor_data->get_undo_redo().add_do_method(editor, "push_item", dup);
- }
- }
-
- editor_data->get_undo_redo().commit_action();
+ } break;
+ case TOOL_PASTE: {
+ paste_nodes();
} break;
case TOOL_REPLACE: {
if (!profile_allow_editing) {
@@ -1302,6 +1241,12 @@ void SceneTreeDock::_notification(int p_what) {
button_custom->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
button_custom->connect("pressed", callable_bind(callable_mp(this, &SceneTreeDock::_tool_selected), TOOL_NEW, false));
+ button_clipboard = memnew(Button);
+ node_shortcuts->add_child(button_clipboard);
+ button_clipboard->set_text(TTR("Paste From Clipboard"));
+ button_clipboard->set_icon(get_theme_icon(SNAME("ActionPaste"), SNAME("EditorIcons")));
+ button_clipboard->connect("pressed", callable_bind(callable_mp(this, &SceneTreeDock::_tool_selected), TOOL_PASTE, false));
+
node_shortcuts->add_spacer();
create_root_dialog->add_child(node_shortcuts);
_update_create_root_dialog();
@@ -1326,6 +1271,7 @@ void SceneTreeDock::_notification(int p_what) {
button_3d->set_icon(get_theme_icon(SNAME("Node3D"), SNAME("EditorIcons")));
button_ui->set_icon(get_theme_icon(SNAME("Control"), SNAME("EditorIcons")));
button_custom->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
+ button_clipboard->set_icon(get_theme_icon(SNAME("ActionPaste"), SNAME("EditorIcons")));
filter->set_right_icon(get_theme_icon(SNAME("Search"), SNAME("EditorIcons")));
filter->set_clear_button_enabled(true);
@@ -2621,6 +2567,10 @@ void SceneTreeDock::_script_dropped(String p_file, NodePath p_to) {
}
void SceneTreeDock::_nodes_dragged(Array p_nodes, NodePath p_to, int p_type) {
+ if (!_validate_no_foreign()) {
+ return;
+ }
+
List<Node *> selection = editor_selection->get_selected_node_list();
if (selection.is_empty()) {
@@ -2732,10 +2682,10 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
}
if (profile_allow_editing) {
- menu->add_shortcut(ED_GET_SHORTCUT("scene_tree/cut_node"), TOOL_CUT);
- menu->add_shortcut(ED_GET_SHORTCUT("scene_tree/copy_node"), TOOL_COPY);
+ menu->add_icon_shortcut(get_theme_icon(SNAME("ActionCut"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/cut_node"), TOOL_CUT);
+ menu->add_icon_shortcut(get_theme_icon(SNAME("ActionCopy"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/copy_node"), TOOL_COPY);
if (selection.size() == 1 && !node_clipboard.is_empty()) {
- menu->add_shortcut(ED_GET_SHORTCUT("scene_tree/paste_node"), TOOL_PASTE);
+ menu->add_icon_shortcut(get_theme_icon(SNAME("ActionPaste"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/paste_node"), TOOL_PASTE);
}
menu->add_separator();
}
@@ -3014,6 +2964,108 @@ void SceneTreeDock::open_instance_child_dialog() {
_tool_selected(TOOL_INSTANTIATE, true);
}
+List<Node *> SceneTreeDock::paste_nodes() {
+ List<Node *> pasted_nodes;
+
+ if (node_clipboard.is_empty()) {
+ return pasted_nodes;
+ }
+
+ bool has_cycle = false;
+ if (edited_scene && !edited_scene->get_scene_file_path().is_empty()) {
+ for (Node *E : node_clipboard) {
+ if (edited_scene->get_scene_file_path() == E->get_scene_file_path()) {
+ has_cycle = true;
+ break;
+ }
+ }
+ }
+
+ if (has_cycle) {
+ current_option = -1;
+ accept->set_text(TTR("Can't paste root node into the same scene."));
+ accept->popup_centered();
+ return pasted_nodes;
+ }
+
+ Node *paste_parent = edited_scene;
+ List<Node *> selection = editor_selection->get_selected_node_list();
+ if (selection.size() > 0) {
+ paste_parent = selection.back()->get();
+ }
+
+ Node *owner = nullptr;
+ if (paste_parent) {
+ owner = paste_parent->get_owner();
+ }
+ if (!owner) {
+ owner = paste_parent;
+ }
+
+ UndoRedo &ur = editor_data->get_undo_redo();
+ ur.create_action(TTR("Paste Node(s)"));
+ ur.add_do_method(editor_selection, "clear");
+
+ Map<RES, RES> resource_remap;
+ String target_scene;
+ if (edited_scene) {
+ target_scene = edited_scene->get_scene_file_path();
+ }
+ if (target_scene != clipboard_source_scene) {
+ if (!clipboard_resource_remap.has(target_scene)) {
+ Map<RES, RES> remap;
+ for (Node *E : node_clipboard) {
+ _create_remap_for_node(E, remap);
+ }
+ clipboard_resource_remap[target_scene] = remap;
+ }
+ resource_remap = clipboard_resource_remap[target_scene];
+ }
+
+ for (Node *node : node_clipboard) {
+ Map<const Node *, Node *> duplimap;
+
+ Node *dup = node->duplicate_from_editor(duplimap, resource_remap);
+ ERR_CONTINUE(!dup);
+
+ pasted_nodes.push_back(dup);
+
+ if (!paste_parent) {
+ paste_parent = dup;
+ owner = dup;
+ ur.add_do_method(editor, "set_edited_scene", dup);
+ } else {
+ ur.add_do_method(paste_parent, "add_child", dup, true);
+ }
+
+ for (KeyValue<const Node *, Node *> &E2 : duplimap) {
+ Node *d = E2.value;
+ if (d != dup) {
+ ur.add_do_method(d, "set_owner", owner);
+ }
+ }
+
+ if (dup != owner) {
+ ur.add_do_method(dup, "set_owner", owner);
+ }
+ ur.add_do_method(editor_selection, "add_node", dup);
+
+ if (dup == paste_parent) {
+ ur.add_undo_method(editor, "set_edited_scene", (Object *)nullptr);
+ } else {
+ ur.add_undo_method(paste_parent, "remove_child", dup);
+ }
+ ur.add_do_reference(dup);
+
+ if (node_clipboard.size() == 1) {
+ ur.add_do_method(editor, "push_item", dup);
+ }
+ }
+
+ ur.commit_action();
+ return pasted_nodes;
+}
+
void SceneTreeDock::add_remote_tree_editor(Control *p_remote) {
ERR_FAIL_COND(remote_tree != nullptr);
add_child(p_remote);
@@ -3113,6 +3165,7 @@ void SceneTreeDock::_update_create_root_dialog() {
beginner_nodes->show();
favorite_nodes->hide();
}
+ button_clipboard->set_visible(!node_clipboard.is_empty());
}
}
diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h
index ffaf34cfdc..f442d3fc6b 100644
--- a/editor/scene_tree_dock.h
+++ b/editor/scene_tree_dock.h
@@ -123,6 +123,7 @@ class SceneTreeDock : public VBoxContainer {
Button *button_3d;
Button *button_ui;
Button *button_custom;
+ Button *button_clipboard;
HBoxContainer *button_hb;
Button *edit_local, *edit_remote;
@@ -308,6 +309,8 @@ public:
void open_add_child_dialog();
void open_instance_child_dialog();
+ List<Node *> paste_nodes();
+
ScriptCreateDialog *get_script_create_dialog() { return script_create_dialog; }
SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSelection *p_editor_selection, EditorData &p_editor_data);
diff --git a/main/main.cpp b/main/main.cpp
index 9393e8d99d..8b58641461 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -325,6 +325,7 @@ void Main::print_help(const char *p_binary) {
OS::get_singleton()->print("].\n");
OS::get_singleton()->print(" --rendering-driver <driver> Rendering driver (depends on display driver).\n");
+ OS::get_singleton()->print(" --gpu-index <device_index> Use a specific GPU (run with --verbose to get available device list).\n");
OS::get_singleton()->print(" --text-driver <driver> Text driver (Fonts, BiDi, shaping)\n");
@@ -793,6 +794,14 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
} else if (I->get() == "-w" || I->get() == "--windowed") { // force windowed window
init_windowed = true;
+ } else if (I->get() == "--gpu-index") {
+ if (I->next()) {
+ Engine::singleton->gpu_idx = I->next()->get().to_int();
+ N = I->next()->next();
+ } else {
+ OS::get_singleton()->print("Missing gpu index argument, aborting.\n");
+ goto error;
+ }
} else if (I->get() == "--vk-layers") {
Engine::singleton->use_validation_layers = true;
#ifdef DEBUG_ENABLED
@@ -1297,47 +1306,47 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
// always convert to lower case for consistency in the code
rendering_driver = rendering_driver.to_lower();
- GLOBAL_DEF_BASIC("display/window/size/width", 1024);
- ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/width",
- PropertyInfo(Variant::INT, "display/window/size/width",
+ GLOBAL_DEF_BASIC("display/window/size/viewport_width", 1024);
+ ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/viewport_width",
+ PropertyInfo(Variant::INT, "display/window/size/viewport_width",
PROPERTY_HINT_RANGE,
"0,7680,or_greater")); // 8K resolution
- GLOBAL_DEF_BASIC("display/window/size/height", 600);
- ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/height",
- PropertyInfo(Variant::INT, "display/window/size/height",
+ GLOBAL_DEF_BASIC("display/window/size/viewport_height", 600);
+ ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/viewport_height",
+ PropertyInfo(Variant::INT, "display/window/size/viewport_height",
PROPERTY_HINT_RANGE,
"0,4320,or_greater")); // 8K resolution
GLOBAL_DEF_BASIC("display/window/size/resizable", true);
GLOBAL_DEF_BASIC("display/window/size/borderless", false);
GLOBAL_DEF_BASIC("display/window/size/fullscreen", false);
GLOBAL_DEF("display/window/size/always_on_top", false);
- GLOBAL_DEF("display/window/size/test_width", 0);
- ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/test_width",
+ GLOBAL_DEF("display/window/size/window_width_override", 0);
+ ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/window_width_override",
PropertyInfo(Variant::INT,
- "display/window/size/test_width",
+ "display/window/size/window_width_override",
PROPERTY_HINT_RANGE,
"0,7680,or_greater")); // 8K resolution
- GLOBAL_DEF("display/window/size/test_height", 0);
- ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/test_height",
+ GLOBAL_DEF("display/window/size/window_height_override", 0);
+ ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/window_height_override",
PropertyInfo(Variant::INT,
- "display/window/size/test_height",
+ "display/window/size/window_height_override",
PROPERTY_HINT_RANGE,
"0,4320,or_greater")); // 8K resolution
if (use_custom_res) {
if (!force_res) {
- window_size.width = GLOBAL_GET("display/window/size/width");
- window_size.height = GLOBAL_GET("display/window/size/height");
-
- if (globals->has_setting("display/window/size/test_width") &&
- globals->has_setting("display/window/size/test_height")) {
- int tw = globals->get("display/window/size/test_width");
- if (tw > 0) {
- window_size.width = tw;
+ window_size.width = GLOBAL_GET("display/window/size/viewport_width");
+ window_size.height = GLOBAL_GET("display/window/size/viewport_height");
+
+ if (globals->has_setting("display/window/size/window_width_override") &&
+ globals->has_setting("display/window/size/window_height_override")) {
+ int desired_width = globals->get("display/window/size/window_width_override");
+ if (desired_width > 0) {
+ window_size.width = desired_width;
}
- int th = globals->get("display/window/size/test_height");
- if (th > 0) {
- window_size.height = th;
+ int desired_height = globals->get("display/window/size/window_height_override");
+ if (desired_height > 0) {
+ window_size.height = desired_height;
}
}
}
@@ -1785,7 +1794,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
GLOBAL_DEF("application/config/icon", String());
ProjectSettings::get_singleton()->set_custom_property_info("application/config/icon",
PropertyInfo(Variant::STRING, "application/config/icon",
- PROPERTY_HINT_FILE, "*.png,*.webp,*.svg,*.svgz"));
+ PROPERTY_HINT_FILE, "*.png,*.webp,*.svg"));
GLOBAL_DEF("application/config/macos_native_icon", String());
ProjectSettings::get_singleton()->set_custom_property_info("application/config/macos_native_icon",
@@ -2082,6 +2091,7 @@ bool Main::start() {
GLOBAL_DEF("mono/runtime/unhandled_exception_policy", 0);
#endif
+ Error err;
DocTools doc;
doc.generate(doc_base);
@@ -2103,34 +2113,42 @@ bool Main::start() {
// Create the module documentation directory if it doesn't exist
DirAccess *da = DirAccess::create_for_path(path);
- da->make_dir_recursive(path);
+ err = da->make_dir_recursive(path);
memdelete(da);
+ ERR_FAIL_COND_V_MSG(err != OK, false, "Error: Can't create directory: " + path + ": " + itos(err));
- docsrc.load_classes(path);
print_line("Loading docs from: " + path);
+ err = docsrc.load_classes(path);
+ ERR_FAIL_COND_V_MSG(err != OK, false, "Error loading docs from: " + path + ": " + itos(err));
}
}
String index_path = doc_tool_path.plus_file("doc/classes");
// Create the main documentation directory if it doesn't exist
DirAccess *da = DirAccess::create_for_path(index_path);
- da->make_dir_recursive(index_path);
+ err = da->make_dir_recursive(index_path);
memdelete(da);
+ ERR_FAIL_COND_V_MSG(err != OK, false, "Error: Can't create index directory: " + index_path + ": " + itos(err));
- docsrc.load_classes(index_path);
+ print_line("Loading classes from: " + index_path);
+ err = docsrc.load_classes(index_path);
+ ERR_FAIL_COND_V_MSG(err != OK, false, "Error loading classes from: " + index_path + ": " + itos(err));
checked_paths.insert(index_path);
- print_line("Loading docs from: " + index_path);
print_line("Merging docs...");
doc.merge_from(docsrc);
+
for (Set<String>::Element *E = checked_paths.front(); E; E = E->next()) {
print_line("Erasing old docs at: " + E->get());
- DocTools::erase_classes(E->get());
+ err = DocTools::erase_classes(E->get());
+ ERR_FAIL_COND_V_MSG(err != OK, false, "Error erasing old docs at: " + E->get() + ": " + itos(err));
}
print_line("Generating new docs...");
- doc.save_classes(index_path, doc_data_classes);
+ err = doc.save_classes(index_path, doc_data_classes);
+ ERR_FAIL_COND_V_MSG(err != OK, false, "Error saving new docs:" + itos(err));
+ OS::get_singleton()->set_exit_code(EXIT_SUCCESS);
return false;
}
@@ -2330,8 +2348,8 @@ bool Main::start() {
String stretch_mode = GLOBAL_DEF_BASIC("display/window/stretch/mode", "disabled");
String stretch_aspect = GLOBAL_DEF_BASIC("display/window/stretch/aspect", "keep");
- Size2i stretch_size = Size2i(GLOBAL_DEF_BASIC("display/window/size/width", 0),
- GLOBAL_DEF_BASIC("display/window/size/height", 0));
+ Size2i stretch_size = Size2i(GLOBAL_DEF_BASIC("display/window/size/viewport_width", 0),
+ GLOBAL_DEF_BASIC("display/window/size/viewport_height", 0));
real_t stretch_scale = GLOBAL_DEF_BASIC("display/window/stretch/scale", 1.0);
Window::ContentScaleMode cs_sm = Window::CONTENT_SCALE_MODE_DISABLED;
@@ -2540,13 +2558,6 @@ bool Main::start() {
}
if (project_manager || editor) {
- if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_CONSOLE_WINDOW)) {
- // Hide console window if requested (Windows-only).
- bool hide_console = EditorSettings::get_singleton()->get_setting(
- "interface/editor/hide_console_window");
- DisplayServer::get_singleton()->console_set_visible(!hide_console);
- }
-
// Load SSL Certificates from Editor Settings (or builtin)
Crypto::load_default_certificates(
EditorSettings::get_singleton()->get_setting("network/ssl/editor_ssl_certificates").operator String());
diff --git a/methods.py b/methods.py
index 86239e434c..fbd304ddde 100644
--- a/methods.py
+++ b/methods.py
@@ -454,45 +454,39 @@ def no_verbose(sys, env):
# Colors are disabled in non-TTY environments such as pipes. This means
# that if output is redirected to a file, it will not contain color codes
if sys.stdout.isatty():
- colors["cyan"] = "\033[96m"
- colors["purple"] = "\033[95m"
- colors["blue"] = "\033[94m"
- colors["green"] = "\033[92m"
- colors["yellow"] = "\033[93m"
- colors["red"] = "\033[91m"
- colors["end"] = "\033[0m"
+ colors["blue"] = "\033[0;94m"
+ colors["bold_blue"] = "\033[1;94m"
+ colors["reset"] = "\033[0m"
else:
- colors["cyan"] = ""
- colors["purple"] = ""
colors["blue"] = ""
- colors["green"] = ""
- colors["yellow"] = ""
- colors["red"] = ""
- colors["end"] = ""
+ colors["bold_blue"] = ""
+ colors["reset"] = ""
- compile_source_message = "{}Compiling {}==> {}$SOURCE{}".format(
- colors["blue"], colors["purple"], colors["yellow"], colors["end"]
+ # There is a space before "..." to ensure that source file names can be
+ # Ctrl + clicked in the VS Code terminal.
+ compile_source_message = "{}Compiling {}$SOURCE{} ...{}".format(
+ colors["blue"], colors["bold_blue"], colors["blue"], colors["reset"]
)
- java_compile_source_message = "{}Compiling {}==> {}$SOURCE{}".format(
- colors["blue"], colors["purple"], colors["yellow"], colors["end"]
+ java_compile_source_message = "{}Compiling {}$SOURCE{} ...{}".format(
+ colors["blue"], colors["bold_blue"], colors["blue"], colors["reset"]
)
- compile_shared_source_message = "{}Compiling shared {}==> {}$SOURCE{}".format(
- colors["blue"], colors["purple"], colors["yellow"], colors["end"]
+ compile_shared_source_message = "{}Compiling shared {}$SOURCE{} ...{}".format(
+ colors["blue"], colors["bold_blue"], colors["blue"], colors["reset"]
)
- link_program_message = "{}Linking Program {}==> {}$TARGET{}".format(
- colors["red"], colors["purple"], colors["yellow"], colors["end"]
+ link_program_message = "{}Linking Program {}$TARGET{} ...{}".format(
+ colors["blue"], colors["bold_blue"], colors["blue"], colors["reset"]
)
- link_library_message = "{}Linking Static Library {}==> {}$TARGET{}".format(
- colors["red"], colors["purple"], colors["yellow"], colors["end"]
+ link_library_message = "{}Linking Static Library {}$TARGET{} ...{}".format(
+ colors["blue"], colors["bold_blue"], colors["blue"], colors["reset"]
)
- ranlib_library_message = "{}Ranlib Library {}==> {}$TARGET{}".format(
- colors["red"], colors["purple"], colors["yellow"], colors["end"]
+ ranlib_library_message = "{}Ranlib Library {}$TARGET{} ...{}".format(
+ colors["blue"], colors["bold_blue"], colors["blue"], colors["reset"]
)
- link_shared_library_message = "{}Linking Shared Library {}==> {}$TARGET{}".format(
- colors["red"], colors["purple"], colors["yellow"], colors["end"]
+ link_shared_library_message = "{}Linking Shared Library {}$TARGET{} ...{}".format(
+ colors["blue"], colors["bold_blue"], colors["blue"], colors["reset"]
)
- java_library_message = "{}Creating Java Archive {}==> {}$TARGET{}".format(
- colors["red"], colors["purple"], colors["yellow"], colors["end"]
+ java_library_message = "{}Creating Java Archive {}$TARGET{} ...{}".format(
+ colors["blue"], colors["bold_blue"], colors["blue"], colors["reset"]
)
env.Append(CXXCOMSTR=[compile_source_message])
diff --git a/misc/dist/html/editor.html b/misc/dist/html/editor.html
index 8b077a5725..a681a2a1c3 100644
--- a/misc/dist/html/editor.html
+++ b/misc/dist/html/editor.html
@@ -9,8 +9,8 @@
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="application-name" content="Godot" />
<meta name="apple-mobile-web-app-title" content="Godot" />
- <meta name="theme-color" content="#478cbf" />
- <meta name="msapplication-navbutton-color" content="#478cbf" />
+ <meta name="theme-color" content="#202531" />
+ <meta name="msapplication-navbutton-color" content="#202531" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="msapplication-starturl" content="/latest" />
<meta property="og:site_name" content="Godot Engine Web Editor" />
diff --git a/misc/dist/html/manifest.json b/misc/dist/html/manifest.json
index 0ca27b3742..adc8106e2a 100644
--- a/misc/dist/html/manifest.json
+++ b/misc/dist/html/manifest.json
@@ -6,7 +6,7 @@
"start_url": "./godot.tools.html",
"display": "standalone",
"orientation": "landscape",
- "theme_color": "#478cbf",
+ "theme_color": "#202531",
"icons": [
{
"src": "favicon.png",
diff --git a/misc/dist/html/offline.html b/misc/dist/html/offline.html
index 000c21b4d3..5cfc3362d9 100644
--- a/misc/dist/html/offline.html
+++ b/misc/dist/html/offline.html
@@ -4,6 +4,8 @@
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
+ <meta name="theme-color" content="#202531" />
+ <meta name="msapplication-navbutton-color" content="#202531" />
<title>You are offline</title>
<style>
html {
diff --git a/misc/dist/osx_template.app/Contents/Info.plist b/misc/dist/osx_template.app/Contents/Info.plist
index 8e221df946..a087550290 100644
--- a/misc/dist/osx_template.app/Contents/Info.plist
+++ b/misc/dist/osx_template.app/Contents/Info.plist
@@ -24,10 +24,7 @@
<string>$signature</string>
<key>CFBundleVersion</key>
<string>$version</string>
- <key>NSMicrophoneUsageDescription</key>
- <string>$microphone_usage_description</string>
- <key>NSCameraUsageDescription</key>
- <string>$camera_usage_description</string>
+$usage_descriptions
<key>NSHumanReadableCopyright</key>
<string>$copyright</string>
<key>CFBundleSupportedPlatforms</key>
@@ -46,6 +43,6 @@
<string>10.12</string>
</dict>
<key>NSHighResolutionCapable</key>
- $highres
+$highres
</dict>
</plist>
diff --git a/misc/scripts/clang_format.sh b/misc/scripts/clang_format.sh
index b0020da597..0006b82280 100755
--- a/misc/scripts/clang_format.sh
+++ b/misc/scripts/clang_format.sh
@@ -29,8 +29,6 @@ while IFS= read -rd '' f; do
continue 2
elif [[ "$f" == *"glsl" ]]; then
continue 2
- elif [[ "$f" == *"theme_data.h" ]]; then
- continue 2
elif [[ "$f" == "platform/android/java/lib/src/org/godotengine/godot/input/InputManager"* ]]; then
continue 2
fi
diff --git a/modules/gdnative/include/nativescript/godot_nativescript.h b/modules/gdnative/include/nativescript/godot_nativescript.h
index eea898475b..879291c2e0 100644
--- a/modules/gdnative/include/nativescript/godot_nativescript.h
+++ b/modules/gdnative/include/nativescript/godot_nativescript.h
@@ -79,6 +79,7 @@ typedef enum {
GODOT_PROPERTY_HINT_PROPERTY_OF_BASE_TYPE, ///< a property of a base type
GODOT_PROPERTY_HINT_PROPERTY_OF_INSTANCE, ///< a property of an instance
GODOT_PROPERTY_HINT_PROPERTY_OF_SCRIPT, ///< a property of a script & base
+ GODOT_PROPERTY_HINT_LOCALE_ID,
GODOT_PROPERTY_HINT_MAX,
} godot_nativescript_property_hint;
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp
index 3a79190149..0d295c3a51 100644
--- a/modules/gdscript/gdscript_analyzer.cpp
+++ b/modules/gdscript/gdscript_analyzer.cpp
@@ -2641,7 +2641,8 @@ void GDScriptAnalyzer::reduce_identifier_from_base(GDScriptParser::IdentifierNod
GDScriptParser::DataType result;
result.type_source = GDScriptParser::DataType::ANNOTATED_EXPLICIT;
result.kind = GDScriptParser::DataType::ENUM_VALUE;
- result.builtin_type = base.builtin_type;
+ result.is_constant = true;
+ result.builtin_type = Variant::INT;
result.native_type = base.native_type;
result.enum_type = name;
p_identifier->set_datatype(result);
diff --git a/modules/gdscript/gdscript_byte_codegen.cpp b/modules/gdscript/gdscript_byte_codegen.cpp
index 8623122edc..82aa14795e 100644
--- a/modules/gdscript/gdscript_byte_codegen.cpp
+++ b/modules/gdscript/gdscript_byte_codegen.cpp
@@ -688,6 +688,7 @@ void GDScriptByteCodeGenerator::write_ternary_false_expr(const Address &p_expr)
void GDScriptByteCodeGenerator::write_end_ternary() {
patch_jump(ternary_jump_skip_pos.back()->get());
ternary_jump_skip_pos.pop_back();
+ ternary_result.pop_back();
}
void GDScriptByteCodeGenerator::write_set(const Address &p_target, const Address &p_index, const Address &p_source) {
diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp
index 117ca68c18..ca125d3a07 100644
--- a/modules/gdscript/gdscript_compiler.cpp
+++ b/modules/gdscript/gdscript_compiler.cpp
@@ -2019,7 +2019,7 @@ GDScriptFunction *GDScriptCompiler::_parse_function(Error &r_error, GDScript *p_
codegen.generator->start_parameters();
for (int i = p_func->parameters.size() - optional_parameters; i < p_func->parameters.size(); i++) {
const GDScriptParser::ParameterNode *parameter = p_func->parameters[i];
- GDScriptCodeGenerator::Address src_addr = _parse_expression(codegen, r_error, parameter->default_value, true);
+ GDScriptCodeGenerator::Address src_addr = _parse_expression(codegen, r_error, parameter->default_value);
if (r_error) {
memdelete(codegen.generator);
return nullptr;
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index 10f1dd0a41..5e210074ed 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -4236,7 +4236,11 @@ void GDScriptParser::TreePrinter::print_get_node(GetNodeNode *p_get_node) {
}
void GDScriptParser::TreePrinter::print_identifier(IdentifierNode *p_identifier) {
- push_text(p_identifier->name);
+ if (p_identifier != nullptr) {
+ push_text(p_identifier->name);
+ } else {
+ push_text("<invalid identifier>");
+ }
}
void GDScriptParser::TreePrinter::print_if(IfNode *p_if, bool p_is_elif) {
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/params_default_forward_reference.gd b/modules/gdscript/tests/scripts/analyzer/errors/params_default_forward_reference.gd
new file mode 100644
index 0000000000..05d9bd6a3d
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/params_default_forward_reference.gd
@@ -0,0 +1,9 @@
+# https://github.com/godotengine/godot/issues/56702
+
+func test():
+ # somewhat obscure feature: referencing parameters in defaults, but only earlier ones!
+ ref_default("non-optional")
+
+
+func ref_default(nondefault1, defa=nondefault1, defb=defc, defc=1):
+ prints(nondefault1, nondefault2, defa, defb, defc)
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/params_default_forward_reference.out b/modules/gdscript/tests/scripts/analyzer/errors/params_default_forward_reference.out
new file mode 100644
index 0000000000..1d5b5bf393
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/params_default_forward_reference.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Identifier "defc" not declared in the current scope.
diff --git a/modules/gdscript/tests/scripts/runtime/features/params_default_values.gd b/modules/gdscript/tests/scripts/runtime/features/params_default_values.gd
new file mode 100644
index 0000000000..8156b4ec68
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/params_default_values.gd
@@ -0,0 +1,35 @@
+# https://github.com/godotengine/godot/issues/56702
+
+func test():
+ const_default()
+ func_result_default()
+ # calling again will run the initializer again,
+ # as the default is not evaluated at time of defining the function (as in python)
+ # but every time the function is called (as in C++)
+ func_result_default()
+ lots_of_defaults("non-optional")
+ # somewhat obscure feature: referencing earlier parameters
+ ref_default("non-optional", 42)
+
+
+func const_default(param=42):
+ print(param)
+
+
+var default_val := 0
+
+func get_default():
+ default_val += 1
+ return default_val
+
+
+func func_result_default(param=get_default()):
+ print(param)
+
+
+func lots_of_defaults(nondefault, one=1, two=2, three=get_default()):
+ prints(nondefault, one, two, three)
+
+
+func ref_default(nondefault1, nondefault2, defa=nondefault1, defb=nondefault2 - 1):
+ prints(nondefault1, nondefault2, defa, defb)
diff --git a/modules/gdscript/tests/scripts/runtime/features/params_default_values.out b/modules/gdscript/tests/scripts/runtime/features/params_default_values.out
new file mode 100644
index 0000000000..50e0885ae5
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/params_default_values.out
@@ -0,0 +1,6 @@
+GDTEST_OK
+42
+1
+2
+non-optional 1 2 3
+non-optional 42 non-optional 41
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp
index 5ef48f8645..320901787d 100644
--- a/modules/gridmap/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/grid_map_editor_plugin.cpp
@@ -1459,10 +1459,10 @@ void GridMapEditorPlugin::_notification(int p_what) {
if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
switch ((int)EditorSettings::get_singleton()->get("editors/grid_map/editor_side")) {
case 0: { // Left.
- Node3DEditor::get_singleton()->get_palette_split()->move_child(grid_map_editor, 0);
+ Node3DEditor::get_singleton()->move_control_to_left_panel(grid_map_editor);
} break;
case 1: { // Right.
- Node3DEditor::get_singleton()->get_palette_split()->move_child(grid_map_editor, 1);
+ Node3DEditor::get_singleton()->move_control_to_right_panel(grid_map_editor);
} break;
}
}
@@ -1498,10 +1498,10 @@ GridMapEditorPlugin::GridMapEditorPlugin(EditorNode *p_node) {
grid_map_editor = memnew(GridMapEditor(editor));
switch ((int)EditorSettings::get_singleton()->get("editors/grid_map/editor_side")) {
case 0: { // Left.
- add_control_to_container(CONTAINER_SPATIAL_EDITOR_SIDE_LEFT, grid_map_editor);
+ Node3DEditor::get_singleton()->add_control_to_left_panel(grid_map_editor);
} break;
case 1: { // Right.
- add_control_to_container(CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT, grid_map_editor);
+ Node3DEditor::get_singleton()->add_control_to_right_panel(grid_map_editor);
} break;
}
grid_map_editor->hide();
diff --git a/modules/mobile_vr/mobile_vr_interface.cpp b/modules/mobile_vr/mobile_vr_interface.cpp
index 59854ad527..49044c4afe 100644
--- a/modules/mobile_vr/mobile_vr_interface.cpp
+++ b/modules/mobile_vr/mobile_vr_interface.cpp
@@ -181,6 +181,7 @@ void MobileVRInterface::set_position_from_sensors() {
orientation = rotate * orientation;
tracking_state = XRInterface::XR_NORMAL_TRACKING;
+ tracking_confidence = XRPose::XR_TRACKING_CONFIDENCE_HIGH;
};
///@TODO improve this, the magnetometer is very fidgety sometimes flipping the axis for no apparent reason (probably a bug on my part)
@@ -193,6 +194,7 @@ void MobileVRInterface::set_position_from_sensors() {
orientation = Basis(transform_quat);
tracking_state = XRInterface::XR_NORMAL_TRACKING;
+ tracking_confidence = XRPose::XR_TRACKING_CONFIDENCE_HIGH;
} else if (has_grav) {
// use gravity vector to make sure down is down...
// transform gravity into our world space
@@ -512,7 +514,7 @@ void MobileVRInterface::process() {
if (head.is_valid()) {
// Set our head position, note in real space, reference frame and world scale is applied later
- head->set_pose("default", head_transform, Vector3(), Vector3());
+ head->set_pose("default", head_transform, Vector3(), Vector3(), tracking_confidence);
}
};
};
diff --git a/modules/mobile_vr/mobile_vr_interface.h b/modules/mobile_vr/mobile_vr_interface.h
index ac04763569..47dc33c0c7 100644
--- a/modules/mobile_vr/mobile_vr_interface.h
+++ b/modules/mobile_vr/mobile_vr_interface.h
@@ -51,6 +51,7 @@ class MobileVRInterface : public XRInterface {
private:
bool initialized = false;
XRInterface::TrackingStatus tracking_state;
+ XRPose::TrackingConfidence tracking_confidence = XRPose::XR_TRACKING_CONFIDENCE_NONE;
// Just set some defaults for these. At some point we need to look at adding a lookup table for common device + headset combos and/or support reading cardboard QR codes
double eye_height = 1.85;
diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp
index 6002dc80da..e0ee809331 100644
--- a/modules/text_server_adv/text_server_adv.cpp
+++ b/modules/text_server_adv/text_server_adv.cpp
@@ -322,7 +322,7 @@ _FORCE_INLINE_ bool is_underscore(char32_t p_char) {
/*************************************************************************/
String TextServerAdvanced::interface_name = "ICU / HarfBuzz / Graphite";
-uint32_t TextServerAdvanced::interface_features = FEATURE_BIDI_LAYOUT | FEATURE_VERTICAL_LAYOUT | FEATURE_SHAPING | FEATURE_KASHIDA_JUSTIFICATION | FEATURE_BREAK_ITERATORS | FEATURE_USE_SUPPORT_DATA | FEATURE_FONT_VARIABLE;
+uint32_t TextServerAdvanced::interface_features = FEATURE_BIDI_LAYOUT | FEATURE_VERTICAL_LAYOUT | FEATURE_SHAPING | FEATURE_KASHIDA_JUSTIFICATION | FEATURE_BREAK_ITERATORS | FEATURE_USE_SUPPORT_DATA | FEATURE_FONT_VARIABLE | FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION;
bool TextServerAdvanced::has_feature(Feature p_feature) const {
return (interface_features & p_feature) == p_feature;
@@ -5229,6 +5229,40 @@ String TextServerAdvanced::strip_diacritics(const String &p_string) const {
return result;
}
+String TextServerAdvanced::string_to_upper(const String &p_string, const String &p_language) const {
+ // Convert to UTF-16.
+ Char16String utf16 = p_string.utf16();
+
+ Char16String upper;
+ UErrorCode err = U_ZERO_ERROR;
+ int32_t len = u_strToUpper(nullptr, 0, utf16.ptr(), -1, p_language.ascii().get_data(), &err);
+ ERR_FAIL_COND_V_MSG(err != U_BUFFER_OVERFLOW_ERROR, p_string, u_errorName(err));
+ upper.resize(len);
+ err = U_ZERO_ERROR;
+ u_strToUpper(upper.ptrw(), len, utf16.ptr(), -1, p_language.ascii().get_data(), &err);
+ ERR_FAIL_COND_V_MSG(U_FAILURE(err), p_string, u_errorName(err));
+
+ // Convert back to UTF-32.
+ return String::utf16(upper.ptr(), len);
+}
+
+String TextServerAdvanced::string_to_lower(const String &p_string, const String &p_language) const {
+ // Convert to UTF-16.
+ Char16String utf16 = p_string.utf16();
+
+ Char16String lower;
+ UErrorCode err = U_ZERO_ERROR;
+ int32_t len = u_strToLower(nullptr, 0, utf16.ptr(), -1, p_language.ascii().get_data(), &err);
+ ERR_FAIL_COND_V_MSG(err != U_BUFFER_OVERFLOW_ERROR, p_string, u_errorName(err));
+ lower.resize(len);
+ err = U_ZERO_ERROR;
+ u_strToLower(lower.ptrw(), len, utf16.ptr(), -1, p_language.ascii().get_data(), &err);
+ ERR_FAIL_COND_V_MSG(U_FAILURE(err), p_string, u_errorName(err));
+
+ // Convert back to UTF-32.
+ return String::utf16(lower.ptr(), len);
+}
+
TextServerAdvanced::TextServerAdvanced() {
_insert_num_systems_lang();
_insert_feature_sets();
diff --git a/modules/text_server_adv/text_server_adv.h b/modules/text_server_adv/text_server_adv.h
index d088219d91..f2ae24cae6 100644
--- a/modules/text_server_adv/text_server_adv.h
+++ b/modules/text_server_adv/text_server_adv.h
@@ -527,6 +527,9 @@ public:
virtual String strip_diacritics(const String &p_string) const override;
+ virtual String string_to_upper(const String &p_string, const String &p_language = "") const override;
+ virtual String string_to_lower(const String &p_string, const String &p_language = "") const override;
+
TextServerAdvanced();
~TextServerAdvanced();
};
diff --git a/modules/text_server_fb/text_server_fb.cpp b/modules/text_server_fb/text_server_fb.cpp
index c7a7c4aa70..ffbd2da22d 100644
--- a/modules/text_server_fb/text_server_fb.cpp
+++ b/modules/text_server_fb/text_server_fb.cpp
@@ -32,6 +32,7 @@
#include "core/error/error_macros.h"
#include "core/string/print_string.h"
+#include "core/string/ucaps.h"
#include "modules/modules_enabled.gen.h" // For freetype, msdfgen.
@@ -3356,6 +3357,34 @@ float TextServerFallback::shaped_text_get_underline_thickness(RID p_shaped) cons
return sd->uthk;
}
+String TextServerFallback::string_to_upper(const String &p_string, const String &p_language) const {
+ String upper = p_string;
+
+ for (int i = 0; i < upper.size(); i++) {
+ const char32_t s = upper[i];
+ const char32_t t = _find_upper(s);
+ if (s != t) { // avoid copy on write
+ upper[i] = t;
+ }
+ }
+
+ return upper;
+}
+
+String TextServerFallback::string_to_lower(const String &p_string, const String &p_language) const {
+ String lower = p_string;
+
+ for (int i = 0; i < lower.size(); i++) {
+ const char32_t s = lower[i];
+ const char32_t t = _find_lower(s);
+ if (s != t) { // avoid copy on write
+ lower[i] = t;
+ }
+ }
+
+ return lower;
+}
+
TextServerFallback::TextServerFallback() {
_insert_feature_sets();
};
diff --git a/modules/text_server_fb/text_server_fb.h b/modules/text_server_fb/text_server_fb.h
index e8619e0825..b356b90d2c 100644
--- a/modules/text_server_fb/text_server_fb.h
+++ b/modules/text_server_fb/text_server_fb.h
@@ -430,6 +430,9 @@ public:
virtual float shaped_text_get_underline_position(RID p_shaped) const override;
virtual float shaped_text_get_underline_thickness(RID p_shaped) const override;
+ virtual String string_to_upper(const String &p_string, const String &p_language = "") const override;
+ virtual String string_to_lower(const String &p_string, const String &p_language = "") const override;
+
TextServerFallback();
~TextServerFallback();
};
diff --git a/modules/visual_script/editor/visual_script_editor.cpp b/modules/visual_script/editor/visual_script_editor.cpp
index ec1a8a6b42..6d515d11f5 100644
--- a/modules/visual_script/editor/visual_script_editor.cpp
+++ b/modules/visual_script/editor/visual_script_editor.cpp
@@ -2846,7 +2846,7 @@ Control *VisualScriptEditor::get_base_editor() const {
return graph;
}
-void VisualScriptEditor::set_tooltip_request_func(String p_method, Object *p_obj) {
+void VisualScriptEditor::set_tooltip_request_func(const Callable &p_toolip_callback) {
}
Control *VisualScriptEditor::get_edit_menu() {
diff --git a/modules/visual_script/editor/visual_script_editor.h b/modules/visual_script/editor/visual_script_editor.h
index 90e4fb9d56..8901ea4006 100644
--- a/modules/visual_script/editor/visual_script_editor.h
+++ b/modules/visual_script/editor/visual_script_editor.h
@@ -328,7 +328,7 @@ public:
virtual void update_settings() override;
virtual bool show_members_overview() override;
virtual void set_debugger_active(bool p_active) override;
- virtual void set_tooltip_request_func(String p_method, Object *p_obj) override;
+ virtual void set_tooltip_request_func(const Callable &p_toolip_callback) override;
virtual Control *get_edit_menu() override;
virtual void clear_edit_menu() override;
virtual void set_find_replace_bar(FindReplaceBar *p_bar) override { p_bar->hide(); }; // Not needed here.
diff --git a/modules/webrtc/doc_classes/WebRTCPeerConnection.xml b/modules/webrtc/doc_classes/WebRTCPeerConnection.xml
index 618fe14137..2f2c2c379d 100644
--- a/modules/webrtc/doc_classes/WebRTCPeerConnection.xml
+++ b/modules/webrtc/doc_classes/WebRTCPeerConnection.xml
@@ -33,8 +33,7 @@
<method name="create_data_channel">
<return type="WebRTCDataChannel" />
<argument index="0" name="label" type="String" />
- <argument index="1" name="options" type="Dictionary" default="{
-}" />
+ <argument index="1" name="options" type="Dictionary" default="{}" />
<description>
Returns a new [WebRTCDataChannel] (or [code]null[/code] on failure) with given [code]label[/code] and optionally configured via the [code]options[/code] dictionary. This method can only be called when the connection is in state [constant STATE_NEW].
There are two ways to create a working data channel: either call [method create_data_channel] on only one of the peer and listen to [signal data_channel_received] on the other, or call [method create_data_channel] on both peers, with the same values, and the [code]negotiated[/code] option set to [code]true[/code].
@@ -70,8 +69,7 @@
</method>
<method name="initialize">
<return type="int" enum="Error" />
- <argument index="0" name="configuration" type="Dictionary" default="{
-}" />
+ <argument index="0" name="configuration" type="Dictionary" default="{}" />
<description>
Re-initialize this peer connection, closing any previously active connection, and going back to state [constant STATE_NEW]. A dictionary of [code]options[/code] can be passed to configure the peer connection.
Valid [code]options[/code] are:
diff --git a/platform/android/display_server_android.cpp b/platform/android/display_server_android.cpp
index 5b9ca44180..15f61db27c 100644
--- a/platform/android/display_server_android.cpp
+++ b/platform/android/display_server_android.cpp
@@ -47,7 +47,6 @@ DisplayServerAndroid *DisplayServerAndroid::get_singleton() {
bool DisplayServerAndroid::has_feature(Feature p_feature) const {
switch (p_feature) {
- //case FEATURE_CONSOLE_WINDOW:
case FEATURE_CURSOR_SHAPE:
//case FEATURE_CUSTOM_CURSOR_SHAPE:
//case FEATURE_GLOBAL_MENU:
@@ -96,6 +95,17 @@ String DisplayServerAndroid::clipboard_get() const {
}
}
+bool DisplayServerAndroid::clipboard_has() const {
+ GodotJavaWrapper *godot_java = OS_Android::get_singleton()->get_godot_java();
+ ERR_FAIL_COND_V(!godot_java, false);
+
+ if (godot_java->has_has_clipboard()) {
+ return godot_java->has_clipboard();
+ } else {
+ return DisplayServer::clipboard_has();
+ }
+}
+
void DisplayServerAndroid::screen_set_keep_on(bool p_enable) {
GodotJavaWrapper *godot_java = OS_Android::get_singleton()->get_godot_java();
ERR_FAIL_COND(!godot_java);
diff --git a/platform/android/display_server_android.h b/platform/android/display_server_android.h
index 8538b6e660..6aadc7e1a9 100644
--- a/platform/android/display_server_android.h
+++ b/platform/android/display_server_android.h
@@ -93,6 +93,7 @@ public:
virtual void clipboard_set(const String &p_text) override;
virtual String clipboard_get() const override;
+ virtual bool clipboard_has() const override;
virtual void screen_set_keep_on(bool p_enable) override;
virtual bool screen_is_kept_on() const override;
diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp
index aa44183329..78155fbef3 100644
--- a/platform/android/export/export_plugin.cpp
+++ b/platform/android/export/export_plugin.cpp
@@ -1514,7 +1514,7 @@ String EditorExportPlatformAndroid::load_splash_refs(Ref<Image> &splash_image, R
}
if (scale_splash) {
- Size2 screen_size = Size2(ProjectSettings::get_singleton()->get("display/window/size/width"), ProjectSettings::get_singleton()->get("display/window/size/height"));
+ Size2 screen_size = Size2(ProjectSettings::get_singleton()->get("display/window/size/viewport_width"), ProjectSettings::get_singleton()->get("display/window/size/viewport_height"));
int width, height;
if (screen_size.width > screen_size.height) {
// scale horizontally
diff --git a/platform/android/java/lib/src/org/godotengine/godot/Godot.java b/platform/android/java/lib/src/org/godotengine/godot/Godot.java
index 3fbbd8fbcc..78848c109a 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/Godot.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/Godot.java
@@ -660,10 +660,14 @@ public class Godot extends Fragment implements SensorEventListener, IDownloaderC
}
}
+ public boolean hasClipboard() {
+ return mClipboard.hasPrimaryClip();
+ }
+
public String getClipboard() {
String copiedText = "";
- if (mClipboard.getPrimaryClip() != null) {
+ if (mClipboard.hasPrimaryClip()) {
ClipData.Item item = mClipboard.getPrimaryClip().getItemAt(0);
copiedText = item.getText().toString();
}
diff --git a/platform/android/java_godot_wrapper.cpp b/platform/android/java_godot_wrapper.cpp
index 115264d7ee..5beec6b611 100644
--- a/platform/android/java_godot_wrapper.cpp
+++ b/platform/android/java_godot_wrapper.cpp
@@ -66,6 +66,7 @@ GodotJavaWrapper::GodotJavaWrapper(JNIEnv *p_env, jobject p_activity, jobject p_
_get_GLES_version_code = p_env->GetMethodID(godot_class, "getGLESVersionCode", "()I");
_get_clipboard = p_env->GetMethodID(godot_class, "getClipboard", "()Ljava/lang/String;");
_set_clipboard = p_env->GetMethodID(godot_class, "setClipboard", "(Ljava/lang/String;)V");
+ _has_clipboard = p_env->GetMethodID(godot_class, "hasClipboard", "()Z");
_request_permission = p_env->GetMethodID(godot_class, "requestPermission", "(Ljava/lang/String;)Z");
_request_permissions = p_env->GetMethodID(godot_class, "requestPermissions", "()Z");
_get_granted_permissions = p_env->GetMethodID(godot_class, "getGrantedPermissions", "()[Ljava/lang/String;");
@@ -248,6 +249,21 @@ void GodotJavaWrapper::set_clipboard(const String &p_text) {
}
}
+bool GodotJavaWrapper::has_has_clipboard() {
+ return _has_clipboard != 0;
+}
+
+bool GodotJavaWrapper::has_clipboard() {
+ if (_has_clipboard) {
+ JNIEnv *env = get_jni_env();
+ ERR_FAIL_COND_V(env == nullptr, false);
+
+ return env->CallBooleanMethod(godot_instance, _has_clipboard);
+ } else {
+ return false;
+ }
+}
+
bool GodotJavaWrapper::request_permission(const String &p_name) {
if (_request_permission) {
JNIEnv *env = get_jni_env();
diff --git a/platform/android/java_godot_wrapper.h b/platform/android/java_godot_wrapper.h
index 4d058ac426..42ae91480f 100644
--- a/platform/android/java_godot_wrapper.h
+++ b/platform/android/java_godot_wrapper.h
@@ -58,6 +58,7 @@ private:
jmethodID _get_GLES_version_code = 0;
jmethodID _get_clipboard = 0;
jmethodID _set_clipboard = 0;
+ jmethodID _has_clipboard = 0;
jmethodID _request_permission = 0;
jmethodID _request_permissions = 0;
jmethodID _get_granted_permissions = 0;
@@ -92,6 +93,8 @@ public:
String get_clipboard();
bool has_set_clipboard();
void set_clipboard(const String &p_text);
+ bool has_has_clipboard();
+ bool has_clipboard();
bool request_permission(const String &p_name);
bool request_permissions();
Vector<String> get_granted_permissions() const;
diff --git a/platform/iphone/display_server_iphone.mm b/platform/iphone/display_server_iphone.mm
index 3047d91a4d..77e1a6078c 100644
--- a/platform/iphone/display_server_iphone.mm
+++ b/platform/iphone/display_server_iphone.mm
@@ -293,7 +293,6 @@ void DisplayServerIPhone::update_gyroscope(float p_x, float p_y, float p_z) {
bool DisplayServerIPhone::has_feature(Feature p_feature) const {
switch (p_feature) {
- // case FEATURE_CONSOLE_WINDOW:
// case FEATURE_CURSOR_SHAPE:
// case FEATURE_CUSTOM_CURSOR_SHAPE:
// case FEATURE_GLOBAL_MENU:
diff --git a/platform/iphone/export/export_plugin.cpp b/platform/iphone/export/export_plugin.cpp
index 67d1805ceb..ea17f1ac61 100644
--- a/platform/iphone/export/export_plugin.cpp
+++ b/platform/iphone/export/export_plugin.cpp
@@ -141,17 +141,17 @@ void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options)
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "privacy/microphone_usage_description", PROPERTY_HINT_PLACEHOLDER_TEXT, "Provide a message if you need to use the microphone"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "privacy/photolibrary_usage_description", PROPERTY_HINT_PLACEHOLDER_TEXT, "Provide a message if you need access to the photo library"), ""));
- r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "icons/generate_missing"), false));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "icons/iphone_120x120", PROPERTY_HINT_FILE, "*.png"), "")); // Home screen on iPhone/iPod Touch with Retina display
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "icons/iphone_180x180", PROPERTY_HINT_FILE, "*.png"), "")); // Home screen on iPhone with Retina HD display
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "required_icons/iphone_120x120", PROPERTY_HINT_FILE, "*.png"), "")); // Home screen on iPhone/iPod Touch with retina display
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "required_icons/ipad_76x76", PROPERTY_HINT_FILE, "*.png"), "")); // Home screen on iPad
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "required_icons/app_store_1024x1024", PROPERTY_HINT_FILE, "*.png"), "")); // App Store
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "icons/ipad_76x76", PROPERTY_HINT_FILE, "*.png"), "")); // Home screen on iPad
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "icons/ipad_152x152", PROPERTY_HINT_FILE, "*.png"), "")); // Home screen on iPad with Retina display
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "icons/ipad_167x167", PROPERTY_HINT_FILE, "*.png"), "")); // Home screen on iPad Pro
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "optional_icons/iphone_180x180", PROPERTY_HINT_FILE, "*.png"), "")); // Home screen on iPhone with retina HD display
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "optional_icons/ipad_152x152", PROPERTY_HINT_FILE, "*.png"), "")); // Home screen on iPad with retina display
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "optional_icons/ipad_167x167", PROPERTY_HINT_FILE, "*.png"), "")); // Home screen on iPad Pro
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "optional_icons/spotlight_40x40", PROPERTY_HINT_FILE, "*.png"), "")); // Spotlight
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "optional_icons/spotlight_80x80", PROPERTY_HINT_FILE, "*.png"), "")); // Spotlight on devices with retina display
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "icons/app_store_1024x1024", PROPERTY_HINT_FILE, "*.png"), "")); // App Store
+
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "icons/spotlight_40x40", PROPERTY_HINT_FILE, "*.png"), "")); // Spotlight
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "icons/spotlight_80x80", PROPERTY_HINT_FILE, "*.png"), "")); // Spotlight on devices with Retina display
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "storyboard/use_launch_screen_storyboard"), false));
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "storyboard/image_scale_mode", PROPERTY_HINT_ENUM, "Same as Logo,Center,Scale to Fit,Scale to Fill,Scale"), 0));
@@ -160,8 +160,6 @@ void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options)
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "storyboard/use_custom_bg_color"), false));
r_options->push_back(ExportOption(PropertyInfo(Variant::COLOR, "storyboard/custom_bg_color"), Color()));
- r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "launch_screens/generate_missing"), false));
-
for (uint64_t i = 0; i < sizeof(loading_screen_infos) / sizeof(loading_screen_infos[0]); ++i) {
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, loading_screen_infos[i].preset_key, PROPERTY_HINT_FILE, "*.png"), ""));
}
@@ -463,26 +461,26 @@ struct IconInfo {
const char *actual_size_side;
const char *scale;
const char *unscaled_size;
- bool is_required = false;
};
static const IconInfo icon_infos[] = {
- { "required_icons/iphone_120x120", "iphone", "Icon-120.png", "120", "2x", "60x60", true },
- { "required_icons/iphone_120x120", "iphone", "Icon-120.png", "120", "3x", "40x40", true },
-
- { "required_icons/ipad_76x76", "ipad", "Icon-76.png", "76", "1x", "76x76", true },
- { "required_icons/app_store_1024x1024", "ios-marketing", "Icon-1024.png", "1024", "1x", "1024x1024", true },
-
- { "optional_icons/iphone_180x180", "iphone", "Icon-180.png", "180", "3x", "60x60", false },
-
- { "optional_icons/ipad_152x152", "ipad", "Icon-152.png", "152", "2x", "76x76", false },
-
- { "optional_icons/ipad_167x167", "ipad", "Icon-167.png", "167", "2x", "83.5x83.5", false },
-
- { "optional_icons/spotlight_40x40", "ipad", "Icon-40.png", "40", "1x", "40x40", false },
-
- { "optional_icons/spotlight_80x80", "iphone", "Icon-80.png", "80", "2x", "40x40", false },
- { "optional_icons/spotlight_80x80", "ipad", "Icon-80.png", "80", "2x", "40x40", false }
+ // Home screen on iPhone
+ { "icons/iphone_120x120", "iphone", "Icon-120.png", "120", "2x", "60x60" },
+ { "icons/iphone_120x120", "iphone", "Icon-120.png", "120", "3x", "40x40" },
+ { "icons/iphone_180x180", "iphone", "Icon-180.png", "180", "3x", "60x60" },
+
+ // Home screen on iPad
+ { "icons/ipad_76x76", "ipad", "Icon-76.png", "76", "1x", "76x76" },
+ { "icons/ipad_152x152", "ipad", "Icon-152.png", "152", "2x", "76x76" },
+ { "icons/ipad_167x167", "ipad", "Icon-167.png", "167", "2x", "83.5x83.5" },
+
+ // App Store
+ { "icons/app_store_1024x1024", "ios-marketing", "Icon-1024.png", "1024", "1x", "1024x1024" },
+
+ // Spotlight
+ { "icons/spotlight_40x40", "ipad", "Icon-40.png", "40", "1x", "40x40" },
+ { "icons/spotlight_80x80", "iphone", "Icon-80.png", "80", "2x", "40x40" },
+ { "icons/spotlight_80x80", "ipad", "Icon-80.png", "80", "2x", "40x40" }
};
Error EditorExportPlatformIOS::_export_icons(const Ref<EditorExportPreset> &p_preset, const String &p_iconset_dir) {
@@ -497,35 +495,23 @@ Error EditorExportPlatformIOS::_export_icons(const Ref<EditorExportPreset> &p_pr
int side_size = String(info.actual_size_side).to_int();
String icon_path = p_preset->get(info.preset_key);
if (icon_path.length() == 0) {
- if ((bool)p_preset->get("icons/generate_missing")) {
- // Resize main app icon
- icon_path = ProjectSettings::get_singleton()->get("application/config/icon");
- Ref<Image> img = memnew(Image);
- Error err = ImageLoader::load_image(icon_path, img);
- if (err != OK) {
- ERR_PRINT("Invalid icon (" + String(info.preset_key) + "): '" + icon_path + "'.");
- return ERR_UNCONFIGURED;
- }
- img->resize(side_size, side_size);
- err = img->save_png(p_iconset_dir + info.export_name);
- if (err) {
- String err_str = String("Failed to export icon(" + String(info.preset_key) + "): '" + icon_path + "'.");
- ERR_PRINT(err_str.utf8().get_data());
- return err;
- }
- } else {
- if (info.is_required) {
- String err_str = String("Required icon (") + info.preset_key + ") is not specified in the preset.";
- ERR_PRINT(err_str);
- return ERR_UNCONFIGURED;
- } else {
- String err_str = String("Icon (") + info.preset_key + ") is not specified in the preset.";
- WARN_PRINT(err_str);
- }
- continue;
+ // Resize main app icon
+ icon_path = ProjectSettings::get_singleton()->get("application/config/icon");
+ Ref<Image> img = memnew(Image);
+ Error err = ImageLoader::load_image(icon_path, img);
+ if (err != OK) {
+ ERR_PRINT("Invalid icon (" + String(info.preset_key) + "): '" + icon_path + "'.");
+ return ERR_UNCONFIGURED;
+ }
+ img->resize(side_size, side_size);
+ err = img->save_png(p_iconset_dir + info.export_name);
+ if (err) {
+ String err_str = String("Failed to export icon(" + String(info.preset_key) + "): '" + icon_path + "'.");
+ ERR_PRINT(err_str.utf8().get_data());
+ return err;
}
} else {
- // Load custom icon
+ // Load custom icon and resize if required
Ref<Image> img = memnew(Image);
Error err = ImageLoader::load_image(icon_path, img);
if (err != OK) {
@@ -533,11 +519,13 @@ Error EditorExportPlatformIOS::_export_icons(const Ref<EditorExportPreset> &p_pr
return ERR_UNCONFIGURED;
}
if (img->get_width() != side_size || img->get_height() != side_size) {
- ERR_PRINT("Invalid icon size (" + String(info.preset_key) + "): '" + icon_path + "'.");
- return ERR_UNCONFIGURED;
+ WARN_PRINT("Icon (" + String(info.preset_key) + "): '" + icon_path + "' has incorrect size (" + String::num_int64(img->get_width()) + "x" + String::num_int64(img->get_height()) + ") and was automatically resized to " + String::num_int64(side_size) + "x" + String::num_int64(side_size) + ".");
+ img->resize(side_size, side_size);
+ err = img->save_png(p_iconset_dir + info.export_name);
+ } else {
+ err = da->copy(icon_path, p_iconset_dir + info.export_name);
}
- err = da->copy(icon_path, p_iconset_dir + info.export_name);
if (err) {
memdelete(da);
String err_str = String("Failed to export icon(" + String(info.preset_key) + "): '" + icon_path + "'.");
@@ -649,8 +637,13 @@ Error EditorExportPlatformIOS::_export_loading_screen_images(const Ref<EditorExp
for (uint64_t i = 0; i < sizeof(loading_screen_infos) / sizeof(loading_screen_infos[0]); ++i) {
LoadingScreenInfo info = loading_screen_infos[i];
String loading_screen_file = p_preset->get(info.preset_key);
+
+ Color boot_bg_color = ProjectSettings::get_singleton()->get("application/boot_splash/bg_color");
+ String boot_logo_path = ProjectSettings::get_singleton()->get("application/boot_splash/image");
+ bool boot_logo_scale = ProjectSettings::get_singleton()->get("application/boot_splash/fullsize");
+
if (loading_screen_file.size() > 0) {
- // Load custom loading screens
+ // Load custom loading screens, and resize if required.
Ref<Image> img = memnew(Image);
Error err = ImageLoader::load_image(loading_screen_file, img);
if (err != OK) {
@@ -658,22 +651,31 @@ Error EditorExportPlatformIOS::_export_loading_screen_images(const Ref<EditorExp
return ERR_UNCONFIGURED;
}
if (img->get_width() != info.width || img->get_height() != info.height) {
- ERR_PRINT("Invalid loading screen size (" + String(info.preset_key) + "): '" + loading_screen_file + "'.");
- return ERR_UNCONFIGURED;
+ WARN_PRINT("Loading screen (" + String(info.preset_key) + "): '" + loading_screen_file + "' has incorrect size (" + String::num_int64(img->get_width()) + "x" + String::num_int64(img->get_height()) + ") and was automatically resized to " + String::num_int64(info.width) + "x" + String::num_int64(info.height) + ".");
+ float aspect_ratio = (float)img->get_width() / (float)img->get_height();
+ if (boot_logo_scale) {
+ if (info.height * aspect_ratio <= info.width) {
+ img->resize(info.height * aspect_ratio, info.height);
+ } else {
+ img->resize(info.width, info.width / aspect_ratio);
+ }
+ }
+ Ref<Image> new_img = memnew(Image);
+ new_img->create(info.width, info.height, false, Image::FORMAT_RGBA8);
+ new_img->fill(boot_bg_color);
+ _blend_and_rotate(new_img, img, false);
+ err = new_img->save_png(p_dest_dir + info.export_name);
+ } else {
+ err = da->copy(loading_screen_file, p_dest_dir + info.export_name);
}
- err = da->copy(loading_screen_file, p_dest_dir + info.export_name);
if (err) {
memdelete(da);
String err_str = String("Failed to export loading screen (") + info.preset_key + ") from path '" + loading_screen_file + "'.";
ERR_PRINT(err_str.utf8().get_data());
return err;
}
- } else if ((bool)p_preset->get("launch_screens/generate_missing")) {
+ } else {
// Generate loading screen from the splash screen
- Color boot_bg_color = ProjectSettings::get_singleton()->get("application/boot_splash/bg_color");
- String boot_logo_path = ProjectSettings::get_singleton()->get("application/boot_splash/image");
- bool boot_logo_scale = ProjectSettings::get_singleton()->get("application/boot_splash/fullsize");
-
Ref<Image> img = memnew(Image);
img->create(info.width, info.height, false, Image::FORMAT_RGBA8);
img->fill(boot_bg_color);
@@ -713,9 +715,6 @@ Error EditorExportPlatformIOS::_export_loading_screen_images(const Ref<EditorExp
String err_str = String("Failed to export loading screen (") + info.preset_key + ") from splash screen.";
WARN_PRINT(err_str.utf8().get_data());
}
- } else {
- String err_str = String("No loading screen (") + info.preset_key + ") specified.";
- WARN_PRINT(err_str.utf8().get_data());
}
}
memdelete(da);
@@ -1751,18 +1750,6 @@ bool EditorExportPlatformIOS::can_export(const Ref<EditorExportPreset> &p_preset
valid = false;
}
- for (uint64_t i = 0; i < (sizeof(icon_infos) / sizeof(icon_infos[0])); ++i) {
- IconInfo info = icon_infos[i];
- String icon_path = p_preset->get(info.preset_key);
- if (icon_path.length() == 0) {
- if (info.is_required) {
- err += TTR("Required icon is not specified in the preset.") + "\n";
- valid = false;
- }
- break;
- }
- }
-
const String etc_error = test_etc2();
if (!etc_error.is_empty()) {
valid = false;
diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py
index b57f3b3f16..b6be44fbb2 100644
--- a/platform/javascript/detect.py
+++ b/platform/javascript/detect.py
@@ -89,10 +89,10 @@ def configure(env):
if env["tools"]:
if not env["threads_enabled"]:
- print("Threads must be enabled to build the editor. Please add the 'threads_enabled=yes' option")
- sys.exit(255)
+ print('Note: Forcing "threads_enabled=yes" as it is required for the web editor.')
+ env["threads_enabled"] = "yes"
if env["initial_memory"] < 64:
- print("Editor build requires at least 64MiB of initial memory. Forcing it.")
+ print('Note: Forcing "initial_memory=64" as it is required for the web editor.')
env["initial_memory"] = 64
env.Append(CCFLAGS=["-frtti"])
elif env["builtin_icu"]:
diff --git a/platform/javascript/display_server_javascript.cpp b/platform/javascript/display_server_javascript.cpp
index b9f691ea43..e7564a599c 100644
--- a/platform/javascript/display_server_javascript.cpp
+++ b/platform/javascript/display_server_javascript.cpp
@@ -738,7 +738,6 @@ DisplayServerJavaScript::~DisplayServerJavaScript() {
bool DisplayServerJavaScript::has_feature(Feature p_feature) const {
switch (p_feature) {
- //case FEATURE_CONSOLE_WINDOW:
//case FEATURE_GLOBAL_MENU:
//case FEATURE_HIDPI:
//case FEATURE_IME:
diff --git a/platform/javascript/export/export_plugin.cpp b/platform/javascript/export/export_plugin.cpp
index 81ffae82bf..db0d506cdf 100644
--- a/platform/javascript/export/export_plugin.cpp
+++ b/platform/javascript/export/export_plugin.cpp
@@ -333,9 +333,9 @@ void EditorExportPlatformJavaScript::get_export_options(List<ExportOption> *r_op
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "progressive_web_app/offline_page", PROPERTY_HINT_FILE, "*.html"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "progressive_web_app/display", PROPERTY_HINT_ENUM, "Fullscreen,Standalone,Minimal UI,Browser"), 1));
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "progressive_web_app/orientation", PROPERTY_HINT_ENUM, "Any,Landscape,Portrait"), 0));
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "progressive_web_app/icon_144x144", PROPERTY_HINT_FILE, "*.png,*.webp,*.svg,*.svgz"), ""));
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "progressive_web_app/icon_180x180", PROPERTY_HINT_FILE, "*.png,*.webp,*.svg,*.svgz"), ""));
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "progressive_web_app/icon_512x512", PROPERTY_HINT_FILE, "*.png,*.webp,*.svg,*.svgz"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "progressive_web_app/icon_144x144", PROPERTY_HINT_FILE, "*.png,*.webp,*.svg"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "progressive_web_app/icon_180x180", PROPERTY_HINT_FILE, "*.png,*.webp,*.svg"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "progressive_web_app/icon_512x512", PROPERTY_HINT_FILE, "*.png,*.webp,*.svg"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::COLOR, "progressive_web_app/background_color", PROPERTY_HINT_COLOR_NO_ALPHA), Color()));
}
diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp
index b0eea54aa9..39eea13ca1 100644
--- a/platform/javascript/os_javascript.cpp
+++ b/platform/javascript/os_javascript.cpp
@@ -107,11 +107,11 @@ void OS_JavaScript::finalize() {
// Miscellaneous
-Error OS_JavaScript::execute(const String &p_path, const List<String> &p_arguments, String *r_pipe, int *r_exitcode, bool read_stderr, Mutex *p_pipe_mutex) {
+Error OS_JavaScript::execute(const String &p_path, const List<String> &p_arguments, String *r_pipe, int *r_exitcode, bool read_stderr, Mutex *p_pipe_mutex, bool p_open_console) {
return create_process(p_path, p_arguments);
}
-Error OS_JavaScript::create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id) {
+Error OS_JavaScript::create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id, bool p_open_console) {
Array args;
for (const String &E : p_arguments) {
args.push_back(E);
diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h
index c12088bfbe..3404fe9dcf 100644
--- a/platform/javascript/os_javascript.h
+++ b/platform/javascript/os_javascript.h
@@ -70,8 +70,8 @@ public:
MainLoop *get_main_loop() const override;
bool main_loop_iterate();
- Error execute(const String &p_path, const List<String> &p_arguments, String *r_pipe = nullptr, int *r_exitcode = nullptr, bool read_stderr = false, Mutex *p_pipe_mutex = nullptr) override;
- Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr) override;
+ Error execute(const String &p_path, const List<String> &p_arguments, String *r_pipe = nullptr, int *r_exitcode = nullptr, bool read_stderr = false, Mutex *p_pipe_mutex = nullptr, bool p_open_console = false) override;
+ Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr, bool p_open_console = false) override;
Error kill(const ProcessID &p_pid) override;
int get_process_id() const override;
int get_processor_count() const override;
diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/display_server_x11.cpp
index c4f7a3a646..318d014ee5 100644
--- a/platform/linuxbsd/display_server_x11.cpp
+++ b/platform/linuxbsd/display_server_x11.cpp
@@ -365,21 +365,6 @@ void DisplayServerX11::mouse_warp_to_position(const Point2i &p_to) {
}
Point2i DisplayServerX11::mouse_get_position() const {
- int root_x, root_y;
- int win_x, win_y;
- unsigned int mask_return;
- Window window_returned;
-
- Bool result = XQueryPointer(x11_display, RootWindow(x11_display, DefaultScreen(x11_display)), &window_returned,
- &window_returned, &root_x, &root_y, &win_x, &win_y,
- &mask_return);
- if (result == True) {
- return Point2i(root_x, root_y);
- }
- return Point2i();
-}
-
-Point2i DisplayServerX11::mouse_get_absolute_position() const {
int number_of_screens = XScreenCount(x11_display);
for (int i = 0; i < number_of_screens; i++) {
Window root, child;
diff --git a/platform/linuxbsd/display_server_x11.h b/platform/linuxbsd/display_server_x11.h
index 1dcedabb1a..8929f528d6 100644
--- a/platform/linuxbsd/display_server_x11.h
+++ b/platform/linuxbsd/display_server_x11.h
@@ -289,7 +289,6 @@ public:
virtual void mouse_warp_to_position(const Point2i &p_to) override;
virtual Point2i mouse_get_position() const override;
- virtual Point2i mouse_get_absolute_position() const override;
virtual MouseButton mouse_get_button_state() const override;
virtual void clipboard_set(const String &p_text) override;
diff --git a/platform/osx/display_server_osx.h b/platform/osx/display_server_osx.h
index 4b558d973d..d609a84e50 100644
--- a/platform/osx/display_server_osx.h
+++ b/platform/osx/display_server_osx.h
@@ -98,6 +98,8 @@ public:
NSTimeInterval last_warp = 0;
bool ignore_warp = false;
+ float display_max_scale = 1.f;
+
Vector<KeyEvent> key_event_buffer;
int key_event_pos;
@@ -214,7 +216,6 @@ public:
virtual void mouse_warp_to_position(const Point2i &p_to) override;
virtual Point2i mouse_get_position() const override;
- virtual Point2i mouse_get_absolute_position() const override;
virtual MouseButton mouse_get_button_state() const override;
virtual void clipboard_set(const String &p_text) override;
@@ -314,9 +315,6 @@ public:
virtual void set_native_icon(const String &p_filename) override;
virtual void set_icon(const Ref<Image> &p_icon) override;
- virtual void console_set_visible(bool p_enabled) override;
- virtual bool is_console_visible() const override;
-
static DisplayServer *create_func(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error);
static Vector<String> get_rendering_drivers_func();
diff --git a/platform/osx/display_server_osx.mm b/platform/osx/display_server_osx.mm
index 27d302a984..e3b4333ec8 100644
--- a/platform/osx/display_server_osx.mm
+++ b/platform/osx/display_server_osx.mm
@@ -158,12 +158,7 @@ static NSCursor *_cursorFromSelector(SEL selector, SEL fallback = nil) {
}
if (wd.transient_parent != DisplayServerOSX::INVALID_WINDOW_ID) {
- DisplayServerOSX::WindowData &pwd = DS_OSX->windows[wd.transient_parent];
- [pwd.window_object makeKeyAndOrderFront:nil]; // Move focus back to parent.
DS_OSX->window_set_transient(window_id, DisplayServerOSX::INVALID_WINDOW_ID);
- } else if ((window_id != DisplayServerOSX::MAIN_WINDOW_ID) && (DS_OSX->windows.size() == 1)) {
- DisplayServerOSX::WindowData &pwd = DS_OSX->windows[DisplayServerOSX::MAIN_WINDOW_ID];
- [pwd.window_object makeKeyAndOrderFront:nil]; // Move focus back to main window if there is no parent or other windows left.
}
#if defined(GLES3_ENABLED)
@@ -1480,7 +1475,6 @@ bool DisplayServerOSX::has_feature(Feature p_feature) const {
case FEATURE_CURSOR_SHAPE:
case FEATURE_CUSTOM_CURSOR_SHAPE:
case FEATURE_NATIVE_DIALOG:
- //case FEATURE_CONSOLE_WINDOW:
case FEATURE_IME:
case FEATURE_WINDOW_TRANSPARENCY:
case FEATURE_HIDPI:
@@ -2002,10 +1996,6 @@ void DisplayServerOSX::mouse_warp_to_position(const Point2i &p_to) {
}
Point2i DisplayServerOSX::mouse_get_position() const {
- return last_mouse_pos;
-}
-
-Point2i DisplayServerOSX::mouse_get_absolute_position() const {
_THREAD_SAFE_METHOD_
const NSPoint mouse_pos = [NSEvent mouseLocation];
@@ -2072,10 +2062,8 @@ int DisplayServerOSX::get_screen_count() const {
// to convert between OS X native screen coordinates and the ones expected by Godot
static bool displays_arrangement_dirty = true;
-static bool displays_scale_dirty = true;
static void displays_arrangement_changed(CGDirectDisplayID display_id, CGDisplayChangeSummaryFlags flags, void *user_info) {
displays_arrangement_dirty = true;
- displays_scale_dirty = true;
}
Point2i DisplayServerOSX::_get_screens_origin() const {
@@ -2186,15 +2174,8 @@ float DisplayServerOSX::screen_get_scale(int p_screen) const {
float DisplayServerOSX::screen_get_max_scale() const {
_THREAD_SAFE_METHOD_
- static float scale = 1.f;
- if (displays_scale_dirty) {
- int screen_count = get_screen_count();
- for (int i = 0; i < screen_count; i++) {
- scale = fmax(scale, screen_get_scale(i));
- }
- displays_scale_dirty = false;
- }
- return scale;
+ // Note: Do not update max display scale on screen configuration change, existing editor windows can't be rescaled on the fly.
+ return display_max_scale;
}
Rect2i DisplayServerOSX::screen_get_usable_rect(int p_screen) const {
@@ -2381,8 +2362,24 @@ int DisplayServerOSX::window_get_current_screen(WindowID p_window) const {
void DisplayServerOSX::window_set_current_screen(int p_screen, WindowID p_window) {
_THREAD_SAFE_METHOD_
+
+ ERR_FAIL_COND(!windows.has(p_window));
+ WindowData &wd = windows[p_window];
+
+ bool was_fullscreen = false;
+ if (wd.fullscreen) {
+ // Temporary exit fullscreen mode to move window.
+ [wd.window_object toggleFullScreen:nil];
+ was_fullscreen = true;
+ }
+
Point2i wpos = window_get_position(p_window) - screen_get_position(window_get_current_screen(p_window));
window_set_position(wpos + screen_get_position(p_screen), p_window);
+
+ if (was_fullscreen) {
+ // Re-enter fullscreen mode.
+ [wd.window_object toggleFullScreen:nil];
+ }
}
void DisplayServerOSX::window_set_transient(WindowID p_window, WindowID p_parent) {
@@ -2405,7 +2402,7 @@ void DisplayServerOSX::window_set_transient(WindowID p_window, WindowID p_parent
wd_window.transient_parent = INVALID_WINDOW_ID;
wd_parent.transient_children.erase(p_window);
- [wd_parent.window_object removeChildWindow:wd_window.window_object];
+ [wd_window.window_object setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
} else {
ERR_FAIL_COND(!windows.has(p_parent));
ERR_FAIL_COND_MSG(wd_window.transient_parent != INVALID_WINDOW_ID, "Window already has a transient parent");
@@ -2414,7 +2411,7 @@ void DisplayServerOSX::window_set_transient(WindowID p_window, WindowID p_parent
wd_window.transient_parent = p_parent;
wd_parent.transient_children.insert(p_window);
- [wd_parent.window_object addChildWindow:wd_window.window_object ordered:NSWindowAbove];
+ [wd_window.window_object setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary];
}
}
@@ -2424,7 +2421,9 @@ Point2i DisplayServerOSX::window_get_position(WindowID p_window) const {
ERR_FAIL_COND_V(!windows.has(p_window), Point2i());
const WindowData &wd = windows[p_window];
- NSRect nsrect = [wd.window_object frame];
+ // Use content rect position (without titlebar / window border).
+ const NSRect contentRect = [wd.window_view frame];
+ const NSRect nsrect = [wd.window_object convertRectToScreen:contentRect];
Point2i pos;
// Return the position of the top-left corner, for OS X the y starts at the bottom
@@ -2452,7 +2451,16 @@ void DisplayServerOSX::window_set_position(const Point2i &p_position, WindowID p
position += _get_screens_origin();
position /= screen_get_max_scale();
- [wd.window_object setFrameTopLeftPoint:NSMakePoint(position.x, position.y)];
+ // Remove titlebar / window border size.
+ const NSRect contentRect = [wd.window_view frame];
+ const NSRect windowRect = [wd.window_object frame];
+ const NSRect nsrect = [wd.window_object convertRectToScreen:contentRect];
+ Point2i offset;
+ offset.x = (nsrect.origin.x - windowRect.origin.x);
+ offset.y = (nsrect.origin.y + nsrect.size.height);
+ offset.y -= (windowRect.origin.y + windowRect.size.height);
+
+ [wd.window_object setFrameTopLeftPoint:NSMakePoint(position.x - offset.x, position.y - offset.y)];
_update_window(wd);
_get_mouse_pos(wd, [wd.window_object mouseLocationOutsideOfEventStream]);
@@ -3679,14 +3687,6 @@ void DisplayServerOSX::swap_buffers() {
#endif
}
-void DisplayServerOSX::console_set_visible(bool p_enabled) {
- //TODO - open terminal and redirect
-}
-
-bool DisplayServerOSX::is_console_visible() const {
- return isatty(STDIN_FILENO);
-}
-
DisplayServerOSX::DisplayServerOSX(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) {
Input::get_singleton()->set_event_dispatch_function(_dispatch_input_events);
@@ -3708,7 +3708,11 @@ DisplayServerOSX::DisplayServerOSX(const String &p_rendering_driver, WindowMode
keyboard_layout_dirty = true;
displays_arrangement_dirty = true;
- displays_scale_dirty = true;
+
+ int screen_count = get_screen_count();
+ for (int i = 0; i < screen_count; i++) {
+ display_max_scale = fmax(display_max_scale, screen_get_scale(i));
+ }
// Register to be notified on keyboard layout changes
CFNotificationCenterAddObserver(CFNotificationCenterGetDistributedCenter(),
diff --git a/platform/osx/export/codesign.cpp b/platform/osx/export/codesign.cpp
new file mode 100644
index 0000000000..8ea6ff519d
--- /dev/null
+++ b/platform/osx/export/codesign.cpp
@@ -0,0 +1,1564 @@
+/*************************************************************************/
+/* codesign.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 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 "codesign.h"
+
+#include "lipo.h"
+#include "macho.h"
+#include "plist.h"
+
+#include "core/os/os.h"
+#include "editor/editor_settings.h"
+#include "modules/modules_enabled.gen.h" // For regex.
+
+#include <ctime>
+
+#ifdef MODULE_REGEX_ENABLED
+
+/*************************************************************************/
+/* CodeSignCodeResources */
+/*************************************************************************/
+
+String CodeSignCodeResources::hash_sha1_base64(const String &p_path) {
+ FileAccessRef fa = FileAccess::open(p_path, FileAccess::READ);
+ ERR_FAIL_COND_V_MSG(!fa, String(), vformat("CodeSign/CodeResources: Can't open file: \"%s\".", p_path));
+
+ CryptoCore::SHA1Context ctx;
+ ctx.start();
+
+ unsigned char step[4096];
+ while (true) {
+ uint64_t br = fa->get_buffer(step, 4096);
+ if (br > 0) {
+ ctx.update(step, br);
+ }
+ if (br < 4096) {
+ break;
+ }
+ }
+
+ unsigned char hash[0x14];
+ ctx.finish(hash);
+ fa->close();
+
+ return CryptoCore::b64_encode_str(hash, 0x14);
+}
+
+String CodeSignCodeResources::hash_sha256_base64(const String &p_path) {
+ FileAccessRef fa = FileAccess::open(p_path, FileAccess::READ);
+ ERR_FAIL_COND_V_MSG(!fa, String(), vformat("CodeSign/CodeResources: Can't open file: \"%s\".", p_path));
+
+ CryptoCore::SHA256Context ctx;
+ ctx.start();
+
+ unsigned char step[4096];
+ while (true) {
+ uint64_t br = fa->get_buffer(step, 4096);
+ if (br > 0) {
+ ctx.update(step, br);
+ }
+ if (br < 4096) {
+ break;
+ }
+ }
+
+ unsigned char hash[0x20];
+ ctx.finish(hash);
+ fa->close();
+
+ return CryptoCore::b64_encode_str(hash, 0x20);
+}
+
+void CodeSignCodeResources::add_rule1(const String &p_rule, const String &p_key, int p_weight, bool p_store) {
+ rules1.push_back(CRRule(p_rule, p_key, p_weight, p_store));
+}
+
+void CodeSignCodeResources::add_rule2(const String &p_rule, const String &p_key, int p_weight, bool p_store) {
+ rules2.push_back(CRRule(p_rule, p_key, p_weight, p_store));
+}
+
+CodeSignCodeResources::CRMatch CodeSignCodeResources::match_rules1(const String &p_path) const {
+ CRMatch found = CRMatch::CR_MATCH_NO;
+ int weight = 0;
+ for (int i = 0; i < rules1.size(); i++) {
+ RegEx regex = RegEx(rules1[i].file_pattern);
+ if (regex.search(p_path).is_valid()) {
+ if (rules1[i].key == "omit") {
+ return CRMatch::CR_MATCH_NO;
+ } else if (rules1[i].key == "nested") {
+ if (weight <= rules1[i].weight) {
+ found = CRMatch::CR_MATCH_NESTED;
+ weight = rules1[i].weight;
+ }
+ } else if (rules1[i].key == "optional") {
+ if (weight <= rules1[i].weight) {
+ found = CRMatch::CR_MATCH_OPTIONAL;
+ weight = rules1[i].weight;
+ }
+ } else {
+ if (weight <= rules1[i].weight) {
+ found = CRMatch::CR_MATCH_YES;
+ weight = rules1[i].weight;
+ }
+ }
+ }
+ }
+ return found;
+}
+
+CodeSignCodeResources::CRMatch CodeSignCodeResources::match_rules2(const String &p_path) const {
+ CRMatch found = CRMatch::CR_MATCH_NO;
+ int weight = 0;
+ for (int i = 0; i < rules2.size(); i++) {
+ RegEx regex = RegEx(rules2[i].file_pattern);
+ if (regex.search(p_path).is_valid()) {
+ if (rules2[i].key == "omit") {
+ return CRMatch::CR_MATCH_NO;
+ } else if (rules2[i].key == "nested") {
+ if (weight <= rules2[i].weight) {
+ found = CRMatch::CR_MATCH_NESTED;
+ weight = rules2[i].weight;
+ }
+ } else if (rules2[i].key == "optional") {
+ if (weight <= rules2[i].weight) {
+ found = CRMatch::CR_MATCH_OPTIONAL;
+ weight = rules2[i].weight;
+ }
+ } else {
+ if (weight <= rules2[i].weight) {
+ found = CRMatch::CR_MATCH_YES;
+ weight = rules2[i].weight;
+ }
+ }
+ }
+ }
+ return found;
+}
+
+bool CodeSignCodeResources::add_file1(const String &p_root, const String &p_path) {
+ CRMatch found = match_rules1(p_path);
+ if (found != CRMatch::CR_MATCH_YES && found != CRMatch::CR_MATCH_OPTIONAL) {
+ return true; // No match.
+ }
+
+ CRFile f;
+ f.name = p_path;
+ f.optional = (found == CRMatch::CR_MATCH_OPTIONAL);
+ f.nested = false;
+ f.hash = hash_sha1_base64(p_root.plus_file(p_path));
+ print_verbose(vformat("CodeSign/CodeResources: File(V1) %s hash1:%s", f.name, f.hash));
+
+ files1.push_back(f);
+ return true;
+}
+
+bool CodeSignCodeResources::add_file2(const String &p_root, const String &p_path) {
+ CRMatch found = match_rules2(p_path);
+ if (found == CRMatch::CR_MATCH_NESTED) {
+ return add_nested_file(p_root, p_path, p_root.plus_file(p_path));
+ }
+ if (found != CRMatch::CR_MATCH_YES && found != CRMatch::CR_MATCH_OPTIONAL) {
+ return true; // No match.
+ }
+
+ CRFile f;
+ f.name = p_path;
+ f.optional = (found == CRMatch::CR_MATCH_OPTIONAL);
+ f.nested = false;
+ f.hash = hash_sha1_base64(p_root.plus_file(p_path));
+ f.hash2 = hash_sha256_base64(p_root.plus_file(p_path));
+
+ print_verbose(vformat("CodeSign/CodeResources: File(V2) %s hash1:%s hash2:%s", f.name, f.hash, f.hash2));
+
+ files2.push_back(f);
+ return true;
+}
+
+bool CodeSignCodeResources::add_nested_file(const String &p_root, const String &p_path, const String &p_exepath) {
+#define CLEANUP() \
+ if (files_to_add.size() > 1) { \
+ for (int j = 0; j < files_to_add.size(); j++) { \
+ da->remove(files_to_add[j]); \
+ } \
+ }
+
+ DirAccessRef da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
+ ERR_FAIL_COND_V(!da, false);
+
+ Vector<String> files_to_add;
+ if (LipO::is_lipo(p_exepath)) {
+ String tmp_path_name = EditorPaths::get_singleton()->get_cache_dir().plus_file("_lipo");
+ Error err = da->make_dir_recursive(tmp_path_name);
+ if (err != OK) {
+ ERR_FAIL_V_MSG(false, vformat("CodeSign/CodeResources: Failed to create \"%s\" subfolder.", tmp_path_name));
+ }
+ LipO lip;
+ if (lip.open_file(p_exepath)) {
+ for (int i = 0; i < lip.get_arch_count(); i++) {
+ if (!lip.extract_arch(i, tmp_path_name.plus_file("_rqexe_" + itos(i)))) {
+ CLEANUP();
+ ERR_FAIL_V_MSG(false, "CodeSign/CodeResources: Failed to extract thin binary.");
+ }
+ files_to_add.push_back(tmp_path_name.plus_file("_rqexe_" + itos(i)));
+ }
+ }
+ } else if (MachO::is_macho(p_exepath)) {
+ files_to_add.push_back(p_exepath);
+ }
+
+ CRFile f;
+ f.name = p_path;
+ f.optional = false;
+ f.nested = true;
+ for (int i = 0; i < files_to_add.size(); i++) {
+ MachO mh;
+ if (!mh.open_file(files_to_add[i])) {
+ CLEANUP();
+ ERR_FAIL_V_MSG(false, "CodeSign/CodeResources: Invalid executable file.");
+ }
+ PackedByteArray hash = mh.get_cdhash_sha256(); // Use SHA-256 variant, if available.
+ if (hash.size() != 0x20) {
+ hash = mh.get_cdhash_sha1(); // Use SHA-1 instead.
+ if (hash.size() != 0x14) {
+ CLEANUP();
+ ERR_FAIL_V_MSG(false, "CodeSign/CodeResources: Unsigned nested executable file.");
+ }
+ }
+ hash.resize(0x14); // Always clamp to 0x14 size.
+ f.hash = CryptoCore::b64_encode_str(hash.ptr(), hash.size());
+
+ PackedByteArray rq_blob = mh.get_requirements();
+ String req_string;
+ if (rq_blob.size() > 8) {
+ CodeSignRequirements rq = CodeSignRequirements(rq_blob);
+ Vector<String> rqs = rq.parse_requirements();
+ for (int j = 0; j < rqs.size(); j++) {
+ if (rqs[j].begins_with("designated => ")) {
+ req_string = rqs[j].replace("designated => ", "");
+ }
+ }
+ }
+ if (req_string.is_empty()) {
+ req_string = "cdhash H\"" + String::hex_encode_buffer(hash.ptr(), hash.size()) + "\"";
+ }
+ print_verbose(vformat("CodeSign/CodeResources: Nested object %s (cputype: %d) cdhash:%s designated rq:%s", f.name, mh.get_cputype(), f.hash, req_string));
+ if (f.requirements != req_string) {
+ if (i != 0) {
+ f.requirements += " or ";
+ }
+ f.requirements += req_string;
+ }
+ }
+ files2.push_back(f);
+
+ CLEANUP();
+ return true;
+
+#undef CLEANUP
+}
+
+bool CodeSignCodeResources::add_folder_recursive(const String &p_root, const String &p_path, const String &p_main_exe_path) {
+ DirAccessRef da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
+ ERR_FAIL_COND_V(!da, false);
+ Error err = da->change_dir(p_root.plus_file(p_path));
+ ERR_FAIL_COND_V(err != OK, false);
+
+ bool ret = true;
+ da->list_dir_begin();
+ String n = da->get_next();
+ while (n != String()) {
+ if (n != "." && n != "..") {
+ String path = p_root.plus_file(p_path).plus_file(n);
+ if (path == p_main_exe_path) {
+ n = da->get_next();
+ continue; // Skip main executable.
+ }
+ if (da->current_is_dir()) {
+ CRMatch found = match_rules2(p_path.plus_file(n));
+ String fmw_ver = "Current"; // Framework version (default).
+ String info_path;
+ String main_exe;
+ bool bundle = false;
+ if (da->file_exists(path.plus_file("Contents/Info.plist"))) {
+ info_path = path.plus_file("Contents/Info.plist");
+ main_exe = path.plus_file("Contents/MacOS");
+ bundle = true;
+ } else if (da->file_exists(path.plus_file(vformat("Versions/%s/Resources/Info.plist", fmw_ver)))) {
+ info_path = path.plus_file(vformat("Versions/%s/Resources/Info.plist", fmw_ver));
+ main_exe = path.plus_file(vformat("Versions/%s", fmw_ver));
+ bundle = true;
+ } else if (da->file_exists(path.plus_file("Info.plist"))) {
+ info_path = path.plus_file("Info.plist");
+ main_exe = path;
+ bundle = true;
+ }
+ if (bundle && found == CRMatch::CR_MATCH_NESTED && !info_path.is_empty()) {
+ // Read Info.plist.
+ PList info_plist;
+ if (info_plist.load_file(info_path)) {
+ if (info_plist.get_root()->data_type == PList::PLNodeType::PL_NODE_TYPE_DICT && info_plist.get_root()->data_dict.has("CFBundleExecutable")) {
+ main_exe = main_exe.plus_file(String::utf8(info_plist.get_root()->data_dict["CFBundleExecutable"]->data_string.get_data()));
+ } else {
+ ERR_FAIL_V_MSG(false, "CodeSign/CodeResources: Invalid Info.plist, no exe name.");
+ }
+ } else {
+ ERR_FAIL_V_MSG(false, "CodeSign/CodeResources: Invalid Info.plist, can't load.");
+ }
+ ret = ret && add_nested_file(p_root, p_path.plus_file(n), main_exe);
+ } else {
+ ret = ret && add_folder_recursive(p_root, p_path.plus_file(n), p_main_exe_path);
+ }
+ } else {
+ ret = ret && add_file1(p_root, p_path.plus_file(n));
+ ret = ret && add_file2(p_root, p_path.plus_file(n));
+ }
+ }
+
+ n = da->get_next();
+ }
+
+ da->list_dir_end();
+ return ret;
+}
+
+bool CodeSignCodeResources::save_to_file(const String &p_path) {
+ PList pl;
+
+ print_verbose(vformat("CodeSign/CodeResources: Writing to file: %s", p_path));
+
+ // Write version 1 hashes.
+ Ref<PListNode> files1_dict = PListNode::new_dict();
+ pl.get_root()->push_subnode(files1_dict, "files");
+ for (int i = 0; i < files1.size(); i++) {
+ if (files1[i].optional) {
+ Ref<PListNode> file_dict = PListNode::new_dict();
+ files1_dict->push_subnode(file_dict, files1[i].name);
+
+ file_dict->push_subnode(PListNode::new_data(files1[i].hash), "hash");
+ file_dict->push_subnode(PListNode::new_bool(true), "optional");
+ } else {
+ files1_dict->push_subnode(PListNode::new_data(files1[i].hash), files1[i].name);
+ }
+ }
+
+ // Write version 2 hashes.
+ Ref<PListNode> files2_dict = PListNode::new_dict();
+ pl.get_root()->push_subnode(files2_dict, "files2");
+ for (int i = 0; i < files2.size(); i++) {
+ Ref<PListNode> file_dict = PListNode::new_dict();
+ files2_dict->push_subnode(file_dict, files2[i].name);
+
+ if (files2[i].nested) {
+ file_dict->push_subnode(PListNode::new_data(files2[i].hash), "cdhash");
+ file_dict->push_subnode(PListNode::new_string(files2[i].requirements), "requirement");
+ } else {
+ file_dict->push_subnode(PListNode::new_data(files2[i].hash), "hash");
+ file_dict->push_subnode(PListNode::new_data(files2[i].hash2), "hash2");
+ if (files2[i].optional) {
+ file_dict->push_subnode(PListNode::new_bool(true), "optional");
+ }
+ }
+ }
+
+ // Write version 1 rules.
+ Ref<PListNode> rules1_dict = PListNode::new_dict();
+ pl.get_root()->push_subnode(rules1_dict, "rules");
+ for (int i = 0; i < rules1.size(); i++) {
+ if (rules1[i].store) {
+ if (rules1[i].key.is_empty() && rules1[i].weight <= 0) {
+ rules1_dict->push_subnode(PListNode::new_bool(true), rules1[i].file_pattern);
+ } else {
+ Ref<PListNode> rule_dict = PListNode::new_dict();
+ rules1_dict->push_subnode(rule_dict, rules1[i].file_pattern);
+ if (!rules1[i].key.is_empty()) {
+ rule_dict->push_subnode(PListNode::new_bool(true), rules1[i].key);
+ }
+ if (rules1[i].weight != 1) {
+ rule_dict->push_subnode(PListNode::new_real(rules1[i].weight), "weight");
+ }
+ }
+ }
+ }
+
+ // Write version 2 rules.
+ Ref<PListNode> rules2_dict = PListNode::new_dict();
+ pl.get_root()->push_subnode(rules2_dict, "rules2");
+ for (int i = 0; i < rules2.size(); i++) {
+ if (rules2[i].store) {
+ if (rules2[i].key.is_empty() && rules2[i].weight <= 0) {
+ rules2_dict->push_subnode(PListNode::new_bool(true), rules2[i].file_pattern);
+ } else {
+ Ref<PListNode> rule_dict = PListNode::new_dict();
+ rules2_dict->push_subnode(rule_dict, rules2[i].file_pattern);
+ if (!rules2[i].key.is_empty()) {
+ rule_dict->push_subnode(PListNode::new_bool(true), rules2[i].key);
+ }
+ if (rules2[i].weight != 1) {
+ rule_dict->push_subnode(PListNode::new_real(rules2[i].weight), "weight");
+ }
+ }
+ }
+ }
+ String text = pl.save_text();
+ ERR_FAIL_COND_V_MSG(text.is_empty(), false, "CodeSign/CodeResources: Generating resources PList failed.");
+
+ FileAccessRef fa = FileAccess::open(p_path, FileAccess::WRITE);
+ ERR_FAIL_COND_V_MSG(!fa, false, vformat("CodeSign/CodeResources: Can't open file: \"%s\".", p_path));
+
+ CharString cs = text.utf8();
+ fa->store_buffer((const uint8_t *)cs.ptr(), cs.length());
+ fa->close();
+ return true;
+}
+
+/*************************************************************************/
+/* CodeSignRequirements */
+/*************************************************************************/
+
+CodeSignRequirements::CodeSignRequirements() {
+ blob.append_array({ 0xFA, 0xDE, 0x0C, 0x01 }); // Requirement set magic.
+ blob.append_array({ 0x00, 0x00, 0x00, 0x0C }); // Length of requirements set (12 bytes).
+ blob.append_array({ 0x00, 0x00, 0x00, 0x00 }); // Empty.
+}
+
+CodeSignRequirements::CodeSignRequirements(const PackedByteArray &p_data) {
+ blob = p_data;
+}
+
+_FORCE_INLINE_ void CodeSignRequirements::_parse_certificate_slot(uint32_t &r_pos, String &r_out, uint32_t p_rq_size) const {
+#define _R(x) BSWAP32(*(uint32_t *)(blob.ptr() + x))
+ ERR_FAIL_COND_MSG(r_pos >= p_rq_size, "CodeSign/Requirements: Out of bounds.");
+ r_out += "certificate ";
+ uint32_t tag_slot = _R(r_pos);
+ if (tag_slot == 0x00000000) {
+ r_out += "leaf";
+ } else if (tag_slot == 0xffffffff) {
+ r_out += "root";
+ } else {
+ r_out += itos((int32_t)tag_slot);
+ }
+ r_pos += 4;
+#undef _R
+}
+
+_FORCE_INLINE_ void CodeSignRequirements::_parse_key(uint32_t &r_pos, String &r_out, uint32_t p_rq_size) const {
+#define _R(x) BSWAP32(*(uint32_t *)(blob.ptr() + x))
+ ERR_FAIL_COND_MSG(r_pos >= p_rq_size, "CodeSign/Requirements: Out of bounds.");
+ uint32_t key_size = _R(r_pos);
+ ERR_FAIL_COND_MSG(r_pos + key_size > p_rq_size, "CodeSign/Requirements: Out of bounds.");
+ CharString key;
+ key.resize(key_size);
+ memcpy(key.ptrw(), blob.ptr() + r_pos + 4, key_size);
+ r_pos += 4 + key_size + PAD(key_size, 4);
+ r_out += "[" + String::utf8(key, key_size) + "]";
+#undef _R
+}
+
+_FORCE_INLINE_ void CodeSignRequirements::_parse_oid_key(uint32_t &r_pos, String &r_out, uint32_t p_rq_size) const {
+#define _R(x) BSWAP32(*(uint32_t *)(blob.ptr() + x))
+ ERR_FAIL_COND_MSG(r_pos >= p_rq_size, "CodeSign/Requirements: Out of bounds.");
+ uint32_t key_size = _R(r_pos);
+ ERR_FAIL_COND_MSG(r_pos + key_size > p_rq_size, "CodeSign/Requirements: Out of bounds.");
+ r_out += "[field.";
+ r_out += itos(blob[r_pos + 4] / 40) + ".";
+ r_out += itos(blob[r_pos + 4] % 40);
+ uint32_t spos = r_pos + 5;
+ while (spos < r_pos + 4 + key_size) {
+ r_out += ".";
+ if (blob[spos] <= 127) {
+ r_out += itos(blob[spos]);
+ spos += 1;
+ } else {
+ uint32_t x = (0x7F & blob[spos]) << 7;
+ spos += 1;
+ while (blob[spos] > 127) {
+ x = (x + (0x7F & blob[spos])) << 7;
+ spos += 1;
+ }
+ x = (x + (0x7F & blob[spos]));
+ r_out += itos(x);
+ spos += 1;
+ }
+ }
+ r_out += "]";
+ r_pos += 4 + key_size + PAD(key_size, 4);
+#undef _R
+}
+
+_FORCE_INLINE_ void CodeSignRequirements::_parse_hash_string(uint32_t &r_pos, String &r_out, uint32_t p_rq_size) const {
+#define _R(x) BSWAP32(*(uint32_t *)(blob.ptr() + x))
+ ERR_FAIL_COND_MSG(r_pos >= p_rq_size, "CodeSign/Requirements: Out of bounds.");
+ uint32_t tag_size = _R(r_pos);
+ ERR_FAIL_COND_MSG(r_pos + tag_size > p_rq_size, "CodeSign/Requirements: Out of bounds.");
+ PackedByteArray data;
+ data.resize(tag_size);
+ memcpy(data.ptrw(), blob.ptr() + r_pos + 4, tag_size);
+ r_out += "H\"" + String::hex_encode_buffer(data.ptr(), data.size()) + "\"";
+ r_pos += 4 + tag_size + PAD(tag_size, 4);
+#undef _R
+}
+
+_FORCE_INLINE_ void CodeSignRequirements::_parse_value(uint32_t &r_pos, String &r_out, uint32_t p_rq_size) const {
+#define _R(x) BSWAP32(*(uint32_t *)(blob.ptr() + x))
+ ERR_FAIL_COND_MSG(r_pos >= p_rq_size, "CodeSign/Requirements: Out of bounds.");
+ uint32_t key_size = _R(r_pos);
+ ERR_FAIL_COND_MSG(r_pos + key_size > p_rq_size, "CodeSign/Requirements: Out of bounds.");
+ CharString key;
+ key.resize(key_size);
+ memcpy(key.ptrw(), blob.ptr() + r_pos + 4, key_size);
+ r_pos += 4 + key_size + PAD(key_size, 4);
+ r_out += "\"" + String::utf8(key, key_size) + "\"";
+#undef _R
+}
+
+_FORCE_INLINE_ void CodeSignRequirements::_parse_date(uint32_t &r_pos, String &r_out, uint32_t p_rq_size) const {
+#define _R(x) BSWAP32(*(uint32_t *)(blob.ptr() + x))
+ ERR_FAIL_COND_MSG(r_pos >= p_rq_size, "CodeSign/Requirements: Out of bounds.");
+ uint32_t date = _R(r_pos);
+ time_t t = 978307200 + date;
+ struct tm lt;
+#ifdef WINDOWS_ENABLED
+ gmtime_s(&lt, &t);
+#else
+ gmtime_r(&t, &lt);
+#endif
+ r_out += vformat("<%04d-%02d-%02d ", (int)(1900 + lt.tm_year), (int)(lt.tm_mon + 1), (int)(lt.tm_mday)) + vformat("%02d:%02d:%02d +0000>", (int)(lt.tm_hour), (int)(lt.tm_min), (int)(lt.tm_sec));
+#undef _R
+}
+
+_FORCE_INLINE_ bool CodeSignRequirements::_parse_match(uint32_t &r_pos, String &r_out, uint32_t p_rq_size) const {
+#define _R(x) BSWAP32(*(uint32_t *)(blob.ptr() + x))
+ ERR_FAIL_COND_V_MSG(r_pos >= p_rq_size, false, "CodeSign/Requirements: Out of bounds.");
+ uint32_t match = _R(r_pos);
+ r_pos += 4;
+ switch (match) {
+ case 0x00000000: {
+ r_out += "exists";
+ } break;
+ case 0x00000001: {
+ r_out += "= ";
+ _parse_value(r_pos, r_out, p_rq_size);
+ } break;
+ case 0x00000002: {
+ r_out += "~ ";
+ _parse_value(r_pos, r_out, p_rq_size);
+ } break;
+ case 0x00000003: {
+ r_out += "= *";
+ _parse_value(r_pos, r_out, p_rq_size);
+ } break;
+ case 0x00000004: {
+ r_out += "= ";
+ _parse_value(r_pos, r_out, p_rq_size);
+ r_out += "*";
+ } break;
+ case 0x00000005: {
+ r_out += "< ";
+ _parse_value(r_pos, r_out, p_rq_size);
+ } break;
+ case 0x00000006: {
+ r_out += "> ";
+ _parse_value(r_pos, r_out, p_rq_size);
+ } break;
+ case 0x00000007: {
+ r_out += "<= ";
+ _parse_value(r_pos, r_out, p_rq_size);
+ } break;
+ case 0x00000008: {
+ r_out += ">= ";
+ _parse_value(r_pos, r_out, p_rq_size);
+ } break;
+ case 0x00000009: {
+ r_out += "= ";
+ _parse_date(r_pos, r_out, p_rq_size);
+ } break;
+ case 0x0000000A: {
+ r_out += "< ";
+ _parse_date(r_pos, r_out, p_rq_size);
+ } break;
+ case 0x0000000B: {
+ r_out += "> ";
+ _parse_date(r_pos, r_out, p_rq_size);
+ } break;
+ case 0x0000000C: {
+ r_out += "<= ";
+ _parse_date(r_pos, r_out, p_rq_size);
+ } break;
+ case 0x0000000D: {
+ r_out += ">= ";
+ _parse_date(r_pos, r_out, p_rq_size);
+ } break;
+ case 0x0000000E: {
+ r_out += "absent";
+ } break;
+ default: {
+ return false;
+ }
+ }
+ return true;
+#undef _R
+}
+
+Vector<String> CodeSignRequirements::parse_requirements() const {
+#define _R(x) BSWAP32(*(uint32_t *)(blob.ptr() + x))
+ Vector<String> list;
+
+ // Read requirements set header.
+ ERR_FAIL_COND_V_MSG(blob.size() < 12, list, "CodeSign/Requirements: Blob is too small.");
+ uint32_t magic = _R(0);
+ ERR_FAIL_COND_V_MSG(magic != 0xfade0c01, list, "CodeSign/Requirements: Invalid set magic.");
+ uint32_t size = _R(4);
+ ERR_FAIL_COND_V_MSG(size != (uint32_t)blob.size(), list, "CodeSign/Requirements: Invalid set size.");
+ uint32_t count = _R(8);
+
+ for (uint32_t i = 0; i < count; i++) {
+ String out;
+
+ // Read requirement header.
+ uint32_t rq_type = _R(12 + i * 8);
+ uint32_t rq_offset = _R(12 + i * 8 + 4);
+ ERR_FAIL_COND_V_MSG(rq_offset + 12 >= (uint32_t)blob.size(), list, "CodeSign/Requirements: Invalid requirement offset.");
+ switch (rq_type) {
+ case 0x00000001: {
+ out += "host => ";
+ } break;
+ case 0x00000002: {
+ out += "guest => ";
+ } break;
+ case 0x00000003: {
+ out += "designated => ";
+ } break;
+ case 0x00000004: {
+ out += "library => ";
+ } break;
+ case 0x00000005: {
+ out += "plugin => ";
+ } break;
+ default: {
+ ERR_FAIL_V_MSG(list, "CodeSign/Requirements: Invalid requirement type.");
+ }
+ }
+ uint32_t rq_magic = _R(rq_offset);
+ uint32_t rq_size = _R(rq_offset + 4);
+ uint32_t rq_ver = _R(rq_offset + 8);
+ uint32_t pos = rq_offset + 12;
+ ERR_FAIL_COND_V_MSG(rq_magic != 0xfade0c00, list, "CodeSign/Requirements: Invalid requirement magic.");
+ ERR_FAIL_COND_V_MSG(rq_ver != 0x00000001, list, "CodeSign/Requirements: Invalid requirement version.");
+
+ // Read requirement tokens.
+ List<String> tokens;
+ while (pos < rq_offset + rq_size) {
+ uint32_t rq_tag = _R(pos);
+ pos += 4;
+ String token;
+ switch (rq_tag) {
+ case 0x00000000: {
+ token = "false";
+ } break;
+ case 0x00000001: {
+ token = "true";
+ } break;
+ case 0x00000002: {
+ token = "identifier ";
+ _parse_value(pos, token, rq_offset + rq_size);
+ } break;
+ case 0x00000003: {
+ token = "anchor apple";
+ } break;
+ case 0x00000004: {
+ _parse_certificate_slot(pos, token, rq_offset + rq_size);
+ token += " ";
+ _parse_hash_string(pos, token, rq_offset + rq_size);
+ } break;
+ case 0x00000005: {
+ token = "info";
+ _parse_key(pos, token, rq_offset + rq_size);
+ token += " = ";
+ _parse_value(pos, token, rq_offset + rq_size);
+ } break;
+ case 0x00000006: {
+ token = "and";
+ } break;
+ case 0x00000007: {
+ token = "or";
+ } break;
+ case 0x00000008: {
+ token = "cdhash ";
+ _parse_hash_string(pos, token, rq_offset + rq_size);
+ } break;
+ case 0x00000009: {
+ token = "!";
+ } break;
+ case 0x0000000A: {
+ token = "info";
+ _parse_key(pos, token, rq_offset + rq_size);
+ token += " ";
+ ERR_FAIL_COND_V_MSG(!_parse_match(pos, token, rq_offset + rq_size), list, "CodeSign/Requirements: Unsupported match suffix.");
+ } break;
+ case 0x0000000B: {
+ _parse_certificate_slot(pos, token, rq_offset + rq_size);
+ _parse_key(pos, token, rq_offset + rq_size);
+ token += " ";
+ ERR_FAIL_COND_V_MSG(!_parse_match(pos, token, rq_offset + rq_size), list, "CodeSign/Requirements: Unsupported match suffix.");
+ } break;
+ case 0x0000000C: {
+ _parse_certificate_slot(pos, token, rq_offset + rq_size);
+ token += " trusted";
+ } break;
+ case 0x0000000D: {
+ token = "anchor trusted";
+ } break;
+ case 0x0000000E: {
+ _parse_certificate_slot(pos, token, rq_offset + rq_size);
+ _parse_oid_key(pos, token, rq_offset + rq_size);
+ token += " ";
+ ERR_FAIL_COND_V_MSG(!_parse_match(pos, token, rq_offset + rq_size), list, "CodeSign/Requirements: Unsupported match suffix.");
+ } break;
+ case 0x0000000F: {
+ token = "anchor apple generic";
+ } break;
+ default: {
+ ERR_FAIL_V_MSG(list, "CodeSign/Requirements: Invalid requirement token.");
+ } break;
+ }
+ tokens.push_back(token);
+ }
+
+ // Polish to infix notation (w/o bracket optimization).
+ for (List<String>::Element *E = tokens.back(); E; E = E->prev()) {
+ if (E->get() == "and") {
+ ERR_FAIL_COND_V_MSG(!E->next() || !E->next()->next(), list, "CodeSign/Requirements: Invalid token sequence.");
+ String token = "(" + E->next()->get() + " and " + E->next()->next()->get() + ")";
+ tokens.erase(E->next()->next());
+ tokens.erase(E->next());
+ E->get() = token;
+ } else if (E->get() == "or") {
+ ERR_FAIL_COND_V_MSG(!E->next() || !E->next()->next(), list, "CodeSign/Requirements: Invalid token sequence.");
+ String token = "(" + E->next()->get() + " or " + E->next()->next()->get() + ")";
+ tokens.erase(E->next()->next());
+ tokens.erase(E->next());
+ E->get() = token;
+ }
+ }
+
+ if (tokens.size() == 1) {
+ list.push_back(out + tokens.front()->get());
+ } else {
+ ERR_FAIL_V_MSG(list, "CodeSign/Requirements: Invalid token sequence.");
+ }
+ }
+
+ return list;
+#undef _R
+}
+
+PackedByteArray CodeSignRequirements::get_hash_sha1() const {
+ PackedByteArray hash;
+ hash.resize(0x14);
+
+ CryptoCore::SHA1Context ctx;
+ ctx.start();
+ ctx.update(blob.ptr(), blob.size());
+ ctx.finish(hash.ptrw());
+
+ return hash;
+}
+
+PackedByteArray CodeSignRequirements::get_hash_sha256() const {
+ PackedByteArray hash;
+ hash.resize(0x20);
+
+ CryptoCore::SHA256Context ctx;
+ ctx.start();
+ ctx.update(blob.ptr(), blob.size());
+ ctx.finish(hash.ptrw());
+
+ return hash;
+}
+
+int CodeSignRequirements::get_size() const {
+ return blob.size();
+}
+
+void CodeSignRequirements::write_to_file(FileAccess *p_file) const {
+ ERR_FAIL_COND_MSG(!p_file, "CodeSign/Requirements: Invalid file handle.");
+ p_file->store_buffer(blob.ptr(), blob.size());
+}
+
+/*************************************************************************/
+/* CodeSignEntitlementsText */
+/*************************************************************************/
+
+CodeSignEntitlementsText::CodeSignEntitlementsText() {
+ blob.append_array({ 0xFA, 0xDE, 0x71, 0x71 }); // Text Entitlements set magic.
+ blob.append_array({ 0x00, 0x00, 0x00, 0x08 }); // Length (8 bytes).
+}
+
+CodeSignEntitlementsText::CodeSignEntitlementsText(const String &p_string) {
+ CharString utf8 = p_string.utf8();
+ blob.append_array({ 0xFA, 0xDE, 0x71, 0x71 }); // Text Entitlements set magic.
+ for (int i = 3; i >= 0; i--) {
+ uint8_t x = ((utf8.length() + 8) >> i * 8) & 0xFF; // Size.
+ blob.push_back(x);
+ }
+ for (int i = 0; i < utf8.length(); i++) { // Write data.
+ blob.push_back(utf8[i]);
+ }
+}
+
+PackedByteArray CodeSignEntitlementsText::get_hash_sha1() const {
+ PackedByteArray hash;
+ hash.resize(0x14);
+
+ CryptoCore::SHA1Context ctx;
+ ctx.start();
+ ctx.update(blob.ptr(), blob.size());
+ ctx.finish(hash.ptrw());
+
+ return hash;
+}
+
+PackedByteArray CodeSignEntitlementsText::get_hash_sha256() const {
+ PackedByteArray hash;
+ hash.resize(0x20);
+
+ CryptoCore::SHA256Context ctx;
+ ctx.start();
+ ctx.update(blob.ptr(), blob.size());
+ ctx.finish(hash.ptrw());
+
+ return hash;
+}
+
+int CodeSignEntitlementsText::get_size() const {
+ return blob.size();
+}
+
+void CodeSignEntitlementsText::write_to_file(FileAccess *p_file) const {
+ ERR_FAIL_COND_MSG(!p_file, "CodeSign/EntitlementsText: Invalid file handle.");
+ p_file->store_buffer(blob.ptr(), blob.size());
+}
+
+/*************************************************************************/
+/* CodeSignEntitlementsBinary */
+/*************************************************************************/
+
+CodeSignEntitlementsBinary::CodeSignEntitlementsBinary() {
+ blob.append_array({ 0xFA, 0xDE, 0x71, 0x72 }); // Binary Entitlements magic.
+ blob.append_array({ 0x00, 0x00, 0x00, 0x08 }); // Length (8 bytes).
+}
+
+CodeSignEntitlementsBinary::CodeSignEntitlementsBinary(const String &p_string) {
+ PList pl = PList(p_string);
+
+ PackedByteArray asn1 = pl.save_asn1();
+ blob.append_array({ 0xFA, 0xDE, 0x71, 0x72 }); // Binary Entitlements magic.
+ uint32_t size = asn1.size() + 8;
+ for (int i = 3; i >= 0; i--) {
+ uint8_t x = (size >> i * 8) & 0xFF; // Size.
+ blob.push_back(x);
+ }
+ blob.append_array(asn1); // Write data.
+}
+
+PackedByteArray CodeSignEntitlementsBinary::get_hash_sha1() const {
+ PackedByteArray hash;
+ hash.resize(0x14);
+
+ CryptoCore::SHA1Context ctx;
+ ctx.start();
+ ctx.update(blob.ptr(), blob.size());
+ ctx.finish(hash.ptrw());
+
+ return hash;
+}
+
+PackedByteArray CodeSignEntitlementsBinary::get_hash_sha256() const {
+ PackedByteArray hash;
+ hash.resize(0x20);
+
+ CryptoCore::SHA256Context ctx;
+ ctx.start();
+ ctx.update(blob.ptr(), blob.size());
+ ctx.finish(hash.ptrw());
+
+ return hash;
+}
+
+int CodeSignEntitlementsBinary::get_size() const {
+ return blob.size();
+}
+
+void CodeSignEntitlementsBinary::write_to_file(FileAccess *p_file) const {
+ ERR_FAIL_COND_MSG(!p_file, "CodeSign/EntitlementsBinary: Invalid file handle.");
+ p_file->store_buffer(blob.ptr(), blob.size());
+}
+
+/*************************************************************************/
+/* CodeSignCodeDirectory */
+/*************************************************************************/
+
+CodeSignCodeDirectory::CodeSignCodeDirectory() {
+ blob.append_array({ 0xFA, 0xDE, 0x0C, 0x02 }); // Code Directory magic.
+ blob.append_array({ 0x00, 0x00, 0x00, 0x00 }); // Size (8 bytes).
+}
+
+CodeSignCodeDirectory::CodeSignCodeDirectory(uint8_t p_hash_size, uint8_t p_hash_type, bool p_main, const CharString &p_id, const CharString &p_team_id, uint32_t p_page_size, uint64_t p_exe_limit, uint64_t p_code_limit) {
+ pages = p_code_limit / (uint64_t(1) << p_page_size);
+ remain = p_code_limit % (uint64_t(1) << p_page_size);
+ code_slots = pages + (remain > 0 ? 1 : 0);
+ special_slots = 7;
+
+ int cd_size = 8 + sizeof(CodeDirectoryHeader) + (code_slots + special_slots) * p_hash_size + p_id.size() + p_team_id.size();
+ int cd_off = 8 + sizeof(CodeDirectoryHeader);
+ blob.append_array({ 0xFA, 0xDE, 0x0C, 0x02 }); // Code Directory magic.
+ for (int i = 3; i >= 0; i--) {
+ uint8_t x = (cd_size >> i * 8) & 0xFF; // Size.
+ blob.push_back(x);
+ }
+ blob.resize(cd_size);
+ memset(blob.ptrw() + 8, 0x00, cd_size - 8);
+ CodeDirectoryHeader *cd = (CodeDirectoryHeader *)(blob.ptrw() + 8);
+
+ bool is_64_cl = (p_code_limit >= std::numeric_limits<uint32_t>::max());
+
+ // Version and options.
+ cd->version = BSWAP32(0x20500);
+ cd->flags = BSWAP32(SIGNATURE_ADHOC | SIGNATURE_RUNTIME);
+ cd->special_slots = BSWAP32(special_slots);
+ cd->code_slots = BSWAP32(code_slots);
+ if (is_64_cl) {
+ cd->code_limit_64 = BSWAP64(p_code_limit);
+ } else {
+ cd->code_limit = BSWAP32(p_code_limit);
+ }
+ cd->hash_size = p_hash_size;
+ cd->hash_type = p_hash_type;
+ cd->page_size = p_page_size;
+ cd->exec_seg_base = 0x00;
+ cd->exec_seg_limit = BSWAP64(p_exe_limit);
+ cd->exec_seg_flags = 0;
+ if (p_main) {
+ cd->exec_seg_flags |= EXECSEG_MAIN_BINARY;
+ }
+ cd->exec_seg_flags = BSWAP64(cd->exec_seg_flags);
+ uint32_t version = (11 << 16) + (3 << 8) + 0; // Version 11.3.0
+ cd->runtime = BSWAP32(version);
+
+ // Copy ID.
+ cd->ident_offset = BSWAP32(cd_off);
+ memcpy(blob.ptrw() + cd_off, p_id.get_data(), p_id.size());
+ cd_off += p_id.size();
+
+ // Copy Team ID.
+ if (p_team_id.length() > 0) {
+ cd->team_offset = BSWAP32(cd_off);
+ memcpy(blob.ptrw() + cd_off, p_team_id.get_data(), p_team_id.size());
+ cd_off += p_team_id.size();
+ } else {
+ cd->team_offset = 0;
+ }
+
+ // Scatter vector.
+ cd->scatter_vector_offset = 0; // Not used.
+
+ // Executable hashes offset.
+ cd->hash_offset = BSWAP32(cd_off + special_slots * cd->hash_size);
+}
+
+bool CodeSignCodeDirectory::set_hash_in_slot(const PackedByteArray &p_hash, int p_slot) {
+ ERR_FAIL_COND_V_MSG((p_slot < -special_slots) || (p_slot >= code_slots), false, vformat("CodeSign/CodeDirectory: Invalid hash slot index: %d.", p_slot));
+ CodeDirectoryHeader *cd = reinterpret_cast<CodeDirectoryHeader *>(blob.ptrw() + 8);
+ for (int i = 0; i < cd->hash_size; i++) {
+ blob.write[BSWAP32(cd->hash_offset) + p_slot * cd->hash_size + i] = p_hash[i];
+ }
+ return true;
+}
+
+int32_t CodeSignCodeDirectory::get_page_count() {
+ return pages;
+}
+
+int32_t CodeSignCodeDirectory::get_page_remainder() {
+ return remain;
+}
+
+PackedByteArray CodeSignCodeDirectory::get_hash_sha1() const {
+ PackedByteArray hash;
+ hash.resize(0x14);
+
+ CryptoCore::SHA1Context ctx;
+ ctx.start();
+ ctx.update(blob.ptr(), blob.size());
+ ctx.finish(hash.ptrw());
+
+ return hash;
+}
+
+PackedByteArray CodeSignCodeDirectory::get_hash_sha256() const {
+ PackedByteArray hash;
+ hash.resize(0x20);
+
+ CryptoCore::SHA256Context ctx;
+ ctx.start();
+ ctx.update(blob.ptr(), blob.size());
+ ctx.finish(hash.ptrw());
+
+ return hash;
+}
+
+int CodeSignCodeDirectory::get_size() const {
+ return blob.size();
+}
+
+void CodeSignCodeDirectory::write_to_file(FileAccess *p_file) const {
+ ERR_FAIL_COND_MSG(!p_file, "CodeSign/CodeDirectory: Invalid file handle.");
+ p_file->store_buffer(blob.ptr(), blob.size());
+}
+
+/*************************************************************************/
+/* CodeSignSignature */
+/*************************************************************************/
+
+CodeSignSignature::CodeSignSignature() {
+ blob.append_array({ 0xFA, 0xDE, 0x0B, 0x01 }); // Signature magic.
+ uint32_t sign_size = 8; // Ad-hoc signature is empty.
+ for (int i = 3; i >= 0; i--) {
+ uint8_t x = (sign_size >> i * 8) & 0xFF; // Size.
+ blob.push_back(x);
+ }
+}
+
+PackedByteArray CodeSignSignature::get_hash_sha1() const {
+ PackedByteArray hash;
+ hash.resize(0x14);
+
+ CryptoCore::SHA1Context ctx;
+ ctx.start();
+ ctx.update(blob.ptr(), blob.size());
+ ctx.finish(hash.ptrw());
+
+ return hash;
+}
+
+PackedByteArray CodeSignSignature::get_hash_sha256() const {
+ PackedByteArray hash;
+ hash.resize(0x20);
+
+ CryptoCore::SHA256Context ctx;
+ ctx.start();
+ ctx.update(blob.ptr(), blob.size());
+ ctx.finish(hash.ptrw());
+
+ return hash;
+}
+
+int CodeSignSignature::get_size() const {
+ return blob.size();
+}
+
+void CodeSignSignature::write_to_file(FileAccess *p_file) const {
+ ERR_FAIL_COND_MSG(!p_file, "CodeSign/Signature: Invalid file handle.");
+ p_file->store_buffer(blob.ptr(), blob.size());
+}
+
+/*************************************************************************/
+/* CodeSignSuperBlob */
+/*************************************************************************/
+
+bool CodeSignSuperBlob::add_blob(const Ref<CodeSignBlob> &p_blob) {
+ if (p_blob.is_valid()) {
+ blobs.push_back(p_blob);
+ return true;
+ } else {
+ return false;
+ }
+}
+
+int CodeSignSuperBlob::get_size() const {
+ int size = 12 + blobs.size() * 8;
+ for (int i = 0; i < blobs.size(); i++) {
+ if (blobs[i].is_null()) {
+ return 0;
+ }
+ size += blobs[i]->get_size();
+ }
+ return size;
+}
+
+void CodeSignSuperBlob::write_to_file(FileAccess *p_file) const {
+ ERR_FAIL_COND_MSG(!p_file, "CodeSign/SuperBlob: Invalid file handle.");
+ uint32_t size = get_size();
+ uint32_t data_offset = 12 + blobs.size() * 8;
+
+ // Write header.
+ p_file->store_32(BSWAP32(0xfade0cc0));
+ p_file->store_32(BSWAP32(size));
+ p_file->store_32(BSWAP32(blobs.size()));
+
+ // Write index.
+ for (int i = 0; i < blobs.size(); i++) {
+ if (blobs[i].is_null()) {
+ return;
+ }
+ p_file->store_32(BSWAP32(blobs[i]->get_index_type()));
+ p_file->store_32(BSWAP32(data_offset));
+ data_offset += blobs[i]->get_size();
+ }
+
+ // Write blobs.
+ for (int i = 0; i < blobs.size(); i++) {
+ blobs[i]->write_to_file(p_file);
+ }
+}
+
+/*************************************************************************/
+/* CodeSign */
+/*************************************************************************/
+
+PackedByteArray CodeSign::file_hash_sha1(const String &p_path) {
+ PackedByteArray file_hash;
+ FileAccessRef f = FileAccess::open(p_path, FileAccess::READ);
+ ERR_FAIL_COND_V_MSG(!f, PackedByteArray(), vformat("CodeSign: Can't open file: \"%s\".", p_path));
+
+ CryptoCore::SHA1Context ctx;
+ ctx.start();
+
+ unsigned char step[4096];
+ while (true) {
+ uint64_t br = f->get_buffer(step, 4096);
+ if (br > 0) {
+ ctx.update(step, br);
+ }
+ if (br < 4096) {
+ break;
+ }
+ }
+
+ file_hash.resize(0x14);
+ ctx.finish(file_hash.ptrw());
+ return file_hash;
+}
+
+PackedByteArray CodeSign::file_hash_sha256(const String &p_path) {
+ PackedByteArray file_hash;
+ FileAccessRef f = FileAccess::open(p_path, FileAccess::READ);
+ ERR_FAIL_COND_V_MSG(!f, PackedByteArray(), vformat("CodeSign: Can't open file: \"%s\".", p_path));
+
+ CryptoCore::SHA256Context ctx;
+ ctx.start();
+
+ unsigned char step[4096];
+ while (true) {
+ uint64_t br = f->get_buffer(step, 4096);
+ if (br > 0) {
+ ctx.update(step, br);
+ }
+ if (br < 4096) {
+ break;
+ }
+ }
+
+ file_hash.resize(0x20);
+ ctx.finish(file_hash.ptrw());
+ return file_hash;
+}
+
+Error CodeSign::_codesign_file(bool p_use_hardened_runtime, bool p_force, const String &p_info, const String &p_exe_path, const String &p_bundle_path, const String &p_ent_path, bool p_ios_bundle, String &r_error_msg) {
+#define CLEANUP() \
+ if (files_to_sign.size() > 1) { \
+ for (int j = 0; j < files_to_sign.size(); j++) { \
+ da->remove(files_to_sign[j]); \
+ } \
+ }
+
+ print_verbose(vformat("CodeSign: Signing executable: %s, bundle: %s with entitlements %s", p_exe_path, p_bundle_path, p_ent_path));
+
+ PackedByteArray info_hash1, info_hash2;
+ PackedByteArray res_hash1, res_hash2;
+ String id;
+ String main_exe = p_exe_path;
+
+ DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
+ if (!da) {
+ r_error_msg = TTR("Can't get filesystem access.");
+ ERR_FAIL_V_MSG(ERR_CANT_CREATE, "CodeSign: Can't get filesystem access.");
+ }
+
+ // Read Info.plist.
+ if (!p_info.is_empty()) {
+ print_verbose(vformat("CodeSign: Reading bundle info..."));
+ PList info_plist;
+ if (info_plist.load_file(p_info)) {
+ info_hash1 = file_hash_sha1(p_info);
+ info_hash2 = file_hash_sha256(p_info);
+ if (info_hash1.is_empty() || info_hash2.is_empty()) {
+ r_error_msg = TTR("Failed to get Info.plist hash.");
+ ERR_FAIL_V_MSG(FAILED, "CodeSign: Failed to get Info.plist hash.");
+ }
+
+ if (info_plist.get_root()->data_type == PList::PLNodeType::PL_NODE_TYPE_DICT && info_plist.get_root()->data_dict.has("CFBundleExecutable")) {
+ main_exe = p_exe_path.plus_file(String::utf8(info_plist.get_root()->data_dict["CFBundleExecutable"]->data_string.get_data()));
+ } else {
+ r_error_msg = TTR("Invalid Info.plist, no exe name.");
+ ERR_FAIL_V_MSG(FAILED, "CodeSign: Invalid Info.plist, no exe name.");
+ }
+
+ if (info_plist.get_root()->data_type == PList::PLNodeType::PL_NODE_TYPE_DICT && info_plist.get_root()->data_dict.has("CFBundleIdentifier")) {
+ id = info_plist.get_root()->data_dict["CFBundleIdentifier"]->data_string.get_data();
+ } else {
+ r_error_msg = TTR("Invalid Info.plist, no bundle id.");
+ ERR_FAIL_V_MSG(FAILED, "CodeSign: Invalid Info.plist, no bundle id.");
+ }
+ } else {
+ r_error_msg = TTR("Invalid Info.plist, can't load.");
+ ERR_FAIL_V_MSG(FAILED, "CodeSign: Invalid Info.plist, can't load.");
+ }
+ }
+
+ // Extract fat binary.
+ Vector<String> files_to_sign;
+ if (LipO::is_lipo(main_exe)) {
+ print_verbose(vformat("CodeSign: Executable is fat, extracting..."));
+ String tmp_path_name = EditorPaths::get_singleton()->get_cache_dir().plus_file("_lipo");
+ Error err = da->make_dir_recursive(tmp_path_name);
+ if (err != OK) {
+ r_error_msg = vformat(TTR("Failed to create \"%s\" subfolder."), tmp_path_name);
+ ERR_FAIL_V_MSG(FAILED, vformat("CodeSign: Failed to create \"%s\" subfolder.", tmp_path_name));
+ }
+ LipO lip;
+ if (lip.open_file(main_exe)) {
+ for (int i = 0; i < lip.get_arch_count(); i++) {
+ if (!lip.extract_arch(i, tmp_path_name.plus_file("_exe_" + itos(i)))) {
+ CLEANUP();
+ r_error_msg = TTR("Failed to extract thin binary.");
+ ERR_FAIL_V_MSG(FAILED, "CodeSign: Failed to extract thin binary.");
+ }
+ files_to_sign.push_back(tmp_path_name.plus_file("_exe_" + itos(i)));
+ }
+ }
+ } else if (MachO::is_macho(main_exe)) {
+ print_verbose(vformat("CodeSign: Executable is thin..."));
+ files_to_sign.push_back(main_exe);
+ } else {
+ r_error_msg = TTR("Invalid binary format.");
+ ERR_FAIL_V_MSG(FAILED, "CodeSign: Invalid binary format.");
+ }
+
+ // Check if it's already signed.
+ if (!p_force) {
+ for (int i = 0; i < files_to_sign.size(); i++) {
+ MachO mh;
+ mh.open_file(files_to_sign[i]);
+ if (mh.is_signed()) {
+ CLEANUP();
+ r_error_msg = TTR("Already signed!");
+ ERR_FAIL_V_MSG(FAILED, "CodeSign: Already signed!");
+ }
+ }
+ }
+
+ // Generate core resources.
+ if (!p_bundle_path.is_empty()) {
+ print_verbose(vformat("CodeSign: Generating bundle CodeResources..."));
+ CodeSignCodeResources cr;
+
+ if (p_ios_bundle) {
+ cr.add_rule1("^.*");
+ cr.add_rule1("^.*\\.lproj/", "optional", 100);
+ cr.add_rule1("^.*\\.lproj/locversion.plist$", "omit", 1100);
+ cr.add_rule1("^Base\\.lproj/", "", 1010);
+ cr.add_rule1("^version.plist$");
+
+ cr.add_rule2(".*\\.dSYM($|/)", "", 11);
+ cr.add_rule2("^(.*/)?\\.DS_Store$", "omit", 2000);
+ cr.add_rule2("^.*");
+ cr.add_rule2("^.*\\.lproj/", "optional", 1000);
+ cr.add_rule2("^.*\\.lproj/locversion.plist$", "omit", 1100);
+ cr.add_rule2("^Base\\.lproj/", "", 1010);
+ cr.add_rule2("^Info\\.plist$", "omit", 20);
+ cr.add_rule2("^PkgInfo$", "omit", 20);
+ cr.add_rule2("^embedded\\.provisionprofile$", "", 10);
+ cr.add_rule2("^version\\.plist$", "", 20);
+
+ cr.add_rule2("^_MASReceipt", "omit", 2000, false);
+ cr.add_rule2("^_CodeSignature", "omit", 2000, false);
+ cr.add_rule2("^CodeResources", "omit", 2000, false);
+ } else {
+ cr.add_rule1("^Resources/");
+ cr.add_rule1("^Resources/.*\\.lproj/", "optional", 1000);
+ cr.add_rule1("^Resources/.*\\.lproj/locversion.plist$", "omit", 1100);
+ cr.add_rule1("^Resources/Base\\.lproj/", "", 1010);
+ cr.add_rule1("^version.plist$");
+
+ cr.add_rule2(".*\\.dSYM($|/)", "", 11);
+ cr.add_rule2("^(.*/)?\\.DS_Store$", "omit", 2000);
+ cr.add_rule2("^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/", "nested", 10);
+ cr.add_rule2("^.*");
+ cr.add_rule2("^Info\\.plist$", "omit", 20);
+ cr.add_rule2("^PkgInfo$", "omit", 20);
+ cr.add_rule2("^Resources/", "", 20);
+ cr.add_rule2("^Resources/.*\\.lproj/", "optional", 1000);
+ cr.add_rule2("^Resources/.*\\.lproj/locversion.plist$", "omit", 1100);
+ cr.add_rule2("^Resources/Base\\.lproj/", "", 1010);
+ cr.add_rule2("^[^/]+$", "nested", 10);
+ cr.add_rule2("^embedded\\.provisionprofile$", "", 10);
+ cr.add_rule2("^version\\.plist$", "", 20);
+ cr.add_rule2("^_MASReceipt", "omit", 2000, false);
+ cr.add_rule2("^_CodeSignature", "omit", 2000, false);
+ cr.add_rule2("^CodeResources", "omit", 2000, false);
+ }
+
+ if (!cr.add_folder_recursive(p_bundle_path, "", main_exe)) {
+ CLEANUP();
+ r_error_msg = TTR("Failed to process nested resources.");
+ ERR_FAIL_V_MSG(FAILED, "CodeSign: Failed to process nested resources.");
+ }
+ Error err = da->make_dir_recursive(p_bundle_path.plus_file("_CodeSignature"));
+ if (err != OK) {
+ CLEANUP();
+ r_error_msg = TTR("Failed to create _CodeSignature subfolder.");
+ ERR_FAIL_V_MSG(FAILED, "CodeSign: Failed to create _CodeSignature subfolder.");
+ }
+ cr.save_to_file(p_bundle_path.plus_file("_CodeSignature").plus_file("CodeResources"));
+ res_hash1 = file_hash_sha1(p_bundle_path.plus_file("_CodeSignature").plus_file("CodeResources"));
+ res_hash2 = file_hash_sha256(p_bundle_path.plus_file("_CodeSignature").plus_file("CodeResources"));
+ if (res_hash1.is_empty() || res_hash2.is_empty()) {
+ CLEANUP();
+ r_error_msg = TTR("Failed to get CodeResources hash.");
+ ERR_FAIL_V_MSG(FAILED, "CodeSign: Failed to get CodeResources hash.");
+ }
+ }
+
+ // Generate common signature structures.
+ if (id.is_empty()) {
+ Ref<Crypto> crypto = Ref<Crypto>(Crypto::create());
+ PackedByteArray uuid = crypto->generate_random_bytes(16);
+ id = (String("a-55554944") /*a-UUID*/ + String::hex_encode_buffer(uuid.ptr(), 16));
+ }
+ CharString uuid_str = id.utf8();
+ print_verbose(vformat("CodeSign: Used bundle ID: %s", id));
+
+ print_verbose(vformat("CodeSign: Processing entitlements..."));
+
+ Ref<CodeSignEntitlementsText> cet;
+ Ref<CodeSignEntitlementsBinary> ceb;
+ if (!p_ent_path.is_empty()) {
+ String entitlements = FileAccess::get_file_as_string(p_ent_path);
+ if (entitlements.is_empty()) {
+ CLEANUP();
+ r_error_msg = TTR("Invalid entitlements file.");
+ ERR_FAIL_V_MSG(FAILED, "CodeSign: Invalid entitlements file.");
+ }
+ cet = Ref<CodeSignEntitlementsText>(memnew(CodeSignEntitlementsText(entitlements)));
+ ceb = Ref<CodeSignEntitlementsBinary>(memnew(CodeSignEntitlementsBinary(entitlements)));
+ }
+
+ print_verbose(vformat("CodeSign: Generating requirements..."));
+ Ref<CodeSignRequirements> rq;
+ String team_id = "";
+ rq = Ref<CodeSignRequirements>(memnew(CodeSignRequirements()));
+
+ // Sign executables.
+ for (int i = 0; i < files_to_sign.size(); i++) {
+ MachO mh;
+ if (!mh.open_file(files_to_sign[i])) {
+ CLEANUP();
+ r_error_msg = TTR("Invalid executable file.");
+ ERR_FAIL_V_MSG(FAILED, "CodeSign: Invalid executable file.");
+ }
+ print_verbose(vformat("CodeSign: Signing executable for cputype: %d ...", mh.get_cputype()));
+
+ print_verbose(vformat("CodeSign: Generating CodeDirectory..."));
+ Ref<CodeSignCodeDirectory> cd1 = memnew(CodeSignCodeDirectory(0x14, 0x01, true, uuid_str, team_id.utf8(), 12, mh.get_exe_limit(), mh.get_code_limit()));
+ Ref<CodeSignCodeDirectory> cd2 = memnew(CodeSignCodeDirectory(0x20, 0x02, true, uuid_str, team_id.utf8(), 12, mh.get_exe_limit(), mh.get_code_limit()));
+ print_verbose(vformat("CodeSign: Calculating special slot hashes..."));
+ if (info_hash2.size() == 0x20) {
+ cd2->set_hash_in_slot(info_hash2, CodeSignCodeDirectory::SLOT_INFO_PLIST);
+ }
+ if (info_hash1.size() == 0x14) {
+ cd1->set_hash_in_slot(info_hash1, CodeSignCodeDirectory::SLOT_INFO_PLIST);
+ }
+ cd1->set_hash_in_slot(rq->get_hash_sha1(), CodeSignCodeDirectory::Slot::SLOT_REQUIREMENTS);
+ cd2->set_hash_in_slot(rq->get_hash_sha256(), CodeSignCodeDirectory::Slot::SLOT_REQUIREMENTS);
+ if (res_hash2.size() == 0x20) {
+ cd2->set_hash_in_slot(res_hash2, CodeSignCodeDirectory::SLOT_RESOURCES);
+ }
+ if (res_hash1.size() == 0x14) {
+ cd1->set_hash_in_slot(res_hash1, CodeSignCodeDirectory::SLOT_RESOURCES);
+ }
+ if (cet.is_valid()) {
+ cd1->set_hash_in_slot(cet->get_hash_sha1(), CodeSignCodeDirectory::Slot::SLOT_ENTITLEMENTS); //Text variant.
+ cd2->set_hash_in_slot(cet->get_hash_sha256(), CodeSignCodeDirectory::Slot::SLOT_ENTITLEMENTS);
+ }
+ if (ceb.is_valid()) {
+ cd1->set_hash_in_slot(ceb->get_hash_sha1(), CodeSignCodeDirectory::Slot::SLOT_DER_ENTITLEMENTS); //ASN.1 variant.
+ cd2->set_hash_in_slot(ceb->get_hash_sha256(), CodeSignCodeDirectory::Slot::SLOT_DER_ENTITLEMENTS);
+ }
+
+ // Calculate signature size.
+ int sign_size = 12; // SuperBlob header.
+ sign_size += cd1->get_size() + 8;
+ sign_size += cd2->get_size() + 8;
+ sign_size += rq->get_size() + 8;
+ if (cet.is_valid()) {
+ sign_size += cet->get_size() + 8;
+ }
+ if (ceb.is_valid()) {
+ sign_size += ceb->get_size() + 8;
+ }
+ sign_size += 16; // Empty signature size.
+
+ // Alloc/resize signature load command.
+ print_verbose(vformat("CodeSign: Reallocating space for the signature superblob (%d)...", sign_size));
+ if (!mh.set_signature_size(sign_size)) {
+ CLEANUP();
+ r_error_msg = TTR("Can't resize signature load command.");
+ ERR_FAIL_V_MSG(FAILED, "CodeSign: Can't resize signature load command.");
+ }
+
+ print_verbose(vformat("CodeSign: Calculating executable code hashes..."));
+ // Calculate executable code hashes.
+ PackedByteArray buffer;
+ PackedByteArray hash1, hash2;
+ hash1.resize(0x14);
+ hash2.resize(0x20);
+ buffer.resize(1 << 12);
+ mh.get_file()->seek(0);
+ for (int32_t j = 0; j < cd2->get_page_count(); j++) {
+ mh.get_file()->get_buffer(buffer.ptrw(), (1 << 12));
+ CryptoCore::SHA256Context ctx2;
+ ctx2.start();
+ ctx2.update(buffer.ptr(), (1 << 12));
+ ctx2.finish(hash2.ptrw());
+ cd2->set_hash_in_slot(hash2, j);
+
+ CryptoCore::SHA1Context ctx1;
+ ctx1.start();
+ ctx1.update(buffer.ptr(), (1 << 12));
+ ctx1.finish(hash1.ptrw());
+ cd1->set_hash_in_slot(hash1, j);
+ }
+ if (cd2->get_page_remainder() > 0) {
+ mh.get_file()->get_buffer(buffer.ptrw(), cd2->get_page_remainder());
+ CryptoCore::SHA256Context ctx2;
+ ctx2.start();
+ ctx2.update(buffer.ptr(), cd2->get_page_remainder());
+ ctx2.finish(hash2.ptrw());
+ cd2->set_hash_in_slot(hash2, cd2->get_page_count());
+
+ CryptoCore::SHA1Context ctx1;
+ ctx1.start();
+ ctx1.update(buffer.ptr(), cd1->get_page_remainder());
+ ctx1.finish(hash1.ptrw());
+ cd1->set_hash_in_slot(hash1, cd1->get_page_count());
+ }
+
+ print_verbose(vformat("CodeSign: Generating signature..."));
+ Ref<CodeSignSignature> cs;
+ cs = Ref<CodeSignSignature>(memnew(CodeSignSignature()));
+
+ print_verbose(vformat("CodeSign: Writing signature superblob..."));
+ // Write signature data to the executable.
+ CodeSignSuperBlob sb = CodeSignSuperBlob();
+ sb.add_blob(cd2);
+ sb.add_blob(cd1);
+ sb.add_blob(rq);
+ if (cet.is_valid()) {
+ sb.add_blob(cet);
+ }
+ if (ceb.is_valid()) {
+ sb.add_blob(ceb);
+ }
+ sb.add_blob(cs);
+ mh.get_file()->seek(mh.get_signature_offset());
+ sb.write_to_file(mh.get_file());
+ }
+ if (files_to_sign.size() > 1) {
+ print_verbose(vformat("CodeSign: Rebuilding fat executable..."));
+ LipO lip;
+ if (!lip.create_file(main_exe, files_to_sign)) {
+ CLEANUP();
+ r_error_msg = TTR("Failed to create fat binary.");
+ ERR_FAIL_V_MSG(FAILED, "CodeSign: Failed to create fat binary.");
+ }
+ CLEANUP();
+ }
+ FileAccess::set_unix_permissions(main_exe, 0755); // Restore unix permissions.
+ return OK;
+#undef CLEANUP
+}
+
+Error CodeSign::codesign(bool p_use_hardened_runtime, bool p_force, const String &p_path, const String &p_ent_path, String &r_error_msg) {
+ DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
+ if (!da) {
+ r_error_msg = TTR("Can't get filesystem access.");
+ ERR_FAIL_V_MSG(ERR_CANT_CREATE, "CodeSign: Can't get filesystem access.");
+ }
+
+ if (da->dir_exists(p_path)) {
+ String fmw_ver = "Current"; // Framework version (default).
+ String info_path;
+ String main_exe;
+ String bundle_path;
+ bool bundle = false;
+ bool ios_bundle = false;
+ if (da->file_exists(p_path.plus_file("Contents/Info.plist"))) {
+ info_path = p_path.plus_file("Contents/Info.plist");
+ main_exe = p_path.plus_file("Contents/MacOS");
+ bundle_path = p_path.plus_file("Contents");
+ bundle = true;
+ } else if (da->file_exists(p_path.plus_file(vformat("Versions/%s/Resources/Info.plist", fmw_ver)))) {
+ info_path = p_path.plus_file(vformat("Versions/%s/Resources/Info.plist", fmw_ver));
+ main_exe = p_path.plus_file(vformat("Versions/%s", fmw_ver));
+ bundle_path = p_path.plus_file(vformat("Versions/%s", fmw_ver));
+ bundle = true;
+ } else if (da->file_exists(p_path.plus_file("Info.plist"))) {
+ info_path = p_path.plus_file("Info.plist");
+ main_exe = p_path;
+ bundle_path = p_path;
+ bundle = true;
+ ios_bundle = true;
+ }
+ if (bundle) {
+ return _codesign_file(p_use_hardened_runtime, p_force, info_path, main_exe, bundle_path, p_ent_path, ios_bundle, r_error_msg);
+ } else {
+ r_error_msg = TTR("Unknown bundle type.");
+ ERR_FAIL_V_MSG(FAILED, "CodeSign: Unknown bundle type.");
+ }
+ } else if (da->file_exists(p_path)) {
+ return _codesign_file(p_use_hardened_runtime, p_force, "", p_path, "", p_ent_path, false, r_error_msg);
+ } else {
+ r_error_msg = TTR("Unknown object type.");
+ ERR_FAIL_V_MSG(FAILED, "CodeSign: Unknown object type.");
+ }
+}
+
+#endif // MODULE_REGEX_ENABLED
diff --git a/platform/osx/export/codesign.h b/platform/osx/export/codesign.h
new file mode 100644
index 0000000000..927df79281
--- /dev/null
+++ b/platform/osx/export/codesign.h
@@ -0,0 +1,369 @@
+/*************************************************************************/
+/* codesign.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 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. */
+/*************************************************************************/
+
+// macOS code signature creation utility.
+//
+// Current implementation has the following limitation:
+// - Only version 11.3.0 signatures are supported.
+// - Only "framework" and "app" bundle types are supported.
+// - Page hash array scattering is not supported.
+// - Reading and writing binary property lists i snot supported (third-party frameworks with binary Info.plist will not work unless .plist is converted to text format).
+// - Requirements code generator is not implemented (only hard-coded requirements for the ad-hoc signing is supported).
+// - RFC5652/CMS blob generation is not implemented, supports ad-hoc signing only.
+
+#ifndef CODESIGN_H
+#define CODESIGN_H
+
+#include "core/crypto/crypto.h"
+#include "core/crypto/crypto_core.h"
+#include "core/io/dir_access.h"
+#include "core/io/file_access.h"
+#include "core/object/ref_counted.h"
+
+#include "modules/modules_enabled.gen.h" // For regex.
+#ifdef MODULE_REGEX_ENABLED
+#include "modules/regex/regex.h"
+#endif
+
+#include "plist.h"
+
+#ifdef MODULE_REGEX_ENABLED
+
+/*************************************************************************/
+/* CodeSignCodeResources */
+/*************************************************************************/
+
+class CodeSignCodeResources {
+public:
+ enum class CRMatch {
+ CR_MATCH_NO,
+ CR_MATCH_YES,
+ CR_MATCH_NESTED,
+ CR_MATCH_OPTIONAL,
+ };
+
+private:
+ struct CRFile {
+ String name;
+ String hash;
+ String hash2;
+ bool optional;
+ bool nested;
+ String requirements;
+ };
+
+ struct CRRule {
+ String file_pattern;
+ String key;
+ int weight;
+ bool store;
+ CRRule() {
+ weight = 1;
+ store = true;
+ }
+ CRRule(const String &p_file_pattern, const String &p_key, int p_weight, bool p_store) {
+ file_pattern = p_file_pattern;
+ key = p_key;
+ weight = p_weight;
+ store = p_store;
+ }
+ };
+
+ Vector<CRRule> rules1;
+ Vector<CRRule> rules2;
+
+ Vector<CRFile> files1;
+ Vector<CRFile> files2;
+
+ String hash_sha1_base64(const String &p_path);
+ String hash_sha256_base64(const String &p_path);
+
+public:
+ void add_rule1(const String &p_rule, const String &p_key = "", int p_weight = 0, bool p_store = true);
+ void add_rule2(const String &p_rule, const String &p_key = "", int p_weight = 0, bool p_store = true);
+
+ CRMatch match_rules1(const String &p_path) const;
+ CRMatch match_rules2(const String &p_path) const;
+
+ bool add_file1(const String &p_root, const String &p_path);
+ bool add_file2(const String &p_root, const String &p_path);
+ bool add_nested_file(const String &p_root, const String &p_path, const String &p_exepath);
+
+ bool add_folder_recursive(const String &p_root, const String &p_path = "", const String &p_main_exe_path = "");
+
+ bool save_to_file(const String &p_path);
+};
+
+/*************************************************************************/
+/* CodeSignBlob */
+/*************************************************************************/
+
+class CodeSignBlob : public RefCounted {
+public:
+ virtual PackedByteArray get_hash_sha1() const = 0;
+ virtual PackedByteArray get_hash_sha256() const = 0;
+
+ virtual int get_size() const = 0;
+ virtual uint32_t get_index_type() const = 0;
+
+ virtual void write_to_file(FileAccess *p_file) const = 0;
+};
+
+/*************************************************************************/
+/* CodeSignRequirements */
+/*************************************************************************/
+
+// Note: Proper code generator is not implemented (any we probably won't ever need it), just a hardcoded bytecode for the limited set of cases.
+
+class CodeSignRequirements : public CodeSignBlob {
+ PackedByteArray blob;
+
+ static inline size_t PAD(size_t s, size_t a) {
+ return (s % a == 0) ? 0 : (a - s % a);
+ }
+
+ _FORCE_INLINE_ void _parse_certificate_slot(uint32_t &r_pos, String &r_out, uint32_t p_rq_size) const;
+ _FORCE_INLINE_ void _parse_key(uint32_t &r_pos, String &r_out, uint32_t p_rq_size) const;
+ _FORCE_INLINE_ void _parse_oid_key(uint32_t &r_pos, String &r_out, uint32_t p_rq_size) const;
+ _FORCE_INLINE_ void _parse_hash_string(uint32_t &r_pos, String &r_out, uint32_t p_rq_size) const;
+ _FORCE_INLINE_ void _parse_value(uint32_t &r_pos, String &r_out, uint32_t p_rq_size) const;
+ _FORCE_INLINE_ void _parse_date(uint32_t &r_pos, String &r_out, uint32_t p_rq_size) const;
+ _FORCE_INLINE_ bool _parse_match(uint32_t &r_pos, String &r_out, uint32_t p_rq_size) const;
+
+public:
+ CodeSignRequirements();
+ CodeSignRequirements(const PackedByteArray &p_data);
+
+ Vector<String> parse_requirements() const;
+
+ virtual PackedByteArray get_hash_sha1() const override;
+ virtual PackedByteArray get_hash_sha256() const override;
+
+ virtual int get_size() const override;
+
+ virtual uint32_t get_index_type() const override { return 0x00000002; };
+ virtual void write_to_file(FileAccess *p_file) const override;
+};
+
+/*************************************************************************/
+/* CodeSignEntitlementsText */
+/*************************************************************************/
+
+// PList formatted entitlements.
+
+class CodeSignEntitlementsText : public CodeSignBlob {
+ PackedByteArray blob;
+
+public:
+ CodeSignEntitlementsText();
+ CodeSignEntitlementsText(const String &p_string);
+
+ virtual PackedByteArray get_hash_sha1() const override;
+ virtual PackedByteArray get_hash_sha256() const override;
+
+ virtual int get_size() const override;
+
+ virtual uint32_t get_index_type() const override { return 0x00000005; };
+ virtual void write_to_file(FileAccess *p_file) const override;
+};
+
+/*************************************************************************/
+/* CodeSignEntitlementsBinary */
+/*************************************************************************/
+
+// ASN.1 serialized entitlements.
+
+class CodeSignEntitlementsBinary : public CodeSignBlob {
+ PackedByteArray blob;
+
+public:
+ CodeSignEntitlementsBinary();
+ CodeSignEntitlementsBinary(const String &p_string);
+
+ virtual PackedByteArray get_hash_sha1() const override;
+ virtual PackedByteArray get_hash_sha256() const override;
+
+ virtual int get_size() const override;
+
+ virtual uint32_t get_index_type() const override { return 0x00000007; };
+ virtual void write_to_file(FileAccess *p_file) const override;
+};
+
+/*************************************************************************/
+/* CodeSignCodeDirectory */
+/*************************************************************************/
+
+// Code Directory, runtime options, code segment and special structure hashes.
+
+class CodeSignCodeDirectory : public CodeSignBlob {
+public:
+ enum Slot {
+ SLOT_INFO_PLIST = -1,
+ SLOT_REQUIREMENTS = -2,
+ SLOT_RESOURCES = -3,
+ SLOT_APP_SPECIFIC = -4, // Unused.
+ SLOT_ENTITLEMENTS = -5,
+ SLOT_RESERVER1 = -6, // Unused.
+ SLOT_DER_ENTITLEMENTS = -7,
+ };
+
+ enum CodeSignExecSegFlags {
+ EXECSEG_MAIN_BINARY = 0x1,
+ EXECSEG_ALLOW_UNSIGNED = 0x10,
+ EXECSEG_DEBUGGER = 0x20,
+ EXECSEG_JIT = 0x40,
+ EXECSEG_SKIP_LV = 0x80,
+ EXECSEG_CAN_LOAD_CDHASH = 0x100,
+ EXECSEG_CAN_EXEC_CDHASH = 0x200,
+ };
+
+ enum CodeSignatureFlags {
+ SIGNATURE_HOST = 0x0001,
+ SIGNATURE_ADHOC = 0x0002,
+ SIGNATURE_TASK_ALLOW = 0x0004,
+ SIGNATURE_INSTALLER = 0x0008,
+ SIGNATURE_FORCED_LV = 0x0010,
+ SIGNATURE_INVALID_ALLOWED = 0x0020,
+ SIGNATURE_FORCE_HARD = 0x0100,
+ SIGNATURE_FORCE_KILL = 0x0200,
+ SIGNATURE_FORCE_EXPIRATION = 0x0400,
+ SIGNATURE_RESTRICT = 0x0800,
+ SIGNATURE_ENFORCEMENT = 0x1000,
+ SIGNATURE_LIBRARY_VALIDATION = 0x2000,
+ SIGNATURE_ENTITLEMENTS_VALIDATED = 0x4000,
+ SIGNATURE_NVRAM_UNRESTRICTED = 0x8000,
+ SIGNATURE_RUNTIME = 0x10000,
+ SIGNATURE_LINKER_SIGNED = 0x20000,
+ };
+
+private:
+ PackedByteArray blob;
+
+ struct CodeDirectoryHeader {
+ uint32_t version; // Using version 0x0020500.
+ uint32_t flags; // // Option flags.
+ uint32_t hash_offset; // Slot zero offset.
+ uint32_t ident_offset; // Identifier string offset.
+ uint32_t special_slots; // Nr. of slots with negative index.
+ uint32_t code_slots; // Nr. of slots with index >= 0, (code_limit / page_size).
+ uint32_t code_limit; // Everything before code signature load command offset.
+ uint8_t hash_size; // 20 (SHA-1) or 32 (SHA-256).
+ uint8_t hash_type; // 1 (SHA-1) or 2 (SHA-256).
+ uint8_t platform; // Not used.
+ uint8_t page_size; // Page size, power of two, 2^12 (4096).
+ uint32_t spare2; // Not used.
+ // Version 0x20100
+ uint32_t scatter_vector_offset; // Set to 0 and ignore.
+ // Version 0x20200
+ uint32_t team_offset; // Team id string offset.
+ // Version 0x20300
+ uint32_t spare3; // Not used.
+ uint64_t code_limit_64; // Set to 0 and ignore.
+ // Version 0x20400
+ uint64_t exec_seg_base; // Start of the signed code segmet.
+ uint64_t exec_seg_limit; // Code segment (__TEXT) vmsize.
+ uint64_t exec_seg_flags; // Executable segment flags.
+ // Version 0x20500
+ uint32_t runtime; // Runtime version.
+ uint32_t pre_encrypt_offset; // Set to 0 and ignore.
+ };
+
+ int32_t pages = 0;
+ int32_t remain = 0;
+ int32_t code_slots = 0;
+ int32_t special_slots = 0;
+
+public:
+ CodeSignCodeDirectory();
+ CodeSignCodeDirectory(uint8_t p_hash_size, uint8_t p_hash_type, bool p_main, const CharString &p_id, const CharString &p_team_id, uint32_t p_page_size, uint64_t p_exe_limit, uint64_t p_code_limit);
+
+ int32_t get_page_count();
+ int32_t get_page_remainder();
+
+ bool set_hash_in_slot(const PackedByteArray &p_hash, int p_slot);
+
+ virtual PackedByteArray get_hash_sha1() const override;
+ virtual PackedByteArray get_hash_sha256() const override;
+
+ virtual int get_size() const override;
+ virtual uint32_t get_index_type() const override { return 0x00000000; };
+
+ virtual void write_to_file(FileAccess *p_file) const override;
+};
+
+/*************************************************************************/
+/* CodeSignSignature */
+/*************************************************************************/
+
+class CodeSignSignature : public CodeSignBlob {
+ PackedByteArray blob;
+
+public:
+ CodeSignSignature();
+
+ virtual PackedByteArray get_hash_sha1() const override;
+ virtual PackedByteArray get_hash_sha256() const override;
+
+ virtual int get_size() const override;
+ virtual uint32_t get_index_type() const override { return 0x00010000; };
+
+ virtual void write_to_file(FileAccess *p_file) const override;
+};
+
+/*************************************************************************/
+/* CodeSignSuperBlob */
+/*************************************************************************/
+
+class CodeSignSuperBlob {
+ Vector<Ref<CodeSignBlob>> blobs;
+
+public:
+ bool add_blob(const Ref<CodeSignBlob> &p_blob);
+
+ int get_size() const;
+ void write_to_file(FileAccess *p_file) const;
+};
+
+/*************************************************************************/
+/* CodeSign */
+/*************************************************************************/
+
+class CodeSign {
+ static PackedByteArray file_hash_sha1(const String &p_path);
+ static PackedByteArray file_hash_sha256(const String &p_path);
+ static Error _codesign_file(bool p_use_hardened_runtime, bool p_force, const String &p_info, const String &p_exe_path, const String &p_bundle_path, const String &p_ent_path, bool p_ios_bundle, String &r_error_msg);
+
+public:
+ static Error codesign(bool p_use_hardened_runtime, bool p_force, const String &p_path, const String &p_ent_path, String &r_error_msg);
+};
+
+#endif // MODULE_REGEX_ENABLED
+
+#endif // CODESIGN_H
diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp
index afc0d63338..bd35b39e9e 100644
--- a/platform/osx/export/export.cpp
+++ b/platform/osx/export/export.cpp
@@ -33,6 +33,9 @@
#include "export_plugin.h"
void register_osx_exporter() {
+ EDITOR_DEF("export/macos/force_builtin_codesign", false);
+ EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::BOOL, "export/macos/force_builtin_codesign", PROPERTY_HINT_NONE));
+
Ref<EditorExportPlatformOSX> platform;
platform.instantiate();
diff --git a/platform/osx/export/export_plugin.cpp b/platform/osx/export/export_plugin.cpp
index 3a731f2172..0a213fd19b 100644
--- a/platform/osx/export/export_plugin.cpp
+++ b/platform/osx/export/export_plugin.cpp
@@ -28,6 +28,9 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+#include "modules/modules_enabled.gen.h" // For regex.
+
+#include "codesign.h"
#include "export_plugin.h"
void EditorExportPlatformOSX::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
@@ -58,15 +61,25 @@ void EditorExportPlatformOSX::get_export_options(List<ExportOption> *r_options)
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/version"), "1.0"));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/copyright"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "display/high_res"), false));
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "privacy/camera_usage_description", PROPERTY_HINT_PLACEHOLDER_TEXT, "Provide a message if you need to use the camera"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "privacy/microphone_usage_description", PROPERTY_HINT_PLACEHOLDER_TEXT, "Provide a message if you need to use the microphone"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "privacy/camera_usage_description", PROPERTY_HINT_PLACEHOLDER_TEXT, "Provide a message if you need to use the camera"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "privacy/location_usage_description", PROPERTY_HINT_PLACEHOLDER_TEXT, "Provide a message if you need to use the location information"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "privacy/address_book_usage_description", PROPERTY_HINT_PLACEHOLDER_TEXT, "Provide a message if you need to use the address book"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "privacy/calendar_usage_description", PROPERTY_HINT_PLACEHOLDER_TEXT, "Provide a message if you need to use the calendar"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "privacy/photos_library_usage_description", PROPERTY_HINT_PLACEHOLDER_TEXT, "Provide a message if you need to use the photo library"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "privacy/desktop_folder_usage_description", PROPERTY_HINT_PLACEHOLDER_TEXT, "Provide a message if you need to use Desktop folder"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "privacy/documents_folder_usage_description", PROPERTY_HINT_PLACEHOLDER_TEXT, "Provide a message if you need to use Documents folder"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "privacy/downloads_folder_usage_description", PROPERTY_HINT_PLACEHOLDER_TEXT, "Provide a message if you need to use Downloads folder"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "privacy/network_volumes_usage_description", PROPERTY_HINT_PLACEHOLDER_TEXT, "Provide a message if you need to use network volumes"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "privacy/removable_volumes_usage_description", PROPERTY_HINT_PLACEHOLDER_TEXT, "Provide a message if you need to use removable volumes"), ""));
-#ifdef OSX_ENABLED
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "codesign/enable"), true));
+#ifdef OSX_ENABLED
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "codesign/identity", PROPERTY_HINT_PLACEHOLDER_TEXT, "Type: Name (ID)"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "codesign/timestamp"), true));
- r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "codesign/hardened_runtime"), true));
+#endif
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "codesign/replace_existing_signature"), true));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "codesign/hardened_runtime"), true));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "codesign/entitlements/custom_file", PROPERTY_HINT_GLOBAL_FILE, "*.plist"), ""));
if (!Engine::get_singleton()->has_singleton("GodotSharp")) {
@@ -97,6 +110,7 @@ void EditorExportPlatformOSX::get_export_options(List<ExportOption> *r_options)
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "codesign/entitlements/app_sandbox/files_movies", PROPERTY_HINT_ENUM, "No,Read-only,Read-write"), 0));
r_options->push_back(ExportOption(PropertyInfo(Variant::ARRAY, "codesign/entitlements/app_sandbox/helper_executables", PROPERTY_HINT_ARRAY_TYPE, itos(Variant::STRING) + "/" + itos(PROPERTY_HINT_GLOBAL_FILE) + ":"), Array()));
+#ifdef OSX_ENABLED
r_options->push_back(ExportOption(PropertyInfo(Variant::PACKED_STRING_ARRAY, "codesign/custom_options"), PackedStringArray()));
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "notarization/enable"), false));
@@ -305,13 +319,56 @@ void EditorExportPlatformOSX::_fix_plist(const Ref<EditorExportPreset> &p_preset
} else if (lines[i].find("$copyright") != -1) {
strnew += lines[i].replace("$copyright", p_preset->get("application/copyright")) + "\n";
} else if (lines[i].find("$highres") != -1) {
- strnew += lines[i].replace("$highres", p_preset->get("display/high_res") ? "<true/>" : "<false/>") + "\n";
- } else if (lines[i].find("$camera_usage_description") != -1) {
- String description = p_preset->get("privacy/camera_usage_description");
- strnew += lines[i].replace("$camera_usage_description", description) + "\n";
- } else if (lines[i].find("$microphone_usage_description") != -1) {
- String description = p_preset->get("privacy/microphone_usage_description");
- strnew += lines[i].replace("$microphone_usage_description", description) + "\n";
+ strnew += lines[i].replace("$highres", p_preset->get("display/high_res") ? "\t<true/>" : "\t<false/>") + "\n";
+ } else if (lines[i].find("$usage_descriptions") != -1) {
+ String descriptions;
+ if (!((String)p_preset->get("privacy/microphone_usage_description")).is_empty()) {
+ descriptions += "\t<key>NSMicrophoneUsageDescription</key>\n";
+ descriptions += "\t<string>" + (String)p_preset->get("privacy/microphone_usage_description") + "</string>\n";
+ }
+ if (!((String)p_preset->get("privacy/camera_usage_description")).is_empty()) {
+ descriptions += "\t<key>NSCameraUsageDescription</key>\n";
+ descriptions += "\t<string>" + (String)p_preset->get("privacy/camera_usage_description") + "</string>\n";
+ }
+ if (!((String)p_preset->get("privacy/location_usage_description")).is_empty()) {
+ descriptions += "\t<key>NSLocationUsageDescription</key>\n";
+ descriptions += "\t<string>" + (String)p_preset->get("privacy/location_usage_description") + "</string>\n";
+ }
+ if (!((String)p_preset->get("privacy/address_book_usage_description")).is_empty()) {
+ descriptions += "\t<key>NSContactsUsageDescription</key>\n";
+ descriptions += "\t<string>" + (String)p_preset->get("privacy/address_book_usage_description") + "</string>\n";
+ }
+ if (!((String)p_preset->get("privacy/calendar_usage_description")).is_empty()) {
+ descriptions += "\t<key>NSCalendarsUsageDescription</key>\n";
+ descriptions += "\t<string>" + (String)p_preset->get("privacy/calendar_usage_description") + "</string>\n";
+ }
+ if (!((String)p_preset->get("privacy/photos_library_usage_description")).is_empty()) {
+ descriptions += "\t<key>NSPhotoLibraryUsageDescription</key>\n";
+ descriptions += "\t<string>" + (String)p_preset->get("privacy/photos_library_usage_description") + "</string>\n";
+ }
+ if (!((String)p_preset->get("privacy/desktop_folder_usage_description")).is_empty()) {
+ descriptions += "\t<key>NSDesktopFolderUsageDescription</key>\n";
+ descriptions += "\t<string>" + (String)p_preset->get("privacy/desktop_folder_usage_description") + "</string>\n";
+ }
+ if (!((String)p_preset->get("privacy/documents_folder_usage_description")).is_empty()) {
+ descriptions += "\t<key>NSDocumentsFolderUsageDescription</key>\n";
+ descriptions += "\t<string>" + (String)p_preset->get("privacy/documents_folder_usage_description") + "</string>\n";
+ }
+ if (!((String)p_preset->get("privacy/downloads_folder_usage_description")).is_empty()) {
+ descriptions += "\t<key>NSDownloadsFolderUsageDescription</key>\n";
+ descriptions += "\t<string>" + (String)p_preset->get("privacy/downloads_folder_usage_description") + "</string>\n";
+ }
+ if (!((String)p_preset->get("privacy/network_volumes_usage_description")).is_empty()) {
+ descriptions += "\t<key>NSNetworkVolumesUsageDescription</key>\n";
+ descriptions += "\t<string>" + (String)p_preset->get("privacy/network_volumes_usage_description") + "</string>\n";
+ }
+ if (!((String)p_preset->get("privacy/removable_volumes_usage_description")).is_empty()) {
+ descriptions += "\t<key>NSRemovableVolumesUsageDescription</key>\n";
+ descriptions += "\t<string>" + (String)p_preset->get("privacy/removable_volumes_usage_description") + "</string>\n";
+ }
+ if (!descriptions.is_empty()) {
+ strnew += lines[i].replace("$usage_descriptions", descriptions);
+ }
} else {
strnew += lines[i] + "\n";
}
@@ -362,14 +419,16 @@ Error EditorExportPlatformOSX::_notarize(const Ref<EditorExportPreset> &p_preset
Error err = OS::get_singleton()->execute("xcrun", args, &str, nullptr, true);
ERR_FAIL_COND_V(err != OK, err);
- print_line("altool (" + p_path + "):\n" + str);
+ print_verbose("altool (" + p_path + "):\n" + str);
if (str.find("RequestUUID") == -1) {
EditorNode::add_io_error("altool: " + str);
return FAILED;
} else {
- print_line("Note: The notarization process generally takes less than an hour. When the process is completed, you'll receive an email.");
- print_line(" You can check progress manually by opening a Terminal and running the following command:");
- print_line(" \"xcrun altool --notarization-history 0 -u <your email> -p <app-specific pwd>\"");
+ print_line(TTR("Note: The notarization process generally takes less than an hour. When the process is completed, you'll receive an email."));
+ print_line(" " + TTR("You can check progress manually by opening a Terminal and running the following command:"));
+ print_line(" \"xcrun altool --notarization-history 0 -u <your email> -p <app-specific pwd>\"");
+ print_line(" " + TTR("Run the following command to staple notarization ticket to the exported application (optional):"));
+ print_line(" \"xcrun stapler staple <app path>\"");
}
#endif
@@ -378,71 +437,91 @@ Error EditorExportPlatformOSX::_notarize(const Ref<EditorExportPreset> &p_preset
}
Error EditorExportPlatformOSX::_code_sign(const Ref<EditorExportPreset> &p_preset, const String &p_path, const String &p_ent_path) {
-#ifdef OSX_ENABLED
- List<String> args;
-
+ bool force_builtin_codesign = EditorSettings::get_singleton()->get("export/macos/force_builtin_codesign");
bool ad_hoc = (p_preset->get("codesign/identity") == "" || p_preset->get("codesign/identity") == "-");
- if (p_preset->get("codesign/timestamp")) {
- if (ad_hoc) {
+ if ((!FileAccess::exists("/usr/bin/codesign") && !FileAccess::exists("/bin/codesign")) || force_builtin_codesign) {
+ print_verbose("using built-in codesign...");
+#ifdef MODULE_REGEX_ENABLED
+ if (p_preset->get("codesign/timestamp")) {
WARN_PRINT("Timestamping is not compatible with ad-hoc signature, and was disabled!");
- } else {
- args.push_back("--timestamp");
}
- }
- if (p_preset->get("codesign/hardened_runtime")) {
- if (ad_hoc) {
+ if (p_preset->get("codesign/hardened_runtime")) {
WARN_PRINT("Hardened Runtime is not compatible with ad-hoc signature, and was disabled!");
- } else {
- args.push_back("--options");
- args.push_back("runtime");
}
- }
- if (p_path.get_extension() != "dmg") {
- args.push_back("--entitlements");
- args.push_back(p_ent_path);
- }
+ String error_msg;
+ Error err = CodeSign::codesign(false, p_preset->get("codesign/replace_existing_signature"), p_path, p_ent_path, error_msg);
+ if (err != OK) {
+ EditorNode::add_io_error("Built-in CodeSign: " + error_msg);
+ return FAILED;
+ }
+#else
+ ERR_FAIL_V_MSG(FAILED, "Built-in CodeSign require regex module");
+#endif
+ return OK;
+ } else {
+ print_verbose("using external codesign...");
+ List<String> args;
+ if (p_preset->get("codesign/timestamp")) {
+ if (ad_hoc) {
+ WARN_PRINT("Timestamping is not compatible with ad-hoc signature, and was disabled!");
+ } else {
+ args.push_back("--timestamp");
+ }
+ }
+ if (p_preset->get("codesign/hardened_runtime")) {
+ if (ad_hoc) {
+ WARN_PRINT("Hardened Runtime is not compatible with ad-hoc signature, and was disabled!");
+ } else {
+ args.push_back("--options");
+ args.push_back("runtime");
+ }
+ }
- PackedStringArray user_args = p_preset->get("codesign/custom_options");
- for (int i = 0; i < user_args.size(); i++) {
- String user_arg = user_args[i].strip_edges();
- if (!user_arg.is_empty()) {
- args.push_back(user_arg);
+ if (p_path.get_extension() != "dmg") {
+ args.push_back("--entitlements");
+ args.push_back(p_ent_path);
}
- }
- args.push_back("-s");
- if (ad_hoc) {
- args.push_back("-");
- } else {
- args.push_back(p_preset->get("codesign/identity"));
- }
+ PackedStringArray user_args = p_preset->get("codesign/custom_options");
+ for (int i = 0; i < user_args.size(); i++) {
+ String user_arg = user_args[i].strip_edges();
+ if (!user_arg.is_empty()) {
+ args.push_back(user_arg);
+ }
+ }
- args.push_back("-v"); /* provide some more feedback */
+ args.push_back("-s");
+ if (ad_hoc) {
+ args.push_back("-");
+ } else {
+ args.push_back(p_preset->get("codesign/identity"));
+ }
- if (p_preset->get("codesign/replace_existing_signature")) {
- args.push_back("-f");
- }
+ args.push_back("-v"); /* provide some more feedback */
- args.push_back(p_path);
+ if (p_preset->get("codesign/replace_existing_signature")) {
+ args.push_back("-f");
+ }
- String str;
- Error err = OS::get_singleton()->execute("codesign", args, &str, nullptr, true);
- ERR_FAIL_COND_V(err != OK, err);
+ args.push_back(p_path);
- print_line("codesign (" + p_path + "):\n" + str);
- if (str.find("no identity found") != -1) {
- EditorNode::add_io_error("codesign: no identity found");
- return FAILED;
- }
- if ((str.find("unrecognized blob type") != -1) || (str.find("cannot read entitlement data") != -1)) {
- EditorNode::add_io_error("codesign: invalid entitlements file");
- return FAILED;
- }
-#endif
+ String str;
+ Error err = OS::get_singleton()->execute("codesign", args, &str, nullptr, true);
+ ERR_FAIL_COND_V(err != OK, err);
- return OK;
+ print_verbose("codesign (" + p_path + "):\n" + str);
+ if (str.find("no identity found") != -1) {
+ EditorNode::add_io_error("CodeSign: " + TTR("No identity found."));
+ return FAILED;
+ }
+ if ((str.find("unrecognized blob type") != -1) || (str.find("cannot read entitlement data") != -1)) {
+ EditorNode::add_io_error("CodeSign: " + TTR("Invalid entitlements file."));
+ return FAILED;
+ }
+ return OK;
+ }
}
Error EditorExportPlatformOSX::_code_sign_directory(const Ref<EditorExportPreset> &p_preset, const String &p_path,
@@ -560,12 +639,12 @@ Error EditorExportPlatformOSX::_create_dmg(const String &p_dmg_path, const Strin
Error err = OS::get_singleton()->execute("hdiutil", args, &str, nullptr, true);
ERR_FAIL_COND_V(err != OK, err);
- print_line("hdiutil returned: " + str);
+ print_verbose("hdiutil returned: " + str);
if (str.find("create failed") != -1) {
if (str.find("File exists") != -1) {
- EditorNode::add_io_error("hdiutil: create failed - file exists");
+ EditorNode::add_io_error("hdiutil: " + TTR("DMG creation failed, file already exists."));
} else {
- EditorNode::add_io_error("hdiutil: create failed");
+ EditorNode::add_io_error("hdiutil: " + TTR("DMG create failed."));
}
return FAILED;
}
@@ -602,13 +681,13 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
FileAccess *src_f = nullptr;
zlib_filefunc_def io = zipio_create_io_from_file(&src_f);
- if (ep.step("Creating app", 0)) {
+ if (ep.step(TTR("Creating app bundle"), 0)) {
return ERR_SKIP;
}
unzFile src_pkg_zip = unzOpen2(src_pkg_name.utf8().get_data(), &io);
if (!src_pkg_zip) {
- EditorNode::add_io_error("Could not find template app to export:\n" + src_pkg_name);
+ EditorNode::add_io_error(TTR("Could not find template app to export:") + "\n" + src_pkg_name);
return ERR_FILE_NOT_FOUND;
}
@@ -627,12 +706,27 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
pkg_name = OS::get_singleton()->get_safe_dir_name(pkg_name);
- String export_format = use_dmg() && p_path.ends_with("dmg") ? "dmg" : "zip";
+ String export_format;
+ if (use_dmg() && p_path.ends_with("dmg")) {
+ export_format = "dmg";
+ } else if (p_path.ends_with("zip")) {
+ export_format = "zip";
+ } else if (p_path.ends_with("app")) {
+ export_format = "app";
+ } else {
+ EditorNode::add_io_error("Invalid export format");
+ return ERR_CANT_CREATE;
+ }
// Create our application bundle.
String tmp_app_dir_name = pkg_name + ".app";
- String tmp_app_path_name = EditorPaths::get_singleton()->get_cache_dir().plus_file(tmp_app_dir_name);
- print_line("Exporting to " + tmp_app_path_name);
+ String tmp_app_path_name;
+ if (export_format == "app") {
+ tmp_app_path_name = p_path;
+ } else {
+ tmp_app_path_name = EditorPaths::get_singleton()->get_cache_dir().plus_file(tmp_app_dir_name);
+ }
+ print_verbose("Exporting to " + tmp_app_path_name);
Error err = OK;
@@ -641,16 +735,22 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
err = ERR_CANT_CREATE;
}
+ if (DirAccess::exists(tmp_app_dir_name)) {
+ if (tmp_app_dir->change_dir(tmp_app_path_name) == OK) {
+ tmp_app_dir->erase_contents_recursive();
+ }
+ }
+
Array helpers = p_preset->get("codesign/entitlements/app_sandbox/helper_executables");
// Create our folder structure.
if (err == OK) {
- print_line("Creating " + tmp_app_path_name + "/Contents/MacOS");
+ print_verbose("Creating " + tmp_app_path_name + "/Contents/MacOS");
err = tmp_app_dir->make_dir_recursive(tmp_app_path_name + "/Contents/MacOS");
}
if (err == OK) {
- print_line("Creating " + tmp_app_path_name + "/Contents/Frameworks");
+ print_verbose("Creating " + tmp_app_path_name + "/Contents/Frameworks");
err = tmp_app_dir->make_dir_recursive(tmp_app_path_name + "/Contents/Frameworks");
}
@@ -660,7 +760,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
}
if (err == OK) {
- print_line("Creating " + tmp_app_path_name + "/Contents/Resources");
+ print_verbose("Creating " + tmp_app_path_name + "/Contents/Resources");
err = tmp_app_dir->make_dir_recursive(tmp_app_path_name + "/Contents/Resources");
}
@@ -689,6 +789,25 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
// Write.
file = file.replace_first("osx_template.app/", "");
+ if (((info.external_fa >> 16L) & 0120000) == 0120000) {
+#ifndef UNIX_ENABLED
+ WARN_PRINT(vformat("Relative symlinks are not supported on this OS, exported project might be broken!"));
+#endif
+ // Handle symlinks in the archive.
+ file = tmp_app_path_name.plus_file(file);
+ if (err == OK) {
+ err = tmp_app_dir->make_dir_recursive(file.get_base_dir());
+ }
+ if (err == OK) {
+ String lnk_data = String::utf8((const char *)data.ptr(), data.size());
+ err = tmp_app_dir->create_link(lnk_data, file);
+ print_verbose(vformat("ADDING SYMLINK %s => %s\n", file, lnk_data));
+ }
+
+ ret = unzGoToNextFile(src_pkg_zip);
+ continue; // next
+ }
+
if (file == "Contents/Info.plist") {
_fix_plist(p_preset, data, pkg_name);
}
@@ -752,7 +871,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
dylibs_found.push_back(file);
}
- print_line("ADDING: " + file + " size: " + itos(data.size()));
+ print_verbose("ADDING: " + file + " size: " + itos(data.size()));
// Write it into our application bundle.
file = tmp_app_path_name.plus_file(file);
@@ -782,12 +901,12 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
unzClose(src_pkg_zip);
if (!found_binary) {
- ERR_PRINT("Requested template binary '" + binary_to_use + "' not found. It might be missing from your template archive.");
+ ERR_PRINT(vformat("Requested template binary '%s' not found. It might be missing from your template archive.", binary_to_use));
err = ERR_FILE_NOT_FOUND;
}
if (err == OK) {
- if (ep.step("Making PKG", 1)) {
+ if (ep.step(TTR("Making PKG"), 1)) {
return ERR_SKIP;
}
@@ -965,6 +1084,22 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
FileAccess::set_unix_permissions(tmp_app_path_name + "/Contents/Helpers/" + hlp_path.get_file(), 0755);
}
}
+
+ bool ad_hoc = true;
+ if (err == OK) {
+#ifdef OSX_ENABLED
+ String sign_identity = p_preset->get("codesign/identity");
+#else
+ String sign_identity = "-";
+#endif
+ ad_hoc = (sign_identity == "" || sign_identity == "-");
+ bool lib_validation = p_preset->get("codesign/entitlements/disable_library_validation");
+ if ((!dylibs_found.is_empty() || !shared_objects.is_empty()) && sign_enabled && ad_hoc && !lib_validation) {
+ ERR_PRINT("Application with an ad-hoc signature require 'Disable Library Validation' entitlement to load dynamic libraries.");
+ err = ERR_CANT_CREATE;
+ }
+ }
+
if (err == OK) {
DirAccessRef da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
for (int i = 0; i < shared_objects.size(); i++) {
@@ -994,31 +1129,31 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
}
if (err == OK && sign_enabled) {
- if (ep.step("Code signing bundle", 2)) {
+ if (ep.step(TTR("Code signing bundle"), 2)) {
return ERR_SKIP;
}
- err = _code_sign(p_preset, tmp_app_path_name + "/Contents/MacOS/" + pkg_name, ent_path);
+ err = _code_sign(p_preset, tmp_app_path_name, ent_path);
}
if (export_format == "dmg") {
// Create a DMG.
if (err == OK) {
- if (ep.step("Making DMG", 3)) {
+ if (ep.step(TTR("Making DMG"), 3)) {
return ERR_SKIP;
}
err = _create_dmg(p_path, pkg_name, tmp_app_path_name);
}
// Sign DMG.
- if (err == OK && sign_enabled) {
- if (ep.step("Code signing DMG", 3)) {
+ if (err == OK && sign_enabled && !ad_hoc) {
+ if (ep.step(TTR("Code signing DMG"), 3)) {
return ERR_SKIP;
}
err = _code_sign(p_preset, p_path, ent_path);
}
- } else {
+ } else if (export_format == "zip") {
// Create ZIP.
if (err == OK) {
- if (ep.step("Making ZIP", 3)) {
+ if (ep.step(TTR("Making ZIP"), 3)) {
return ERR_SKIP;
}
if (FileAccess::exists(p_path)) {
@@ -1037,20 +1172,30 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
bool noto_enabled = p_preset->get("notarization/enable");
if (err == OK && noto_enabled) {
- if (ep.step("Sending archive for notarization", 4)) {
- return ERR_SKIP;
+ if (export_format == "app") {
+ WARN_PRINT("Notarization require app to be archived first, select DMG or ZIP export format instead.");
+ } else {
+ if (ep.step(TTR("Sending archive for notarization"), 4)) {
+ return ERR_SKIP;
+ }
+ err = _notarize(p_preset, p_path);
}
- err = _notarize(p_preset, p_path);
}
// Clean up temporary entitlements files.
DirAccess::remove_file_or_error(hlp_ent_path);
- // Clean up temporary .app dir.
- tmp_app_dir->change_dir(tmp_app_path_name);
- tmp_app_dir->erase_contents_recursive();
- tmp_app_dir->change_dir("..");
- tmp_app_dir->remove(tmp_app_dir_name);
+ // Clean up temporary .app dir and generated entitlements.
+ if ((String)(p_preset->get("codesign/entitlements/custom_file")) == "") {
+ tmp_app_dir->remove(ent_path);
+ }
+ if (export_format != "app") {
+ if (tmp_app_dir->change_dir(tmp_app_path_name) == OK) {
+ tmp_app_dir->erase_contents_recursive();
+ tmp_app_dir->change_dir("..");
+ tmp_app_dir->remove(tmp_app_dir_name);
+ }
+ }
}
return err;
@@ -1152,7 +1297,7 @@ void EditorExportPlatformOSX::_zip_folder_recursive(zipFile &p_zip, const String
FileAccessRef fa = FileAccess::open(dir.plus_file(f), FileAccess::READ);
if (!fa) {
- ERR_FAIL_MSG("Can't open file to read from path '" + String(dir.plus_file(f)) + "'.");
+ ERR_FAIL_MSG(vformat("Can't open file to read from path \"%s\".", dir.plus_file(f)));
}
const int bufsize = 16384;
uint8_t buf[bufsize];
@@ -1209,11 +1354,19 @@ bool EditorExportPlatformOSX::can_export(const Ref<EditorExportPreset> &p_preset
valid = false;
}
-#ifdef OSX_ENABLED
bool sign_enabled = p_preset->get("codesign/enable");
bool noto_enabled = p_preset->get("notarization/enable");
bool ad_hoc = ((p_preset->get("codesign/identity") == "") || (p_preset->get("codesign/identity") == "-"));
+#ifdef OSX_ENABLED
+ if (!ad_hoc && (bool)EditorSettings::get_singleton()->get("export/macos/force_builtin_codesign")) {
+ err += TTR("Warning: Built-in \"codesign\" is selected in the Editor Settings. Code signing is limited to ad-hoc signature only.") + "\n";
+ }
+ if (!ad_hoc && !FileAccess::exists("/usr/bin/codesign") && !FileAccess::exists("/bin/codesign")) {
+ err += TTR("Warning: Xcode command line tools are not installed, using built-in \"codesign\". Code signing is limited to ad-hoc signature only.") + "\n";
+ }
+#endif
+
if (noto_enabled) {
if (ad_hoc) {
err += TTR("Notarization: Notarization with the ad-hoc signature is not supported.") + "\n";
@@ -1240,7 +1393,11 @@ bool EditorExportPlatformOSX::can_export(const Ref<EditorExportPreset> &p_preset
valid = false;
}
} else {
- err += TTR("Notarization is disabled. Exported project will be blocked by Gatekeeper, if it's downloaded from an unknown source.") + "\n";
+#ifdef OSX_ENABLED
+ err += TTR("Warning: Notarization is disabled. Exported project will be blocked by Gatekeeper, if it's downloaded from an unknown source.") + "\n";
+#else
+ err += TTR("Warning: Notarization is not supported on this OS. Exported project will be blocked by Gatekeeper, if it's downloaded from an unknown source.") + "\n";
+#endif
if (!sign_enabled) {
err += TTR("Code signing is disabled. Exported project will not run on Macs with enabled Gatekeeper and Apple Silicon powered Macs.") + "\n";
} else {
@@ -1252,9 +1409,33 @@ bool EditorExportPlatformOSX::can_export(const Ref<EditorExportPreset> &p_preset
}
}
}
-#else
- err += TTR("macOS code signing and Notarization is not supported on the host OS. Exported project will not run on Macs with enabled Gatekeeper and Apple Silicon powered Macs.") + "\n";
-#endif
+
+ if (sign_enabled) {
+ if ((bool)p_preset->get("codesign/entitlements/audio_input") && ((String)p_preset->get("privacy/microphone_usage_description")).is_empty()) {
+ err += TTR("Privacy: Microphone access is enabled, but usage description is not specified.") + "\n";
+ valid = false;
+ }
+ if ((bool)p_preset->get("codesign/entitlements/camera") && ((String)p_preset->get("privacy/camera_usage_description")).is_empty()) {
+ err += TTR("Privacy: Camera access is enabled, but usage description is not specified.") + "\n";
+ valid = false;
+ }
+ if ((bool)p_preset->get("codesign/entitlements/location") && ((String)p_preset->get("privacy/location_usage_description")).is_empty()) {
+ err += TTR("Privacy: Location information access is enabled, but usage description is not specified.") + "\n";
+ valid = false;
+ }
+ if ((bool)p_preset->get("codesign/entitlements/address_book") && ((String)p_preset->get("privacy/address_book_usage_description")).is_empty()) {
+ err += TTR("Privacy: Address book access is enabled, but usage description is not specified.") + "\n";
+ valid = false;
+ }
+ if ((bool)p_preset->get("codesign/entitlements/calendars") && ((String)p_preset->get("privacy/calendar_usage_description")).is_empty()) {
+ err += TTR("Privacy: Calendar access is enabled, but usage description is not specified.") + "\n";
+ valid = false;
+ }
+ if ((bool)p_preset->get("codesign/entitlements/photos_library") && ((String)p_preset->get("privacy/photos_library_usage_description")).is_empty()) {
+ err += TTR("Privacy: Photo library access is enabled, but usage description is not specified.") + "\n";
+ valid = false;
+ }
+ }
if (!err.is_empty()) {
r_error = err;
diff --git a/platform/osx/export/export_plugin.h b/platform/osx/export/export_plugin.h
index aa22ad6384..85fc72437c 100644
--- a/platform/osx/export/export_plugin.h
+++ b/platform/osx/export/export_plugin.h
@@ -68,13 +68,13 @@ class EditorExportPlatformOSX : public EditorExportPlatform {
Error _create_dmg(const String &p_dmg_path, const String &p_pkg_name, const String &p_app_path_name);
void _zip_folder_recursive(zipFile &p_zip, const String &p_root_path, const String &p_folder, const String &p_pkg_name);
-#ifdef OSX_ENABLED
bool use_codesign() const { return true; }
+#ifdef OSX_ENABLED
bool use_dmg() const { return true; }
#else
- bool use_codesign() const { return false; }
bool use_dmg() const { return false; }
#endif
+
bool is_package_name_valid(const String &p_package, String *r_error = nullptr) const {
String pname = p_package;
@@ -113,6 +113,7 @@ public:
list.push_back("dmg");
}
list.push_back("zip");
+ list.push_back("app");
return list;
}
virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override;
diff --git a/platform/osx/export/lipo.cpp b/platform/osx/export/lipo.cpp
new file mode 100644
index 0000000000..66d2ecdbcf
--- /dev/null
+++ b/platform/osx/export/lipo.cpp
@@ -0,0 +1,243 @@
+/*************************************************************************/
+/* lipo.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 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 "modules/modules_enabled.gen.h" // For regex.
+
+#include "lipo.h"
+
+#ifdef MODULE_REGEX_ENABLED
+
+bool LipO::is_lipo(const String &p_path) {
+ FileAccessRef fb = FileAccess::open(p_path, FileAccess::READ);
+ ERR_FAIL_COND_V_MSG(!fb, false, vformat("LipO: Can't open file: \"%s\".", p_path));
+ uint32_t magic = fb->get_32();
+ return (magic == 0xbebafeca || magic == 0xcafebabe || magic == 0xbfbafeca || magic == 0xcafebabf);
+}
+
+bool LipO::create_file(const String &p_output_path, const PackedStringArray &p_files) {
+ close();
+
+ fa = FileAccess::open(p_output_path, FileAccess::WRITE);
+ ERR_FAIL_COND_V_MSG(!fa, false, vformat("LipO: Can't open file: \"%s\".", p_output_path));
+
+ uint64_t max_size = 0;
+ for (int i = 0; i < p_files.size(); i++) {
+ MachO mh;
+ if (!mh.open_file(p_files[i])) {
+ ERR_FAIL_V_MSG(false, vformat("LipO: Invalid MachO file: \"%s.\"", p_files[i]));
+ }
+
+ FatArch arch;
+ arch.cputype = mh.get_cputype();
+ arch.cpusubtype = mh.get_cpusubtype();
+ arch.offset = 0;
+ arch.size = mh.get_size();
+ arch.align = mh.get_align();
+ max_size += arch.size;
+
+ archs.push_back(arch);
+
+ FileAccessRef fb = FileAccess::open(p_files[i], FileAccess::READ);
+ if (!fb) {
+ close();
+ ERR_FAIL_V_MSG(false, vformat("LipO: Can't open file: \"%s.\"", p_files[i]));
+ }
+ }
+
+ // Write header.
+ bool is_64 = (max_size >= std::numeric_limits<uint32_t>::max());
+ if (is_64) {
+ fa->store_32(0xbfbafeca);
+ } else {
+ fa->store_32(0xbebafeca);
+ }
+ fa->store_32(BSWAP32(archs.size()));
+ uint64_t offset = archs.size() * (is_64 ? 32 : 20) + 8;
+ for (int i = 0; i < archs.size(); i++) {
+ archs.write[i].offset = offset + PAD(offset, uint64_t(1) << archs[i].align);
+ if (is_64) {
+ fa->store_32(BSWAP32(archs[i].cputype));
+ fa->store_32(BSWAP32(archs[i].cpusubtype));
+ fa->store_64(BSWAP64(archs[i].offset));
+ fa->store_64(BSWAP64(archs[i].size));
+ fa->store_32(BSWAP32(archs[i].align));
+ fa->store_32(0);
+ } else {
+ fa->store_32(BSWAP32(archs[i].cputype));
+ fa->store_32(BSWAP32(archs[i].cpusubtype));
+ fa->store_32(BSWAP32(archs[i].offset));
+ fa->store_32(BSWAP32(archs[i].size));
+ fa->store_32(BSWAP32(archs[i].align));
+ }
+ offset = archs[i].offset + archs[i].size;
+ }
+
+ // Write files and padding.
+ for (int i = 0; i < archs.size(); i++) {
+ FileAccessRef fb = FileAccess::open(p_files[i], FileAccess::READ);
+ if (!fb) {
+ close();
+ ERR_FAIL_V_MSG(false, vformat("LipO: Can't open file: \"%s.\"", p_files[i]));
+ }
+ uint64_t cur = fa->get_position();
+ for (uint64_t j = cur; j < archs[i].offset; j++) {
+ fa->store_8(0);
+ }
+ int pages = archs[i].size / 4096;
+ int remain = archs[i].size % 4096;
+ unsigned char step[4096];
+ for (int j = 0; j < pages; j++) {
+ uint64_t br = fb->get_buffer(step, 4096);
+ if (br > 0) {
+ fa->store_buffer(step, br);
+ }
+ }
+ uint64_t br = fb->get_buffer(step, remain);
+ if (br > 0) {
+ fa->store_buffer(step, br);
+ }
+ fb->close();
+ }
+ return true;
+}
+
+bool LipO::open_file(const String &p_path) {
+ close();
+
+ fa = FileAccess::open(p_path, FileAccess::READ);
+ ERR_FAIL_COND_V_MSG(!fa, false, vformat("LipO: Can't open file: \"%s\".", p_path));
+
+ uint32_t magic = fa->get_32();
+ if (magic == 0xbebafeca) {
+ // 32-bit fat binary, bswap.
+ uint32_t nfat_arch = BSWAP32(fa->get_32());
+ for (uint32_t i = 0; i < nfat_arch; i++) {
+ FatArch arch;
+ arch.cputype = BSWAP32(fa->get_32());
+ arch.cpusubtype = BSWAP32(fa->get_32());
+ arch.offset = BSWAP32(fa->get_32());
+ arch.size = BSWAP32(fa->get_32());
+ arch.align = BSWAP32(fa->get_32());
+
+ archs.push_back(arch);
+ }
+ } else if (magic == 0xcafebabe) {
+ // 32-bit fat binary.
+ uint32_t nfat_arch = fa->get_32();
+ for (uint32_t i = 0; i < nfat_arch; i++) {
+ FatArch arch;
+ arch.cputype = fa->get_32();
+ arch.cpusubtype = fa->get_32();
+ arch.offset = fa->get_32();
+ arch.size = fa->get_32();
+ arch.align = fa->get_32();
+
+ archs.push_back(arch);
+ }
+ } else if (magic == 0xbfbafeca) {
+ // 64-bit fat binary, bswap.
+ uint32_t nfat_arch = BSWAP32(fa->get_32());
+ for (uint32_t i = 0; i < nfat_arch; i++) {
+ FatArch arch;
+ arch.cputype = BSWAP32(fa->get_32());
+ arch.cpusubtype = BSWAP32(fa->get_32());
+ arch.offset = BSWAP64(fa->get_64());
+ arch.size = BSWAP64(fa->get_64());
+ arch.align = BSWAP32(fa->get_32());
+ fa->get_32(); // Skip, reserved.
+
+ archs.push_back(arch);
+ }
+ } else if (magic == 0xcafebabf) {
+ // 64-bit fat binary.
+ uint32_t nfat_arch = fa->get_32();
+ for (uint32_t i = 0; i < nfat_arch; i++) {
+ FatArch arch;
+ arch.cputype = fa->get_32();
+ arch.cpusubtype = fa->get_32();
+ arch.offset = fa->get_64();
+ arch.size = fa->get_64();
+ arch.align = fa->get_32();
+ fa->get_32(); // Skip, reserved.
+
+ archs.push_back(arch);
+ }
+ } else {
+ close();
+ ERR_FAIL_V_MSG(false, vformat("LipO: Invalid fat binary: \"%s\".", p_path));
+ }
+ return true;
+}
+
+int LipO::get_arch_count() const {
+ ERR_FAIL_COND_V_MSG(!fa, 0, "LipO: File not opened.");
+ return archs.size();
+}
+
+bool LipO::extract_arch(int p_index, const String &p_path) {
+ ERR_FAIL_COND_V_MSG(!fa, false, "LipO: File not opened.");
+ ERR_FAIL_INDEX_V(p_index, archs.size(), false);
+
+ FileAccessRef fb = FileAccess::open(p_path, FileAccess::WRITE);
+ ERR_FAIL_COND_V_MSG(!fb, false, vformat("LipO: Can't open file: \"%s\".", p_path));
+
+ fa->seek(archs[p_index].offset);
+
+ int pages = archs[p_index].size / 4096;
+ int remain = archs[p_index].size % 4096;
+ unsigned char step[4096];
+ for (int i = 0; i < pages; i++) {
+ uint64_t br = fa->get_buffer(step, 4096);
+ if (br > 0) {
+ fb->store_buffer(step, br);
+ }
+ }
+ uint64_t br = fa->get_buffer(step, remain);
+ if (br > 0) {
+ fb->store_buffer(step, br);
+ }
+ fb->close();
+ return true;
+}
+
+void LipO::close() {
+ if (fa) {
+ fa->close();
+ memdelete(fa);
+ fa = nullptr;
+ }
+ archs.clear();
+}
+
+LipO::~LipO() {
+ close();
+}
+
+#endif // MODULE_REGEX_ENABLED
diff --git a/platform/osx/export/lipo.h b/platform/osx/export/lipo.h
new file mode 100644
index 0000000000..68bbe42dd6
--- /dev/null
+++ b/platform/osx/export/lipo.h
@@ -0,0 +1,76 @@
+/*************************************************************************/
+/* lipo.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 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. */
+/*************************************************************************/
+
+// Universal / Universal 2 fat binary file creator and extractor.
+
+#ifndef LIPO_H
+#define LIPO_H
+
+#include "core/io/file_access.h"
+#include "core/object/ref_counted.h"
+#include "modules/modules_enabled.gen.h" // For regex.
+
+#include "macho.h"
+
+#ifdef MODULE_REGEX_ENABLED
+
+class LipO : public RefCounted {
+ struct FatArch {
+ uint32_t cputype;
+ uint32_t cpusubtype;
+ uint64_t offset;
+ uint64_t size;
+ uint32_t align;
+ };
+
+ FileAccess *fa = nullptr;
+ Vector<FatArch> archs;
+
+ static inline size_t PAD(size_t s, size_t a) {
+ return (a - s % a);
+ }
+
+public:
+ static bool is_lipo(const String &p_path);
+
+ bool create_file(const String &p_output_path, const PackedStringArray &p_files);
+
+ bool open_file(const String &p_path);
+ int get_arch_count() const;
+ bool extract_arch(int p_index, const String &p_path);
+
+ void close();
+
+ ~LipO();
+};
+
+#endif // MODULE_REGEX_ENABLED
+
+#endif // LIPO_H
diff --git a/platform/osx/export/macho.cpp b/platform/osx/export/macho.cpp
new file mode 100644
index 0000000000..08f2a855b0
--- /dev/null
+++ b/platform/osx/export/macho.cpp
@@ -0,0 +1,556 @@
+/*************************************************************************/
+/* macho.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 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 "modules/modules_enabled.gen.h" // For regex.
+
+#include "macho.h"
+
+#ifdef MODULE_REGEX_ENABLED
+
+uint32_t MachO::seg_align(uint64_t p_vmaddr, uint32_t p_min, uint32_t p_max) {
+ uint32_t align = p_max;
+ if (p_vmaddr != 0) {
+ uint64_t seg_align = 1;
+ align = 0;
+ while ((seg_align & p_vmaddr) == 0) {
+ seg_align = seg_align << 1;
+ align++;
+ }
+ align = CLAMP(align, p_min, p_max);
+ }
+ return align;
+}
+
+bool MachO::alloc_signature(uint64_t p_size) {
+ ERR_FAIL_COND_V_MSG(!fa, false, "MachO: File not opened.");
+ if (signature_offset != 0) {
+ // Nothing to do, already have signature load command.
+ return true;
+ }
+ if (lc_limit == 0 || lc_limit + 16 > exe_base) {
+ ERR_FAIL_V_MSG(false, "MachO: Can't allocate signature load command, please use \"codesign_allocate\" utility first.");
+ } else {
+ // Add signature load command.
+ signature_offset = lc_limit;
+
+ fa->seek(lc_limit);
+ LoadCommandHeader lc;
+ lc.cmd = LC_CODE_SIGNATURE;
+ lc.cmdsize = 16;
+ if (swap) {
+ lc.cmdsize = BSWAP32(lc.cmdsize);
+ }
+ fa->store_buffer((const uint8_t *)&lc, sizeof(LoadCommandHeader));
+
+ uint32_t lc_offset = fa->get_length() + PAD(fa->get_length(), 16);
+ uint32_t lc_size = 0;
+ if (swap) {
+ lc_offset = BSWAP32(lc_offset);
+ lc_size = BSWAP32(lc_size);
+ }
+ fa->store_32(lc_offset);
+ fa->store_32(lc_size);
+
+ // Write new command number.
+ fa->seek(0x10);
+ uint32_t ncmds = fa->get_32();
+ uint32_t cmdssize = fa->get_32();
+ if (swap) {
+ ncmds = BSWAP32(ncmds);
+ cmdssize = BSWAP32(cmdssize);
+ }
+ ncmds += 1;
+ cmdssize += 16;
+ if (swap) {
+ ncmds = BSWAP32(ncmds);
+ cmdssize = BSWAP32(cmdssize);
+ }
+ fa->seek(0x10);
+ fa->store_32(ncmds);
+ fa->store_32(cmdssize);
+
+ lc_limit = lc_limit + sizeof(LoadCommandHeader) + 8;
+
+ return true;
+ }
+}
+
+bool MachO::is_macho(const String &p_path) {
+ FileAccessRef fb = FileAccess::open(p_path, FileAccess::READ);
+ ERR_FAIL_COND_V_MSG(!fb, false, vformat("MachO: Can't open file: \"%s\".", p_path));
+ uint32_t magic = fb->get_32();
+ return (magic == 0xcefaedfe || magic == 0xfeedface || magic == 0xcffaedfe || magic == 0xfeedfacf);
+}
+
+bool MachO::open_file(const String &p_path) {
+ fa = FileAccess::open(p_path, FileAccess::READ_WRITE);
+ ERR_FAIL_COND_V_MSG(!fa, false, vformat("MachO: Can't open file: \"%s\".", p_path));
+ uint32_t magic = fa->get_32();
+ MachHeader mach_header;
+
+ // Read MachO header.
+ swap = (magic == 0xcffaedfe || magic == 0xcefaedfe);
+ if (magic == 0xcefaedfe || magic == 0xfeedface) {
+ // Thin 32-bit binary.
+ fa->get_buffer((uint8_t *)&mach_header, sizeof(MachHeader));
+ } else if (magic == 0xcffaedfe || magic == 0xfeedfacf) {
+ // Thin 64-bit binary.
+ fa->get_buffer((uint8_t *)&mach_header, sizeof(MachHeader));
+ fa->get_32(); // Skip extra reserved field.
+ } else {
+ ERR_FAIL_V_MSG(false, vformat("MachO: File is not a valid MachO binary: \"%s\".", p_path));
+ }
+
+ if (swap) {
+ mach_header.ncmds = BSWAP32(mach_header.ncmds);
+ mach_header.cpusubtype = BSWAP32(mach_header.cpusubtype);
+ mach_header.cputype = BSWAP32(mach_header.cputype);
+ }
+ cpusubtype = mach_header.cpusubtype;
+ cputype = mach_header.cputype;
+ align = 0;
+ exe_base = std::numeric_limits<uint64_t>::max();
+ exe_limit = 0;
+ lc_limit = 0;
+ link_edit_offset = 0;
+ signature_offset = 0;
+
+ // Read load commands.
+ for (uint32_t i = 0; i < mach_header.ncmds; i++) {
+ LoadCommandHeader lc;
+ fa->get_buffer((uint8_t *)&lc, sizeof(LoadCommandHeader));
+ if (swap) {
+ lc.cmd = BSWAP32(lc.cmd);
+ lc.cmdsize = BSWAP32(lc.cmdsize);
+ }
+ uint64_t ps = fa->get_position();
+ switch (lc.cmd) {
+ case LC_SEGMENT: {
+ LoadCommandSegment lc_seg;
+ fa->get_buffer((uint8_t *)&lc_seg, sizeof(LoadCommandSegment));
+ if (swap) {
+ lc_seg.nsects = BSWAP32(lc_seg.nsects);
+ lc_seg.vmaddr = BSWAP32(lc_seg.vmaddr);
+ lc_seg.vmsize = BSWAP32(lc_seg.vmsize);
+ }
+ align = MAX(align, seg_align(lc_seg.vmaddr, 2, 15));
+ if (String(lc_seg.segname) == "__TEXT") {
+ exe_limit = MAX(exe_limit, lc_seg.vmsize);
+ for (uint32_t j = 0; j < lc_seg.nsects; j++) {
+ Section lc_sect;
+ fa->get_buffer((uint8_t *)&lc_sect, sizeof(Section));
+ if (String(lc_sect.sectname) == "__text") {
+ if (swap) {
+ exe_base = MIN(exe_base, BSWAP32(lc_sect.offset));
+ } else {
+ exe_base = MIN(exe_base, lc_sect.offset);
+ }
+ }
+ if (swap) {
+ align = MAX(align, BSWAP32(lc_sect.align));
+ } else {
+ align = MAX(align, lc_sect.align);
+ }
+ }
+ } else if (String(lc_seg.segname) == "__LINKEDIT") {
+ link_edit_offset = ps - 8;
+ }
+ } break;
+ case LC_SEGMENT_64: {
+ LoadCommandSegment64 lc_seg;
+ fa->get_buffer((uint8_t *)&lc_seg, sizeof(LoadCommandSegment64));
+ if (swap) {
+ lc_seg.nsects = BSWAP32(lc_seg.nsects);
+ lc_seg.vmaddr = BSWAP64(lc_seg.vmaddr);
+ lc_seg.vmsize = BSWAP64(lc_seg.vmsize);
+ }
+ align = MAX(align, seg_align(lc_seg.vmaddr, 3, 15));
+ if (String(lc_seg.segname) == "__TEXT") {
+ exe_limit = MAX(exe_limit, lc_seg.vmsize);
+ for (uint32_t j = 0; j < lc_seg.nsects; j++) {
+ Section64 lc_sect;
+ fa->get_buffer((uint8_t *)&lc_sect, sizeof(Section64));
+ if (String(lc_sect.sectname) == "__text") {
+ if (swap) {
+ exe_base = MIN(exe_base, BSWAP32(lc_sect.offset));
+ } else {
+ exe_base = MIN(exe_base, lc_sect.offset);
+ }
+ if (swap) {
+ align = MAX(align, BSWAP32(lc_sect.align));
+ } else {
+ align = MAX(align, lc_sect.align);
+ }
+ }
+ }
+ } else if (String(lc_seg.segname) == "__LINKEDIT") {
+ link_edit_offset = ps - 8;
+ }
+ } break;
+ case LC_CODE_SIGNATURE: {
+ signature_offset = ps - 8;
+ } break;
+ default: {
+ } break;
+ }
+ fa->seek(ps + lc.cmdsize - 8);
+ lc_limit = ps + lc.cmdsize - 8;
+ }
+
+ if (exe_limit == 0 || lc_limit == 0) {
+ ERR_FAIL_V_MSG(false, vformat("MachO: No load commands or executable code found: \"%s\".", p_path));
+ }
+
+ return true;
+}
+
+uint64_t MachO::get_exe_base() {
+ ERR_FAIL_COND_V_MSG(!fa, 0, "MachO: File not opened.");
+ return exe_base;
+}
+
+uint64_t MachO::get_exe_limit() {
+ ERR_FAIL_COND_V_MSG(!fa, 0, "MachO: File not opened.");
+ return exe_limit;
+}
+
+int32_t MachO::get_align() {
+ ERR_FAIL_COND_V_MSG(!fa, 0, "MachO: File not opened.");
+ return align;
+}
+
+uint32_t MachO::get_cputype() {
+ ERR_FAIL_COND_V_MSG(!fa, 0, "MachO: File not opened.");
+ return cputype;
+}
+
+uint32_t MachO::get_cpusubtype() {
+ ERR_FAIL_COND_V_MSG(!fa, 0, "MachO: File not opened.");
+ return cpusubtype;
+}
+
+uint64_t MachO::get_size() {
+ ERR_FAIL_COND_V_MSG(!fa, 0, "MachO: File not opened.");
+ return fa->get_length();
+}
+
+uint64_t MachO::get_signature_offset() {
+ ERR_FAIL_COND_V_MSG(!fa, 0, "MachO: File not opened.");
+ ERR_FAIL_COND_V_MSG(signature_offset == 0, 0, "MachO: No signature load command.");
+
+ fa->seek(signature_offset + 8);
+ if (swap) {
+ return BSWAP32(fa->get_32());
+ } else {
+ return fa->get_32();
+ }
+}
+
+uint64_t MachO::get_code_limit() {
+ ERR_FAIL_COND_V_MSG(!fa, 0, "MachO: File not opened.");
+
+ if (signature_offset == 0) {
+ return fa->get_length() + PAD(fa->get_length(), 16);
+ } else {
+ return get_signature_offset();
+ }
+}
+
+uint64_t MachO::get_signature_size() {
+ ERR_FAIL_COND_V_MSG(!fa, 0, "MachO: File not opened.");
+ ERR_FAIL_COND_V_MSG(signature_offset == 0, 0, "MachO: No signature load command.");
+
+ fa->seek(signature_offset + 12);
+ if (swap) {
+ return BSWAP32(fa->get_32());
+ } else {
+ return fa->get_32();
+ }
+}
+
+bool MachO::is_signed() {
+ ERR_FAIL_COND_V_MSG(!fa, false, "MachO: File not opened.");
+ if (signature_offset == 0) {
+ return false;
+ }
+
+ fa->seek(get_signature_offset());
+ uint32_t magic = BSWAP32(fa->get_32());
+ if (magic != 0xfade0cc0) {
+ return false; // No SuperBlob found.
+ }
+ fa->get_32(); // Skip size field, unused.
+ uint32_t count = BSWAP32(fa->get_32());
+ for (uint32_t i = 0; i < count; i++) {
+ uint32_t index_type = BSWAP32(fa->get_32());
+ uint32_t offset = BSWAP32(fa->get_32());
+ if (index_type == 0x00000000) { // CodeDirectory index type.
+ fa->seek(get_signature_offset() + offset + 12);
+ uint32_t flags = BSWAP32(fa->get_32());
+ if (flags & 0x20000) {
+ return false; // Found CD, linker-signed.
+ } else {
+ return true; // Found CD, not linker-signed.
+ }
+ }
+ }
+ return false; // No CD found.
+}
+
+PackedByteArray MachO::get_cdhash_sha1() {
+ ERR_FAIL_COND_V_MSG(!fa, PackedByteArray(), "MachO: File not opened.");
+ if (signature_offset == 0) {
+ return PackedByteArray();
+ }
+
+ fa->seek(get_signature_offset());
+ uint32_t magic = BSWAP32(fa->get_32());
+ if (magic != 0xfade0cc0) {
+ return PackedByteArray(); // No SuperBlob found.
+ }
+ fa->get_32(); // Skip size field, unused.
+ uint32_t count = BSWAP32(fa->get_32());
+ for (uint32_t i = 0; i < count; i++) {
+ fa->get_32(); // Index type, skip.
+ uint32_t offset = BSWAP32(fa->get_32());
+ uint64_t pos = fa->get_position();
+
+ fa->seek(get_signature_offset() + offset);
+ uint32_t cdmagic = BSWAP32(fa->get_32());
+ uint32_t cdsize = BSWAP32(fa->get_32());
+ if (cdmagic == 0xfade0c02) { // CodeDirectory.
+ fa->seek(get_signature_offset() + offset + 36);
+ uint8_t hash_size = fa->get_8();
+ uint8_t hash_type = fa->get_8();
+ if (hash_size == 0x14 && hash_type == 0x01) { /* SHA-1 */
+ PackedByteArray hash;
+ hash.resize(0x14);
+
+ fa->seek(get_signature_offset() + offset);
+ PackedByteArray blob;
+ blob.resize(cdsize);
+ fa->get_buffer(blob.ptrw(), cdsize);
+
+ CryptoCore::SHA1Context ctx;
+ ctx.start();
+ ctx.update(blob.ptr(), blob.size());
+ ctx.finish(hash.ptrw());
+
+ return hash;
+ }
+ }
+ fa->seek(pos);
+ }
+ return PackedByteArray();
+}
+
+PackedByteArray MachO::get_cdhash_sha256() {
+ ERR_FAIL_COND_V_MSG(!fa, PackedByteArray(), "MachO: File not opened.");
+ if (signature_offset == 0) {
+ return PackedByteArray();
+ }
+
+ fa->seek(get_signature_offset());
+ uint32_t magic = BSWAP32(fa->get_32());
+ if (magic != 0xfade0cc0) {
+ return PackedByteArray(); // No SuperBlob found.
+ }
+ fa->get_32(); // Skip size field, unused.
+ uint32_t count = BSWAP32(fa->get_32());
+ for (uint32_t i = 0; i < count; i++) {
+ fa->get_32(); // Index type, skip.
+ uint32_t offset = BSWAP32(fa->get_32());
+ uint64_t pos = fa->get_position();
+
+ fa->seek(get_signature_offset() + offset);
+ uint32_t cdmagic = BSWAP32(fa->get_32());
+ uint32_t cdsize = BSWAP32(fa->get_32());
+ if (cdmagic == 0xfade0c02) { // CodeDirectory.
+ fa->seek(get_signature_offset() + offset + 36);
+ uint8_t hash_size = fa->get_8();
+ uint8_t hash_type = fa->get_8();
+ if (hash_size == 0x20 && hash_type == 0x02) { /* SHA-256 */
+ PackedByteArray hash;
+ hash.resize(0x20);
+
+ fa->seek(get_signature_offset() + offset);
+ PackedByteArray blob;
+ blob.resize(cdsize);
+ fa->get_buffer(blob.ptrw(), cdsize);
+
+ CryptoCore::SHA256Context ctx;
+ ctx.start();
+ ctx.update(blob.ptr(), blob.size());
+ ctx.finish(hash.ptrw());
+
+ return hash;
+ }
+ }
+ fa->seek(pos);
+ }
+ return PackedByteArray();
+}
+
+PackedByteArray MachO::get_requirements() {
+ ERR_FAIL_COND_V_MSG(!fa, PackedByteArray(), "MachO: File not opened.");
+ if (signature_offset == 0) {
+ return PackedByteArray();
+ }
+
+ fa->seek(get_signature_offset());
+ uint32_t magic = BSWAP32(fa->get_32());
+ if (magic != 0xfade0cc0) {
+ return PackedByteArray(); // No SuperBlob found.
+ }
+ fa->get_32(); // Skip size field, unused.
+ uint32_t count = BSWAP32(fa->get_32());
+ for (uint32_t i = 0; i < count; i++) {
+ fa->get_32(); // Index type, skip.
+ uint32_t offset = BSWAP32(fa->get_32());
+ uint64_t pos = fa->get_position();
+
+ fa->seek(get_signature_offset() + offset);
+ uint32_t rqmagic = BSWAP32(fa->get_32());
+ uint32_t rqsize = BSWAP32(fa->get_32());
+ if (rqmagic == 0xfade0c01) { // Requirements.
+ PackedByteArray blob;
+ fa->seek(get_signature_offset() + offset);
+ blob.resize(rqsize);
+ fa->get_buffer(blob.ptrw(), rqsize);
+ return blob;
+ }
+ fa->seek(pos);
+ }
+ return PackedByteArray();
+}
+
+const FileAccess *MachO::get_file() const {
+ return fa;
+}
+
+FileAccess *MachO::get_file() {
+ return fa;
+}
+
+bool MachO::set_signature_size(uint64_t p_size) {
+ ERR_FAIL_COND_V_MSG(!fa, false, "MachO: File not opened.");
+
+ // Ensure signature load command exists.
+ ERR_FAIL_COND_V_MSG(link_edit_offset == 0, false, "MachO: No __LINKEDIT segment found.");
+ ERR_FAIL_COND_V_MSG(!alloc_signature(p_size), false, "MachO: Can't allocate signature load command.");
+
+ // Update signature load command.
+ uint64_t old_size = get_signature_size();
+ uint64_t new_size = p_size + PAD(p_size, 16384);
+
+ if (new_size <= old_size) {
+ fa->seek(get_signature_offset());
+ for (uint64_t i = 0; i < old_size; i++) {
+ fa->store_8(0x00);
+ }
+ return true;
+ }
+
+ fa->seek(signature_offset + 12);
+ if (swap) {
+ fa->store_32(BSWAP32(new_size));
+ } else {
+ fa->store_32(new_size);
+ }
+
+ uint64_t end = get_signature_offset() + new_size;
+
+ // Update "__LINKEDIT" segment.
+ LoadCommandHeader lc;
+ fa->seek(link_edit_offset);
+ fa->get_buffer((uint8_t *)&lc, sizeof(LoadCommandHeader));
+ if (swap) {
+ lc.cmd = BSWAP32(lc.cmd);
+ lc.cmdsize = BSWAP32(lc.cmdsize);
+ }
+ switch (lc.cmd) {
+ case LC_SEGMENT: {
+ LoadCommandSegment lc_seg;
+ fa->get_buffer((uint8_t *)&lc_seg, sizeof(LoadCommandSegment));
+ if (swap) {
+ lc_seg.vmsize = BSWAP32(lc_seg.vmsize);
+ lc_seg.filesize = BSWAP32(lc_seg.filesize);
+ lc_seg.fileoff = BSWAP32(lc_seg.fileoff);
+ }
+
+ lc_seg.vmsize = end - lc_seg.fileoff;
+ lc_seg.vmsize += PAD(lc_seg.vmsize, 4096);
+ lc_seg.filesize = end - lc_seg.fileoff;
+
+ if (swap) {
+ lc_seg.vmsize = BSWAP32(lc_seg.vmsize);
+ lc_seg.filesize = BSWAP32(lc_seg.filesize);
+ }
+ fa->seek(link_edit_offset + 8);
+ fa->store_buffer((const uint8_t *)&lc_seg, sizeof(LoadCommandSegment));
+ } break;
+ case LC_SEGMENT_64: {
+ LoadCommandSegment64 lc_seg;
+ fa->get_buffer((uint8_t *)&lc_seg, sizeof(LoadCommandSegment64));
+ if (swap) {
+ lc_seg.vmsize = BSWAP64(lc_seg.vmsize);
+ lc_seg.filesize = BSWAP64(lc_seg.filesize);
+ lc_seg.fileoff = BSWAP64(lc_seg.fileoff);
+ }
+ lc_seg.vmsize = end - lc_seg.fileoff;
+ lc_seg.vmsize += PAD(lc_seg.vmsize, 4096);
+ lc_seg.filesize = end - lc_seg.fileoff;
+ if (swap) {
+ lc_seg.vmsize = BSWAP64(lc_seg.vmsize);
+ lc_seg.filesize = BSWAP64(lc_seg.filesize);
+ }
+ fa->seek(link_edit_offset + 8);
+ fa->store_buffer((const uint8_t *)&lc_seg, sizeof(LoadCommandSegment64));
+ } break;
+ default: {
+ ERR_FAIL_V_MSG(false, "MachO: Invalid __LINKEDIT segment type.");
+ } break;
+ }
+ fa->seek(get_signature_offset());
+ for (uint64_t i = 0; i < new_size; i++) {
+ fa->store_8(0x00);
+ }
+ return true;
+}
+
+MachO::~MachO() {
+ if (fa) {
+ fa->close();
+ memdelete(fa);
+ fa = nullptr;
+ }
+}
+
+#endif // MODULE_REGEX_ENABLED
diff --git a/platform/osx/export/macho.h b/platform/osx/export/macho.h
new file mode 100644
index 0000000000..e09906898b
--- /dev/null
+++ b/platform/osx/export/macho.h
@@ -0,0 +1,217 @@
+/*************************************************************************/
+/* macho.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 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. */
+/*************************************************************************/
+
+// Mach-O binary object file format parser and editor.
+
+#ifndef MACHO_H
+#define MACHO_H
+
+#include "core/crypto/crypto.h"
+#include "core/crypto/crypto_core.h"
+#include "core/io/file_access.h"
+#include "core/object/ref_counted.h"
+#include "modules/modules_enabled.gen.h" // For regex.
+
+#ifdef MODULE_REGEX_ENABLED
+
+class MachO : public RefCounted {
+ struct MachHeader {
+ uint32_t cputype;
+ uint32_t cpusubtype;
+ uint32_t filetype;
+ uint32_t ncmds;
+ uint32_t sizeofcmds;
+ uint32_t flags;
+ };
+
+ enum LoadCommandID {
+ LC_SEGMENT = 0x00000001,
+ LC_SYMTAB = 0x00000002,
+ LC_SYMSEG = 0x00000003,
+ LC_THREAD = 0x00000004,
+ LC_UNIXTHREAD = 0x00000005,
+ LC_LOADFVMLIB = 0x00000006,
+ LC_IDFVMLIB = 0x00000007,
+ LC_IDENT = 0x00000008,
+ LC_FVMFILE = 0x00000009,
+ LC_PREPAGE = 0x0000000a,
+ LC_DYSYMTAB = 0x0000000b,
+ LC_LOAD_DYLIB = 0x0000000c,
+ LC_ID_DYLIB = 0x0000000d,
+ LC_LOAD_DYLINKER = 0x0000000e,
+ LC_ID_DYLINKER = 0x0000000f,
+ LC_PREBOUND_DYLIB = 0x00000010,
+ LC_ROUTINES = 0x00000011,
+ LC_SUB_FRAMEWORK = 0x00000012,
+ LC_SUB_UMBRELLA = 0x00000013,
+ LC_SUB_CLIENT = 0x00000014,
+ LC_SUB_LIBRARY = 0x00000015,
+ LC_TWOLEVEL_HINTS = 0x00000016,
+ LC_PREBIND_CKSUM = 0x00000017,
+ LC_LOAD_WEAK_DYLIB = 0x80000018,
+ LC_SEGMENT_64 = 0x00000019,
+ LC_ROUTINES_64 = 0x0000001a,
+ LC_UUID = 0x0000001b,
+ LC_RPATH = 0x8000001c,
+ LC_CODE_SIGNATURE = 0x0000001d,
+ LC_SEGMENT_SPLIT_INFO = 0x0000001e,
+ LC_REEXPORT_DYLIB = 0x8000001f,
+ LC_LAZY_LOAD_DYLIB = 0x00000020,
+ LC_ENCRYPTION_INFO = 0x00000021,
+ LC_DYLD_INFO = 0x00000022,
+ LC_DYLD_INFO_ONLY = 0x80000022,
+ LC_LOAD_UPWARD_DYLIB = 0x80000023,
+ LC_VERSION_MIN_MACOSX = 0x00000024,
+ LC_VERSION_MIN_IPHONEOS = 0x00000025,
+ LC_FUNCTION_STARTS = 0x00000026,
+ LC_DYLD_ENVIRONMENT = 0x00000027,
+ LC_MAIN = 0x80000028,
+ LC_DATA_IN_CODE = 0x00000029,
+ LC_SOURCE_VERSION = 0x0000002a,
+ LC_DYLIB_CODE_SIGN_DRS = 0x0000002b,
+ LC_ENCRYPTION_INFO_64 = 0x0000002c,
+ LC_LINKER_OPTION = 0x0000002d,
+ LC_LINKER_OPTIMIZATION_HINT = 0x0000002e,
+ LC_VERSION_MIN_TVOS = 0x0000002f,
+ LC_VERSION_MIN_WATCHOS = 0x00000030,
+ };
+
+ struct LoadCommandHeader {
+ uint32_t cmd;
+ uint32_t cmdsize;
+ };
+
+ struct LoadCommandSegment {
+ char segname[16];
+ uint32_t vmaddr;
+ uint32_t vmsize;
+ uint32_t fileoff;
+ uint32_t filesize;
+ uint32_t maxprot;
+ uint32_t initprot;
+ uint32_t nsects;
+ uint32_t flags;
+ };
+
+ struct LoadCommandSegment64 {
+ char segname[16];
+ uint64_t vmaddr;
+ uint64_t vmsize;
+ uint64_t fileoff;
+ uint64_t filesize;
+ uint32_t maxprot;
+ uint32_t initprot;
+ uint32_t nsects;
+ uint32_t flags;
+ };
+
+ struct Section {
+ char sectname[16];
+ char segname[16];
+ uint32_t addr;
+ uint32_t size;
+ uint32_t offset;
+ uint32_t align;
+ uint32_t reloff;
+ uint32_t nreloc;
+ uint32_t flags;
+ uint32_t reserved1;
+ uint32_t reserved2;
+ };
+
+ struct Section64 {
+ char sectname[16];
+ char segname[16];
+ uint64_t addr;
+ uint64_t size;
+ uint32_t offset;
+ uint32_t align;
+ uint32_t reloff;
+ uint32_t nreloc;
+ uint32_t flags;
+ uint32_t reserved1;
+ uint32_t reserved2;
+ uint32_t reserved3;
+ };
+
+ FileAccess *fa = nullptr;
+ bool swap = false;
+
+ uint64_t lc_limit = 0;
+
+ uint64_t exe_limit = 0;
+ uint64_t exe_base = std::numeric_limits<uint64_t>::max(); // Start of first __text section.
+ uint32_t align = 0;
+ uint32_t cputype = 0;
+ uint32_t cpusubtype = 0;
+
+ uint64_t link_edit_offset = 0; // __LINKEDIT segment offset.
+ uint64_t signature_offset = 0; // Load command offset.
+
+ uint32_t seg_align(uint64_t p_vmaddr, uint32_t p_min, uint32_t p_max);
+ bool alloc_signature(uint64_t p_size);
+
+ static inline size_t PAD(size_t s, size_t a) {
+ return (a - s % a);
+ }
+
+public:
+ static bool is_macho(const String &p_path);
+
+ bool open_file(const String &p_path);
+
+ uint64_t get_exe_base();
+ uint64_t get_exe_limit();
+ int32_t get_align();
+ uint32_t get_cputype();
+ uint32_t get_cpusubtype();
+ uint64_t get_size();
+ uint64_t get_code_limit();
+
+ uint64_t get_signature_offset();
+ bool is_signed();
+
+ PackedByteArray get_cdhash_sha1();
+ PackedByteArray get_cdhash_sha256();
+
+ PackedByteArray get_requirements();
+
+ const FileAccess *get_file() const;
+ FileAccess *get_file();
+
+ uint64_t get_signature_size();
+ bool set_signature_size(uint64_t p_size);
+
+ ~MachO();
+};
+
+#endif // MODULE_REGEX_ENABLED
+
+#endif // MACHO_H
diff --git a/platform/osx/export/plist.cpp b/platform/osx/export/plist.cpp
new file mode 100644
index 0000000000..553b864180
--- /dev/null
+++ b/platform/osx/export/plist.cpp
@@ -0,0 +1,570 @@
+/*************************************************************************/
+/* plist.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 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 "modules/modules_enabled.gen.h" // For regex.
+
+#include "plist.h"
+
+#ifdef MODULE_REGEX_ENABLED
+
+Ref<PListNode> PListNode::new_array() {
+ Ref<PListNode> node = memnew(PListNode());
+ ERR_FAIL_COND_V(node.is_null(), Ref<PListNode>());
+ node->data_type = PList::PLNodeType::PL_NODE_TYPE_ARRAY;
+ return node;
+}
+
+Ref<PListNode> PListNode::new_dict() {
+ Ref<PListNode> node = memnew(PListNode());
+ ERR_FAIL_COND_V(node.is_null(), Ref<PListNode>());
+ node->data_type = PList::PLNodeType::PL_NODE_TYPE_DICT;
+ return node;
+}
+
+Ref<PListNode> PListNode::new_string(const String &p_string) {
+ Ref<PListNode> node = memnew(PListNode());
+ ERR_FAIL_COND_V(node.is_null(), Ref<PListNode>());
+ node->data_type = PList::PLNodeType::PL_NODE_TYPE_STRING;
+ node->data_string = p_string.utf8();
+ return node;
+}
+
+Ref<PListNode> PListNode::new_data(const String &p_string) {
+ Ref<PListNode> node = memnew(PListNode());
+ ERR_FAIL_COND_V(node.is_null(), Ref<PListNode>());
+ node->data_type = PList::PLNodeType::PL_NODE_TYPE_DATA;
+ node->data_string = p_string.utf8();
+ return node;
+}
+
+Ref<PListNode> PListNode::new_date(const String &p_string) {
+ Ref<PListNode> node = memnew(PListNode());
+ ERR_FAIL_COND_V(node.is_null(), Ref<PListNode>());
+ node->data_type = PList::PLNodeType::PL_NODE_TYPE_DATE;
+ node->data_string = p_string.utf8();
+ return node;
+}
+
+Ref<PListNode> PListNode::new_bool(bool p_bool) {
+ Ref<PListNode> node = memnew(PListNode());
+ ERR_FAIL_COND_V(node.is_null(), Ref<PListNode>());
+ node->data_type = PList::PLNodeType::PL_NODE_TYPE_BOOLEAN;
+ node->data_bool = p_bool;
+ return node;
+}
+
+Ref<PListNode> PListNode::new_int(int32_t p_int) {
+ Ref<PListNode> node = memnew(PListNode());
+ ERR_FAIL_COND_V(node.is_null(), Ref<PListNode>());
+ node->data_type = PList::PLNodeType::PL_NODE_TYPE_INTEGER;
+ node->data_int = p_int;
+ return node;
+}
+
+Ref<PListNode> PListNode::new_real(float p_real) {
+ Ref<PListNode> node = memnew(PListNode());
+ ERR_FAIL_COND_V(node.is_null(), Ref<PListNode>());
+ node->data_type = PList::PLNodeType::PL_NODE_TYPE_REAL;
+ node->data_real = p_real;
+ return node;
+}
+
+bool PListNode::push_subnode(const Ref<PListNode> &p_node, const String &p_key) {
+ ERR_FAIL_COND_V(p_node.is_null(), false);
+ if (data_type == PList::PLNodeType::PL_NODE_TYPE_DICT) {
+ ERR_FAIL_COND_V(p_key.is_empty(), false);
+ ERR_FAIL_COND_V(data_dict.has(p_key), false);
+ data_dict[p_key] = p_node;
+ return true;
+ } else if (data_type == PList::PLNodeType::PL_NODE_TYPE_ARRAY) {
+ data_array.push_back(p_node);
+ return true;
+ } else {
+ ERR_FAIL_V_MSG(false, "PList: Invalid parent node type, should be DICT or ARRAY.");
+ }
+}
+
+size_t PListNode::get_asn1_size(uint8_t p_len_octets) const {
+ // Get size of all data, excluding type and size information.
+ switch (data_type) {
+ case PList::PLNodeType::PL_NODE_TYPE_NIL: {
+ return 0;
+ } break;
+ case PList::PLNodeType::PL_NODE_TYPE_DATA:
+ case PList::PLNodeType::PL_NODE_TYPE_DATE: {
+ ERR_FAIL_V_MSG(0, "PList: DATE and DATA nodes are not supported by ASN.1 serialization.");
+ } break;
+ case PList::PLNodeType::PL_NODE_TYPE_STRING: {
+ return data_string.length();
+ } break;
+ case PList::PLNodeType::PL_NODE_TYPE_BOOLEAN: {
+ return 1;
+ } break;
+ case PList::PLNodeType::PL_NODE_TYPE_INTEGER:
+ case PList::PLNodeType::PL_NODE_TYPE_REAL: {
+ return 4;
+ } break;
+ case PList::PLNodeType::PL_NODE_TYPE_ARRAY: {
+ size_t size = 0;
+ for (int i = 0; i < data_array.size(); i++) {
+ size += 1 + _asn1_size_len(p_len_octets) + data_array[i]->get_asn1_size(p_len_octets);
+ }
+ return size;
+ } break;
+ case PList::PLNodeType::PL_NODE_TYPE_DICT: {
+ size_t size = 0;
+ for (const Map<String, Ref<PListNode>>::Element *it = data_dict.front(); it; it = it->next()) {
+ size += 1 + _asn1_size_len(p_len_octets); // Sequence.
+ size += 1 + _asn1_size_len(p_len_octets) + it->key().utf8().length(); //Key.
+ size += 1 + _asn1_size_len(p_len_octets) + it->value()->get_asn1_size(p_len_octets); // Value.
+ }
+ return size;
+ } break;
+ default: {
+ return 0;
+ } break;
+ }
+}
+
+int PListNode::_asn1_size_len(uint8_t p_len_octets) {
+ if (p_len_octets > 1) {
+ return p_len_octets + 1;
+ } else {
+ return 1;
+ }
+}
+
+void PListNode::store_asn1_size(PackedByteArray &p_stream, uint8_t p_len_octets) const {
+ uint32_t size = get_asn1_size(p_len_octets);
+ if (p_len_octets > 1) {
+ p_stream.push_back(0x80 + p_len_octets);
+ }
+ for (int i = p_len_octets - 1; i >= 0; i--) {
+ uint8_t x = (size >> i * 8) & 0xFF;
+ p_stream.push_back(x);
+ }
+}
+
+bool PListNode::store_asn1(PackedByteArray &p_stream, uint8_t p_len_octets) const {
+ // Convert to binary ASN1 stream.
+ bool valid = true;
+ switch (data_type) {
+ case PList::PLNodeType::PL_NODE_TYPE_NIL: {
+ // Nothing to store.
+ } break;
+ case PList::PLNodeType::PL_NODE_TYPE_DATE:
+ case PList::PLNodeType::PL_NODE_TYPE_DATA: {
+ ERR_FAIL_V_MSG(false, "PList: DATE and DATA nodes are not supported by ASN.1 serialization.");
+ } break;
+ case PList::PLNodeType::PL_NODE_TYPE_STRING: {
+ p_stream.push_back(0x0C);
+ store_asn1_size(p_stream, p_len_octets);
+ for (int i = 0; i < data_string.size(); i++) {
+ p_stream.push_back(data_string[i]);
+ }
+ } break;
+ case PList::PLNodeType::PL_NODE_TYPE_BOOLEAN: {
+ p_stream.push_back(0x01);
+ store_asn1_size(p_stream, p_len_octets);
+ if (data_bool) {
+ p_stream.push_back(0x01);
+ } else {
+ p_stream.push_back(0x00);
+ }
+ } break;
+ case PList::PLNodeType::PL_NODE_TYPE_INTEGER: {
+ p_stream.push_back(0x02);
+ store_asn1_size(p_stream, p_len_octets);
+ for (int i = 4; i >= 0; i--) {
+ uint8_t x = (data_int >> i * 8) & 0xFF;
+ p_stream.push_back(x);
+ }
+ } break;
+ case PList::PLNodeType::PL_NODE_TYPE_REAL: {
+ p_stream.push_back(0x03);
+ store_asn1_size(p_stream, p_len_octets);
+ for (int i = 4; i >= 0; i--) {
+ uint8_t x = (data_int >> i * 8) & 0xFF;
+ p_stream.push_back(x);
+ }
+ } break;
+ case PList::PLNodeType::PL_NODE_TYPE_ARRAY: {
+ p_stream.push_back(0x30); // Sequence.
+ store_asn1_size(p_stream, p_len_octets);
+ for (int i = 0; i < data_array.size(); i++) {
+ valid = valid && data_array[i]->store_asn1(p_stream, p_len_octets);
+ }
+ } break;
+ case PList::PLNodeType::PL_NODE_TYPE_DICT: {
+ p_stream.push_back(0x31); // Set.
+ store_asn1_size(p_stream, p_len_octets);
+ for (const Map<String, Ref<PListNode>>::Element *it = data_dict.front(); it; it = it->next()) {
+ CharString cs = it->key().utf8();
+ uint32_t size = cs.length();
+
+ // Sequence.
+ p_stream.push_back(0x30);
+ uint32_t seq_size = 2 * (1 + _asn1_size_len(p_len_octets)) + size + it->value()->get_asn1_size(p_len_octets);
+ if (p_len_octets > 1) {
+ p_stream.push_back(0x80 + p_len_octets);
+ }
+ for (int i = p_len_octets - 1; i >= 0; i--) {
+ uint8_t x = (seq_size >> i * 8) & 0xFF;
+ p_stream.push_back(x);
+ }
+ // Key.
+ p_stream.push_back(0x0C);
+ if (p_len_octets > 1) {
+ p_stream.push_back(0x80 + p_len_octets);
+ }
+ for (int i = p_len_octets - 1; i >= 0; i--) {
+ uint8_t x = (size >> i * 8) & 0xFF;
+ p_stream.push_back(x);
+ }
+ for (uint32_t i = 0; i < size; i++) {
+ p_stream.push_back(cs[i]);
+ }
+ // Value.
+ valid = valid && it->value()->store_asn1(p_stream, p_len_octets);
+ }
+ } break;
+ }
+ return valid;
+}
+
+void PListNode::store_text(String &p_stream, uint8_t p_indent) const {
+ // Convert to text XML stream.
+ switch (data_type) {
+ case PList::PLNodeType::PL_NODE_TYPE_NIL: {
+ // Nothing to store.
+ } break;
+ case PList::PLNodeType::PL_NODE_TYPE_DATA: {
+ p_stream += String("\t").repeat(p_indent);
+ p_stream += "<data>\n";
+ p_stream += String("\t").repeat(p_indent);
+ p_stream += data_string + "\n";
+ p_stream += String("\t").repeat(p_indent);
+ p_stream += "</data>\n";
+ } break;
+ case PList::PLNodeType::PL_NODE_TYPE_DATE: {
+ p_stream += String("\t").repeat(p_indent);
+ p_stream += "<date>";
+ p_stream += data_string;
+ p_stream += "</date>\n";
+ } break;
+ case PList::PLNodeType::PL_NODE_TYPE_STRING: {
+ p_stream += String("\t").repeat(p_indent);
+ p_stream += "<string>";
+ p_stream += String::utf8(data_string);
+ p_stream += "</string>\n";
+ } break;
+ case PList::PLNodeType::PL_NODE_TYPE_BOOLEAN: {
+ p_stream += String("\t").repeat(p_indent);
+ if (data_bool) {
+ p_stream += "<true/>\n";
+ } else {
+ p_stream += "<false/>\n";
+ }
+ } break;
+ case PList::PLNodeType::PL_NODE_TYPE_INTEGER: {
+ p_stream += String("\t").repeat(p_indent);
+ p_stream += "<integer>";
+ p_stream += itos(data_int);
+ p_stream += "</integer>\n";
+ } break;
+ case PList::PLNodeType::PL_NODE_TYPE_REAL: {
+ p_stream += String("\t").repeat(p_indent);
+ p_stream += "<real>";
+ p_stream += rtos(data_real);
+ p_stream += "</real>\n";
+ } break;
+ case PList::PLNodeType::PL_NODE_TYPE_ARRAY: {
+ p_stream += String("\t").repeat(p_indent);
+ p_stream += "<array>\n";
+ for (int i = 0; i < data_array.size(); i++) {
+ data_array[i]->store_text(p_stream, p_indent + 1);
+ }
+ p_stream += String("\t").repeat(p_indent);
+ p_stream += "</array>\n";
+ } break;
+ case PList::PLNodeType::PL_NODE_TYPE_DICT: {
+ p_stream += String("\t").repeat(p_indent);
+ p_stream += "<dict>\n";
+ for (const Map<String, Ref<PListNode>>::Element *it = data_dict.front(); it; it = it->next()) {
+ p_stream += String("\t").repeat(p_indent + 1);
+ p_stream += "<key>";
+ p_stream += it->key();
+ p_stream += "</key>\n";
+ it->value()->store_text(p_stream, p_indent + 1);
+ }
+ p_stream += String("\t").repeat(p_indent);
+ p_stream += "</dict>\n";
+ } break;
+ }
+}
+
+/*************************************************************************/
+
+PList::PList() {
+ root = PListNode::new_dict();
+}
+
+PList::PList(const String &p_string) {
+ load_string(p_string);
+}
+
+bool PList::load_file(const String &p_filename) {
+ root = Ref<PListNode>();
+
+ FileAccessRef fb = FileAccess::open(p_filename, FileAccess::READ);
+ if (!fb) {
+ return false;
+ }
+
+ unsigned char magic[8];
+ fb->get_buffer(magic, 8);
+
+ if (String((const char *)magic, 8) == "bplist00") {
+ ERR_FAIL_V_MSG(false, "PList: Binary property lists are not supported.");
+ } else {
+ // Load text plist.
+ Error err;
+ Vector<uint8_t> array = FileAccess::get_file_as_array(p_filename, &err);
+ ERR_FAIL_COND_V(err != OK, false);
+
+ String ret;
+ ret.parse_utf8((const char *)array.ptr(), array.size());
+ return load_string(ret);
+ }
+}
+
+bool PList::load_string(const String &p_string) {
+ root = Ref<PListNode>();
+
+ int pos = 0;
+ bool in_plist = false;
+ bool done_plist = false;
+ List<Ref<PListNode>> stack;
+ String key;
+ while (pos >= 0) {
+ int open_token_s = p_string.find("<", pos);
+ if (open_token_s == -1) {
+ ERR_FAIL_V_MSG(false, "PList: Unexpected end of data. No tags found.");
+ }
+ int open_token_e = p_string.find(">", open_token_s);
+ pos = open_token_e;
+
+ String token = p_string.substr(open_token_s + 1, open_token_e - open_token_s - 1);
+ if (token.is_empty()) {
+ ERR_FAIL_V_MSG(false, "PList: Invalid token name.");
+ }
+ String value;
+ if (token[0] == '?' || token[0] == '!') { // Skip <?xml ... ?> and <!DOCTYPE ... >
+ int end_token_e = p_string.find(">", open_token_s);
+ pos = end_token_e;
+ continue;
+ }
+
+ if (token.find("plist", 0) == 0) {
+ in_plist = true;
+ continue;
+ }
+
+ if (token == "/plist") {
+ in_plist = false;
+ done_plist = true;
+ break;
+ }
+
+ if (!in_plist) {
+ ERR_FAIL_V_MSG(false, "PList: Node outside of <plist> tag.");
+ }
+
+ if (token == "dict") {
+ if (!stack.is_empty()) {
+ // Add subnode end enter it.
+ Ref<PListNode> dict = PListNode::new_dict();
+ dict->data_type = PList::PLNodeType::PL_NODE_TYPE_DICT;
+ if (!stack.back()->get()->push_subnode(dict, key)) {
+ ERR_FAIL_V_MSG(false, "PList: Can't push subnode, invalid parent type.");
+ }
+ stack.push_back(dict);
+ } else {
+ // Add root node.
+ if (!root.is_null()) {
+ ERR_FAIL_V_MSG(false, "PList: Root node already set.");
+ }
+ Ref<PListNode> dict = PListNode::new_dict();
+ stack.push_back(dict);
+ root = dict;
+ }
+ continue;
+ }
+
+ if (token == "/dict") {
+ // Exit current dict.
+ if (stack.is_empty() || stack.back()->get()->data_type != PList::PLNodeType::PL_NODE_TYPE_DICT) {
+ ERR_FAIL_V_MSG(false, "PList: Mismatched </dict> tag.");
+ }
+ stack.pop_back();
+ continue;
+ }
+
+ if (token == "array") {
+ if (!stack.is_empty()) {
+ // Add subnode end enter it.
+ Ref<PListNode> arr = PListNode::new_array();
+ if (!stack.back()->get()->push_subnode(arr, key)) {
+ ERR_FAIL_V_MSG(false, "PList: Can't push subnode, invalid parent type.");
+ }
+ stack.push_back(arr);
+ } else {
+ // Add root node.
+ if (!root.is_null()) {
+ ERR_FAIL_V_MSG(false, "PList: Root node already set.");
+ }
+ Ref<PListNode> arr = PListNode::new_array();
+ stack.push_back(arr);
+ root = arr;
+ }
+ continue;
+ }
+
+ if (token == "/array") {
+ // Exit current array.
+ if (stack.is_empty() || stack.back()->get()->data_type != PList::PLNodeType::PL_NODE_TYPE_ARRAY) {
+ ERR_FAIL_V_MSG(false, "PList: Mismatched </array> tag.");
+ }
+ stack.pop_back();
+ continue;
+ }
+
+ if (token[token.length() - 1] == '/') {
+ token = token.substr(0, token.length() - 1);
+ } else {
+ int end_token_s = p_string.find("</", pos);
+ if (end_token_s == -1) {
+ ERR_FAIL_V_MSG(false, vformat("PList: Mismatched <%s> tag.", token));
+ }
+ int end_token_e = p_string.find(">", end_token_s);
+ pos = end_token_e;
+ String end_token = p_string.substr(end_token_s + 2, end_token_e - end_token_s - 2);
+ if (end_token != token) {
+ ERR_FAIL_V_MSG(false, vformat("PList: Mismatched <%s> and <%s> token pair.", token, end_token));
+ }
+ value = p_string.substr(open_token_e + 1, end_token_s - open_token_e - 1);
+ }
+ if (token == "key") {
+ key = value;
+ } else {
+ Ref<PListNode> var = nullptr;
+ if (token == "true") {
+ var = PListNode::new_bool(true);
+ } else if (token == "false") {
+ var = PListNode::new_bool(false);
+ } else if (token == "integer") {
+ var = PListNode::new_int(value.to_int());
+ } else if (token == "real") {
+ var = PListNode::new_real(value.to_float());
+ } else if (token == "string") {
+ var = PListNode::new_string(value);
+ } else if (token == "data") {
+ var = PListNode::new_data(value);
+ } else if (token == "date") {
+ var = PListNode::new_date(value);
+ } else {
+ ERR_FAIL_V_MSG(false, "PList: Invalid value type.");
+ }
+ if (stack.is_empty() || !stack.back()->get()->push_subnode(var, key)) {
+ ERR_FAIL_V_MSG(false, "PList: Can't push subnode, invalid parent type.");
+ }
+ }
+ }
+ if (!stack.is_empty() || !done_plist) {
+ ERR_FAIL_V_MSG(false, "PList: Unexpected end of data. Root node is not closed.");
+ }
+ return true;
+}
+
+PackedByteArray PList::save_asn1() const {
+ if (root == nullptr) {
+ ERR_FAIL_V_MSG(PackedByteArray(), "PList: Invalid PList, no root node.");
+ }
+ size_t size = root->get_asn1_size(1);
+ uint8_t len_octets = 0;
+ if (size < 0x80) {
+ len_octets = 1;
+ } else {
+ size = root->get_asn1_size(2);
+ if (size < 0xFFFF) {
+ len_octets = 2;
+ } else {
+ size = root->get_asn1_size(3);
+ if (size < 0xFFFFFF) {
+ len_octets = 3;
+ } else {
+ size = root->get_asn1_size(4);
+ if (size < 0xFFFFFFFF) {
+ len_octets = 4;
+ } else {
+ ERR_FAIL_V_MSG(PackedByteArray(), "PList: Data is too big for ASN.1 serializer, should be < 4 GiB.");
+ }
+ }
+ }
+ }
+
+ PackedByteArray ret;
+ if (!root->store_asn1(ret, len_octets)) {
+ ERR_FAIL_V_MSG(PackedByteArray(), "PList: ASN.1 serializer error.");
+ }
+ return ret;
+}
+
+String PList::save_text() const {
+ if (root == nullptr) {
+ ERR_FAIL_V_MSG(String(), "PList: Invalid PList, no root node.");
+ }
+
+ String ret;
+ ret += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+ ret += "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n";
+ ret += "<plist version=\"1.0\">\n";
+
+ root->store_text(ret, 0);
+
+ ret += "</plist>\n\n";
+ return ret;
+}
+
+Ref<PListNode> PList::get_root() {
+ return root;
+}
+
+#endif // MODULE_REGEX_ENABLED
diff --git a/platform/osx/export/plist.h b/platform/osx/export/plist.h
new file mode 100644
index 0000000000..fb4aaaa935
--- /dev/null
+++ b/platform/osx/export/plist.h
@@ -0,0 +1,116 @@
+/*************************************************************************/
+/* plist.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 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. */
+/*************************************************************************/
+
+// Property list file format (application/x-plist) parser, property list ASN-1 serialization.
+
+#ifndef PLIST_H
+#define PLIST_H
+
+#include "core/crypto/crypto_core.h"
+#include "core/io/file_access.h"
+#include "modules/modules_enabled.gen.h" // For regex.
+
+#ifdef MODULE_REGEX_ENABLED
+
+class PListNode;
+
+class PList : public RefCounted {
+ friend class PListNode;
+
+public:
+ enum PLNodeType {
+ PL_NODE_TYPE_NIL,
+ PL_NODE_TYPE_STRING,
+ PL_NODE_TYPE_ARRAY,
+ PL_NODE_TYPE_DICT,
+ PL_NODE_TYPE_BOOLEAN,
+ PL_NODE_TYPE_INTEGER,
+ PL_NODE_TYPE_REAL,
+ PL_NODE_TYPE_DATA,
+ PL_NODE_TYPE_DATE,
+ };
+
+private:
+ Ref<PListNode> root;
+
+public:
+ PList();
+ PList(const String &p_string);
+
+ bool load_file(const String &p_filename);
+ bool load_string(const String &p_string);
+
+ PackedByteArray save_asn1() const;
+ String save_text() const;
+
+ Ref<PListNode> get_root();
+};
+
+/*************************************************************************/
+
+class PListNode : public RefCounted {
+ static int _asn1_size_len(uint8_t p_len_octets);
+
+public:
+ PList::PLNodeType data_type = PList::PLNodeType::PL_NODE_TYPE_NIL;
+
+ CharString data_string;
+ Vector<Ref<PListNode>> data_array;
+ Map<String, Ref<PListNode>> data_dict;
+ union {
+ int32_t data_int;
+ bool data_bool;
+ float data_real;
+ };
+
+ static Ref<PListNode> new_array();
+ static Ref<PListNode> new_dict();
+ static Ref<PListNode> new_string(const String &p_string);
+ static Ref<PListNode> new_data(const String &p_string);
+ static Ref<PListNode> new_date(const String &p_string);
+ static Ref<PListNode> new_bool(bool p_bool);
+ static Ref<PListNode> new_int(int32_t p_int);
+ static Ref<PListNode> new_real(float p_real);
+
+ bool push_subnode(const Ref<PListNode> &p_node, const String &p_key = "");
+
+ size_t get_asn1_size(uint8_t p_len_octets) const;
+
+ void store_asn1_size(PackedByteArray &p_stream, uint8_t p_len_octets) const;
+ bool store_asn1(PackedByteArray &p_stream, uint8_t p_len_octets) const;
+ void store_text(String &p_stream, uint8_t p_indent) const;
+
+ PListNode() {}
+ ~PListNode() {}
+};
+
+#endif // MODULE_REGEX_ENABLED
+
+#endif // PLIST_H
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h
index 555ce4c75f..60dec1fe3f 100644
--- a/platform/osx/os_osx.h
+++ b/platform/osx/os_osx.h
@@ -94,7 +94,7 @@ public:
String get_locale() const override;
virtual String get_executable_path() const override;
- virtual Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr) override;
+ virtual Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr, bool p_open_console = false) override;
virtual Error create_instance(const List<String> &p_arguments, ProcessID *r_child_id = nullptr) override;
virtual String get_unique_id() const override; //++
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index 821036de9c..32d0e6dd94 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -497,13 +497,13 @@ Error OS_OSX::create_instance(const List<String> &p_arguments, ProcessID *r_chil
if (nsappname != nil) {
String path;
path.parse_utf8([[[NSBundle mainBundle] bundlePath] UTF8String]);
- return create_process(path, p_arguments, r_child_id);
+ return create_process(path, p_arguments, r_child_id, false);
} else {
- return create_process(get_executable_path(), p_arguments, r_child_id);
+ return create_process(get_executable_path(), p_arguments, r_child_id, false);
}
}
-Error OS_OSX::create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id) {
+Error OS_OSX::create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id, bool p_open_console) {
if (@available(macOS 10.15, *)) {
// Use NSWorkspace if path is an .app bundle.
NSURL *url = [NSURL fileURLWithPath:@(p_path.utf8().get_data())];
@@ -542,10 +542,10 @@ Error OS_OSX::create_process(const String &p_path, const List<String> &p_argumen
return err;
} else {
- return OS_Unix::create_process(p_path, p_arguments, r_child_id);
+ return OS_Unix::create_process(p_path, p_arguments, r_child_id, p_open_console);
}
} else {
- return OS_Unix::create_process(p_path, p_arguments, r_child_id);
+ return OS_Unix::create_process(p_path, p_arguments, r_child_id, p_open_console);
}
}
diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp
index ca486633bf..b6dde9c63f 100644
--- a/platform/uwp/os_uwp.cpp
+++ b/platform/uwp/os_uwp.cpp
@@ -626,11 +626,11 @@ void OS_UWP::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, c
// TODO
}
-Error OS_UWP::execute(const String &p_path, const List<String> &p_arguments, String *r_pipe, int *r_exitcode, bool read_stderr, Mutex *p_pipe_mutex) {
+Error OS_UWP::execute(const String &p_path, const List<String> &p_arguments, String *r_pipe, int *r_exitcode, bool read_stderr, Mutex *p_pipe_mutex, bool p_open_console) {
return FAILED;
};
-Error OS_UWP::create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id) {
+Error OS_UWP::create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id, bool p_open_console) {
return FAILED;
};
diff --git a/platform/uwp/os_uwp.h b/platform/uwp/os_uwp.h
index 5784c11d53..573d86af7c 100644
--- a/platform/uwp/os_uwp.h
+++ b/platform/uwp/os_uwp.h
@@ -195,8 +195,8 @@ public:
virtual void delay_usec(uint32_t p_usec) const;
virtual uint64_t get_ticks_usec() const;
- virtual Error execute(const String &p_path, const List<String> &p_arguments, String *r_pipe = nullptr, int *r_exitcode = nullptr, bool read_stderr = false, Mutex *p_pipe_mutex = nullptr);
- virtual Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr);
+ virtual Error execute(const String &p_path, const List<String> &p_arguments, String *r_pipe = nullptr, int *r_exitcode = nullptr, bool read_stderr = false, Mutex *p_pipe_mutex = nullptr, bool p_open_console = false);
+ virtual Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr, bool p_open_console = false);
virtual Error kill(const ProcessID &p_pid);
virtual bool has_environment(const String &p_var) const;
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index e9ecc99ef5..249a0d2e79 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -65,7 +65,7 @@ def get_opts():
# Vista support dropped after EOL due to GH-10243
("target_win_version", "Targeted Windows version, >= 0x0601 (Windows 7)", "0x0601"),
BoolVariable("debug_symbols", "Add debugging symbols to release/release_debug builds", True),
- EnumVariable("windows_subsystem", "Windows subsystem", "default", ("default", "console", "gui")),
+ EnumVariable("windows_subsystem", "Windows subsystem", "gui", ("gui", "console")),
BoolVariable("separate_debug_symbols", "Create a separate file containing debugging symbols", False),
("msvc_version", "MSVC version to use. Ignored if VCINSTALLDIR is set in shell env.", None),
BoolVariable("use_mingw", "Use the Mingw compiler, even if MSVC is installed.", False),
@@ -178,15 +178,6 @@ def configure_msvc(env, manual_msvc_config):
# Build type
- if env["tests"]:
- env["windows_subsystem"] = "console"
- elif env["windows_subsystem"] == "default":
- # Default means we use console for debug, gui for release.
- if "debug" in env["target"]:
- env["windows_subsystem"] = "console"
- else:
- env["windows_subsystem"] = "gui"
-
if env["target"] == "release":
if env["optimize"] == "speed": # optimize for speed (default)
env.Append(CCFLAGS=["/O2"])
@@ -326,15 +317,6 @@ def configure_mingw(env):
## Build type
- if env["tests"]:
- env["windows_subsystem"] = "console"
- elif env["windows_subsystem"] == "default":
- # Default means we use console for debug, gui for release.
- if "debug" in env["target"]:
- env["windows_subsystem"] = "console"
- else:
- env["windows_subsystem"] = "gui"
-
if env["target"] == "release":
env.Append(CCFLAGS=["-msse2"])
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp
index 9160371b5f..bcddae45d8 100644
--- a/platform/windows/display_server_windows.cpp
+++ b/platform/windows/display_server_windows.cpp
@@ -77,7 +77,6 @@ bool DisplayServerWindows::has_feature(Feature p_feature) const {
case FEATURE_CLIPBOARD:
case FEATURE_CURSOR_SHAPE:
case FEATURE_CUSTOM_CURSOR_SHAPE:
- case FEATURE_CONSOLE_WINDOW:
case FEATURE_IME:
case FEATURE_WINDOW_TRANSPARENCY:
case FEATURE_HIDPI:
@@ -675,8 +674,20 @@ void DisplayServerWindows::window_set_current_screen(int p_screen, WindowID p_wi
ERR_FAIL_COND(!windows.has(p_window));
ERR_FAIL_INDEX(p_screen, get_screen_count());
- Vector2 ofs = window_get_position(p_window) - screen_get_position(window_get_current_screen(p_window));
- window_set_position(ofs + screen_get_position(p_screen), p_window);
+ const WindowData &wd = windows[p_window];
+ if (wd.fullscreen) {
+ int cs = window_get_current_screen(p_window);
+ if (cs == p_screen) {
+ return;
+ }
+ Point2 pos = screen_get_position(p_screen);
+ Size2 size = screen_get_size(p_screen);
+
+ MoveWindow(wd.hWnd, pos.x, pos.y, size.width, size.height, TRUE);
+ } else {
+ Vector2 ofs = window_get_position(p_window) - screen_get_position(window_get_current_screen(p_window));
+ window_set_position(ofs + screen_get_position(p_screen), p_window);
+ }
}
Point2i DisplayServerWindows::window_get_position(WindowID p_window) const {
@@ -1207,23 +1218,6 @@ void DisplayServerWindows::window_set_ime_position(const Point2i &p_pos, WindowI
ImmReleaseContext(wd.hWnd, himc);
}
-void DisplayServerWindows::console_set_visible(bool p_enabled) {
- _THREAD_SAFE_METHOD_
-
- if (console_visible == p_enabled) {
- return;
- }
- if (!((OS_Windows *)OS::get_singleton())->_is_win11_terminal()) {
- // GetConsoleWindow is not supported by the Windows Terminal.
- ShowWindow(GetConsoleWindow(), p_enabled ? SW_SHOW : SW_HIDE);
- console_visible = p_enabled;
- }
-}
-
-bool DisplayServerWindows::is_console_visible() const {
- return console_visible;
-}
-
void DisplayServerWindows::cursor_set_shape(CursorShape p_shape) {
_THREAD_SAFE_METHOD_
@@ -3243,7 +3237,6 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win
shift_mem = false;
control_mem = false;
meta_mem = false;
- console_visible = IsWindowVisible(GetConsoleWindow());
hInstance = ((OS_Windows *)OS::get_singleton())->get_hinstance();
pressrc = 0;
diff --git a/platform/windows/display_server_windows.h b/platform/windows/display_server_windows.h
index 409335b41c..3593dc1a05 100644
--- a/platform/windows/display_server_windows.h
+++ b/platform/windows/display_server_windows.h
@@ -414,7 +414,6 @@ class DisplayServerWindows : public DisplayServer {
bool use_raw_input = false;
bool drop_events = false;
bool in_dispatch_input_event = false;
- bool console_visible = false;
WNDCLASSEXW wc;
@@ -477,7 +476,7 @@ public:
virtual void window_attach_instance_id(ObjectID p_instance, WindowID p_window = MAIN_WINDOW_ID) override;
virtual ObjectID window_get_attached_instance_id(WindowID p_window = MAIN_WINDOW_ID) const override;
- virtual void gl_window_make_current(DisplayServer::WindowID p_window_id);
+ virtual void gl_window_make_current(DisplayServer::WindowID p_window_id) override;
virtual void window_set_rect_changed_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID) override;
@@ -529,9 +528,6 @@ public:
virtual void window_set_vsync_mode(DisplayServer::VSyncMode p_vsync_mode, WindowID p_window = MAIN_WINDOW_ID) override;
virtual DisplayServer::VSyncMode window_get_vsync_mode(WindowID p_vsync_mode) const override;
- virtual void console_set_visible(bool p_enabled) override;
- virtual bool is_console_visible() const override;
-
virtual void cursor_set_shape(CursorShape p_shape) override;
virtual CursorShape cursor_get_shape() const override;
virtual void cursor_set_custom_image(const RES &p_cursor, CursorShape p_shape = CURSOR_ARROW, const Vector2 &p_hotspot = Vector2()) override;
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 203e078cb4..06b8fea681 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -52,8 +52,6 @@
#include <regstr.h>
#include <shlobj.h>
-static const WORD MAX_CONSOLE_LINES = 1500;
-
extern "C" {
__declspec(dllexport) DWORD NvOptimusEnablement = 1;
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
@@ -86,65 +84,17 @@ static String format_error_message(DWORD id) {
}
void RedirectIOToConsole() {
- int hConHandle;
-
- intptr_t lStdHandle;
-
- CONSOLE_SCREEN_BUFFER_INFO coninfo;
-
- FILE *fp;
-
- // allocate a console for this app
-
- AllocConsole();
-
- // set the screen buffer to be big enough to let us scroll text
-
- GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &coninfo);
-
- coninfo.dwSize.Y = MAX_CONSOLE_LINES;
-
- SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), coninfo.dwSize);
-
- // redirect unbuffered STDOUT to the console
-
- lStdHandle = (intptr_t)GetStdHandle(STD_OUTPUT_HANDLE);
-
- hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
-
- fp = _fdopen(hConHandle, "w");
-
- *stdout = *fp;
-
- setvbuf(stdout, nullptr, _IONBF, 0);
-
- // redirect unbuffered STDIN to the console
-
- lStdHandle = (intptr_t)GetStdHandle(STD_INPUT_HANDLE);
+ if (AttachConsole(ATTACH_PARENT_PROCESS)) {
+ FILE *fpstdin = stdin;
+ FILE *fpstdout = stdout;
+ FILE *fpstderr = stderr;
- hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
+ freopen_s(&fpstdin, "CONIN$", "r", stdin);
+ freopen_s(&fpstdout, "CONOUT$", "w", stdout);
+ freopen_s(&fpstderr, "CONOUT$", "w", stderr);
- fp = _fdopen(hConHandle, "r");
-
- *stdin = *fp;
-
- setvbuf(stdin, nullptr, _IONBF, 0);
-
- // redirect unbuffered STDERR to the console
-
- lStdHandle = (intptr_t)GetStdHandle(STD_ERROR_HANDLE);
-
- hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
-
- fp = _fdopen(hConHandle, "w");
-
- *stderr = *fp;
-
- setvbuf(stderr, nullptr, _IONBF, 0);
-
- // make cout, wcout, cin, wcin, wcerr, cerr, wclog and clog
-
- // point to console as well
+ printf("\n"); // Make sure our output is starting from the new line.
+ }
}
BOOL WINAPI HandlerRoutine(_In_ DWORD dwCtrlType) {
@@ -172,7 +122,9 @@ void OS_Windows::initialize_debugging() {
void OS_Windows::initialize() {
crash_handler.initialize();
- //RedirectIOToConsole();
+#ifndef WINDOWS_SUBSYSTEM_CONSOLE
+ RedirectIOToConsole();
+#endif
FileAccess::make_default<FileAccessWindows>(FileAccess::ACCESS_RESOURCES);
FileAccess::make_default<FileAccessWindows>(FileAccess::ACCESS_USERDATA);
@@ -401,78 +353,87 @@ String OS_Windows::_quote_command_line_argument(const String &p_text) const {
return p_text;
}
-Error OS_Windows::execute(const String &p_path, const List<String> &p_arguments, String *r_pipe, int *r_exitcode, bool read_stderr, Mutex *p_pipe_mutex) {
+Error OS_Windows::execute(const String &p_path, const List<String> &p_arguments, String *r_pipe, int *r_exitcode, bool read_stderr, Mutex *p_pipe_mutex, bool p_open_console) {
String path = p_path.replace("/", "\\");
String command = _quote_command_line_argument(path);
for (const String &E : p_arguments) {
command += " " + _quote_command_line_argument(E);
}
+ ProcessInfo pi;
+ ZeroMemory(&pi.si, sizeof(pi.si));
+ pi.si.cb = sizeof(pi.si);
+ ZeroMemory(&pi.pi, sizeof(pi.pi));
+ LPSTARTUPINFOW si_w = (LPSTARTUPINFOW)&pi.si;
+
+ bool inherit_handles = false;
+ HANDLE pipe[2] = { nullptr, nullptr };
if (r_pipe) {
+ // Create pipe for StdOut and StdErr.
+ SECURITY_ATTRIBUTES sa;
+ sa.nLength = sizeof(SECURITY_ATTRIBUTES);
+ sa.bInheritHandle = true;
+ sa.lpSecurityDescriptor = nullptr;
+
+ ERR_FAIL_COND_V(!CreatePipe(&pipe[0], &pipe[1], &sa, 0), ERR_CANT_FORK);
+ ERR_FAIL_COND_V(!SetHandleInformation(pipe[0], HANDLE_FLAG_INHERIT, 0), ERR_CANT_FORK); // Read handle is for host process only and should not be inherited.
+
+ pi.si.dwFlags |= STARTF_USESTDHANDLES;
+ pi.si.hStdOutput = pipe[1];
if (read_stderr) {
- command += " 2>&1"; // Include stderr
+ pi.si.hStdError = pipe[1];
}
- // Add extra quotes around the full command, to prevent it from stripping quotes in the command,
- // because _wpopen calls command as "cmd.exe /c command", instead of executing it directly
- command = _quote_command_line_argument(command);
-
- FILE *f = _wpopen((LPCWSTR)(command.utf16().get_data()), L"r");
- ERR_FAIL_COND_V_MSG(!f, ERR_CANT_OPEN, "Cannot create pipe from command: " + command);
- char buf[65535];
- while (fgets(buf, 65535, f)) {
+ inherit_handles = true;
+ }
+ DWORD creaton_flags = NORMAL_PRIORITY_CLASS;
+ if (p_open_console) {
+ creaton_flags |= CREATE_NEW_CONSOLE;
+ } else {
+ creaton_flags |= CREATE_NO_WINDOW;
+ }
+
+ int ret = CreateProcessW(nullptr, (LPWSTR)(command.utf16().ptrw()), nullptr, nullptr, inherit_handles, creaton_flags, nullptr, nullptr, si_w, &pi.pi);
+ if (!ret && r_pipe) {
+ CloseHandle(pipe[0]); // Cleanup pipe handles.
+ CloseHandle(pipe[1]);
+ }
+ ERR_FAIL_COND_V_MSG(ret == 0, ERR_CANT_FORK, "Could not create child process: " + command);
+
+ if (r_pipe) {
+ CloseHandle(pipe[1]); // Close pipe write handle (only child process is writing).
+ char buf[4096];
+ DWORD read = 0;
+ for (;;) { // Read StdOut and StdErr from pipe.
+ bool success = ReadFile(pipe[0], buf, 4096, &read, NULL);
+ if (!success || read == 0) {
+ break;
+ }
if (p_pipe_mutex) {
p_pipe_mutex->lock();
}
- (*r_pipe) += String::utf8(buf);
+ (*r_pipe) += String::utf8(buf, read);
if (p_pipe_mutex) {
p_pipe_mutex->unlock();
}
- }
- int rv = _pclose(f);
-
- if (r_exitcode) {
- *r_exitcode = rv;
- }
- return OK;
+ };
+ CloseHandle(pipe[0]); // Close pipe read handle.
+ } else {
+ WaitForSingleObject(pi.pi.hProcess, INFINITE);
}
- ProcessInfo pi;
- ZeroMemory(&pi.si, sizeof(pi.si));
- pi.si.cb = sizeof(pi.si);
- ZeroMemory(&pi.pi, sizeof(pi.pi));
- LPSTARTUPINFOW si_w = (LPSTARTUPINFOW)&pi.si;
-
- DWORD dwCreationFlags = NORMAL_PRIORITY_CLASS;
-#ifndef DEBUG_ENABLED
- dwCreationFlags |= CREATE_NO_WINDOW;
-#endif
-
- int ret = CreateProcessW(nullptr, (LPWSTR)(command.utf16().ptrw()), nullptr, nullptr, false, dwCreationFlags, nullptr, nullptr, si_w, &pi.pi);
- ERR_FAIL_COND_V_MSG(ret == 0, ERR_CANT_FORK, "Could not create child process: " + command);
-
- WaitForSingleObject(pi.pi.hProcess, INFINITE);
if (r_exitcode) {
DWORD ret2;
GetExitCodeProcess(pi.pi.hProcess, &ret2);
*r_exitcode = ret2;
}
+
CloseHandle(pi.pi.hProcess);
CloseHandle(pi.pi.hThread);
return OK;
};
-bool OS_Windows::_is_win11_terminal() const {
- HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
- DWORD dwMode = 0;
- if (GetConsoleMode(hStdOut, &dwMode)) {
- return ((dwMode & ENABLE_VIRTUAL_TERMINAL_PROCESSING) == ENABLE_VIRTUAL_TERMINAL_PROCESSING);
- } else {
- return false;
- }
-}
-
-Error OS_Windows::create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id) {
+Error OS_Windows::create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id, bool p_open_console) {
String path = p_path.replace("/", "\\");
String command = _quote_command_line_argument(path);
for (const String &E : p_arguments) {
@@ -485,16 +446,14 @@ Error OS_Windows::create_process(const String &p_path, const List<String> &p_arg
ZeroMemory(&pi.pi, sizeof(pi.pi));
LPSTARTUPINFOW si_w = (LPSTARTUPINFOW)&pi.si;
- DWORD dwCreationFlags = NORMAL_PRIORITY_CLASS;
-#ifndef DEBUG_ENABLED
- dwCreationFlags |= CREATE_NO_WINDOW;
-#endif
- if (p_path == get_executable_path() && GetConsoleWindow() != nullptr && _is_win11_terminal()) {
- // Open a new terminal as a workaround for Windows Terminal bug.
- dwCreationFlags |= CREATE_NEW_CONSOLE;
+ DWORD creaton_flags = NORMAL_PRIORITY_CLASS;
+ if (p_open_console) {
+ creaton_flags |= CREATE_NEW_CONSOLE;
+ } else {
+ creaton_flags |= CREATE_NO_WINDOW;
}
- int ret = CreateProcessW(nullptr, (LPWSTR)(command.utf16().ptrw()), nullptr, nullptr, false, dwCreationFlags, nullptr, nullptr, si_w, &pi.pi);
+ int ret = CreateProcessW(nullptr, (LPWSTR)(command.utf16().ptrw()), nullptr, nullptr, false, creaton_flags, nullptr, nullptr, si_w, &pi.pi);
ERR_FAIL_COND_V_MSG(ret == 0, ERR_CANT_FORK, "Could not create child process: " + command);
ProcessID pid = pi.pi.dwProcessId;
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index 4e61f3be7e..28baa855b4 100644
--- a/platform/windows/os_windows.h
+++ b/platform/windows/os_windows.h
@@ -128,8 +128,8 @@ public:
virtual void delay_usec(uint32_t p_usec) const override;
virtual uint64_t get_ticks_usec() const override;
- virtual Error execute(const String &p_path, const List<String> &p_arguments, String *r_pipe = nullptr, int *r_exitcode = nullptr, bool read_stderr = false, Mutex *p_pipe_mutex = nullptr) override;
- virtual Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr) override;
+ virtual Error execute(const String &p_path, const List<String> &p_arguments, String *r_pipe = nullptr, int *r_exitcode = nullptr, bool read_stderr = false, Mutex *p_pipe_mutex = nullptr, bool p_open_console = false) override;
+ virtual Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr, bool p_open_console = false) override;
virtual Error kill(const ProcessID &p_pid) override;
virtual int get_process_id() const override;
@@ -157,7 +157,6 @@ public:
void run();
- bool _is_win11_terminal() const;
virtual bool _check_internal_feature_support(const String &p_feature) override;
virtual void disable_crash_handler() override;
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp
index f4c0665f36..e8dfaf9c2e 100644
--- a/scene/2d/camera_2d.cpp
+++ b/scene/2d/camera_2d.cpp
@@ -530,7 +530,7 @@ Point2 Camera2D::get_camera_screen_center() const {
Size2 Camera2D::_get_camera_screen_size() const {
// special case if the camera2D is in the root viewport
if (Engine::get_singleton()->is_editor_hint() && get_viewport()->get_parent_viewport() == get_tree()->get_root()) {
- return Size2(ProjectSettings::get_singleton()->get("display/window/size/width"), ProjectSettings::get_singleton()->get("display/window/size/height"));
+ return Size2(ProjectSettings::get_singleton()->get("display/window/size/viewport_width"), ProjectSettings::get_singleton()->get("display/window/size/viewport_height"));
}
return get_viewport_rect().size;
}
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index 62dc4d1c15..5857b6710f 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -1809,7 +1809,7 @@ void TileMap::_scenes_update_dirty_quadrants(SelfList<TileMapQuadrant>::List &r_
// Clear the scenes.
for (const KeyValue<Vector2i, String> &E : q.scenes) {
- Node *node = get_node(E.value);
+ Node *node = get_node_or_null(E.value);
if (node) {
node->queue_delete();
}
@@ -1857,7 +1857,7 @@ void TileMap::_scenes_update_dirty_quadrants(SelfList<TileMapQuadrant>::List &r_
void TileMap::_scenes_cleanup_quadrant(TileMapQuadrant *p_quadrant) {
// Clear the scenes.
for (const KeyValue<Vector2i, String> &E : p_quadrant->scenes) {
- Node *node = get_node(E.value);
+ Node *node = get_node_or_null(E.value);
if (node) {
node->queue_delete();
}
diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp
index 046b9c18c7..552dd28513 100644
--- a/scene/gui/button.cpp
+++ b/scene/gui/button.cpp
@@ -569,7 +569,7 @@ void Button::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING, "text", PROPERTY_HINT_MULTILINE_TEXT, "", PROPERTY_USAGE_DEFAULT_INTL), "set_text", "get_text");
ADD_PROPERTY(PropertyInfo(Variant::INT, "text_direction", PROPERTY_HINT_ENUM, "Auto,Left-to-Right,Right-to-Left,Inherited"), "set_text_direction", "get_text_direction");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "language"), "set_language", "get_language");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING, "language", PROPERTY_HINT_LOCALE_ID, ""), "set_language", "get_language");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "icon", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_button_icon", "get_button_icon");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "flat"), "set_flat", "is_flat");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "clip_text"), "set_clip_text", "get_clip_text");
diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp
index 040075150b..b3754ba6db 100644
--- a/scene/gui/code_edit.cpp
+++ b/scene/gui/code_edit.cpp
@@ -2085,8 +2085,6 @@ void CodeEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_auto_brace_completion_close_key", "open_key"), &CodeEdit::get_auto_brace_completion_close_key);
/* Main Gutter */
- ClassDB::bind_method(D_METHOD("_main_gutter_draw_callback"), &CodeEdit::_main_gutter_draw_callback);
-
ClassDB::bind_method(D_METHOD("set_draw_breakpoints_gutter", "enable"), &CodeEdit::set_draw_breakpoints_gutter);
ClassDB::bind_method(D_METHOD("is_drawing_breakpoints_gutter"), &CodeEdit::is_drawing_breakpoints_gutter);
@@ -2115,16 +2113,12 @@ void CodeEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_executing_lines"), &CodeEdit::get_executing_lines);
/* Line numbers */
- ClassDB::bind_method(D_METHOD("_line_number_draw_callback"), &CodeEdit::_line_number_draw_callback);
-
ClassDB::bind_method(D_METHOD("set_draw_line_numbers", "enable"), &CodeEdit::set_draw_line_numbers);
ClassDB::bind_method(D_METHOD("is_draw_line_numbers_enabled"), &CodeEdit::is_draw_line_numbers_enabled);
ClassDB::bind_method(D_METHOD("set_line_numbers_zero_padded", "enable"), &CodeEdit::set_line_numbers_zero_padded);
ClassDB::bind_method(D_METHOD("is_line_numbers_zero_padded"), &CodeEdit::is_line_numbers_zero_padded);
/* Fold Gutter */
- ClassDB::bind_method(D_METHOD("_fold_gutter_draw_callback"), &CodeEdit::_fold_gutter_draw_callback);
-
ClassDB::bind_method(D_METHOD("set_draw_fold_gutter", "enable"), &CodeEdit::set_draw_fold_gutter);
ClassDB::bind_method(D_METHOD("is_drawing_fold_gutter"), &CodeEdit::is_drawing_fold_gutter);
@@ -3084,7 +3078,7 @@ CodeEdit::CodeEdit() {
set_gutter_draw(gutter_idx, false);
set_gutter_overwritable(gutter_idx, true);
set_gutter_type(gutter_idx, GUTTER_TYPE_CUSTOM);
- set_gutter_custom_draw(gutter_idx, this, "_main_gutter_draw_callback");
+ set_gutter_custom_draw(gutter_idx, callable_mp(this, &CodeEdit::_main_gutter_draw_callback));
gutter_idx++;
/* Line numbers */
@@ -3092,7 +3086,7 @@ CodeEdit::CodeEdit() {
set_gutter_name(gutter_idx, "line_numbers");
set_gutter_draw(gutter_idx, false);
set_gutter_type(gutter_idx, GUTTER_TYPE_CUSTOM);
- set_gutter_custom_draw(gutter_idx, this, "_line_number_draw_callback");
+ set_gutter_custom_draw(gutter_idx, callable_mp(this, &CodeEdit::_line_number_draw_callback));
gutter_idx++;
/* Fold Gutter */
@@ -3100,7 +3094,7 @@ CodeEdit::CodeEdit() {
set_gutter_name(gutter_idx, "fold_gutter");
set_gutter_draw(gutter_idx, false);
set_gutter_type(gutter_idx, GUTTER_TYPE_CUSTOM);
- set_gutter_custom_draw(gutter_idx, this, "_fold_gutter_draw_callback");
+ set_gutter_custom_draw(gutter_idx, callable_mp(this, &CodeEdit::_fold_gutter_draw_callback));
gutter_idx++;
connect("lines_edited_from", callable_mp(this, &CodeEdit::_lines_edited_from));
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index 69e6d74292..f167062f7d 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -733,8 +733,10 @@ void Control::_notification(int p_notification) {
} break;
case NOTIFICATION_TRANSLATION_CHANGED:
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED: {
- data.is_rtl_dirty = true;
- _size_changed();
+ if (is_inside_tree()) {
+ data.is_rtl_dirty = true;
+ _size_changed();
+ }
} break;
}
}
@@ -1306,7 +1308,7 @@ Rect2 Control::get_parent_anchorable_rect() const {
#ifdef TOOLS_ENABLED
Node *edited_root = get_tree()->get_edited_scene_root();
if (edited_root && (this == edited_root || edited_root->is_ancestor_of(this))) {
- parent_rect.size = Size2(ProjectSettings::get_singleton()->get("display/window/size/width"), ProjectSettings::get_singleton()->get("display/window/size/height"));
+ parent_rect.size = Size2(ProjectSettings::get_singleton()->get("display/window/size/viewport_width"), ProjectSettings::get_singleton()->get("display/window/size/viewport_height"));
} else {
parent_rect = get_viewport()->get_visible_rect();
}
diff --git a/scene/gui/flow_container.cpp b/scene/gui/flow_container.cpp
new file mode 100644
index 0000000000..d1ac60b325
--- /dev/null
+++ b/scene/gui/flow_container.cpp
@@ -0,0 +1,252 @@
+/*************************************************************************/
+/* flow_container.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 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 "scene/gui/container.h"
+
+#include "flow_container.h"
+
+struct _LineData {
+ int child_count = 0;
+ int min_line_height = 0;
+ int min_line_length = 0;
+ int stretch_avail = 0;
+ float stretch_ratio_total = 0;
+};
+
+void FlowContainer::_resort() {
+ int separation_horizontal = get_theme_constant(SNAME("hseparation"));
+ int separation_vertical = get_theme_constant(SNAME("vseparation"));
+
+ bool rtl = is_layout_rtl();
+
+ Map<Control *, Size2i> children_minsize_cache;
+
+ Vector<_LineData> lines_data;
+
+ Vector2i ofs;
+ int line_height = 0;
+ int line_length = 0;
+ float line_stretch_ratio_total = 0;
+ int current_container_size = vertical ? get_rect().size.y : get_rect().size.x;
+ int children_in_current_line = 0;
+
+ // First pass for line wrapping and minimum size calculation.
+ for (int i = 0; i < get_child_count(); i++) {
+ Control *child = Object::cast_to<Control>(get_child(i));
+ if (!child || !child->is_visible_in_tree()) {
+ continue;
+ }
+ if (child->is_set_as_top_level()) {
+ continue;
+ }
+
+ Size2i child_msc = child->get_combined_minimum_size();
+
+ if (vertical) { /* VERTICAL */
+ if (children_in_current_line > 0) {
+ ofs.y += separation_vertical;
+ }
+ if (ofs.y + child_msc.y > current_container_size) {
+ line_length = ofs.y - separation_vertical;
+ lines_data.push_back(_LineData{ children_in_current_line, line_height, line_length, current_container_size - line_length, line_stretch_ratio_total });
+
+ // Move in new column (vertical line).
+ ofs.x += line_height + separation_horizontal;
+ ofs.y = 0;
+ line_height = 0;
+ line_stretch_ratio_total = 0;
+ children_in_current_line = 0;
+ }
+
+ line_height = MAX(line_height, child_msc.x);
+ if (child->get_v_size_flags() & SIZE_EXPAND) {
+ line_stretch_ratio_total += child->get_stretch_ratio();
+ }
+ ofs.y += child_msc.y;
+
+ } else { /* HORIZONTAL */
+ if (children_in_current_line > 0) {
+ ofs.x += separation_horizontal;
+ }
+ if (ofs.x + child_msc.x > current_container_size) {
+ line_length = ofs.x - separation_horizontal;
+ lines_data.push_back(_LineData{ children_in_current_line, line_height, line_length, current_container_size - line_length, line_stretch_ratio_total });
+
+ // Move in new line.
+ ofs.y += line_height + separation_vertical;
+ ofs.x = 0;
+ line_height = 0;
+ line_stretch_ratio_total = 0;
+ children_in_current_line = 0;
+ }
+
+ line_height = MAX(line_height, child_msc.y);
+ if (child->get_h_size_flags() & SIZE_EXPAND) {
+ line_stretch_ratio_total += child->get_stretch_ratio();
+ }
+ ofs.x += child_msc.x;
+ }
+
+ children_minsize_cache[child] = child_msc;
+ children_in_current_line++;
+ }
+ line_length = vertical ? (ofs.y) : (ofs.x);
+ lines_data.push_back(_LineData{ children_in_current_line, line_height, line_length, current_container_size - line_length, line_stretch_ratio_total });
+
+ // Second pass for in-line expansion and alignment.
+
+ int current_line_idx = 0;
+ int child_idx_in_line = 0;
+
+ ofs.x = 0;
+ ofs.y = 0;
+
+ for (int i = 0; i < get_child_count(); i++) {
+ Control *child = Object::cast_to<Control>(get_child(i));
+ if (!child || !child->is_visible_in_tree()) {
+ continue;
+ }
+ if (child->is_set_as_top_level()) {
+ continue;
+ }
+ Size2i child_size = children_minsize_cache[child];
+
+ _LineData line_data = lines_data[current_line_idx];
+ if (child_idx_in_line >= lines_data[current_line_idx].child_count) {
+ current_line_idx++;
+ child_idx_in_line = 0;
+ if (vertical) {
+ ofs.x += line_data.min_line_height + separation_horizontal;
+ ofs.y = 0;
+ } else {
+ ofs.x = 0;
+ ofs.y += line_data.min_line_height + separation_vertical;
+ }
+ line_data = lines_data[current_line_idx];
+ }
+
+ if (vertical) { /* VERTICAL */
+ if (child->get_h_size_flags() & (SIZE_FILL | SIZE_SHRINK_CENTER | SIZE_SHRINK_END)) {
+ child_size.width = line_data.min_line_height;
+ }
+
+ if (child->get_v_size_flags() & SIZE_EXPAND) {
+ int stretch = line_data.stretch_avail * child->get_stretch_ratio() / line_data.stretch_ratio_total;
+ child_size.height += stretch;
+ }
+
+ } else { /* HORIZONTAL */
+ if (child->get_v_size_flags() & (SIZE_FILL | SIZE_SHRINK_CENTER | SIZE_SHRINK_END)) {
+ child_size.height = line_data.min_line_height;
+ }
+
+ if (child->get_h_size_flags() & SIZE_EXPAND) {
+ int stretch = line_data.stretch_avail * child->get_stretch_ratio() / line_data.stretch_ratio_total;
+ child_size.width += stretch;
+ }
+ }
+
+ Rect2 child_rect = Rect2(ofs, child_size);
+ if (rtl) {
+ child_rect.position.x = get_rect().size.x - child_rect.position.x - child_rect.size.width;
+ }
+
+ fit_child_in_rect(child, child_rect);
+
+ if (vertical) { /* VERTICAL */
+ ofs.y += child_size.height + separation_vertical;
+ } else { /* HORIZONTAL */
+ ofs.x += child_size.width + separation_horizontal;
+ }
+
+ child_idx_in_line++;
+ }
+ cached_size = (vertical ? ofs.x : ofs.y) + line_height;
+ cached_line_count = lines_data.size();
+}
+
+Size2 FlowContainer::get_minimum_size() const {
+ Size2i minimum;
+
+ for (int i = 0; i < get_child_count(); i++) {
+ Control *c = Object::cast_to<Control>(get_child(i));
+ if (!c) {
+ continue;
+ }
+ if (c->is_set_as_top_level()) {
+ continue;
+ }
+
+ if (!c->is_visible()) {
+ continue;
+ }
+
+ Size2i size = c->get_combined_minimum_size();
+
+ if (vertical) { /* VERTICAL */
+ minimum.height = MAX(minimum.height, size.height);
+ minimum.width = cached_size;
+
+ } else { /* HORIZONTAL */
+ minimum.width = MAX(minimum.width, size.width);
+ minimum.height = cached_size;
+ }
+ }
+
+ return minimum;
+}
+
+void FlowContainer::_notification(int p_what) {
+ switch (p_what) {
+ case NOTIFICATION_SORT_CHILDREN: {
+ _resort();
+ update_minimum_size();
+ } break;
+ case NOTIFICATION_THEME_CHANGED: {
+ update_minimum_size();
+ } break;
+ case NOTIFICATION_TRANSLATION_CHANGED:
+ case NOTIFICATION_LAYOUT_DIRECTION_CHANGED: {
+ queue_sort();
+ } break;
+ }
+}
+
+int FlowContainer::get_line_count() const {
+ return cached_line_count;
+}
+
+FlowContainer::FlowContainer(bool p_vertical) {
+ vertical = p_vertical;
+}
+
+void FlowContainer::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("get_line_count"), &FlowContainer::get_line_count);
+}
diff --git a/scene/gui/flow_container.h b/scene/gui/flow_container.h
new file mode 100644
index 0000000000..e3ed423ae1
--- /dev/null
+++ b/scene/gui/flow_container.h
@@ -0,0 +1,76 @@
+/*************************************************************************/
+/* flow_container.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 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 FLOW_CONTAINER_H
+#define FLOW_CONTAINER_H
+
+class Container;
+
+class FlowContainer : public Container {
+ GDCLASS(FlowContainer, Container);
+
+private:
+ int cached_size = 0;
+ int cached_line_count = 0;
+
+ bool vertical = false;
+
+ void _resort();
+
+protected:
+ void _notification(int p_what);
+
+ static void _bind_methods();
+
+public:
+ int get_line_count() const;
+
+ virtual Size2 get_minimum_size() const override;
+
+ FlowContainer(bool p_vertical = false);
+};
+
+class HFlowContainer : public FlowContainer {
+ GDCLASS(HFlowContainer, FlowContainer);
+
+public:
+ HFlowContainer() :
+ FlowContainer(false) {}
+};
+
+class VFlowContainer : public FlowContainer {
+ GDCLASS(VFlowContainer, FlowContainer);
+
+public:
+ VFlowContainer() :
+ FlowContainer(true) {}
+};
+
+#endif // FLOW_CONTAINER_H
diff --git a/scene/gui/gradient_edit.h b/scene/gui/gradient_edit.h
index 407f61f7c1..67531d4f4a 100644
--- a/scene/gui/gradient_edit.h
+++ b/scene/gui/gradient_edit.h
@@ -33,7 +33,6 @@
#include "scene/gui/color_picker.h"
#include "scene/gui/popup.h"
-#include "scene/resources/default_theme/theme_data.h"
#include "scene/resources/gradient.h"
class GradientEdit : public Control {
diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp
index d6569e3de4..30f6cf4a14 100644
--- a/scene/gui/graph_node.cpp
+++ b/scene/gui/graph_node.cpp
@@ -1022,7 +1022,7 @@ void GraphNode::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING, "title"), "set_title", "get_title");
ADD_PROPERTY(PropertyInfo(Variant::INT, "text_direction", PROPERTY_HINT_ENUM, "Auto,Left-to-Right,Right-to-Left,Inherited"), "set_text_direction", "get_text_direction");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "language"), "set_language", "get_language");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING, "language", PROPERTY_HINT_LOCALE_ID, ""), "set_language", "get_language");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "position_offset"), "set_position_offset", "get_position_offset");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "show_close"), "set_show_close_button", "is_close_button_visible");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "resizable"), "set_resizable", "is_resizable");
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index 861b70f17e..fab420d593 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -83,6 +83,7 @@ void Label::_shape() {
int width = (get_size().width - style->get_minimum_size().width);
if (dirty) {
+ String lang = (!language.is_empty()) ? language : TranslationServer::get_singleton()->get_tool_locale();
TS->shaped_text_clear(text_rid);
if (text_direction == Control::TEXT_DIRECTION_INHERITED) {
TS->shaped_text_set_direction(text_rid, is_layout_rtl() ? TextServer::DIRECTION_RTL : TextServer::DIRECTION_LTR);
@@ -92,11 +93,11 @@ void Label::_shape() {
const Ref<Font> &font = get_theme_font(SNAME("font"));
int font_size = get_theme_font_size(SNAME("font_size"));
ERR_FAIL_COND(font.is_null());
- String text = (uppercase) ? xl_text.to_upper() : xl_text;
+ String text = (uppercase) ? TS->string_to_upper(xl_text, lang) : xl_text;
if (visible_chars >= 0 && visible_chars_behavior == VC_CHARS_BEFORE_SHAPING) {
text = text.substr(0, visible_chars);
}
- TS->shaped_text_add_string(text_rid, text, font->get_rids(), font_size, opentype_features, (!language.is_empty()) ? language : TranslationServer::get_singleton()->get_tool_locale());
+ TS->shaped_text_add_string(text_rid, text, font->get_rids(), font_size, opentype_features, lang);
TS->shaped_text_set_bidi_override(text_rid, structured_text_parser(st_parser, st_args, text));
dirty = false;
lines_dirty = true;
@@ -915,7 +916,7 @@ void Label::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING, "text", PROPERTY_HINT_MULTILINE_TEXT, "", PROPERTY_USAGE_DEFAULT_INTL), "set_text", "get_text");
ADD_GROUP("Locale", "");
ADD_PROPERTY(PropertyInfo(Variant::INT, "text_direction", PROPERTY_HINT_ENUM, "Auto,Left-to-Right,Right-to-Left,Inherited"), "set_text_direction", "get_text_direction");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "language"), "set_language", "get_language");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING, "language", PROPERTY_HINT_LOCALE_ID, ""), "set_language", "get_language");
ADD_PROPERTY(PropertyInfo(Variant::INT, "horizontal_alignment", PROPERTY_HINT_ENUM, "Left,Center,Right,Fill"), "set_horizontal_alignment", "get_horizontal_alignment");
ADD_PROPERTY(PropertyInfo(Variant::INT, "vertical_alignment", PROPERTY_HINT_ENUM, "Top,Center,Bottom,Fill"), "set_vertical_alignment", "get_vertical_alignment");
ADD_PROPERTY(PropertyInfo(Variant::INT, "autowrap_mode", PROPERTY_HINT_ENUM, "Off,Arbitrary,Word,Word (Smart)"), "set_autowrap_mode", "get_autowrap_mode");
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index f7d6850a88..88953fa7db 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -2344,7 +2344,7 @@ void LineEdit::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "right_icon", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_right_icon", "get_right_icon");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "flat"), "set_flat", "is_flat");
ADD_PROPERTY(PropertyInfo(Variant::INT, "text_direction", PROPERTY_HINT_ENUM, "Auto,Left-to-Right,Right-to-Left,Inherited"), "set_text_direction", "get_text_direction");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "language"), "set_language", "get_language");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING, "language", PROPERTY_HINT_LOCALE_ID, ""), "set_language", "get_language");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "draw_control_chars"), "set_draw_control_chars", "get_draw_control_chars");
ADD_GROUP("Structured Text", "structured_text_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "structured_text_bidi_override", PROPERTY_HINT_ENUM, "Default,URI,File,Email,List,None,Custom"), "set_structured_text_bidi_override", "get_structured_text_bidi_override");
diff --git a/scene/gui/link_button.cpp b/scene/gui/link_button.cpp
index 67ffa2c7ed..0ff05faf85 100644
--- a/scene/gui/link_button.cpp
+++ b/scene/gui/link_button.cpp
@@ -308,7 +308,7 @@ void LinkButton::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING, "text"), "set_text", "get_text");
ADD_PROPERTY(PropertyInfo(Variant::INT, "text_direction", PROPERTY_HINT_ENUM, "Auto,Left-to-Right,Right-to-Left,Inherited"), "set_text_direction", "get_text_direction");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "language"), "set_language", "get_language");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING, "language", PROPERTY_HINT_LOCALE_ID, ""), "set_language", "get_language");
ADD_PROPERTY(PropertyInfo(Variant::INT, "underline", PROPERTY_HINT_ENUM, "Always,On Hover,Never"), "set_underline_mode", "get_underline_mode");
ADD_GROUP("Structured Text", "structured_text_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "structured_text_bidi_override", PROPERTY_HINT_ENUM, "Default,URI,File,Email,List,None,Custom"), "set_structured_text_bidi_override", "get_structured_text_bidi_override");
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 863555120d..b50fad0e42 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -254,7 +254,12 @@ void RichTextLabel::_resize_line(ItemFrame *p_frame, int p_line, const Ref<Font>
for (int i = 0; i < col_count; i++) {
remaining_width -= table->columns[i].min_width;
if (table->columns[i].max_width > table->columns[i].min_width) {
+ // If the column can grow, allow it to grow.
table->columns.write[i].expand = true;
+ } else {
+ // Otherwise make it shrink as much as possible, so that other columns can grow if needs be.
+ // We keep the max width as is to spread the remaining space between the columns later.
+ table->columns.write[i].min_width = 0;
}
if (table->columns[i].expand) {
total_ratio += table->columns[i].expand_ratio;
@@ -264,7 +269,7 @@ void RichTextLabel::_resize_line(ItemFrame *p_frame, int p_line, const Ref<Font>
// Assign actual widths.
for (int i = 0; i < col_count; i++) {
table->columns.write[i].width = table->columns[i].min_width;
- if (table->columns[i].expand && total_ratio > 0) {
+ if (table->columns[i].expand && total_ratio > 0 && remaining_width > 0) {
table->columns.write[i].width += table->columns[i].expand_ratio * remaining_width / total_ratio;
}
table->total_width += table->columns[i].width + hseparation;
@@ -325,13 +330,16 @@ void RichTextLabel::_resize_line(ItemFrame *p_frame, int p_line, const Ref<Font>
table->columns.write[column].width = MAX(table->columns.write[column].width, ceil(frame->lines[i].text_buf->get_size().x));
if (i > 0) {
- frame->lines.write[i].offset.y = frame->lines[i - 1].offset.y + frame->lines[i - 1].text_buf->get_size().y;
+ frame->lines.write[i].offset.y = frame->lines[i - 1].offset.y + frame->lines[i - 1].text_buf->get_size().y + get_theme_constant(SNAME("line_separation"));
} else {
frame->lines.write[i].offset.y = 0;
}
frame->lines.write[i].offset += offset;
- float h = frame->lines[i].text_buf->get_size().y;
+ float h = frame->lines[i].text_buf->get_size().y + (frame->lines[i].text_buf->get_line_count() - 1) * get_theme_constant(SNAME("line_separation"));
+ if (i > 0) {
+ h += get_theme_constant(SNAME("line_separation"));
+ }
if (frame->min_size_over.y > 0) {
h = MAX(h, frame->min_size_over.y);
}
@@ -499,7 +507,12 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font>
for (int i = 0; i < col_count; i++) {
remaining_width -= table->columns[i].min_width;
if (table->columns[i].max_width > table->columns[i].min_width) {
+ // If the column can grow, allow it to grow.
table->columns.write[i].expand = true;
+ } else {
+ // Otherwise make it shrink as much as possible, so that other columns can grow if needs be.
+ // We keep the max width as is to spread the remaining space between the columns later.
+ table->columns.write[i].min_width = 0;
}
if (table->columns[i].expand) {
total_ratio += table->columns[i].expand_ratio;
@@ -509,7 +522,7 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font>
// Assign actual widths.
for (int i = 0; i < col_count; i++) {
table->columns.write[i].width = table->columns[i].min_width;
- if (table->columns[i].expand && total_ratio > 0) {
+ if (table->columns[i].expand && total_ratio > 0 && remaining_width > 0) {
table->columns.write[i].width += table->columns[i].expand_ratio * remaining_width / total_ratio;
}
table->total_width += table->columns[i].width + hseparation;
@@ -570,13 +583,16 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font>
table->columns.write[column].width = MAX(table->columns.write[column].width, ceil(frame->lines[i].text_buf->get_size().x));
if (i > 0) {
- frame->lines.write[i].offset.y = frame->lines[i - 1].offset.y + frame->lines[i - 1].text_buf->get_size().y;
+ frame->lines.write[i].offset.y = frame->lines[i - 1].offset.y + frame->lines[i - 1].text_buf->get_size().y + get_theme_constant(SNAME("line_separation"));
} else {
frame->lines.write[i].offset.y = 0;
}
frame->lines.write[i].offset += offset;
- float h = frame->lines[i].text_buf->get_size().y;
+ float h = frame->lines[i].text_buf->get_size().y + (frame->lines[i].text_buf->get_line_count() - 1) * get_theme_constant(SNAME("line_separation"));
+ if (i > 0) {
+ h += get_theme_constant(SNAME("line_separation"));
+ }
if (frame->min_size_over.y > 0) {
h = MAX(h, frame->min_size_over.y);
}
@@ -622,11 +638,12 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font>
}
int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_ofs, int p_width, const Color &p_base_color, int p_outline_size, const Color &p_outline_color, const Color &p_font_shadow_color, int p_shadow_outline_size, const Point2 &p_shadow_ofs, int &r_processed_glyphs) {
- Vector2 off;
-
ERR_FAIL_COND_V(p_frame == nullptr, 0);
ERR_FAIL_COND_V(p_line < 0 || p_line >= p_frame->lines.size(), 0);
+ Vector2 off;
+ int line_spacing = get_theme_constant(SNAME("line_separation"));
+
Line &l = p_frame->lines.write[p_line];
Item *it_from = l.from;
@@ -712,6 +729,10 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o
Size2 ctrl_size = get_size();
// Draw text.
for (int line = 0; line < l.text_buf->get_line_count(); line++) {
+ if (line > 0) {
+ off.y += line_spacing;
+ }
+
RID rid = l.text_buf->get_line_rid(line);
if (p_ofs.y + off.y >= ctrl_size.height) {
break;
@@ -2176,10 +2197,6 @@ void RichTextLabel::_validate_line_caches(ItemFrame *p_frame) {
}
// Resize lines without reshaping.
- Size2 size = get_size();
- if (fixed_width != -1) {
- size.width = fixed_width;
- }
Rect2 text_rect = _get_text_rect();
Ref<Font> base_font = get_theme_font(SNAME("normal_font"));
@@ -2200,7 +2217,7 @@ void RichTextLabel::_validate_line_caches(ItemFrame *p_frame) {
vscroll->set_max(total_height);
vscroll->set_page(text_rect.size.height);
if (scroll_follow && scroll_following) {
- vscroll->set_value(total_height - size.height);
+ vscroll->set_value(total_height);
}
updating_scroll = false;
@@ -2211,10 +2228,6 @@ void RichTextLabel::_validate_line_caches(ItemFrame *p_frame) {
}
// Shape invalid lines.
- Size2 size = get_size();
- if (fixed_width != -1) {
- size.width = fixed_width;
- }
Rect2 text_rect = _get_text_rect();
Ref<Font> base_font = get_theme_font(SNAME("normal_font"));
@@ -2237,7 +2250,7 @@ void RichTextLabel::_validate_line_caches(ItemFrame *p_frame) {
vscroll->set_max(total_height);
vscroll->set_page(text_rect.size.height);
if (scroll_follow && scroll_following) {
- vscroll->set_value(total_height - size.height);
+ vscroll->set_value(total_height);
}
updating_scroll = false;
@@ -4207,7 +4220,7 @@ void RichTextLabel::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "custom_effects", PROPERTY_HINT_ARRAY_TYPE, vformat("%s/%s:%s", Variant::OBJECT, PROPERTY_HINT_RESOURCE_TYPE, "RichTextEffect"), (PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE)), "set_effects", "get_effects");
ADD_PROPERTY(PropertyInfo(Variant::INT, "text_direction", PROPERTY_HINT_ENUM, "Auto,Left-to-Right,Right-to-Left,Inherited"), "set_text_direction", "get_text_direction");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "language"), "set_language", "get_language");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING, "language", PROPERTY_HINT_LOCALE_ID, ""), "set_language", "get_language");
ADD_GROUP("Structured Text", "structured_text_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "structured_text_bidi_override", PROPERTY_HINT_ENUM, "Default,URI,File,Email,List,None,Custom"), "set_structured_text_bidi_override", "get_structured_text_bidi_override");
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 2b10ead8f6..d6b449abd1 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -1008,15 +1008,17 @@ void TextEdit::_notification(int p_what) {
icon->draw_rect(ci, gutter_rect, false, get_line_gutter_item_color(line, g));
} break;
case GUTTER_TYPE_CUSTOM: {
- if (gutter.custom_draw_obj.is_valid()) {
- Object *cdo = ObjectDB::get_instance(gutter.custom_draw_obj);
- if (cdo) {
- Rect2i gutter_rect = Rect2i(Point2i(gutter_offset, ofs_y), Size2i(gutter.width, row_height));
- if (rtl) {
- gutter_rect.position.x = size.width - gutter_rect.position.x - gutter_rect.size.x;
- }
- cdo->call(gutter.custom_draw_callback, line, g, Rect2(gutter_rect));
+ if (gutter.custom_draw_callback.is_valid()) {
+ Rect2i gutter_rect = Rect2i(Point2i(gutter_offset, ofs_y), Size2i(gutter.width, row_height));
+ if (rtl) {
+ gutter_rect.position.x = size.width - gutter_rect.position.x - gutter_rect.size.x;
}
+
+ Variant args[3] = { line, g, Rect2(gutter_rect) };
+ const Variant *argp[] = { &args[0], &args[1], &args[2] };
+ Callable::CallError ce;
+ Variant ret;
+ gutter.custom_draw_callback.call(argp, 3, ret, ce);
}
} break;
}
@@ -2598,8 +2600,7 @@ Control::CursorShape TextEdit::get_cursor_shape(const Point2 &p_pos) const {
}
String TextEdit::get_tooltip(const Point2 &p_pos) const {
- Object *tooltip_obj = ObjectDB::get_instance(tooltip_obj_id);
- if (!tooltip_obj) {
+ if (!tooltip_callback.is_valid()) {
return Control::get_tooltip(p_pos);
}
Point2i pos = get_line_column_at_pos(p_pos);
@@ -2612,19 +2613,20 @@ String TextEdit::get_tooltip(const Point2 &p_pos) const {
}
int beg, end;
if (select_word(s, col, beg, end)) {
- String tt = tooltip_obj->call(tooltip_func, s.substr(beg, end - beg), tooltip_ud);
-
- return tt;
+ Variant args[1] = { s.substr(beg, end - beg) };
+ const Variant *argp[] = { &args[0] };
+ Callable::CallError ce;
+ Variant ret;
+ tooltip_callback.call(argp, 1, ret, ce);
+ ERR_FAIL_COND_V_MSG(ce.error != Callable::CallError::CALL_OK, "", "Failed to call custom tooltip.");
+ return ret;
}
return Control::get_tooltip(p_pos);
}
-void TextEdit::set_tooltip_request_func(Object *p_obj, const StringName &p_function, const Variant &p_udata) {
- ERR_FAIL_NULL(p_obj);
- tooltip_obj_id = p_obj->get_instance_id();
- tooltip_func = p_function;
- tooltip_ud = p_udata;
+void TextEdit::set_tooltip_request_func(const Callable &p_tooltip_callback) {
+ tooltip_callback = p_tooltip_callback;
}
/* Text */
@@ -4658,12 +4660,10 @@ void TextEdit::merge_gutters(int p_from_line, int p_to_line) {
update();
}
-void TextEdit::set_gutter_custom_draw(int p_gutter, Object *p_object, const StringName &p_callback) {
+void TextEdit::set_gutter_custom_draw(int p_gutter, const Callable &p_draw_callback) {
ERR_FAIL_INDEX(p_gutter, gutters.size());
- ERR_FAIL_NULL(p_object);
- gutters.write[p_gutter].custom_draw_obj = p_object->get_instance_id();
- gutters.write[p_gutter].custom_draw_callback = p_callback;
+ gutters.write[p_gutter].custom_draw_callback = p_draw_callback;
update();
}
@@ -4953,7 +4953,7 @@ void TextEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("search", "text", "flags", "from_line", "from_colum"), &TextEdit::search);
/* Tooltip */
- ClassDB::bind_method(D_METHOD("set_tooltip_request_func", "object", "callback", "data"), &TextEdit::set_tooltip_request_func);
+ ClassDB::bind_method(D_METHOD("set_tooltip_request_func", "callback"), &TextEdit::set_tooltip_request_func);
/* Mouse */
ClassDB::bind_method(D_METHOD("get_local_mouse_pos"), &TextEdit::get_local_mouse_pos);
@@ -5125,7 +5125,7 @@ void TextEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_gutter_overwritable", "gutter", "overwritable"), &TextEdit::set_gutter_overwritable);
ClassDB::bind_method(D_METHOD("is_gutter_overwritable", "gutter"), &TextEdit::is_gutter_overwritable);
ClassDB::bind_method(D_METHOD("merge_gutters", "from_line", "to_line"), &TextEdit::merge_gutters);
- ClassDB::bind_method(D_METHOD("set_gutter_custom_draw", "column", "object", "callback"), &TextEdit::set_gutter_custom_draw);
+ ClassDB::bind_method(D_METHOD("set_gutter_custom_draw", "column", "draw_callback"), &TextEdit::set_gutter_custom_draw);
ClassDB::bind_method(D_METHOD("get_total_gutter_width"), &TextEdit::get_total_gutter_width);
// Line gutters.
@@ -5171,7 +5171,7 @@ void TextEdit::_bind_methods() {
/* Inspector */
ADD_PROPERTY(PropertyInfo(Variant::STRING, "text", PROPERTY_HINT_MULTILINE_TEXT), "set_text", "get_text");
ADD_PROPERTY(PropertyInfo(Variant::INT, "text_direction", PROPERTY_HINT_ENUM, "Auto,Left-to-Right,Right-to-Left,Inherited"), "set_text_direction", "get_text_direction");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "language"), "set_language", "get_language");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING, "language", PROPERTY_HINT_LOCALE_ID, ""), "set_language", "get_language");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editable"), "set_editable", "is_editable");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "context_menu_enabled"), "set_context_menu_enabled", "is_context_menu_enabled");
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index 57b48b5f52..0d0f4f6dba 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -120,8 +120,7 @@ private:
bool clickable = false;
bool overwritable = false;
- ObjectID custom_draw_obj = ObjectID();
- StringName custom_draw_callback;
+ Callable custom_draw_callback;
};
class Text {
@@ -332,9 +331,7 @@ private:
int _get_column_pos_of_word(const String &p_key, const String &p_search, uint32_t p_search_flags, int p_from_column) const;
/* Tooltip. */
- ObjectID tooltip_obj_id;
- StringName tooltip_func;
- Variant tooltip_ud;
+ Callable tooltip_callback;
/* Mouse */
struct LineDrawingCache {
@@ -620,7 +617,7 @@ public:
virtual bool can_drop_data(const Point2 &p_point, const Variant &p_data) const override;
virtual void drop_data(const Point2 &p_point, const Variant &p_data) override;
virtual String get_tooltip(const Point2 &p_pos) const override;
- void set_tooltip_request_func(Object *p_obj, const StringName &p_function, const Variant &p_udata);
+ void set_tooltip_request_func(const Callable &p_tooltip_callback);
/* Text */
// Text properties.
@@ -884,7 +881,7 @@ public:
void merge_gutters(int p_from_line, int p_to_line);
- void set_gutter_custom_draw(int p_gutter, Object *p_object, const StringName &p_callback);
+ void set_gutter_custom_draw(int p_gutter, const Callable &p_draw_callback);
// Line gutters.
void set_line_gutter_metadata(int p_line, int p_gutter, const Variant &p_metadata);
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 9d96c71113..416dec3e4f 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -1316,12 +1316,14 @@ Node *Node::get_node_or_null(const NodePath &p_path) const {
Node *Node::get_node(const NodePath &p_path) const {
Node *node = get_node_or_null(p_path);
- if (p_path.is_absolute()) {
- ERR_FAIL_COND_V_MSG(!node, nullptr,
- vformat(R"(Node not found: "%s" (absolute path attempted from "%s").)", p_path, get_path()));
- } else {
- ERR_FAIL_COND_V_MSG(!node, nullptr,
- vformat(R"(Node not found: "%s" (relative to "%s").)", p_path, get_path()));
+ if (unlikely(!node)) {
+ if (p_path.is_absolute()) {
+ ERR_FAIL_V_MSG(nullptr,
+ vformat(R"(Node not found: "%s" (absolute path attempted from "%s").)", p_path, get_path()));
+ } else {
+ ERR_FAIL_V_MSG(nullptr,
+ vformat(R"(Node not found: "%s" (relative to "%s").)", p_path, get_path()));
+ }
}
return node;
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 4ad250ff54..2cdafefba7 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -2348,7 +2348,7 @@ void Viewport::push_text_input(const String &p_text) {
}
Viewport::SubWindowResize Viewport::_sub_window_get_resize_margin(Window *p_subwindow, const Point2 &p_point) {
- if (p_subwindow->get_flag(Window::FLAG_BORDERLESS)) {
+ if (p_subwindow->get_flag(Window::FLAG_BORDERLESS) || p_subwindow->get_flag(Window::FLAG_RESIZE_DISABLED)) {
return SUB_WINDOW_RESIZE_DISABLED;
}
diff --git a/scene/main/window.cpp b/scene/main/window.cpp
index 43de4187d4..532b457843 100644
--- a/scene/main/window.cpp
+++ b/scene/main/window.cpp
@@ -281,6 +281,11 @@ void Window::_clear_window() {
DisplayServer::get_singleton()->delete_sub_window(window_id);
window_id = DisplayServer::INVALID_WINDOW_ID;
+ // If closing window was focused and has a parent, return focus.
+ if (focused && transient_parent) {
+ transient_parent->grab_focus();
+ }
+
_update_viewport_size();
RS::get_singleton()->viewport_set_update_mode(get_viewport_rid(), RS::VIEWPORT_UPDATE_DISABLED);
}
@@ -1574,6 +1579,7 @@ void Window::_bind_methods() {
ADD_SIGNAL(MethodInfo("go_back_requested"));
ADD_SIGNAL(MethodInfo("visibility_changed"));
ADD_SIGNAL(MethodInfo("about_to_popup"));
+ ADD_SIGNAL(MethodInfo("theme_changed"));
BIND_CONSTANT(NOTIFICATION_VISIBILITY_CHANGED);
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index e6b73b7780..69b06c1803 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -91,6 +91,7 @@
#include "scene/gui/control.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/file_dialog.h"
+#include "scene/gui/flow_container.h"
#include "scene/gui/graph_edit.h"
#include "scene/gui/graph_node.h"
#include "scene/gui/grid_container.h"
@@ -353,6 +354,9 @@ void register_scene_types() {
GDREGISTER_CLASS(CenterContainer);
GDREGISTER_CLASS(ScrollContainer);
GDREGISTER_CLASS(PanelContainer);
+ GDREGISTER_VIRTUAL_CLASS(FlowContainer);
+ GDREGISTER_CLASS(HFlowContainer);
+ GDREGISTER_CLASS(VFlowContainer);
OS::get_singleton()->yield(); // may take time to init
@@ -390,6 +394,7 @@ void register_scene_types() {
GDREGISTER_VIRTUAL_CLASS(SplitContainer);
GDREGISTER_CLASS(HSplitContainer);
GDREGISTER_CLASS(VSplitContainer);
+
GDREGISTER_CLASS(GraphNode);
GDREGISTER_CLASS(GraphEdit);
@@ -1046,8 +1051,9 @@ void register_scene_types() {
}
void initialize_theme() {
- bool default_theme_hidpi = GLOBAL_DEF("gui/theme/use_hidpi", false);
- ProjectSettings::get_singleton()->set_custom_property_info("gui/theme/use_hidpi", PropertyInfo(Variant::BOOL, "gui/theme/use_hidpi", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED));
+ // Allow creating the default theme at a different scale to suit higher/lower base resolutions.
+ float default_theme_scale = GLOBAL_DEF("gui/theme/default_theme_scale", 1.0);
+ ProjectSettings::get_singleton()->set_custom_property_info("gui/theme/default_theme_scale", PropertyInfo(Variant::FLOAT, "gui/theme/default_theme_scale", PROPERTY_HINT_RANGE, "0.5,8,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED));
String theme_path = GLOBAL_DEF_RST("gui/theme/custom", "");
ProjectSettings::get_singleton()->set_custom_property_info("gui/theme/custom", PropertyInfo(Variant::STRING, "gui/theme/custom", PROPERTY_HINT_FILE, "*.tres,*.res,*.theme", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED));
String font_path = GLOBAL_DEF_RST("gui/theme/custom_font", "");
@@ -1063,7 +1069,7 @@ void initialize_theme() {
// Always make the default theme to avoid invalid default font/icon/style in the given theme.
if (RenderingServer::get_singleton()) {
- make_default_theme(default_theme_hidpi, font);
+ make_default_theme(default_theme_scale, font);
}
if (!theme_path.is_empty()) {
diff --git a/scene/resources/default_theme/SCsub b/scene/resources/default_theme/SCsub
index 3667ab7c14..f27bd9144e 100644
--- a/scene/resources/default_theme/SCsub
+++ b/scene/resources/default_theme/SCsub
@@ -4,6 +4,7 @@ Import("env")
from platform_methods import run_in_subprocess
import default_theme_builders
+import default_theme_icons_builders
env.add_source_files(env.scene_sources, "*.cpp")
@@ -13,3 +14,19 @@ env.CommandNoCache(
"#thirdparty/fonts/OpenSans_SemiBold.ttf",
run_in_subprocess(default_theme_builders.make_fonts_header),
)
+
+env["BUILDERS"]["MakeDefaultThemeIconsBuilder"] = Builder(
+ action=env.Run(
+ default_theme_icons_builders.make_default_theme_icons_action, "Generating default project theme icons header."
+ ),
+ suffix=".h",
+ src_suffix=".svg",
+)
+
+# Default theme icons
+icon_sources = Glob("*.svg")
+
+env.Alias(
+ "default_theme_icons",
+ [env.MakeDefaultThemeIconsBuilder("#scene/resources/default_theme/default_theme_icons.gen.h", icon_sources)],
+)
diff --git a/scene/resources/default_theme/add.svg b/scene/resources/default_theme/add.svg
new file mode 100644
index 0000000000..6884a07aa0
--- /dev/null
+++ b/scene/resources/default_theme/add.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m7 1v6h-6v2h6v6h2v-6h6v-2h-6v-6z" fill="#b2b2b2" fill-rule="nonzero"/></svg>
diff --git a/scene/resources/default_theme/arrow_down.png b/scene/resources/default_theme/arrow_down.png
deleted file mode 100644
index bfb87a4761..0000000000
--- a/scene/resources/default_theme/arrow_down.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/arrow_down.svg b/scene/resources/default_theme/arrow_down.svg
new file mode 100644
index 0000000000..16cc00fa8f
--- /dev/null
+++ b/scene/resources/default_theme/arrow_down.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m5 7 3 3 3-3" fill="none" stroke="#b2b2b2" stroke-opacity=".45" stroke-width="2"/></svg>
diff --git a/scene/resources/default_theme/arrow_left.png b/scene/resources/default_theme/arrow_left.png
deleted file mode 100644
index 4163059dd3..0000000000
--- a/scene/resources/default_theme/arrow_left.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/arrow_left.svg b/scene/resources/default_theme/arrow_left.svg
new file mode 100644
index 0000000000..7dbf01e186
--- /dev/null
+++ b/scene/resources/default_theme/arrow_left.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m9 11-3-3 3-3" fill="none" stroke="#b2b2b2" stroke-opacity=".45" stroke-width="2"/></svg>
diff --git a/scene/resources/default_theme/arrow_right.png b/scene/resources/default_theme/arrow_right.png
deleted file mode 100644
index 1e4c8e5529..0000000000
--- a/scene/resources/default_theme/arrow_right.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/arrow_right.svg b/scene/resources/default_theme/arrow_right.svg
new file mode 100644
index 0000000000..b031f12ec0
--- /dev/null
+++ b/scene/resources/default_theme/arrow_right.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m6 11 3-3-3-3" fill="none" stroke="#b2b2b2" stroke-opacity=".45" stroke-width="2"/></svg>
diff --git a/scene/resources/default_theme/bar_arrow.png b/scene/resources/default_theme/bar_arrow.png
deleted file mode 100644
index 7cf146b8da..0000000000
--- a/scene/resources/default_theme/bar_arrow.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/bookmark.png b/scene/resources/default_theme/bookmark.png
deleted file mode 100644
index 9718cf53b6..0000000000
--- a/scene/resources/default_theme/bookmark.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/bookmark.svg b/scene/resources/default_theme/bookmark.svg
new file mode 100644
index 0000000000..0b50c2b034
--- /dev/null
+++ b/scene/resources/default_theme/bookmark.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#fefffe" fill-opacity=".85"><path d="m14.505 1.476h-12.995v13.049l6.491-5.185 6.504 5.185z"/><path d="m15.018 1.476c0-.25-.23-.452-.514-.452h-12.994c-.284 0-.513.202-.513.452v13.049c0 .178.119.34.306.413.185.071.402.041.552-.079l6.146-4.909 6.158 4.909c.151.12.367.15.553.079.187-.073.306-.235.306-.413zm-.514 0h-12.994v13.049l6.491-5.185 6.503 5.185z"/></g></svg>
diff --git a/scene/resources/default_theme/breakpoint.svg b/scene/resources/default_theme/breakpoint.svg
new file mode 100644
index 0000000000..9b18b276d8
--- /dev/null
+++ b/scene/resources/default_theme/breakpoint.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m15 8c0 3.84-3.16 7-7 7s-7-3.16-7-7 3.16-7 7-7 7 3.16 7 7" fill="#ff5d5d" fill-opacity=".5" fill-rule="nonzero"/></svg>
diff --git a/scene/resources/default_theme/button_disabled.png b/scene/resources/default_theme/button_disabled.png
deleted file mode 100644
index 708748dfe9..0000000000
--- a/scene/resources/default_theme/button_disabled.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/button_focus.png b/scene/resources/default_theme/button_focus.png
deleted file mode 100644
index 70e16b953b..0000000000
--- a/scene/resources/default_theme/button_focus.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/button_hover.png b/scene/resources/default_theme/button_hover.png
deleted file mode 100644
index ff2258281e..0000000000
--- a/scene/resources/default_theme/button_hover.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/button_normal.png b/scene/resources/default_theme/button_normal.png
deleted file mode 100644
index c189b61b89..0000000000
--- a/scene/resources/default_theme/button_normal.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/button_pressed.png b/scene/resources/default_theme/button_pressed.png
deleted file mode 100644
index 19a7e237aa..0000000000
--- a/scene/resources/default_theme/button_pressed.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/checked.png b/scene/resources/default_theme/checked.png
deleted file mode 100644
index bde031b6a2..0000000000
--- a/scene/resources/default_theme/checked.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/checked.svg b/scene/resources/default_theme/checked.svg
new file mode 100644
index 0000000000..6c3bc8f210
--- /dev/null
+++ b/scene/resources/default_theme/checked.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 15.999999" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3.3333333 1c-1.2887 0-2.3333333 1.0446683-2.3333333 2.3333333v9.3333337c0 1.2887 1.0446683 2.333333 2.3333333 2.333333h9.3333337c1.2887 0 2.333333-1.044668 2.333333-2.333333v-9.3333337c0-1.2887-1.044668-2.3333333-2.333333-2.3333333z" fill="#fff" fill-opacity=".75" stroke-width="1.16667"/><path d="m11.500773 3.7343508-5.6117507 5.6117502-1.7045017-1.6814543-1.4992276 1.4992276 3.2037293 3.1806817 7.1109777-7.1109775z" fill="#1a1a1a" stroke-width="1.06023"/></svg>
diff --git a/scene/resources/default_theme/checked_disabled.png b/scene/resources/default_theme/checked_disabled.png
deleted file mode 100644
index 70549e2edc..0000000000
--- a/scene/resources/default_theme/checked_disabled.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/checked_disabled.svg b/scene/resources/default_theme/checked_disabled.svg
new file mode 100644
index 0000000000..109c4dc129
--- /dev/null
+++ b/scene/resources/default_theme/checked_disabled.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 15.999999" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3.3333333 1c-1.2887 0-2.3333333 1.0446683-2.3333333 2.3333333v9.3333337c0 1.2887 1.0446683 2.333333 2.3333333 2.333333h9.3333337c1.2887 0 2.333333-1.044668 2.333333-2.333333v-9.3333337c0-1.2887-1.044668-2.3333333-2.333333-2.3333333z" fill="#fff" fill-opacity=".37" stroke-width="1.16667"/><path d="m11.500773 3.7343508-5.6117507 5.6117502-1.7045017-1.6814543-1.4992276 1.4992276 3.2037293 3.1806817 7.1109777-7.1109775z" fill="#1a1a1a" fill-opacity=".5" stroke-width="1.06023"/></svg>
diff --git a/scene/resources/default_theme/checker_bg.png b/scene/resources/default_theme/checker_bg.png
deleted file mode 100644
index 3eff2f0e08..0000000000
--- a/scene/resources/default_theme/checker_bg.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/close.png b/scene/resources/default_theme/close.png
deleted file mode 100644
index 4d4ac4a551..0000000000
--- a/scene/resources/default_theme/close.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/close.svg b/scene/resources/default_theme/close.svg
new file mode 100644
index 0000000000..c26cca06c3
--- /dev/null
+++ b/scene/resources/default_theme/close.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 15.999999" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 3 2-2 5 5 5-5 2 2-5 5 5 5-2 2-5.3020979-5-4.6979021 5-2-2 5-5z" fill="#fff" fill-opacity=".75"/></svg>
diff --git a/scene/resources/default_theme/close_hl.png b/scene/resources/default_theme/close_hl.png
deleted file mode 100644
index 4d4ac4a551..0000000000
--- a/scene/resources/default_theme/close_hl.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/close_hl.svg b/scene/resources/default_theme/close_hl.svg
new file mode 100644
index 0000000000..ec44ba6d24
--- /dev/null
+++ b/scene/resources/default_theme/close_hl.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 15.999999" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 3 2-2 5 5 5-5 2 2-5 5 5 5-2 2-5.3020979-5-4.6979021 5-2-2 5-5z" fill="#fff"/></svg>
diff --git a/scene/resources/default_theme/color_picker_bar_arrow.svg b/scene/resources/default_theme/color_picker_bar_arrow.svg
new file mode 100644
index 0000000000..5043da0761
--- /dev/null
+++ b/scene/resources/default_theme/color_picker_bar_arrow.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 20" xmlns="http://www.w3.org/2000/svg"><path d="m3.564 15.218h8.872l-4.436-4.436z" fill="#b2b2b2" fill-rule="nonzero" stroke="#b2b2b2"/></svg>
diff --git a/scene/resources/default_theme/color_picker_cursor.svg b/scene/resources/default_theme/color_picker_cursor.svg
new file mode 100644
index 0000000000..88ee3f55ce
--- /dev/null
+++ b/scene/resources/default_theme/color_picker_cursor.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 2a6 6 0 0 0 -6 6 6 6 0 0 0 6 6 6 6 0 0 0 6-6 6 6 0 0 0 -6-6zm0 1a5 5 0 0 1 5 5 5 5 0 0 1 -5 5 5 5 0 0 1 -5-5 5 5 0 0 1 5-5z" fill="#fff"/><path d="m8 3a5 5 0 0 0 -5 5 5 5 0 0 0 5 5 5 5 0 0 0 5-5 5 5 0 0 0 -5-5zm-.0605469 1a4 4 0 0 1 .0605469 0 4 4 0 0 1 4 4 4 4 0 0 1 -4 4 4 4 0 0 1 -4-4 4 4 0 0 1 3.9394531-4z"/></svg>
diff --git a/scene/resources/default_theme/color_picker_hue.png b/scene/resources/default_theme/color_picker_hue.png
deleted file mode 100644
index 7b46f03cb4..0000000000
--- a/scene/resources/default_theme/color_picker_hue.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/color_picker_hue.svg b/scene/resources/default_theme/color_picker_hue.svg
new file mode 100644
index 0000000000..ff75d5eb9e
--- /dev/null
+++ b/scene/resources/default_theme/color_picker_hue.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 1 256" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientTransform="matrix(0 256 -256 0 0 0)" gradientUnits="userSpaceOnUse" x1="0" x2="1" y1="0" y2="0"><stop offset="0" stop-color="#f00"/><stop offset=".04" stop-color="#ff4000"/><stop offset=".08" stop-color="#ff8000"/><stop offset=".17" stop-color="#ff0"/><stop offset=".25" stop-color="#80ff00"/><stop offset=".33" stop-color="#0f0"/><stop offset=".42" stop-color="#00ff80"/><stop offset=".5" stop-color="#0ff"/><stop offset=".58" stop-color="#0080ff"/><stop offset=".63" stop-color="#0040ff"/><stop offset=".67" stop-color="#00f"/><stop offset=".75" stop-color="#8000ff"/><stop offset=".83" stop-color="#f0f"/><stop offset=".92" stop-color="#ff0080"/><stop offset="1" stop-color="#f00"/></linearGradient><path d="m0 0h1v256h-1z" fill="url(#a)"/></svg>
diff --git a/scene/resources/default_theme/color_picker_overbright.svg b/scene/resources/default_theme/color_picker_overbright.svg
new file mode 100644
index 0000000000..f618980d51
--- /dev/null
+++ b/scene/resources/default_theme/color_picker_overbright.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m.5.5v10l10-10z" fill="#fff" stroke="#000"/><path d="m0 12 12-12h-1.714286l-10.285714 10.285714z" fill="#000003" stroke-width="2"/></svg>
diff --git a/scene/resources/default_theme/color_picker_pipette.svg b/scene/resources/default_theme/color_picker_pipette.svg
new file mode 100644
index 0000000000..5213a6e1bc
--- /dev/null
+++ b/scene/resources/default_theme/color_picker_pipette.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-1.108 0-2 .892-2 2v2h-1v2h1v5c.001.712.383 1.372 1 1.729v1.271h2v-1.27c.618-.356.999-1.017 1-1.73v-5h1v-2h-1v-2c0-1.108-.892-2-2-2zm-1 6h2v5c0 .549-.451 1-1 1s-1-.451-1-1z" fill="#b2b2b2" fill-rule="nonzero"/></svg>
diff --git a/scene/resources/default_theme/color_picker_sample.png b/scene/resources/default_theme/color_picker_sample.png
deleted file mode 100644
index e6ec28d307..0000000000
--- a/scene/resources/default_theme/color_picker_sample.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/color_picker_sample.svg b/scene/resources/default_theme/color_picker_sample.svg
new file mode 100644
index 0000000000..140ac20a99
--- /dev/null
+++ b/scene/resources/default_theme/color_picker_sample.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 256 20" xmlns="http://www.w3.org/2000/svg"><g fill-rule="nonzero"><path d="m0 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m5 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m80 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m85 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m159.978 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m164.978 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m39.991 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m44.991 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m119.99 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m124.99 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m199.968 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m204.968 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m9.98 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m14.98 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m89.98 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m94.98 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m169.957 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m174.957 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m49.97 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m54.97 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m129.97 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m134.97 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m209.948 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m214.948 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m19.995 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m24.995 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m99.995 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m104.995 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m179.973 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m184.973 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m59.986 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m64.986 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m139.986 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m144.986 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m219.964 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m224.964 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m30.011 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m35.011 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m110.011 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m115.011 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m189.989 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m194.989 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m70.001 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m75.001 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m150.001 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m155.001 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m229.979 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m234.979 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m240.017 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m245.017 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m249.996 0v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m254.996 0v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m249.996 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m254.996 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m240.017 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m245.017 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m0 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m5 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m80 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m85 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m159.978 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m164.978 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m39.991 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m44.991 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m119.99 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m124.99 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m199.968 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m204.968 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m9.98 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m14.98 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m89.98 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m94.98 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m169.957 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m174.957 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m49.97 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m54.97 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m129.97 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m134.97 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m209.948 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m214.948 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m19.995 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m24.995 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m99.995 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m104.995 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m179.973 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m184.973 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m59.986 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m64.986 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m139.986 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m144.986 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m219.964 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m224.964 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m30.011 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m35.011 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m110.011 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m115.011 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m189.989 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m194.989 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m70.001 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m75.001 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m150.001 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m155.001 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/><path d="m229.979 10v5h5v-5zm5 5v5h5v-5z" fill="#e0e0e0"/><path d="m234.979 10v5h5v-5zm0 5h-5v5h5z" fill="#fff"/></g></svg>
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index 61cd834867..12ea1683c8 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -32,49 +32,22 @@
#include "core/os/os.h"
#include "default_font.gen.h"
+#include "default_theme_icons.gen.h"
#include "scene/resources/font.h"
#include "scene/resources/theme.h"
#include "servers/text_server.h"
-#include "theme_data.h"
-typedef Map<const void *, Ref<ImageTexture>> TexCacheMap;
+#include "modules/modules_enabled.gen.h" // For svg.
+#ifdef MODULE_SVG_ENABLED
+#include "modules/svg/image_loader_svg.h"
+#endif
-static TexCacheMap *tex_cache;
static float scale = 1.0;
-template <class T>
-static Ref<StyleBoxTexture> make_stylebox(T p_src, float p_left, float p_top, float p_right, float p_bottom, float p_margin_left = -1, float p_margin_top = -1, float p_margin_right = -1, float p_margin_bottom = -1, bool p_draw_center = true) {
- Ref<ImageTexture> texture;
+static const int default_margin = 4;
+static const int default_corner_radius = 3;
- if (tex_cache->has(p_src)) {
- texture = (*tex_cache)[p_src];
- } else {
- texture = Ref<ImageTexture>(memnew(ImageTexture));
- Ref<Image> img = memnew(Image(p_src));
- const Size2 orig_size = img->get_size();
- img->convert(Image::FORMAT_RGBA8);
- img->resize(orig_size.x * scale, orig_size.y * scale);
-
- texture->create_from_image(img);
- (*tex_cache)[p_src] = texture;
- }
-
- Ref<StyleBoxTexture> style(memnew(StyleBoxTexture));
- style->set_texture(texture);
- style->set_margin_size(SIDE_LEFT, p_left * scale);
- style->set_margin_size(SIDE_RIGHT, p_right * scale);
- style->set_margin_size(SIDE_BOTTOM, p_bottom * scale);
- style->set_margin_size(SIDE_TOP, p_top * scale);
- style->set_default_margin(SIDE_LEFT, p_margin_left * scale);
- style->set_default_margin(SIDE_RIGHT, p_margin_right * scale);
- style->set_default_margin(SIDE_BOTTOM, p_margin_bottom * scale);
- style->set_default_margin(SIDE_TOP, p_margin_top * scale);
- style->set_draw_center(p_draw_center);
-
- return style;
-}
-
-static Ref<StyleBoxFlat> make_flat_stylebox(Color p_color, float p_margin_left = -1, float p_margin_top = -1, float p_margin_right = -1, float p_margin_bottom = -1) {
+static Ref<StyleBoxFlat> make_flat_stylebox(Color p_color, float p_margin_left = default_margin, float p_margin_top = default_margin, float p_margin_right = default_margin, float p_margin_bottom = default_margin, int p_corner_radius = default_corner_radius, bool p_draw_center = true, int p_border_width = 0) {
Ref<StyleBoxFlat> style(memnew(StyleBoxFlat));
style->set_bg_color(p_color);
style->set_default_margin(SIDE_LEFT, p_margin_left * scale);
@@ -82,10 +55,18 @@ static Ref<StyleBoxFlat> make_flat_stylebox(Color p_color, float p_margin_left =
style->set_default_margin(SIDE_BOTTOM, p_margin_bottom * scale);
style->set_default_margin(SIDE_TOP, p_margin_top * scale);
+ style->set_corner_radius_all(p_corner_radius);
+ style->set_anti_aliased(true);
+ // Adjust level of detail based on the corners' effective sizes.
+ style->set_corner_detail(MIN(Math::ceil(1.5 * p_corner_radius), 6) * scale);
+
+ style->set_draw_center(p_draw_center);
+ style->set_border_width_all(p_border_width);
+
return style;
}
-static Ref<StyleBoxTexture> sb_expand(Ref<StyleBoxTexture> p_sbox, float p_left, float p_top, float p_right, float p_bottom) {
+static Ref<StyleBoxFlat> sb_expand(Ref<StyleBoxFlat> p_sbox, float p_left, float p_top, float p_right, float p_bottom) {
p_sbox->set_expand_margin_size(SIDE_LEFT, p_left * scale);
p_sbox->set_expand_margin_size(SIDE_TOP, p_top * scale);
p_sbox->set_expand_margin_size(SIDE_RIGHT, p_right * scale);
@@ -93,36 +74,22 @@ static Ref<StyleBoxTexture> sb_expand(Ref<StyleBoxTexture> p_sbox, float p_left,
return p_sbox;
}
-template <class T>
-static Ref<Texture2D> make_icon(T p_src) {
- Ref<ImageTexture> texture(memnew(ImageTexture));
- Ref<Image> img = memnew(Image(p_src));
- const Size2 orig_size = img->get_size();
- img->convert(Image::FORMAT_RGBA8);
- img->resize(orig_size.x * scale, orig_size.y * scale);
- texture->create_from_image(img);
-
- return texture;
-}
-
-static Ref<Texture2D> flip_icon(Ref<Texture2D> p_texture, bool p_flip_y = false, bool p_flip_x = false) {
- if (!p_flip_y && !p_flip_x) {
- return p_texture;
- }
-
- Ref<ImageTexture> texture(memnew(ImageTexture));
- Ref<Image> img = p_texture->get_image();
- img = img->duplicate();
-
- if (p_flip_y) {
- img->flip_y();
- }
- if (p_flip_x) {
- img->flip_x();
- }
-
- texture->create_from_image(img);
- return texture;
+// See also `editor_generate_icon()` in `editor/editor_themes.cpp`.
+static Ref<ImageTexture> generate_icon(int p_index) {
+ Ref<ImageTexture> icon = memnew(ImageTexture);
+ Ref<Image> img = memnew(Image);
+
+#ifdef MODULE_SVG_ENABLED
+ // Upsample icon generation only if the scale isn't an integer multiplier.
+ // Generating upsampled icons is slower, and the benefit is hardly visible
+ // with integer scales.
+ const bool upsample = !Math::is_equal_approx(Math::round(scale), scale);
+ ImageLoaderSVG img_loader;
+ img_loader.create_image_from_string(img, default_theme_icons_sources[p_index], scale, upsample, false);
+#endif
+ icon->create_from_image(img);
+
+ return icon;
}
static Ref<StyleBox> make_empty_stylebox(float p_margin_left = -1, float p_margin_top = -1, float p_margin_right = -1, float p_margin_bottom = -1) {
@@ -136,48 +103,59 @@ static Ref<StyleBox> make_empty_stylebox(float p_margin_left = -1, float p_margi
return style;
}
-void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const Ref<Font> &large_font, Ref<Texture2D> &default_icon, Ref<StyleBox> &default_style, float p_scale) {
+void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, Ref<Texture2D> &default_icon, Ref<StyleBox> &default_style, float p_scale) {
scale = p_scale;
- tex_cache = memnew(TexCacheMap);
-
- // Font Colors
-
- Color control_font_color = Color(0.88, 0.88, 0.88);
- Color control_font_lower_color = Color(0.63, 0.63, 0.63);
- Color control_font_low_color = Color(0.69, 0.69, 0.69);
- Color control_font_hover_color = Color(0.94, 0.94, 0.94);
- Color control_font_focus_color = Color(0.94, 0.94, 0.94);
- Color control_font_disabled_color = Color(0.9, 0.9, 0.9, 0.2);
- Color control_font_pressed_color = Color(1, 1, 1);
-
- Color control_selection_color = Color(0.49, 0.49, 0.49);
+ // Font colors
+ const Color control_font_color = Color(0.875, 0.875, 0.875);
+ const Color control_font_low_color = Color(0.7, 0.7, 0.7);
+ const Color control_font_lower_color = Color(0.65, 0.65, 0.65);
+ const Color control_font_hover_color = Color(0.95, 0.95, 0.95);
+ const Color control_font_focus_color = Color(0.95, 0.95, 0.95);
+ const Color control_font_disabled_color = control_font_color * Color(1, 1, 1, 0.5);
+ const Color control_font_pressed_color = Color(1, 1, 1);
+ const Color control_selection_color = Color(0.5, 0.5, 0.5);
+
+ // StyleBox colors
+ const Color style_normal_color = Color(0.1, 0.1, 0.1, 0.6);
+ const Color style_hover_color = Color(0.225, 0.225, 0.225, 0.6);
+ const Color style_pressed_color = Color(0, 0, 0, 0.6);
+ const Color style_disabled_color = Color(0.1, 0.1, 0.1, 0.3);
+ const Color style_focus_color = Color(1, 1, 1, 0.75);
+ const Color style_popup_color = Color(0.25, 0.25, 0.25, 1);
+ const Color style_popup_border_color = Color(0.175, 0.175, 0.175, 1);
+ const Color style_popup_hover_color = Color(0.4, 0.4, 0.4, 1);
+ const Color style_selected_color = Color(1, 1, 1, 0.3);
+ // Don't use a color too bright to keep the percentage readable.
+ const Color style_progress_color = Color(1, 1, 1, 0.4);
+ const Color style_separator_color = Color(0.5, 0.5, 0.5);
+
+ // Convert the generated icon sources to a dictionary for easier access.
+ // Unlike the editor icons, there is no central repository of icons in the Theme resource itself to keep it tidy.
+ Dictionary icons;
+ for (int i = 0; i < default_theme_icons_count; i++) {
+ icons[default_theme_icons_names[i]] = generate_icon(i);
+ }
// Panel
-
- theme->set_stylebox("panel", "Panel", make_stylebox(panel_bg_png, 0, 0, 0, 0));
- theme->set_stylebox("panel_fg", "Panel", make_stylebox(panel_bg_png, 0, 0, 0, 0));
-
- // Focus
-
- Ref<StyleBoxTexture> focus = make_stylebox(focus_png, 5, 5, 5, 5);
- for (int i = 0; i < 4; i++) {
- focus->set_expand_margin_size(Side(i), 1 * scale);
- }
+ theme->set_stylebox("panel", "Panel", make_flat_stylebox(style_normal_color, 0, 0, 0, 0));
+ theme->set_stylebox("panel_fg", "Panel", make_flat_stylebox(style_normal_color, 0, 0, 0, 0));
// Button
- Ref<StyleBox> sb_button_normal = sb_expand(make_stylebox(button_normal_png, 4, 4, 4, 4, 6, 3, 6, 3), 2, 2, 2, 2);
- Ref<StyleBox> sb_button_pressed = sb_expand(make_stylebox(button_pressed_png, 4, 4, 4, 4, 6, 3, 6, 3), 2, 2, 2, 2);
- Ref<StyleBox> sb_button_hover = sb_expand(make_stylebox(button_hover_png, 4, 4, 4, 4, 6, 2, 6, 2), 2, 2, 2, 2);
- Ref<StyleBox> sb_button_disabled = sb_expand(make_stylebox(button_disabled_png, 4, 4, 4, 4, 6, 2, 6, 2), 2, 2, 2, 2);
- Ref<StyleBox> sb_button_focus = sb_expand(make_stylebox(button_focus_png, 4, 4, 4, 4, 6, 2, 6, 2), 2, 2, 2, 2);
+ const Ref<StyleBoxFlat> button_normal = make_flat_stylebox(style_normal_color);
+ const Ref<StyleBoxFlat> button_hover = make_flat_stylebox(style_hover_color);
+ const Ref<StyleBoxFlat> button_pressed = make_flat_stylebox(style_pressed_color);
+ const Ref<StyleBoxFlat> button_disabled = make_flat_stylebox(style_disabled_color);
+ Ref<StyleBoxFlat> focus = make_flat_stylebox(style_focus_color, default_margin, default_margin, default_margin, default_margin, default_corner_radius, false, 2);
+ // Make the focus outline appear to be flush with the buttons it's focusing.
+ focus->set_expand_margin_size_all(2 * scale);
- theme->set_stylebox("normal", "Button", sb_button_normal);
- theme->set_stylebox("pressed", "Button", sb_button_pressed);
- theme->set_stylebox("hover", "Button", sb_button_hover);
- theme->set_stylebox("disabled", "Button", sb_button_disabled);
- theme->set_stylebox("focus", "Button", sb_button_focus);
+ theme->set_stylebox("normal", "Button", button_normal);
+ theme->set_stylebox("hover", "Button", button_hover);
+ theme->set_stylebox("pressed", "Button", button_pressed);
+ theme->set_stylebox("disabled", "Button", button_disabled);
+ theme->set_stylebox("focus", "Button", focus);
theme->set_font("font", "Button", Ref<Font>());
theme->set_font_size("font_size", "Button", -1);
@@ -217,31 +195,29 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("underline_spacing", "LinkButton", 2 * scale);
// OptionButton
+ theme->set_stylebox("focus", "OptionButton", focus);
- Ref<StyleBox> sb_optbutton_focus = sb_expand(make_stylebox(button_focus_png, 4, 4, 4, 4, 6, 2, 6, 2), 2, 2, 2, 2);
- theme->set_stylebox("focus", "OptionButton", sb_optbutton_focus);
-
- Ref<StyleBox> sb_optbutton_normal = sb_expand(make_stylebox(option_button_normal_png, 4, 4, 21, 4, 6, 3, 9, 3), 2, 2, 2, 2);
- Ref<StyleBox> sb_optbutton_pressed = sb_expand(make_stylebox(option_button_pressed_png, 4, 4, 21, 4, 6, 3, 9, 3), 2, 2, 2, 2);
- Ref<StyleBox> sb_optbutton_hover = sb_expand(make_stylebox(option_button_hover_png, 4, 4, 21, 4, 6, 2, 9, 2), 2, 2, 2, 2);
- Ref<StyleBox> sb_optbutton_disabled = sb_expand(make_stylebox(option_button_disabled_png, 4, 4, 21, 4, 6, 2, 9, 2), 2, 2, 2, 2);
+ Ref<StyleBox> sb_optbutton_normal = make_flat_stylebox(style_normal_color, 2 * default_margin, default_margin, 21, default_margin);
+ Ref<StyleBox> sb_optbutton_hover = make_flat_stylebox(style_hover_color, 2 * default_margin, default_margin, 21, default_margin);
+ Ref<StyleBox> sb_optbutton_pressed = make_flat_stylebox(style_pressed_color, 2 * default_margin, default_margin, 21, default_margin);
+ Ref<StyleBox> sb_optbutton_disabled = make_flat_stylebox(style_disabled_color, 2 * default_margin, default_margin, 21, default_margin);
theme->set_stylebox("normal", "OptionButton", sb_optbutton_normal);
- theme->set_stylebox("pressed", "OptionButton", sb_optbutton_pressed);
theme->set_stylebox("hover", "OptionButton", sb_optbutton_hover);
+ theme->set_stylebox("pressed", "OptionButton", sb_optbutton_pressed);
theme->set_stylebox("disabled", "OptionButton", sb_optbutton_disabled);
- Ref<StyleBox> sb_optbutton_normal_mirrored = sb_expand(make_stylebox(option_button_normal_mirrored_png, 21, 4, 4, 4, 9, 3, 6, 3), 2, 2, 2, 2);
- Ref<StyleBox> sb_optbutton_pressed_mirrored = sb_expand(make_stylebox(option_button_pressed_mirrored_png, 21, 4, 4, 4, 9, 3, 6, 3), 2, 2, 2, 2);
- Ref<StyleBox> sb_optbutton_hover_mirrored = sb_expand(make_stylebox(option_button_hover_mirrored_png, 21, 4, 4, 4, 9, 2, 6, 2), 2, 2, 2, 2);
- Ref<StyleBox> sb_optbutton_disabled_mirrored = sb_expand(make_stylebox(option_button_disabled_mirrored_png, 21, 4, 4, 4, 9, 2, 6, 2), 2, 2, 2, 2);
+ Ref<StyleBox> sb_optbutton_normal_mirrored = make_flat_stylebox(style_normal_color, 21, default_margin, 2 * default_margin, default_margin);
+ Ref<StyleBox> sb_optbutton_hover_mirrored = make_flat_stylebox(style_hover_color, 21, default_margin, 2 * default_margin, default_margin);
+ Ref<StyleBox> sb_optbutton_pressed_mirrored = make_flat_stylebox(style_pressed_color, 21, default_margin, 2 * default_margin, default_margin);
+ Ref<StyleBox> sb_optbutton_disabled_mirrored = make_flat_stylebox(style_disabled_color, 21, default_margin, 2 * default_margin, default_margin);
theme->set_stylebox("normal_mirrored", "OptionButton", sb_optbutton_normal_mirrored);
- theme->set_stylebox("pressed_mirrored", "OptionButton", sb_optbutton_pressed_mirrored);
theme->set_stylebox("hover_mirrored", "OptionButton", sb_optbutton_hover_mirrored);
+ theme->set_stylebox("pressed_mirrored", "OptionButton", sb_optbutton_pressed_mirrored);
theme->set_stylebox("disabled_mirrored", "OptionButton", sb_optbutton_disabled_mirrored);
- theme->set_icon("arrow", "OptionButton", make_icon(option_arrow_png));
+ theme->set_icon("arrow", "OptionButton", icons["option_button_arrow"]);
theme->set_font("font", "OptionButton", Ref<Font>());
theme->set_font_size("font_size", "OptionButton", -1);
@@ -254,16 +230,16 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_outline_color", "OptionButton", Color(1, 1, 1));
theme->set_constant("hseparation", "OptionButton", 2 * scale);
- theme->set_constant("arrow_margin", "OptionButton", 2 * scale);
+ theme->set_constant("arrow_margin", "OptionButton", 4 * scale);
theme->set_constant("outline_size", "OptionButton", 0);
// MenuButton
- theme->set_stylebox("normal", "MenuButton", sb_button_normal);
- theme->set_stylebox("pressed", "MenuButton", sb_button_pressed);
- theme->set_stylebox("hover", "MenuButton", sb_button_hover);
- theme->set_stylebox("disabled", "MenuButton", sb_button_disabled);
- theme->set_stylebox("focus", "MenuButton", sb_button_focus);
+ theme->set_stylebox("normal", "MenuButton", button_normal);
+ theme->set_stylebox("pressed", "MenuButton", button_pressed);
+ theme->set_stylebox("hover", "MenuButton", button_hover);
+ theme->set_stylebox("disabled", "MenuButton", button_disabled);
+ theme->set_stylebox("focus", "MenuButton", focus);
theme->set_font("font", "MenuButton", Ref<Font>());
theme->set_font_size("font_size", "MenuButton", -1);
@@ -298,14 +274,14 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_stylebox("hover_pressed", "CheckBox", cbx_empty);
theme->set_stylebox("focus", "CheckBox", cbx_focus);
- theme->set_icon("checked", "CheckBox", make_icon(checked_png));
- theme->set_icon("checked_disabled", "CheckBox", make_icon(checked_disabled_png));
- theme->set_icon("unchecked", "CheckBox", make_icon(unchecked_png));
- theme->set_icon("unchecked_disabled", "CheckBox", make_icon(unchecked_disabled_png));
- theme->set_icon("radio_checked", "CheckBox", make_icon(radio_checked_png));
- theme->set_icon("radio_checked_disabled", "CheckBox", make_icon(radio_checked_disabled_png));
- theme->set_icon("radio_unchecked", "CheckBox", make_icon(radio_unchecked_png));
- theme->set_icon("radio_unchecked_disabled", "CheckBox", make_icon(radio_unchecked_disabled_png));
+ theme->set_icon("checked", "CheckBox", icons["checked"]);
+ theme->set_icon("checked_disabled", "CheckBox", icons["checked"]);
+ theme->set_icon("unchecked", "CheckBox", icons["unchecked"]);
+ theme->set_icon("unchecked_disabled", "CheckBox", icons["unchecked"]);
+ theme->set_icon("radio_checked", "CheckBox", icons["radio_checked"]);
+ theme->set_icon("radio_checked_disabled", "CheckBox", icons["radio_checked"]);
+ theme->set_icon("radio_unchecked", "CheckBox", icons["radio_unchecked"]);
+ theme->set_icon("radio_unchecked_disabled", "CheckBox", icons["radio_unchecked"]);
theme->set_font("font", "CheckBox", Ref<Font>());
theme->set_font_size("font_size", "CheckBox", -1);
@@ -337,15 +313,15 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_stylebox("hover_pressed", "CheckButton", cb_empty);
theme->set_stylebox("focus", "CheckButton", focus);
- theme->set_icon("on", "CheckButton", make_icon(toggle_on_png));
- theme->set_icon("on_disabled", "CheckButton", make_icon(toggle_on_disabled_png));
- theme->set_icon("off", "CheckButton", make_icon(toggle_off_png));
- theme->set_icon("off_disabled", "CheckButton", make_icon(toggle_off_disabled_png));
+ theme->set_icon("on", "CheckButton", icons["toggle_on"]);
+ theme->set_icon("on_disabled", "CheckButton", icons["toggle_on_disabled"]);
+ theme->set_icon("off", "CheckButton", icons["toggle_off"]);
+ theme->set_icon("off_disabled", "CheckButton", icons["toggle_off_disabled"]);
- theme->set_icon("on_mirrored", "CheckButton", make_icon(toggle_on_mirrored_png));
- theme->set_icon("on_disabled_mirrored", "CheckButton", make_icon(toggle_on_disabled_mirrored_png));
- theme->set_icon("off_mirrored", "CheckButton", make_icon(toggle_off_mirrored_png));
- theme->set_icon("off_disabled_mirrored", "CheckButton", make_icon(toggle_off_disabled_mirrored_png));
+ theme->set_icon("on_mirrored", "CheckButton", icons["toggle_on_mirrored"]);
+ theme->set_icon("on_disabled_mirrored", "CheckButton", icons["toggle_on_disabled_mirrored"]);
+ theme->set_icon("off_mirrored", "CheckButton", icons["toggle_off_mirrored"]);
+ theme->set_icon("off_disabled_mirrored", "CheckButton", icons["toggle_off_disabled_mirrored"]);
theme->set_font("font", "CheckButton", Ref<Font>());
theme->set_font_size("font_size", "CheckButton", -1);
@@ -389,16 +365,26 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
// LineEdit
- theme->set_stylebox("normal", "LineEdit", make_stylebox(line_edit_png, 5, 5, 5, 5));
+ Ref<StyleBoxFlat> style_line_edit = make_flat_stylebox(style_normal_color);
+ // Add a line at the bottom to make LineEdits distinguishable from Buttons.
+ style_line_edit->set_border_width(SIDE_BOTTOM, 2);
+ style_line_edit->set_border_color(style_pressed_color);
+ theme->set_stylebox("normal", "LineEdit", style_line_edit);
+
theme->set_stylebox("focus", "LineEdit", focus);
- theme->set_stylebox("read_only", "LineEdit", make_stylebox(line_edit_disabled_png, 6, 6, 6, 6));
+
+ Ref<StyleBoxFlat> style_line_edit_read_only = make_flat_stylebox(style_disabled_color);
+ // Add a line at the bottom to make LineEdits distinguishable from Buttons.
+ style_line_edit_read_only->set_border_width(SIDE_BOTTOM, 2);
+ style_line_edit_read_only->set_border_color(style_pressed_color * Color(1, 1, 1, 0.5));
+ theme->set_stylebox("read_only", "LineEdit", style_line_edit_read_only);
theme->set_font("font", "LineEdit", Ref<Font>());
theme->set_font_size("font_size", "LineEdit", -1);
theme->set_color("font_color", "LineEdit", control_font_color);
- theme->set_color("font_selected_color", "LineEdit", Color(0, 0, 0));
- theme->set_color("font_uneditable_color", "LineEdit", Color(control_font_color.r, control_font_color.g, control_font_color.b, 0.5f));
+ theme->set_color("font_selected_color", "LineEdit", control_font_pressed_color);
+ theme->set_color("font_uneditable_color", "LineEdit", control_font_disabled_color);
theme->set_color("font_outline_color", "LineEdit", Color(1, 1, 1));
theme->set_color("caret_color", "LineEdit", control_font_hover_color);
theme->set_color("selection_color", "LineEdit", control_selection_color);
@@ -409,12 +395,12 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("outline_size", "LineEdit", 0);
theme->set_constant("caret_width", "LineEdit", 1);
- theme->set_icon("clear", "LineEdit", make_icon(line_edit_clear_png));
+ theme->set_icon("clear", "LineEdit", icons["line_edit_clear"]);
// ProgressBar
- theme->set_stylebox("bg", "ProgressBar", make_stylebox(progress_bar_png, 4, 4, 4, 4, 0, 0, 0, 0));
- theme->set_stylebox("fg", "ProgressBar", make_stylebox(progress_fill_png, 6, 6, 6, 6, 2, 1, 2, 1));
+ theme->set_stylebox("bg", "ProgressBar", make_flat_stylebox(style_disabled_color, 2, 2, 2, 2, 6));
+ theme->set_stylebox("fg", "ProgressBar", make_flat_stylebox(style_progress_color, 2, 2, 2, 2, 6));
theme->set_font("font", "ProgressBar", Ref<Font>());
theme->set_font_size("font_size", "ProgressBar", -1);
@@ -427,26 +413,26 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
// TextEdit
- theme->set_stylebox("normal", "TextEdit", make_stylebox(tree_bg_png, 3, 3, 3, 3, 0, 0, 0, 0));
+ theme->set_stylebox("normal", "TextEdit", style_line_edit);
theme->set_stylebox("focus", "TextEdit", focus);
- theme->set_stylebox("read_only", "TextEdit", make_stylebox(tree_bg_disabled_png, 4, 4, 4, 4, 0, 0, 0, 0));
+ theme->set_stylebox("read_only", "TextEdit", style_line_edit_read_only);
- theme->set_icon("tab", "TextEdit", make_icon(tab_png));
- theme->set_icon("space", "TextEdit", make_icon(space_png));
+ theme->set_icon("tab", "TextEdit", icons["text_edit_tab"]);
+ theme->set_icon("space", "TextEdit", icons["text_edit_space"]);
theme->set_font("font", "TextEdit", Ref<Font>());
theme->set_font_size("font_size", "TextEdit", -1);
theme->set_color("background_color", "TextEdit", Color(0, 0, 0, 0));
theme->set_color("font_color", "TextEdit", control_font_color);
- theme->set_color("font_selected_color", "TextEdit", Color(0, 0, 0));
- theme->set_color("font_readonly_color", "TextEdit", Color(control_font_color.r, control_font_color.g, control_font_color.b, 0.5f));
+ theme->set_color("font_selected_color", "TextEdit", control_font_pressed_color);
+ theme->set_color("font_readonly_color", "TextEdit", control_font_disabled_color);
theme->set_color("font_outline_color", "TextEdit", Color(1, 1, 1));
theme->set_color("selection_color", "TextEdit", control_selection_color);
theme->set_color("current_line_color", "TextEdit", Color(0.25, 0.25, 0.26, 0.8));
theme->set_color("caret_color", "TextEdit", control_font_color);
theme->set_color("caret_background_color", "TextEdit", Color(0, 0, 0));
- theme->set_color("word_highlighted_color", "TextEdit", Color(0.8, 0.9, 0.9, 0.15));
+ theme->set_color("word_highlighted_color", "TextEdit", Color(0.5, 0.5, 0.5, 0.25));
theme->set_color("search_result_color", "TextEdit", Color(0.3, 0.3, 0.3));
theme->set_color("search_result_border_color", "TextEdit", Color(0.3, 0.3, 0.3, 0.4));
@@ -456,19 +442,19 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
// CodeEdit
- theme->set_stylebox("normal", "CodeEdit", make_stylebox(tree_bg_png, 3, 3, 3, 3, 0, 0, 0, 0));
+ theme->set_stylebox("normal", "CodeEdit", style_line_edit);
theme->set_stylebox("focus", "CodeEdit", focus);
- theme->set_stylebox("read_only", "CodeEdit", make_stylebox(tree_bg_disabled_png, 4, 4, 4, 4, 0, 0, 0, 0));
- theme->set_stylebox("completion", "CodeEdit", make_stylebox(tree_bg_png, 3, 3, 3, 3, 0, 0, 0, 0));
-
- theme->set_icon("tab", "CodeEdit", make_icon(tab_png));
- theme->set_icon("space", "CodeEdit", make_icon(space_png));
- theme->set_icon("breakpoint", "CodeEdit", make_icon(graph_port_png));
- theme->set_icon("bookmark", "CodeEdit", make_icon(bookmark_png));
- theme->set_icon("executing_line", "CodeEdit", make_icon(arrow_right_png));
- theme->set_icon("can_fold", "CodeEdit", make_icon(arrow_down_png));
- theme->set_icon("folded", "CodeEdit", make_icon(arrow_right_png));
- theme->set_icon("folded_eol_icon", "CodeEdit", make_icon(ellipsis_png));
+ theme->set_stylebox("read_only", "CodeEdit", style_line_edit_read_only);
+ theme->set_stylebox("completion", "CodeEdit", make_flat_stylebox(style_normal_color, 0, 0, 0, 0));
+
+ theme->set_icon("tab", "CodeEdit", icons["text_edit_tab"]);
+ theme->set_icon("space", "CodeEdit", icons["text_edit_space"]);
+ theme->set_icon("breakpoint", "CodeEdit", icons["breakpoint"]);
+ theme->set_icon("bookmark", "CodeEdit", icons["bookmark"]);
+ theme->set_icon("executing_line", "CodeEdit", icons["arrow_right"]);
+ theme->set_icon("can_fold", "CodeEdit", icons["arrow_down"]);
+ theme->set_icon("folded", "CodeEdit", icons["arrow_right"]);
+ theme->set_icon("folded_eol_icon", "CodeEdit", icons["text_edit_ellipsis"]);
theme->set_font("font", "CodeEdit", Ref<Font>());
theme->set_font_size("font_size", "CodeEdit", -1);
@@ -506,13 +492,18 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
Ref<Texture2D> empty_icon = memnew(ImageTexture);
+ const Ref<StyleBoxFlat> style_scrollbar = make_flat_stylebox(style_normal_color, 4, 4, 4, 4, 10);
+ Ref<StyleBoxFlat> style_scrollbar_grabber = make_flat_stylebox(style_progress_color, 4, 4, 4, 4, 10);
+ Ref<StyleBoxFlat> style_scrollbar_grabber_highlight = make_flat_stylebox(style_focus_color, 4, 4, 4, 4, 10);
+ Ref<StyleBoxFlat> style_scrollbar_grabber_pressed = make_flat_stylebox(style_focus_color * Color(0.75, 0.75, 0.75), 4, 4, 4, 4, 10);
+
// HScrollBar
- theme->set_stylebox("scroll", "HScrollBar", make_stylebox(scroll_bg_png, 5, 5, 5, 5, 0, 0, 0, 0));
- theme->set_stylebox("scroll_focus", "HScrollBar", make_stylebox(scroll_bg_png, 5, 5, 5, 5, 0, 0, 0, 0));
- theme->set_stylebox("grabber", "HScrollBar", make_stylebox(scroll_grabber_png, 5, 5, 5, 5, 2, 2, 2, 2));
- theme->set_stylebox("grabber_highlight", "HScrollBar", make_stylebox(scroll_grabber_hl_png, 5, 5, 5, 5, 2, 2, 2, 2));
- theme->set_stylebox("grabber_pressed", "HScrollBar", make_stylebox(scroll_grabber_pressed_png, 5, 5, 5, 5, 2, 2, 2, 2));
+ theme->set_stylebox("scroll", "HScrollBar", style_scrollbar);
+ theme->set_stylebox("scroll_focus", "HScrollBar", focus);
+ theme->set_stylebox("grabber", "HScrollBar", style_scrollbar_grabber);
+ theme->set_stylebox("grabber_highlight", "HScrollBar", style_scrollbar_grabber_highlight);
+ theme->set_stylebox("grabber_pressed", "HScrollBar", style_scrollbar_grabber_pressed);
theme->set_icon("increment", "HScrollBar", empty_icon);
theme->set_icon("increment_highlight", "HScrollBar", empty_icon);
@@ -523,11 +514,11 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
// VScrollBar
- theme->set_stylebox("scroll", "VScrollBar", make_stylebox(scroll_bg_png, 5, 5, 5, 5, 0, 0, 0, 0));
- theme->set_stylebox("scroll_focus", "VScrollBar", make_stylebox(scroll_bg_png, 5, 5, 5, 5, 0, 0, 0, 0));
- theme->set_stylebox("grabber", "VScrollBar", make_stylebox(scroll_grabber_png, 5, 5, 5, 5, 2, 2, 2, 2));
- theme->set_stylebox("grabber_highlight", "VScrollBar", make_stylebox(scroll_grabber_hl_png, 5, 5, 5, 5, 2, 2, 2, 2));
- theme->set_stylebox("grabber_pressed", "VScrollBar", make_stylebox(scroll_grabber_pressed_png, 5, 5, 5, 5, 2, 2, 2, 2));
+ theme->set_stylebox("scroll", "VScrollBar", style_scrollbar);
+ theme->set_stylebox("scroll_focus", "VScrollBar", focus);
+ theme->set_stylebox("grabber", "VScrollBar", style_scrollbar_grabber);
+ theme->set_stylebox("grabber_highlight", "VScrollBar", style_scrollbar_grabber_highlight);
+ theme->set_stylebox("grabber_pressed", "VScrollBar", style_scrollbar_grabber_pressed);
theme->set_icon("increment", "VScrollBar", empty_icon);
theme->set_icon("increment_highlight", "VScrollBar", empty_icon);
@@ -536,31 +527,35 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_icon("decrement_highlight", "VScrollBar", empty_icon);
theme->set_icon("decrement_pressed", "VScrollBar", empty_icon);
+ const Ref<StyleBoxFlat> style_slider = make_flat_stylebox(style_normal_color, 4, 4, 4, 4, 4);
+ const Ref<StyleBoxFlat> style_slider_grabber = make_flat_stylebox(style_progress_color, 4, 4, 4, 4, 4);
+ const Ref<StyleBoxFlat> style_slider_grabber_highlight = make_flat_stylebox(style_focus_color, 4, 4, 4, 4, 4);
+
// HSlider
- theme->set_stylebox("slider", "HSlider", make_stylebox(hslider_bg_png, 4, 4, 4, 4));
- theme->set_stylebox("grabber_area", "HSlider", make_stylebox(hslider_bg_png, 4, 4, 4, 4));
- theme->set_stylebox("grabber_area_highlight", "HSlider", make_stylebox(hslider_bg_png, 4, 4, 4, 4));
+ theme->set_stylebox("slider", "HSlider", style_slider);
+ theme->set_stylebox("grabber_area", "HSlider", style_slider_grabber);
+ theme->set_stylebox("grabber_area_highlight", "HSlider", style_slider_grabber_highlight);
- theme->set_icon("grabber", "HSlider", make_icon(hslider_grabber_png));
- theme->set_icon("grabber_highlight", "HSlider", make_icon(hslider_grabber_hl_png));
- theme->set_icon("grabber_disabled", "HSlider", make_icon(hslider_grabber_disabled_png));
- theme->set_icon("tick", "HSlider", make_icon(hslider_tick_png));
+ theme->set_icon("grabber", "HSlider", icons["slider_grabber"]);
+ theme->set_icon("grabber_highlight", "HSlider", icons["slider_grabber_hl"]);
+ theme->set_icon("grabber_disabled", "HSlider", icons["slider_grabber_disabled"]);
+ theme->set_icon("tick", "HSlider", icons["hslider_tick"]);
// VSlider
- theme->set_stylebox("slider", "VSlider", make_stylebox(vslider_bg_png, 4, 4, 4, 4));
- theme->set_stylebox("grabber_area", "VSlider", make_stylebox(vslider_bg_png, 4, 4, 4, 4));
- theme->set_stylebox("grabber_area_highlight", "VSlider", make_stylebox(vslider_bg_png, 4, 4, 4, 4));
+ theme->set_stylebox("slider", "VSlider", style_slider);
+ theme->set_stylebox("grabber_area", "VSlider", style_slider_grabber);
+ theme->set_stylebox("grabber_area_highlight", "VSlider", style_slider_grabber_highlight);
- theme->set_icon("grabber", "VSlider", make_icon(vslider_grabber_png));
- theme->set_icon("grabber_highlight", "VSlider", make_icon(vslider_grabber_hl_png));
- theme->set_icon("grabber_disabled", "VSlider", make_icon(vslider_grabber_disabled_png));
- theme->set_icon("tick", "VSlider", make_icon(vslider_tick_png));
+ theme->set_icon("grabber", "VSlider", icons["slider_grabber"]);
+ theme->set_icon("grabber_highlight", "VSlider", icons["slider_grabber_hl"]);
+ theme->set_icon("grabber_disabled", "VSlider", icons["slider_grabber_disabled"]);
+ theme->set_icon("tick", "VSlider", icons["vslider_tick"]);
// SpinBox
- theme->set_icon("updown", "SpinBox", make_icon(spinbox_updown_png));
+ theme->set_icon("updown", "SpinBox", icons["updown"]);
// ScrollContainer
@@ -570,67 +565,88 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
// Window
- theme->set_stylebox("embedded_border", "Window", sb_expand(make_stylebox(popup_window_png, 10, 26, 10, 8), 8, 24, 8, 6));
+ theme->set_stylebox("embedded_border", "Window", sb_expand(make_flat_stylebox(style_popup_color, 10, 28, 10, 8), 8, 32, 8, 6));
theme->set_constant("scaleborder_size", "Window", 4 * scale);
- theme->set_font("title_font", "Window", large_font);
+ theme->set_font("title_font", "Window", Ref<Font>());
theme->set_font_size("title_font_size", "Window", -1);
-
- theme->set_color("title_color", "Window", Color(0, 0, 0));
+ theme->set_color("title_color", "Window", control_font_color);
theme->set_color("title_outline_modulate", "Window", Color(1, 1, 1));
-
theme->set_constant("title_outline_size", "Window", 0);
- theme->set_constant("title_height", "Window", 20 * scale);
+ theme->set_constant("title_height", "Window", 36 * scale);
theme->set_constant("resize_margin", "Window", 4 * scale);
- theme->set_icon("close", "Window", make_icon(close_png));
- theme->set_icon("close_pressed", "Window", make_icon(close_hl_png));
+ theme->set_icon("close", "Window", icons["close"]);
+ theme->set_icon("close_pressed", "Window", icons["close_hl"]);
theme->set_constant("close_h_ofs", "Window", 18 * scale);
- theme->set_constant("close_v_ofs", "Window", 18 * scale);
+ theme->set_constant("close_v_ofs", "Window", 24 * scale);
+
+ // Dialogs
+
+ theme->set_constant("margin", "Dialogs", 8 * scale);
+ theme->set_constant("button_margin", "Dialogs", 32 * scale);
// AcceptDialog
- theme->set_stylebox("panel", "AcceptDialog", make_stylebox(dialog_bg_png, 0, 0, 0, 0));
+ theme->set_stylebox("panel", "AcceptDialog", make_flat_stylebox(style_popup_color, 0, 0, 0, 0));
// File Dialog
- theme->set_icon("parent_folder", "FileDialog", make_icon(icon_parent_folder_png));
- theme->set_icon("back_folder", "FileDialog", make_icon(arrow_left_png));
- theme->set_icon("forward_folder", "FileDialog", make_icon(arrow_right_png));
- theme->set_icon("reload", "FileDialog", make_icon(icon_reload_png));
- theme->set_icon("toggle_hidden", "FileDialog", make_icon(icon_visibility_png));
+ theme->set_icon("parent_folder", "FileDialog", icons["folder_up"]);
+ theme->set_icon("back_folder", "FileDialog", icons["arrow_left"]);
+ theme->set_icon("forward_folder", "FileDialog", icons["arrow_right"]);
+ theme->set_icon("reload", "FileDialog", icons["reload"]);
+ theme->set_icon("toggle_hidden", "FileDialog", icons["visibility_visible"]);
+ theme->set_icon("folder", "FileDialog", icons["folder"]);
+ theme->set_icon("file", "FileDialog", icons["file"]);
+ theme->set_color("folder_icon_modulate", "FileDialog", Color(1, 1, 1));
+ theme->set_color("file_icon_modulate", "FileDialog", Color(1, 1, 1));
+ theme->set_color("files_disabled", "FileDialog", Color(0, 0, 0, 0.7));
// Popup
- Ref<StyleBoxTexture> style_pp = sb_expand(make_stylebox(popup_bg_png, 5, 5, 5, 5, 4, 4, 4, 4), 2, 2, 2, 2);
-
- Ref<StyleBoxTexture> selected = make_stylebox(selection_png, 6, 6, 6, 6);
- for (int i = 0; i < 4; i++) {
- selected->set_expand_margin_size(Side(i), 2 * scale);
- }
-
- theme->set_stylebox("panel", "PopupPanel", style_pp);
+ theme->set_stylebox("panel", "PopupPanel", make_flat_stylebox(style_normal_color));
// PopupDialog
- Ref<StyleBoxTexture> style_pd = make_stylebox(popup_bg_png, 4, 4, 4, 4, 10, 10, 10, 10);
- theme->set_stylebox("panel", "PopupDialog", style_pd);
+ theme->set_stylebox("panel", "PopupDialog", make_flat_stylebox(style_normal_color));
// PopupMenu
- theme->set_stylebox("panel", "PopupMenu", style_pd);
- theme->set_stylebox("panel_disabled", "PopupMenu", make_stylebox(popup_bg_disabled_png, 4, 4, 4, 4));
- theme->set_stylebox("hover", "PopupMenu", selected);
- theme->set_stylebox("separator", "PopupMenu", make_stylebox(vseparator_png, 3, 3, 3, 3));
- theme->set_stylebox("labeled_separator_left", "PopupMenu", make_stylebox(vseparator_png, 0, 0, 0, 0));
- theme->set_stylebox("labeled_separator_right", "PopupMenu", make_stylebox(vseparator_png, 0, 0, 0, 0));
-
- theme->set_icon("checked", "PopupMenu", make_icon(checked_png));
- theme->set_icon("unchecked", "PopupMenu", make_icon(unchecked_png));
- theme->set_icon("radio_checked", "PopupMenu", make_icon(radio_checked_png));
- theme->set_icon("radio_unchecked", "PopupMenu", make_icon(radio_unchecked_png));
- theme->set_icon("submenu", "PopupMenu", make_icon(submenu_png));
- theme->set_icon("submenu_mirrored", "PopupMenu", make_icon(submenu_mirrored_png));
+ Ref<StyleBoxLine> separator_horizontal = memnew(StyleBoxLine);
+ separator_horizontal->set_thickness(Math::round(scale));
+ separator_horizontal->set_color(style_separator_color);
+ separator_horizontal->set_default_margin(SIDE_LEFT, default_margin);
+ separator_horizontal->set_default_margin(SIDE_TOP, 0);
+ separator_horizontal->set_default_margin(SIDE_RIGHT, default_margin);
+ separator_horizontal->set_default_margin(SIDE_BOTTOM, 0);
+ Ref<StyleBoxLine> separator_vertical = separator_horizontal->duplicate();
+ separator_vertical->set_vertical(true);
+ separator_vertical->set_default_margin(SIDE_LEFT, 0);
+ separator_vertical->set_default_margin(SIDE_TOP, default_margin);
+ separator_vertical->set_default_margin(SIDE_RIGHT, 0);
+ separator_vertical->set_default_margin(SIDE_BOTTOM, default_margin);
+
+ // Always display a border for PopupMenus so they can be distinguished from their background.
+ Ref<StyleBoxFlat> style_popup_panel = make_flat_stylebox(style_popup_color);
+ style_popup_panel->set_border_width_all(2);
+ style_popup_panel->set_border_color(style_popup_border_color);
+ Ref<StyleBoxFlat> style_popup_panel_disabled = style_popup_panel->duplicate();
+ style_popup_panel_disabled->set_bg_color(style_disabled_color);
+
+ theme->set_stylebox("panel", "PopupMenu", style_popup_panel);
+ theme->set_stylebox("panel_disabled", "PopupMenu", style_popup_panel_disabled);
+ theme->set_stylebox("hover", "PopupMenu", make_flat_stylebox(style_popup_hover_color));
+ theme->set_stylebox("separator", "PopupMenu", separator_horizontal);
+ theme->set_stylebox("labeled_separator_left", "PopupMenu", separator_horizontal);
+ theme->set_stylebox("labeled_separator_right", "PopupMenu", separator_horizontal);
+
+ theme->set_icon("checked", "PopupMenu", icons["checked"]);
+ theme->set_icon("unchecked", "PopupMenu", icons["unchecked"]);
+ theme->set_icon("radio_checked", "PopupMenu", icons["radio_checked"]);
+ theme->set_icon("radio_unchecked", "PopupMenu", icons["radio_unchecked"]);
+ theme->set_icon("submenu", "PopupMenu", icons["arrow_right"]);
+ theme->set_icon("submenu_mirrored", "PopupMenu", icons["arrow_left"]);
theme->set_font("font", "PopupMenu", Ref<Font>());
theme->set_font_size("font_size", "PopupMenu", -1);
@@ -649,65 +665,63 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("item_end_padding", "PopupMenu", 2 * scale);
// GraphNode
-
- Ref<StyleBoxTexture> graphsb = make_stylebox(graph_node_png, 6, 24, 6, 5, 16, 24, 16, 6);
- Ref<StyleBoxTexture> graphsbcomment = make_stylebox(graph_node_comment_png, 6, 24, 6, 5, 16, 24, 16, 6);
- Ref<StyleBoxTexture> graphsbcommentselected = make_stylebox(graph_node_comment_focus_png, 6, 24, 6, 5, 16, 24, 16, 6);
- Ref<StyleBoxTexture> graphsbselected = make_stylebox(graph_node_selected_png, 6, 24, 6, 5, 16, 24, 16, 6);
- Ref<StyleBoxTexture> graphsbdefault = make_stylebox(graph_node_default_png, 4, 4, 4, 4, 6, 4, 4, 4);
- Ref<StyleBoxTexture> graphsbdeffocus = make_stylebox(graph_node_default_focus_png, 4, 4, 4, 4, 6, 4, 4, 4);
- Ref<StyleBoxTexture> graph_bpoint = make_stylebox(graph_node_breakpoint_png, 6, 24, 6, 5, 16, 24, 16, 6);
- Ref<StyleBoxTexture> graph_position = make_stylebox(graph_node_position_png, 6, 24, 6, 5, 16, 24, 16, 6);
-
- //graphsb->set_expand_margin_size(SIDE_LEFT,10);
- //graphsb->set_expand_margin_size(SIDE_RIGHT,10);
- theme->set_stylebox("frame", "GraphNode", graphsb);
- theme->set_stylebox("selectedframe", "GraphNode", graphsbselected);
- theme->set_stylebox("defaultframe", "GraphNode", graphsbdefault);
- theme->set_stylebox("defaultfocus", "GraphNode", graphsbdeffocus);
- theme->set_stylebox("comment", "GraphNode", graphsbcomment);
- theme->set_stylebox("commentfocus", "GraphNode", graphsbcommentselected);
- theme->set_stylebox("breakpoint", "GraphNode", graph_bpoint);
- theme->set_stylebox("position", "GraphNode", graph_position);
- theme->set_constant("separation", "GraphNode", 1 * scale);
- theme->set_icon("port", "GraphNode", make_icon(graph_port_png));
- theme->set_icon("close", "GraphNode", make_icon(graph_node_close_png));
- theme->set_icon("resizer", "GraphNode", make_icon(window_resizer_png));
+ Ref<StyleBoxFlat> graphnode_normal = make_flat_stylebox(style_normal_color, 18, 42, 18, 12);
+ graphnode_normal->set_border_width(SIDE_TOP, 30);
+ graphnode_normal->set_border_color(Color(0.325, 0.325, 0.325, 0.6));
+ Ref<StyleBoxFlat> graphnode_selected = graphnode_normal->duplicate();
+ graphnode_selected->set_border_color(Color(0.625, 0.625, 0.625, 0.6));
+ Ref<StyleBoxFlat> graphnode_comment_normal = make_flat_stylebox(style_pressed_color, 18, 42, 18, 12, 3, true, 2);
+ graphnode_comment_normal->set_border_color(style_pressed_color);
+ Ref<StyleBoxFlat> graphnode_comment_selected = graphnode_comment_normal->duplicate();
+ graphnode_comment_selected->set_border_color(style_hover_color);
+ Ref<StyleBoxFlat> graphnode_breakpoint = make_flat_stylebox(style_pressed_color, 18, 42, 18, 12, 6, true, 4);
+ graphnode_breakpoint->set_border_color(Color(0.9, 0.29, 0.3));
+ Ref<StyleBoxFlat> graphnode_position = make_flat_stylebox(style_pressed_color, 18, 42, 18, 12, 6, true, 4);
+ graphnode_position->set_border_color(Color(0.98, 0.89, 0.27));
+
+ theme->set_stylebox("frame", "GraphNode", graphnode_normal);
+ theme->set_stylebox("selectedframe", "GraphNode", graphnode_selected);
+ theme->set_stylebox("comment", "GraphNode", graphnode_comment_normal);
+ theme->set_stylebox("commentfocus", "GraphNode", graphnode_comment_selected);
+ theme->set_stylebox("breakpoint", "GraphNode", graphnode_breakpoint);
+ theme->set_stylebox("position", "GraphNode", graphnode_position);
+
+ theme->set_icon("port", "GraphNode", icons["graph_port"]);
+ theme->set_icon("close", "GraphNode", icons["close"]);
+ theme->set_icon("resizer", "GraphNode", icons["resizer_se"]);
theme->set_font("title_font", "GraphNode", Ref<Font>());
- theme->set_color("title_color", "GraphNode", Color(0, 0, 0, 1));
- theme->set_color("close_color", "GraphNode", Color(0, 0, 0, 1));
- theme->set_color("resizer_color", "GraphNode", Color(0, 0, 0, 1));
- theme->set_constant("title_offset", "GraphNode", 20 * scale);
- theme->set_constant("close_offset", "GraphNode", 18 * scale);
- theme->set_constant("port_offset", "GraphNode", 3 * scale);
+ theme->set_color("title_color", "GraphNode", control_font_color);
+ theme->set_color("close_color", "GraphNode", control_font_color);
+ theme->set_color("resizer_color", "GraphNode", control_font_color);
+ theme->set_constant("separation", "GraphNode", 2 * scale);
+ theme->set_constant("title_offset", "GraphNode", 26 * scale);
+ theme->set_constant("close_offset", "GraphNode", 22 * scale);
+ theme->set_constant("port_offset", "GraphNode", 0);
// Tree
- Ref<StyleBoxTexture> tree_selected = make_stylebox(selection_png, 4, 4, 4, 4, 8, 0, 8, 0);
- Ref<StyleBoxTexture> tree_selected_oof = make_stylebox(selection_oof_png, 4, 4, 4, 4, 8, 0, 8, 0);
-
- theme->set_stylebox("bg", "Tree", make_stylebox(tree_bg_png, 4, 4, 4, 5));
+ theme->set_stylebox("bg", "Tree", make_flat_stylebox(style_normal_color, 4, 4, 4, 5));
theme->set_stylebox("bg_focus", "Tree", focus);
- theme->set_stylebox("selected", "Tree", tree_selected_oof);
- theme->set_stylebox("selected_focus", "Tree", tree_selected);
+ theme->set_stylebox("selected", "Tree", make_flat_stylebox(style_selected_color));
+ theme->set_stylebox("selected_focus", "Tree", make_flat_stylebox(style_selected_color));
theme->set_stylebox("cursor", "Tree", focus);
theme->set_stylebox("cursor_unfocused", "Tree", focus);
- theme->set_stylebox("button_pressed", "Tree", make_stylebox(button_pressed_png, 4, 4, 4, 4));
- theme->set_stylebox("title_button_normal", "Tree", make_stylebox(tree_title_png, 4, 4, 4, 4));
- theme->set_stylebox("title_button_pressed", "Tree", make_stylebox(tree_title_pressed_png, 4, 4, 4, 4));
- theme->set_stylebox("title_button_hover", "Tree", make_stylebox(tree_title_png, 4, 4, 4, 4));
- theme->set_stylebox("custom_button", "Tree", sb_button_normal);
- theme->set_stylebox("custom_button_pressed", "Tree", sb_button_pressed);
- theme->set_stylebox("custom_button_hover", "Tree", sb_button_hover);
-
- theme->set_icon("checked", "Tree", make_icon(checked_png));
- theme->set_icon("unchecked", "Tree", make_icon(unchecked_png));
- theme->set_icon("indeterminate", "Tree", make_icon(indeterminate_png));
- theme->set_icon("updown", "Tree", make_icon(updown_png));
- theme->set_icon("select_arrow", "Tree", make_icon(dropdown_png));
- theme->set_icon("arrow", "Tree", make_icon(arrow_down_png));
- theme->set_icon("arrow_collapsed", "Tree", make_icon(arrow_right_png));
- theme->set_icon("arrow_collapsed_mirrored", "Tree", make_icon(arrow_left_png));
+ theme->set_stylebox("button_pressed", "Tree", button_pressed);
+ theme->set_stylebox("title_button_normal", "Tree", make_flat_stylebox(style_pressed_color, 4, 4, 4, 4));
+ theme->set_stylebox("title_button_pressed", "Tree", make_flat_stylebox(style_hover_color, 4, 4, 4, 4));
+ theme->set_stylebox("title_button_hover", "Tree", make_flat_stylebox(style_normal_color, 4, 4, 4, 4));
+ theme->set_stylebox("custom_button", "Tree", button_normal);
+ theme->set_stylebox("custom_button_pressed", "Tree", button_pressed);
+ theme->set_stylebox("custom_button_hover", "Tree", button_hover);
+
+ theme->set_icon("checked", "Tree", icons["checked"]);
+ theme->set_icon("unchecked", "Tree", icons["unchecked"]);
+ theme->set_icon("indeterminate", "Tree", icons["indeterminate"]);
+ theme->set_icon("updown", "Tree", icons["updown"]);
+ theme->set_icon("select_arrow", "Tree", icons["option_button_arrow"]);
+ theme->set_icon("arrow", "Tree", icons["arrow_down"]);
+ theme->set_icon("arrow_collapsed", "Tree", icons["arrow_right"]);
+ theme->set_icon("arrow_collapsed_mirrored", "Tree", icons["arrow_left"]);
theme->set_font("title_button_font", "Tree", Ref<Font>());
theme->set_font("font", "Tree", Ref<Font>());
@@ -717,7 +731,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_color", "Tree", control_font_low_color);
theme->set_color("font_selected_color", "Tree", control_font_pressed_color);
theme->set_color("font_outline_color", "Tree", Color(1, 1, 1));
- theme->set_color("guide_color", "Tree", Color(0, 0, 0, 0.1));
+ theme->set_color("guide_color", "Tree", Color(0.7, 0.7, 0.7, 0.25));
theme->set_color("drop_position_color", "Tree", Color(1, 0.3, 0.2));
theme->set_color("relationship_line_color", "Tree", Color(0.27, 0.27, 0.27));
theme->set_color("parent_hl_line_color", "Tree", Color(0.27, 0.27, 0.27));
@@ -726,7 +740,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("hseparation", "Tree", 4 * scale);
theme->set_constant("vseparation", "Tree", 4 * scale);
- theme->set_constant("item_margin", "Tree", 12 * scale);
+ theme->set_constant("item_margin", "Tree", 16 * scale);
theme->set_constant("button_margin", "Tree", 4 * scale);
theme->set_constant("draw_relationship_lines", "Tree", 0);
theme->set_constant("relationship_line_width", "Tree", 1);
@@ -740,10 +754,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
// ItemList
- Ref<StyleBoxTexture> item_selected = make_stylebox(selection_png, 4, 4, 4, 4, 8, 2, 8, 2);
- Ref<StyleBoxTexture> item_selected_oof = make_stylebox(selection_oof_png, 4, 4, 4, 4, 8, 2, 8, 2);
-
- theme->set_stylebox("bg", "ItemList", make_stylebox(tree_bg_png, 4, 4, 4, 5));
+ theme->set_stylebox("bg", "ItemList", make_flat_stylebox(style_normal_color));
theme->set_stylebox("bg_focus", "ItemList", focus);
theme->set_constant("hseparation", "ItemList", 4);
theme->set_constant("vseparation", "ItemList", 2);
@@ -757,8 +768,8 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_selected_color", "ItemList", control_font_pressed_color);
theme->set_color("font_outline_color", "ItemList", Color(1, 1, 1));
theme->set_color("guide_color", "ItemList", Color(0, 0, 0, 0.1));
- theme->set_stylebox("selected", "ItemList", item_selected_oof);
- theme->set_stylebox("selected_focus", "ItemList", item_selected);
+ theme->set_stylebox("selected", "ItemList", make_flat_stylebox(style_selected_color));
+ theme->set_stylebox("selected_focus", "ItemList", make_flat_stylebox(style_selected_color));
theme->set_stylebox("cursor", "ItemList", focus);
theme->set_stylebox("cursor_unfocused", "ItemList", focus);
@@ -766,22 +777,28 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
// TabContainer
- Ref<StyleBoxTexture> tc_sb = sb_expand(make_stylebox(tab_container_bg_png, 4, 4, 4, 4, 4, 4, 4, 4), 3, 3, 3, 3);
-
- tc_sb->set_expand_margin_size(SIDE_TOP, 2 * scale);
- tc_sb->set_default_margin(SIDE_TOP, 8 * scale);
-
- theme->set_stylebox("tab_selected", "TabContainer", sb_expand(make_stylebox(tab_current_png, 4, 4, 4, 1, 16, 4, 16, 4), 2, 2, 2, 2));
- theme->set_stylebox("tab_unselected", "TabContainer", sb_expand(make_stylebox(tab_behind_png, 5, 5, 5, 1, 16, 6, 16, 4), 3, 0, 3, 0));
- theme->set_stylebox("tab_disabled", "TabContainer", sb_expand(make_stylebox(tab_disabled_png, 5, 5, 5, 1, 16, 6, 16, 4), 3, 0, 3, 0));
- theme->set_stylebox("panel", "TabContainer", tc_sb);
-
- theme->set_icon("increment", "TabContainer", make_icon(scroll_button_right_png));
- theme->set_icon("increment_highlight", "TabContainer", make_icon(scroll_button_right_hl_png));
- theme->set_icon("decrement", "TabContainer", make_icon(scroll_button_left_png));
- theme->set_icon("decrement_highlight", "TabContainer", make_icon(scroll_button_left_hl_png));
- theme->set_icon("menu", "TabContainer", make_icon(tab_menu_png));
- theme->set_icon("menu_highlight", "TabContainer", make_icon(tab_menu_hl_png));
+ Ref<StyleBoxFlat> style_tab_selected = make_flat_stylebox(style_normal_color, 10, 4, 10, 4, 0);
+ style_tab_selected->set_border_width(SIDE_TOP, Math::round(2 * scale));
+ style_tab_selected->set_border_color(style_focus_color);
+ Ref<StyleBoxFlat> style_tab_unselected = make_flat_stylebox(style_pressed_color, 10, 4, 10, 4, 0);
+ // Add some spacing between unselected tabs to make them easier to distinguish from each other.
+ style_tab_unselected->set_border_width(SIDE_LEFT, Math::round(scale));
+ style_tab_unselected->set_border_width(SIDE_RIGHT, Math::round(scale));
+ style_tab_unselected->set_border_color(style_popup_border_color);
+ Ref<StyleBoxFlat> style_tab_disabled = style_tab_unselected->duplicate();
+ style_tab_disabled->set_bg_color(style_disabled_color);
+
+ theme->set_stylebox("tab_selected", "TabContainer", style_tab_selected);
+ theme->set_stylebox("tab_unselected", "TabContainer", style_tab_unselected);
+ theme->set_stylebox("tab_disabled", "TabContainer", style_tab_disabled);
+ theme->set_stylebox("panel", "TabContainer", make_flat_stylebox(style_normal_color, 0, 0, 0, 0));
+
+ theme->set_icon("increment", "TabContainer", icons["scroll_button_right"]);
+ theme->set_icon("increment_highlight", "TabContainer", icons["scroll_button_right_hl"]);
+ theme->set_icon("decrement", "TabContainer", icons["scroll_button_left"]);
+ theme->set_icon("decrement_highlight", "TabContainer", icons["scroll_button_left_hl"]);
+ theme->set_icon("menu", "TabContainer", icons["tabs_menu"]);
+ theme->set_icon("menu_highlight", "TabContainer", icons["tabs_menu_hl"]);
theme->set_font("font", "TabContainer", Ref<Font>());
theme->set_font_size("font_size", "TabContainer", -1);
@@ -797,17 +814,17 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
// TabBar
- theme->set_stylebox("tab_selected", "TabBar", sb_expand(make_stylebox(tab_current_png, 4, 4, 4, 1, 16, 4, 16, 4), 2, 2, 2, 2));
- theme->set_stylebox("tab_unselected", "TabBar", sb_expand(make_stylebox(tab_behind_png, 5, 5, 5, 1, 16, 6, 16, 4), 3, 0, 3, 0));
- theme->set_stylebox("tab_disabled", "TabBar", sb_expand(make_stylebox(tab_disabled_png, 5, 5, 5, 1, 16, 6, 16, 4), 3, 0, 3, 0));
- theme->set_stylebox("close_bg_pressed", "TabBar", make_stylebox(button_pressed_png, 4, 4, 4, 4));
- theme->set_stylebox("close_bg_highlight", "TabBar", make_stylebox(button_normal_png, 4, 4, 4, 4));
+ theme->set_stylebox("tab_selected", "TabBar", style_tab_selected);
+ theme->set_stylebox("tab_unselected", "TabBar", style_tab_unselected);
+ theme->set_stylebox("tab_disabled", "TabBar", style_tab_disabled);
+ theme->set_stylebox("close_bg_pressed", "TabBar", button_pressed);
+ theme->set_stylebox("close_bg_highlight", "TabBar", button_normal);
- theme->set_icon("increment", "TabBar", make_icon(scroll_button_right_png));
- theme->set_icon("increment_highlight", "TabBar", make_icon(scroll_button_right_hl_png));
- theme->set_icon("decrement", "TabBar", make_icon(scroll_button_left_png));
- theme->set_icon("decrement_highlight", "TabBar", make_icon(scroll_button_left_hl_png));
- theme->set_icon("close", "TabBar", make_icon(tab_close_png));
+ theme->set_icon("increment", "TabBar", icons["scroll_button_right"]);
+ theme->set_icon("increment_highlight", "TabBar", icons["scroll_button_right_hl"]);
+ theme->set_icon("decrement", "TabBar", icons["scroll_button_left"]);
+ theme->set_icon("decrement_highlight", "TabBar", icons["scroll_button_left_hl"]);
+ theme->set_icon("close", "TabBar", icons["close"]);
theme->set_font("font", "TabBar", Ref<Font>());
theme->set_font_size("font_size", "TabBar", -1);
@@ -822,29 +839,16 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
// Separators
- theme->set_stylebox("separator", "HSeparator", make_stylebox(vseparator_png, 3, 3, 3, 3));
- theme->set_stylebox("separator", "VSeparator", make_stylebox(hseparator_png, 3, 3, 3, 3));
+ theme->set_stylebox("separator", "HSeparator", separator_horizontal);
+ theme->set_stylebox("separator", "VSeparator", separator_vertical);
- theme->set_icon("close", "Icons", make_icon(icon_close_png));
+ theme->set_icon("close", "Icons", icons["close"]);
theme->set_font("normal", "Fonts", Ref<Font>());
- theme->set_font("large", "Fonts", large_font);
+ theme->set_font("large", "Fonts", Ref<Font>());
theme->set_constant("separation", "HSeparator", 4 * scale);
theme->set_constant("separation", "VSeparator", 4 * scale);
- // Dialogs
-
- theme->set_constant("margin", "Dialogs", 8 * scale);
- theme->set_constant("button_margin", "Dialogs", 32 * scale);
-
- // FileDialog
-
- theme->set_icon("folder", "FileDialog", make_icon(icon_folder_png));
- theme->set_icon("file", "FileDialog", make_icon(icon_file_png));
- theme->set_color("folder_icon_modulate", "FileDialog", Color(1, 1, 1));
- theme->set_color("file_icon_modulate", "FileDialog", Color(1, 1, 1));
- theme->set_color("files_disabled", "FileDialog", Color(0, 0, 0, 0.7));
-
// ColorPicker
theme->set_constant("margin", "ColorPicker", 4 * scale);
@@ -853,23 +857,23 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("h_width", "ColorPicker", 30 * scale);
theme->set_constant("label_width", "ColorPicker", 10 * scale);
- theme->set_icon("screen_picker", "ColorPicker", make_icon(icon_color_pick_png));
- theme->set_icon("add_preset", "ColorPicker", make_icon(icon_add_png));
- theme->set_icon("color_hue", "ColorPicker", make_icon(color_picker_hue_png));
- theme->set_icon("color_sample", "ColorPicker", make_icon(color_picker_sample_png));
- theme->set_icon("sample_bg", "ColorPicker", make_icon(mini_checkerboard_png));
- theme->set_icon("overbright_indicator", "ColorPicker", make_icon(overbright_indicator_png));
- theme->set_icon("bar_arrow", "ColorPicker", make_icon(bar_arrow_png));
- theme->set_icon("picker_cursor", "ColorPicker", make_icon(picker_cursor_png));
+ theme->set_icon("screen_picker", "ColorPicker", icons["color_picker_pipette"]);
+ theme->set_icon("add_preset", "ColorPicker", icons["add"]);
+ theme->set_icon("color_hue", "ColorPicker", icons["color_picker_hue"]);
+ theme->set_icon("color_sample", "ColorPicker", icons["color_picker_sample"]);
+ theme->set_icon("sample_bg", "ColorPicker", icons["mini_checkerboard"]);
+ theme->set_icon("overbright_indicator", "ColorPicker", icons["color_picker_overbright"]);
+ theme->set_icon("bar_arrow", "ColorPicker", icons["color_picker_bar_arrow"]);
+ theme->set_icon("picker_cursor", "ColorPicker", icons["color_picker_cursor"]);
// ColorPickerButton
- theme->set_icon("bg", "ColorPickerButton", make_icon(mini_checkerboard_png));
- theme->set_stylebox("normal", "ColorPickerButton", sb_button_normal);
- theme->set_stylebox("pressed", "ColorPickerButton", sb_button_pressed);
- theme->set_stylebox("hover", "ColorPickerButton", sb_button_hover);
- theme->set_stylebox("disabled", "ColorPickerButton", sb_button_disabled);
- theme->set_stylebox("focus", "ColorPickerButton", sb_button_focus);
+ theme->set_icon("bg", "ColorPickerButton", icons["mini_checkerboard"]);
+ theme->set_stylebox("normal", "ColorPickerButton", button_normal);
+ theme->set_stylebox("pressed", "ColorPickerButton", button_pressed);
+ theme->set_stylebox("hover", "ColorPickerButton", button_hover);
+ theme->set_stylebox("disabled", "ColorPickerButton", button_disabled);
+ theme->set_stylebox("focus", "ColorPickerButton", focus);
theme->set_font("font", "ColorPickerButton", Ref<Font>());
theme->set_font_size("font_size", "ColorPickerButton", -1);
@@ -892,24 +896,20 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
preset_sb->set_anti_aliased(false);
theme->set_stylebox("preset_fg", "ColorPresetButton", preset_sb);
- theme->set_icon("preset_bg", "ColorPresetButton", make_icon(mini_checkerboard_png));
- theme->set_icon("overbright_indicator", "ColorPresetButton", make_icon(overbright_indicator_png));
-
- // TooltipPanel
+ theme->set_icon("preset_bg", "ColorPresetButton", icons["mini_checkerboard"]);
+ theme->set_icon("overbright_indicator", "ColorPresetButton", icons["color_picker_overbright"]);
- Ref<StyleBoxTexture> style_tt = make_stylebox(tooltip_bg_png, 4, 4, 4, 4);
- for (int i = 0; i < 4; i++) {
- style_tt->set_expand_margin_size((Side)i, 4 * scale);
- }
+ // TooltipPanel + TooltipLabel
- theme->set_stylebox("panel", "TooltipPanel", style_tt);
+ theme->set_stylebox("panel", "TooltipPanel",
+ make_flat_stylebox(Color(0, 0, 0, 0.5), 2 * default_margin, 0.5 * default_margin, 2 * default_margin, 0.5 * default_margin));
theme->set_font("font", "TooltipLabel", Ref<Font>());
theme->set_font_size("font_size", "TooltipLabel", -1);
- theme->set_color("font_color", "TooltipLabel", Color(0, 0, 0));
- theme->set_color("font_shadow_color", "TooltipLabel", Color(0, 0, 0, 0.1));
- theme->set_color("font_outline_color", "TooltipLabel", Color(1, 1, 1));
+ theme->set_color("font_color", "TooltipLabel", control_font_color);
+ theme->set_color("font_shadow_color", "TooltipLabel", Color(0, 0, 0, 0));
+ theme->set_color("font_outline_color", "TooltipLabel", Color(0, 0, 0, 0));
theme->set_constant("shadow_offset_x", "TooltipLabel", 1);
theme->set_constant("shadow_offset_y", "TooltipLabel", 1);
@@ -956,11 +956,8 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
// Containers
- theme->set_stylebox("bg", "VSplitContainer", make_stylebox(vsplit_bg_png, 1, 1, 1, 1));
- theme->set_stylebox("bg", "HSplitContainer", make_stylebox(hsplit_bg_png, 1, 1, 1, 1));
-
- theme->set_icon("grabber", "VSplitContainer", make_icon(vsplitter_png));
- theme->set_icon("grabber", "HSplitContainer", make_icon(hsplitter_png));
+ theme->set_icon("grabber", "VSplitContainer", icons["vsplitter"]);
+ theme->set_icon("grabber", "HSplitContainer", icons["hsplitter"]);
theme->set_constant("separation", "HBoxContainer", 4 * scale);
theme->set_constant("separation", "VBoxContainer", 4 * scale);
@@ -974,17 +971,20 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("separation", "VSplitContainer", 12 * scale);
theme->set_constant("autohide", "HSplitContainer", 1 * scale);
theme->set_constant("autohide", "VSplitContainer", 1 * scale);
-
- Ref<StyleBoxTexture> sb_pc = make_stylebox(tab_container_bg_png, 4, 4, 4, 4, 7, 7, 7, 7);
- theme->set_stylebox("panel", "PanelContainer", sb_pc);
-
- theme->set_icon("minus", "GraphEdit", make_icon(icon_zoom_less_png));
- theme->set_icon("reset", "GraphEdit", make_icon(icon_zoom_reset_png));
- theme->set_icon("more", "GraphEdit", make_icon(icon_zoom_more_png));
- theme->set_icon("snap", "GraphEdit", make_icon(icon_snap_grid_png));
- theme->set_icon("minimap", "GraphEdit", make_icon(icon_grid_minimap_png));
- theme->set_icon("layout", "GraphEdit", make_icon(icon_grid_layout_png));
- theme->set_stylebox("bg", "GraphEdit", make_stylebox(tree_bg_png, 4, 4, 4, 5));
+ theme->set_constant("hseparation", "HFlowContainer", 4 * scale);
+ theme->set_constant("vseparation", "HFlowContainer", 4 * scale);
+ theme->set_constant("hseparation", "VFlowContainer", 4 * scale);
+ theme->set_constant("vseparation", "VFlowContainer", 4 * scale);
+
+ theme->set_stylebox("panel", "PanelContainer", make_flat_stylebox(style_normal_color, 0, 0, 0, 0));
+
+ theme->set_icon("minus", "GraphEdit", icons["zoom_less"]);
+ theme->set_icon("reset", "GraphEdit", icons["zoom_reset"]);
+ theme->set_icon("more", "GraphEdit", icons["zoom_more"]);
+ theme->set_icon("snap", "GraphEdit", icons["grid_snap"]);
+ theme->set_icon("minimap", "GraphEdit", icons["grid_minimap"]);
+ theme->set_icon("layout", "GraphEdit", icons["grid_layout"]);
+ theme->set_stylebox("bg", "GraphEdit", make_flat_stylebox(style_normal_color, 4, 4, 4, 5));
theme->set_color("grid_minor", "GraphEdit", Color(1, 1, 1, 0.05));
theme->set_color("grid_major", "GraphEdit", Color(1, 1, 1, 0.2));
theme->set_color("selection_fill", "GraphEdit", Color(1, 1, 1, 0.3));
@@ -999,33 +999,30 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("port_grab_distance_vertical", "GraphEdit", 26 * scale);
theme->set_stylebox("bg", "GraphEditMinimap", make_flat_stylebox(Color(0.24, 0.24, 0.24), 0, 0, 0, 0));
- Ref<StyleBoxFlat> style_minimap_camera = make_flat_stylebox(Color(0.65, 0.65, 0.65, 0.2), 0, 0, 0, 0);
+ Ref<StyleBoxFlat> style_minimap_camera = make_flat_stylebox(Color(0.65, 0.65, 0.65, 0.2), 0, 0, 0, 0, 0);
style_minimap_camera->set_border_color(Color(0.65, 0.65, 0.65, 0.45));
style_minimap_camera->set_border_width_all(1);
theme->set_stylebox("camera", "GraphEditMinimap", style_minimap_camera);
- Ref<StyleBoxFlat> style_minimap_node = make_flat_stylebox(Color(1, 1, 1), 0, 0, 0, 0);
- style_minimap_node->set_corner_radius_all(2);
- theme->set_stylebox("node", "GraphEditMinimap", style_minimap_node);
+ theme->set_stylebox("node", "GraphEditMinimap", make_flat_stylebox(Color(1, 1, 1), 0, 0, 0, 0, 2));
- Ref<Texture2D> resizer_icon = make_icon(window_resizer_png);
- theme->set_icon("resizer", "GraphEditMinimap", flip_icon(resizer_icon, true, true));
+ theme->set_icon("resizer", "GraphEditMinimap", icons["resizer_nw"]);
theme->set_color("resizer_color", "GraphEditMinimap", Color(1, 1, 1, 0.85));
// Theme
- default_icon = make_icon(error_icon_png);
- default_style = make_stylebox(error_icon_png, 2, 2, 2, 2);
-
- memdelete(tex_cache);
+ default_icon = icons["error_icon"];
+ // Same color as the error icon.
+ default_style = make_flat_stylebox(Color(1, 0.365, 0.365), 4, 4, 4, 4, 0, false, 2);
}
-void make_default_theme(bool p_hidpi, Ref<Font> p_font) {
+void make_default_theme(float p_scale, Ref<Font> p_font) {
Ref<Theme> t;
t.instantiate();
Ref<StyleBox> default_style;
Ref<Texture2D> default_icon;
Ref<Font> default_font;
+ float default_scale = CLAMP(p_scale, 0.5, 8.0);
if (p_font.is_valid()) {
// Use the custom font defined in the Project Settings.
@@ -1045,21 +1042,14 @@ void make_default_theme(bool p_hidpi, Ref<Font> p_font) {
default_font = dynamic_font;
}
- Ref<Font> large_font = default_font;
-
- float default_scale = 1.0;
- if (p_hidpi) {
- default_scale = 2.0;
- }
-
- fill_default_theme(t, default_font, large_font, default_icon, default_style, default_scale);
+ fill_default_theme(t, default_font, default_icon, default_style, default_scale);
Theme::set_default(t);
Theme::set_fallback_base_scale(default_scale);
Theme::set_fallback_icon(default_icon);
Theme::set_fallback_style(default_style);
Theme::set_fallback_font(default_font);
- Theme::set_fallback_font_size(default_font_size);
+ Theme::set_fallback_font_size(default_font_size * default_scale);
}
void clear_default_theme() {
diff --git a/scene/resources/default_theme/default_theme.h b/scene/resources/default_theme/default_theme.h
index e6d7b31b3e..3016517824 100644
--- a/scene/resources/default_theme/default_theme.h
+++ b/scene/resources/default_theme/default_theme.h
@@ -35,8 +35,8 @@
const int default_font_size = 16;
-void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const Ref<Font> &large_font, Ref<Texture2D> &default_icon, Ref<StyleBox> &default_style, float p_scale);
-void make_default_theme(bool p_hidpi, Ref<Font> p_font);
+void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, Ref<Texture2D> &default_icon, Ref<StyleBox> &default_style, float p_scale);
+void make_default_theme(float p_scale, Ref<Font> p_font);
void clear_default_theme();
#endif
diff --git a/scene/resources/default_theme/default_theme_icons_builders.py b/scene/resources/default_theme/default_theme_icons_builders.py
new file mode 100644
index 0000000000..4dd5819a23
--- /dev/null
+++ b/scene/resources/default_theme/default_theme_icons_builders.py
@@ -0,0 +1,78 @@
+"""Functions used to generate source files during build time
+
+All such functions are invoked in a subprocess on Windows to prevent build flakiness.
+
+"""
+
+import os
+from io import StringIO
+from platform_methods import subprocess_main
+
+
+# See also `editor/icons/editor_icons_builders.py`.
+def make_default_theme_icons_action(target, source, env):
+
+ dst = target[0]
+ svg_icons = source
+
+ icons_string = StringIO()
+
+ for f in svg_icons:
+
+ fname = str(f)
+
+ icons_string.write('\t"')
+
+ with open(fname, "rb") as svgf:
+ b = svgf.read(1)
+ while len(b) == 1:
+ icons_string.write("\\" + str(hex(ord(b)))[1:])
+ b = svgf.read(1)
+
+ icons_string.write('"')
+ if fname != svg_icons[-1]:
+ icons_string.write(",")
+ icons_string.write("\n")
+
+ s = StringIO()
+ s.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n\n")
+ s.write('#include "modules/modules_enabled.gen.h"\n\n')
+ s.write("#ifndef _DEFAULT_THEME_ICONS_H\n")
+ s.write("#define _DEFAULT_THEME_ICONS_H\n")
+ s.write("static const int default_theme_icons_count = {};\n\n".format(len(svg_icons)))
+ s.write("#ifdef MODULE_SVG_ENABLED\n")
+ s.write("static const char *default_theme_icons_sources[] = {\n")
+ s.write(icons_string.getvalue())
+ s.write("};\n")
+ s.write("#endif // MODULE_SVG_ENABLED\n\n")
+ s.write("static const char *default_theme_icons_names[] = {\n")
+
+ index = 0
+ for f in svg_icons:
+
+ fname = str(f)
+
+ # Trim the `.svg` extension from the string.
+ icon_name = os.path.basename(fname)[:-4]
+
+ s.write('\t"{0}"'.format(icon_name))
+
+ if fname != svg_icons[-1]:
+ s.write(",")
+ s.write("\n")
+
+ index += 1
+
+ s.write("};\n")
+
+ s.write("#endif\n")
+
+ with open(dst, "w") as f:
+ f.write(s.getvalue())
+
+ s.close()
+ icons_string.close()
+
+
+if __name__ == "__main__":
+ subprocess_main(globals())
diff --git a/scene/resources/default_theme/dialog_bg.png b/scene/resources/default_theme/dialog_bg.png
deleted file mode 100644
index a23a10b48a..0000000000
--- a/scene/resources/default_theme/dialog_bg.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/dropdown.png b/scene/resources/default_theme/dropdown.png
deleted file mode 100644
index b5d9ffbbb4..0000000000
--- a/scene/resources/default_theme/dropdown.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/ellipsis.png b/scene/resources/default_theme/ellipsis.png
deleted file mode 100644
index c949e2c95b..0000000000
--- a/scene/resources/default_theme/ellipsis.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/error_icon.png b/scene/resources/default_theme/error_icon.png
deleted file mode 100644
index 30336b91a4..0000000000
--- a/scene/resources/default_theme/error_icon.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/error_icon.svg b/scene/resources/default_theme/error_icon.svg
new file mode 100644
index 0000000000..2f5099aa29
--- /dev/null
+++ b/scene/resources/default_theme/error_icon.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1v8.5859l1.293-1.293a1.0001 1.0001 0 0 1 .69141-.29102 1.0001 1.0001 0 0 1 .72266.29102l2.293 2.293 2.293-2.293a1.0001 1.0001 0 0 1 1.4141 0l2.293 2.293 1-1v-3.5859h-5v-5h-7zm8 0v4h4zm-6 9.4141-2 2v2.5859h12v-2.5859l-.29297.29297a1.0001 1.0001 0 0 1 -1.4141 0l-2.293-2.293-2.293 2.293a1.0001 1.0001 0 0 1 -1.4141 0l-2.293-2.293z" fill="#ff5d5d" transform="translate(0 -.000017)"/></svg>
diff --git a/scene/resources/default_theme/error_icon.xpm b/scene/resources/default_theme/error_icon.xpm
deleted file mode 100644
index 666a60338d..0000000000
--- a/scene/resources/default_theme/error_icon.xpm
+++ /dev/null
@@ -1,38 +0,0 @@
-/* XPM */
-static const char * error_icon_xpm[] = {
-"32 32 3 1",
-" c None",
-". c #FF00FF",
-"+ c #000000",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"....++++.+++..+++...++..+++.....",
-"....+....+..+.+..+.+..+.+..+....",
-"....+....+..+.+..+.+..+.+..+....",
-"....+++..+++..+++..+..+.+++.....",
-"....+....+..+.+..+.+..+.+..+....",
-"....+....+..+.+..+.+..+.+..+....",
-"....++++.+..+.+..+..++..+..+....",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................"};
diff --git a/scene/resources/default_theme/file.svg b/scene/resources/default_theme/file.svg
new file mode 100644
index 0000000000..974644c5da
--- /dev/null
+++ b/scene/resources/default_theme/file.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1v14h12v-9h-5v-5zm8 0v4h4z" fill="#b2b2b2" fill-rule="nonzero"/></svg>
diff --git a/scene/resources/default_theme/focus.png b/scene/resources/default_theme/focus.png
deleted file mode 100644
index f51ea89e8f..0000000000
--- a/scene/resources/default_theme/focus.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/folder.svg b/scene/resources/default_theme/folder.svg
new file mode 100644
index 0000000000..ca4c8c9c70
--- /dev/null
+++ b/scene/resources/default_theme/folder.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m2 2c-.549 0-1 .451-1 1v10c0 .549.451 1 1 1h12c.549 0 1-.451 1-1v-7c0-.549-.451-1-1-1h-4c-.549 0-1-.451-1-1v-1c0-.549-.451-1-1-1z" fill="#b2b2b2" fill-rule="nonzero"/></svg>
diff --git a/scene/resources/default_theme/folder_up.svg b/scene/resources/default_theme/folder_up.svg
new file mode 100644
index 0000000000..aaf5693d38
--- /dev/null
+++ b/scene/resources/default_theme/folder_up.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m3 8c.003.26.107.509.291.693.388.388 1.026.388 1.414 0l2.293-2.293v4.586c0 .553.448 1 1 1s1-.447 1-1v-4.586l2.293 2.293c.388.388 1.026.388 1.414 0 .388-.387.388-1.026 0-1.414l-4-4c-.388-.387-1.026-.387-1.414 0l-4 4c-.19.191-.295.451-.291.721z" fill="#b2b2b2" fill-rule="nonzero"/></svg>
diff --git a/scene/resources/default_theme/graph_node.png b/scene/resources/default_theme/graph_node.png
deleted file mode 100644
index d4b4dd3c1f..0000000000
--- a/scene/resources/default_theme/graph_node.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/graph_node_breakpoint.png b/scene/resources/default_theme/graph_node_breakpoint.png
deleted file mode 100644
index e18c6f42e1..0000000000
--- a/scene/resources/default_theme/graph_node_breakpoint.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/graph_node_close.png b/scene/resources/default_theme/graph_node_close.png
deleted file mode 100644
index 5c962ae1c6..0000000000
--- a/scene/resources/default_theme/graph_node_close.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/graph_node_comment.png b/scene/resources/default_theme/graph_node_comment.png
deleted file mode 100644
index cdec1d1eac..0000000000
--- a/scene/resources/default_theme/graph_node_comment.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/graph_node_comment_focus.png b/scene/resources/default_theme/graph_node_comment_focus.png
deleted file mode 100644
index 472a6b6f53..0000000000
--- a/scene/resources/default_theme/graph_node_comment_focus.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/graph_node_default.png b/scene/resources/default_theme/graph_node_default.png
deleted file mode 100644
index 359bbdc205..0000000000
--- a/scene/resources/default_theme/graph_node_default.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/graph_node_default_focus.png b/scene/resources/default_theme/graph_node_default_focus.png
deleted file mode 100644
index 204dd16ac0..0000000000
--- a/scene/resources/default_theme/graph_node_default_focus.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/graph_node_position.png b/scene/resources/default_theme/graph_node_position.png
deleted file mode 100644
index 24c2759be6..0000000000
--- a/scene/resources/default_theme/graph_node_position.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/graph_node_selected.png b/scene/resources/default_theme/graph_node_selected.png
deleted file mode 100644
index c52d88586b..0000000000
--- a/scene/resources/default_theme/graph_node_selected.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/graph_port.png b/scene/resources/default_theme/graph_port.png
deleted file mode 100644
index 358934f4d8..0000000000
--- a/scene/resources/default_theme/graph_port.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/graph_port.svg b/scene/resources/default_theme/graph_port.svg
new file mode 100644
index 0000000000..423819ea68
--- /dev/null
+++ b/scene/resources/default_theme/graph_port.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><g fill-rule="nonzero"><path d="m10 5c0 2.743-2.257 5-5 5s-5-2.257-5-5 2.257-5 5-5 5 2.257 5 5" fill="#fff"/><path d="m8.667 5c0 2.011-1.656 3.667-3.667 3.667s-3.667-1.656-3.667-3.667 1.656-3.667 3.667-3.667 3.667 1.656 3.667 3.667" fill="#b2b2b2" fill-opacity=".65"/></g></svg>
diff --git a/scene/resources/default_theme/grid_layout.svg b/scene/resources/default_theme/grid_layout.svg
new file mode 100644
index 0000000000..d5cafca687
--- /dev/null
+++ b/scene/resources/default_theme/grid_layout.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="1.5" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke-width="1.3"><g stroke="#fefffe"><path d="m1.87 6.541h2.917v2.917h-2.917z"/><path d="m6.536 6.541h2.917v2.917h-2.917z"/><path d="m11.202 6.541h2.917v2.917h-2.917z"/></g><g stroke="#e0e0e0" stroke-opacity=".65"><path d="m5.432 1.112-1.95 1.95 1.95 1.95" stroke-linejoin="miter" stroke-miterlimit="10"/><path d="m3.482 3.062h9.386"/><path d="m10.731 11.112 1.95 1.95-1.95 1.95" stroke-linejoin="miter" stroke-miterlimit="10"/><path d="m3.294 13.062h9.387"/></g></g></svg>
diff --git a/scene/resources/default_theme/grid_minimap.svg b/scene/resources/default_theme/grid_minimap.svg
new file mode 100644
index 0000000000..a7e5150bc3
--- /dev/null
+++ b/scene/resources/default_theme/grid_minimap.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill-rule="nonzero"><path d="m14 2.199v2.615l-2.625 1.313v-2.615zm-12 4.065 2.625 1.312v2.551l-2.625-1.313zm12 0v2.55l-2.625 1.313v-2.551zm-8 1.455h4v2.64h-4zm-4 2.56 2.625 1.313v2.521l-2.625-1.312zm12 0v2.522l-2.625 1.312v-2.521zm-8 1.455h4v2.641h-4zm1.701-8.109h2.299v2.734h-4.156s-.749.647-.875.641c-.131-.007-1.51-1.456-1.51-1.456l-1.459-.73v-2.615l.068.034s.027-.457.063-.676c.034-.212.197-.592.197-.592l-1.049-.524c-.079-.04-.167-.062-.256-.066-.354-.013-.648.27-.648.625v12c0 .237.134.453.346.559l4 2c.086.043.182.066.279.066h6c.097 0 .193-.023.279-.066l4-2c.212-.106.346-.322.346-.559v-12c0-.464-.489-.766-.904-.559l-3.869 1.934h-2.971s.033.417.016.625c-.03.346-.196.625-.196.625z" fill="#b2b2b2" fill-opacity=".65"/><path d="m5 6s-2.219-2.162-2.219-3.243c0-1.08 0-2.607 2.219-2.607s2.219 1.527 2.219 2.607c0 1.081-2.219 3.243-2.219 3.243z" fill="#fefffe"/></g></svg>
diff --git a/scene/resources/default_theme/grid_snap.svg b/scene/resources/default_theme/grid_snap.svg
new file mode 100644
index 0000000000..633c85fe79
--- /dev/null
+++ b/scene/resources/default_theme/grid_snap.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill-rule="nonzero"><path d="m3 0v3h-3v2h3v4h-3v2h3v3h2v-9h9v-2h-3v-3h-2v3h-4v-3zm4 13v2h2v-2zm6 0v2h2v-2z" fill="#b2b2b2" fill-opacity=".65"/><path d="m11 7c-2.194 0-4 1.806-4 4v2h2v-2c0-1.097.903-2 2-2s2 .903 2 2v2h2v-2c0-2.194-1.806-4-4-4z" fill="#fefffe"/></g></svg>
diff --git a/scene/resources/default_theme/hseparator.png b/scene/resources/default_theme/hseparator.png
deleted file mode 100644
index d4fd71ace5..0000000000
--- a/scene/resources/default_theme/hseparator.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/hslider_bg.png b/scene/resources/default_theme/hslider_bg.png
deleted file mode 100644
index b402bd370d..0000000000
--- a/scene/resources/default_theme/hslider_bg.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/hslider_grabber.png b/scene/resources/default_theme/hslider_grabber.png
deleted file mode 100644
index d273b491ee..0000000000
--- a/scene/resources/default_theme/hslider_grabber.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/hslider_grabber_disabled.png b/scene/resources/default_theme/hslider_grabber_disabled.png
deleted file mode 100644
index dddd1a468e..0000000000
--- a/scene/resources/default_theme/hslider_grabber_disabled.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/hslider_grabber_hl.png b/scene/resources/default_theme/hslider_grabber_hl.png
deleted file mode 100644
index e3defb3610..0000000000
--- a/scene/resources/default_theme/hslider_grabber_hl.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/hslider_tick.png b/scene/resources/default_theme/hslider_tick.png
deleted file mode 100644
index 1ba19c37a1..0000000000
--- a/scene/resources/default_theme/hslider_tick.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/hslider_tick.svg b/scene/resources/default_theme/hslider_tick.svg
new file mode 100644
index 0000000000..a97d05b9e8
--- /dev/null
+++ b/scene/resources/default_theme/hslider_tick.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 4 15.999999" width="4" xmlns="http://www.w3.org/2000/svg"><path d="m1 0h2v16h-2z" fill="#fff" fill-opacity=".25" stroke-width=".285079"/></svg>
diff --git a/scene/resources/default_theme/hsplit_bg.png b/scene/resources/default_theme/hsplit_bg.png
deleted file mode 100644
index a5749f6d5c..0000000000
--- a/scene/resources/default_theme/hsplit_bg.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/hsplitter.png b/scene/resources/default_theme/hsplitter.png
deleted file mode 100644
index 2287753c9d..0000000000
--- a/scene/resources/default_theme/hsplitter.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/hsplitter.svg b/scene/resources/default_theme/hsplitter.svg
new file mode 100644
index 0000000000..effc6996cc
--- /dev/null
+++ b/scene/resources/default_theme/hsplitter.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linecap="round" viewBox="0 0 8 48" xmlns="http://www.w3.org/2000/svg"><path d="m4 4.012v39.976" fill="none" stroke="#808080" stroke-opacity=".65" stroke-width="1.7"/></svg>
diff --git a/scene/resources/default_theme/icon_add.png b/scene/resources/default_theme/icon_add.png
deleted file mode 100644
index eccb69b363..0000000000
--- a/scene/resources/default_theme/icon_add.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/icon_close.png b/scene/resources/default_theme/icon_close.png
deleted file mode 100644
index 4d4ac4a551..0000000000
--- a/scene/resources/default_theme/icon_close.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/icon_color_pick.png b/scene/resources/default_theme/icon_color_pick.png
deleted file mode 100644
index 46953febb8..0000000000
--- a/scene/resources/default_theme/icon_color_pick.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/icon_file.png b/scene/resources/default_theme/icon_file.png
deleted file mode 100644
index bb4c361a8d..0000000000
--- a/scene/resources/default_theme/icon_file.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/icon_folder.png b/scene/resources/default_theme/icon_folder.png
deleted file mode 100644
index d1b308e88d..0000000000
--- a/scene/resources/default_theme/icon_folder.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/icon_grid_layout.png b/scene/resources/default_theme/icon_grid_layout.png
deleted file mode 100644
index a249252a79..0000000000
--- a/scene/resources/default_theme/icon_grid_layout.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/icon_grid_minimap.png b/scene/resources/default_theme/icon_grid_minimap.png
deleted file mode 100644
index 00a6179d5e..0000000000
--- a/scene/resources/default_theme/icon_grid_minimap.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/icon_parent_folder.png b/scene/resources/default_theme/icon_parent_folder.png
deleted file mode 100644
index 35d218722e..0000000000
--- a/scene/resources/default_theme/icon_parent_folder.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/icon_reload.png b/scene/resources/default_theme/icon_reload.png
deleted file mode 100644
index bec5f3f4f9..0000000000
--- a/scene/resources/default_theme/icon_reload.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/icon_snap_grid.png b/scene/resources/default_theme/icon_snap_grid.png
deleted file mode 100644
index 0680317d86..0000000000
--- a/scene/resources/default_theme/icon_snap_grid.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/icon_visibility.png b/scene/resources/default_theme/icon_visibility.png
deleted file mode 100644
index b2df8cbdb8..0000000000
--- a/scene/resources/default_theme/icon_visibility.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/icon_zoom_less.png b/scene/resources/default_theme/icon_zoom_less.png
deleted file mode 100644
index 03119c60ca..0000000000
--- a/scene/resources/default_theme/icon_zoom_less.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/icon_zoom_more.png b/scene/resources/default_theme/icon_zoom_more.png
deleted file mode 100644
index 31467ec3de..0000000000
--- a/scene/resources/default_theme/icon_zoom_more.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/icon_zoom_reset.png b/scene/resources/default_theme/icon_zoom_reset.png
deleted file mode 100644
index cac68c09fa..0000000000
--- a/scene/resources/default_theme/icon_zoom_reset.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/indeterminate.png b/scene/resources/default_theme/indeterminate.png
deleted file mode 100644
index 28a457b251..0000000000
--- a/scene/resources/default_theme/indeterminate.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/indeterminate.svg b/scene/resources/default_theme/indeterminate.svg
new file mode 100644
index 0000000000..2a742e1475
--- /dev/null
+++ b/scene/resources/default_theme/indeterminate.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 15.999999" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3.3333333 1c-1.2887 0-2.3333333 1.0446683-2.3333333 2.3333333v9.3333337c0 1.2887 1.0446683 2.333333 2.3333333 2.333333h9.3333337c1.2887 0 2.333333-1.044668 2.333333-2.333333v-9.3333337c0-1.2887-1.044668-2.3333333-2.333333-2.3333333z" fill="#fff" fill-opacity=".75" stroke-width="1.16667"/><path d="m3 7h10v2h-10z" fill="#1a1a1a" stroke-linecap="square" stroke-opacity=".75" stroke-width="2"/></svg>
diff --git a/scene/resources/default_theme/line_edit.png b/scene/resources/default_theme/line_edit.png
deleted file mode 100644
index 2b0c506f34..0000000000
--- a/scene/resources/default_theme/line_edit.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/line_edit_clear.png b/scene/resources/default_theme/line_edit_clear.png
deleted file mode 100644
index af2775a132..0000000000
--- a/scene/resources/default_theme/line_edit_clear.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/line_edit_clear.svg b/scene/resources/default_theme/line_edit_clear.svg
new file mode 100644
index 0000000000..3709c43410
--- /dev/null
+++ b/scene/resources/default_theme/line_edit_clear.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m1 3 2-2 5 5 5-5 2 2-5 5 5 5-2 2-5.302-5-4.698 5-2-2 5-5z" fill="#fff" fill-opacity=".75" fill-rule="nonzero"/></svg>
diff --git a/scene/resources/default_theme/line_edit_disabled.png b/scene/resources/default_theme/line_edit_disabled.png
deleted file mode 100644
index 69d78febd9..0000000000
--- a/scene/resources/default_theme/line_edit_disabled.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/make_header.py b/scene/resources/default_theme/make_header.py
deleted file mode 100755
index efad3b2815..0000000000
--- a/scene/resources/default_theme/make_header.py
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/usr/bin/env python
-
-import glob
-import os
-
-enc = "utf-8"
-
-# Change to the directory where the script is located,
-# so that the script can be run from any location
-os.chdir(os.path.dirname(os.path.realpath(__file__)))
-
-# Generate include files
-
-f = open("theme_data.h", "wb")
-
-f.write(b"// THIS FILE HAS BEEN AUTOGENERATED, DON'T EDIT!!\n")
-
-# Generate png image block
-f.write(b"\n// png image block\n")
-
-pixmaps = glob.glob("*.png")
-pixmaps.sort()
-
-for x in pixmaps:
-
- var_str = x[:-4] + "_png"
-
- s = "\nstatic const unsigned char " + var_str + "[] = {\n\t"
- f.write(s.encode(enc))
-
- pngf = open(x, "rb")
-
- b = pngf.read(1)
- while len(b) == 1:
- f.write(hex(ord(b)).encode(enc))
- b = pngf.read(1)
- if len(b) == 1:
- f.write(b", ")
-
- f.write(b"\n};\n")
- pngf.close()
-
-# Generate shaders block
-f.write(b"\n// shaders block\n")
-
-shaders = glob.glob("*.gsl")
-shaders.sort()
-
-for x in shaders:
-
- var_str = x[:-4] + "_shader_code"
-
- s = "\nstatic const char *" + var_str + " = \n"
- f.write(s.encode(enc))
-
- sf = open(x, "rb")
-
- b = sf.readline()
- while b != "":
- if b.endswith("\r\n"):
- b = b[:-2]
- if b.endswith("\n"):
- b = b[:-1]
- s = ' "' + b
- f.write(s.encode(enc))
- b = sf.readline()
- if b != "":
- f.write(b'"\n')
-
- f.write(b'";\n')
- sf.close()
-
-f.close()
diff --git a/scene/resources/default_theme/mini_checkerboard.png b/scene/resources/default_theme/mini_checkerboard.png
deleted file mode 100644
index d8279bda80..0000000000
--- a/scene/resources/default_theme/mini_checkerboard.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/mini_checkerboard.svg b/scene/resources/default_theme/mini_checkerboard.svg
new file mode 100644
index 0000000000..0ae6a855bd
--- /dev/null
+++ b/scene/resources/default_theme/mini_checkerboard.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g stroke-linecap="round" stroke-linejoin="round" stroke-width="1.9994"><path d="m0 0v8h8v-8zm8 8v8h8v-8z" fill="#e0e0e0"/><path d="m8 0v8h8v-8zm0 8h-8v8h8z" fill="#fff"/></g></svg>
diff --git a/scene/resources/default_theme/option_arrow.png b/scene/resources/default_theme/option_arrow.png
deleted file mode 100644
index 40590fd60a..0000000000
--- a/scene/resources/default_theme/option_arrow.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/option_button_arrow.svg b/scene/resources/default_theme/option_button_arrow.svg
new file mode 100644
index 0000000000..1a33668708
--- /dev/null
+++ b/scene/resources/default_theme/option_button_arrow.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg"><path d="m10 3c-.264.01-.514.117-.697.307l-3.293 3.293-3.293-3.293c-.189-.194-.447-.303-.717-.303-.897 0-1.34 1.091-.697 1.717l4 4c.39.39 1.023.39 1.414 0l4-4c.657-.632.195-1.742-.717-1.721z" fill="#b2b2b2" fill-opacity=".85" fill-rule="nonzero"/></svg>
diff --git a/scene/resources/default_theme/option_button_disabled.png b/scene/resources/default_theme/option_button_disabled.png
deleted file mode 100644
index 1961b673cd..0000000000
--- a/scene/resources/default_theme/option_button_disabled.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/option_button_disabled_mirrored.png b/scene/resources/default_theme/option_button_disabled_mirrored.png
deleted file mode 100644
index 9d149a35ca..0000000000
--- a/scene/resources/default_theme/option_button_disabled_mirrored.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/option_button_hover.png b/scene/resources/default_theme/option_button_hover.png
deleted file mode 100644
index 826fe1c9ca..0000000000
--- a/scene/resources/default_theme/option_button_hover.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/option_button_hover_mirrored.png b/scene/resources/default_theme/option_button_hover_mirrored.png
deleted file mode 100644
index d49c165645..0000000000
--- a/scene/resources/default_theme/option_button_hover_mirrored.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/option_button_normal.png b/scene/resources/default_theme/option_button_normal.png
deleted file mode 100644
index 43fc29e958..0000000000
--- a/scene/resources/default_theme/option_button_normal.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/option_button_normal_mirrored.png b/scene/resources/default_theme/option_button_normal_mirrored.png
deleted file mode 100644
index feec848f33..0000000000
--- a/scene/resources/default_theme/option_button_normal_mirrored.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/option_button_pressed.png b/scene/resources/default_theme/option_button_pressed.png
deleted file mode 100644
index 68796f9d85..0000000000
--- a/scene/resources/default_theme/option_button_pressed.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/option_button_pressed_mirrored.png b/scene/resources/default_theme/option_button_pressed_mirrored.png
deleted file mode 100644
index 94cabb18d6..0000000000
--- a/scene/resources/default_theme/option_button_pressed_mirrored.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/overbright_indicator.png b/scene/resources/default_theme/overbright_indicator.png
deleted file mode 100644
index e13f15dd02..0000000000
--- a/scene/resources/default_theme/overbright_indicator.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/panel_bg.png b/scene/resources/default_theme/panel_bg.png
deleted file mode 100644
index b496e2177e..0000000000
--- a/scene/resources/default_theme/panel_bg.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/picker_cursor.png b/scene/resources/default_theme/picker_cursor.png
deleted file mode 100644
index 2f403492d2..0000000000
--- a/scene/resources/default_theme/picker_cursor.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/popup_bg.png b/scene/resources/default_theme/popup_bg.png
deleted file mode 100644
index 023029f936..0000000000
--- a/scene/resources/default_theme/popup_bg.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/popup_bg_disabled.png b/scene/resources/default_theme/popup_bg_disabled.png
deleted file mode 100644
index 8eab5f27bc..0000000000
--- a/scene/resources/default_theme/popup_bg_disabled.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/popup_window.png b/scene/resources/default_theme/popup_window.png
deleted file mode 100644
index 442084049d..0000000000
--- a/scene/resources/default_theme/popup_window.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/progress_bar.png b/scene/resources/default_theme/progress_bar.png
deleted file mode 100644
index 057557e567..0000000000
--- a/scene/resources/default_theme/progress_bar.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/progress_fill.png b/scene/resources/default_theme/progress_fill.png
deleted file mode 100644
index e39bb2a021..0000000000
--- a/scene/resources/default_theme/progress_fill.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/radio_checked.png b/scene/resources/default_theme/radio_checked.png
deleted file mode 100644
index 0ce575c15f..0000000000
--- a/scene/resources/default_theme/radio_checked.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/radio_checked.svg b/scene/resources/default_theme/radio_checked.svg
new file mode 100644
index 0000000000..73d1c8e34a
--- /dev/null
+++ b/scene/resources/default_theme/radio_checked.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 15.999999" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m15 8a7 7 0 0 1 -7 7 7 7 0 0 1 -7-7 7 7 0 0 1 7-7 7 7 0 0 1 7 7" fill="#fff" fill-opacity=".75" stroke-width="2.33333"/><path d="m12 8a4 4 0 0 1 -4 4 4 4 0 0 1 -4-4 4 4 0 0 1 4-4 4 4 0 0 1 4 4" fill="#1a1a1a" stroke-width="1.33333"/></svg>
diff --git a/scene/resources/default_theme/radio_checked_disabled.png b/scene/resources/default_theme/radio_checked_disabled.png
deleted file mode 100644
index 72f08ecb96..0000000000
--- a/scene/resources/default_theme/radio_checked_disabled.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/radio_checked_disabled.svg b/scene/resources/default_theme/radio_checked_disabled.svg
new file mode 100644
index 0000000000..ef5eff8d97
--- /dev/null
+++ b/scene/resources/default_theme/radio_checked_disabled.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 15.999999" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m15 8a7 7 0 0 1 -7 7 7 7 0 0 1 -7-7 7 7 0 0 1 7-7 7 7 0 0 1 7 7" fill="#fff" fill-opacity=".37" stroke-width="2.33333"/><path d="m12 8a4 4 0 0 1 -4 4 4 4 0 0 1 -4-4 4 4 0 0 1 4-4 4 4 0 0 1 4 4" fill="#1a1a1a" fill-opacity=".5" stroke-width="1.33333"/></svg>
diff --git a/scene/resources/default_theme/radio_unchecked.png b/scene/resources/default_theme/radio_unchecked.png
deleted file mode 100644
index fe5bcf6ab1..0000000000
--- a/scene/resources/default_theme/radio_unchecked.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/radio_unchecked.svg b/scene/resources/default_theme/radio_unchecked.svg
new file mode 100644
index 0000000000..5429855db5
--- /dev/null
+++ b/scene/resources/default_theme/radio_unchecked.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 15.999999" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m15 8a7 7 0 0 1 -7 7 7 7 0 0 1 -7-7 7 7 0 0 1 7-7 7 7 0 0 1 7 7" fill="#1a1a1a" fill-opacity=".5" stroke-width="2.33333"/></svg>
diff --git a/scene/resources/default_theme/radio_unchecked_disabled.png b/scene/resources/default_theme/radio_unchecked_disabled.png
deleted file mode 100644
index a8f4c1b555..0000000000
--- a/scene/resources/default_theme/radio_unchecked_disabled.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/radio_unchecked_disabled.svg b/scene/resources/default_theme/radio_unchecked_disabled.svg
new file mode 100644
index 0000000000..1e827d9374
--- /dev/null
+++ b/scene/resources/default_theme/radio_unchecked_disabled.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 15.999999" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m15 8a7 7 0 0 1 -7 7 7 7 0 0 1 -7-7 7 7 0 0 1 7-7 7 7 0 0 1 7 7" fill="#1a1a1a" fill-opacity=".25" stroke-width="2.33333"/></svg>
diff --git a/scene/resources/default_theme/reload.svg b/scene/resources/default_theme/reload.svg
new file mode 100644
index 0000000000..66809f8374
--- /dev/null
+++ b/scene/resources/default_theme/reload.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#b2b2b2" fill-rule="nonzero"><path d="m8.987 2c-3.292 0-6 2.708-6 6h2c0-2.194 1.806-4 4-4s4 1.806 4 4-1.806 4-4 4v2c3.291 0 6-2.708 6-6s-2.709-6-6-6z"/><path d="m7.013 7.989-1.5 2-1.5 2-1.5-2-1.5-2z"/></g></svg>
diff --git a/scene/resources/default_theme/resizer_nw.svg b/scene/resources/default_theme/resizer_nw.svg
new file mode 100644
index 0000000000..92e25c3be2
--- /dev/null
+++ b/scene/resources/default_theme/resizer_nw.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill-opacity=".65"><path d="m4 12c.552 0 1-.448 1-1v-6h6c.552 0 1-.448 1-1s-.448-1-1-1h-7c-.552 0-1 .448-1 1v7c0 .552.448 1 1 1z" fill="#fefffe" fill-rule="nonzero"/><circle cx="7.5" cy="7.5" fill="#b2b2b2" r="1.479"/></g></svg>
diff --git a/scene/resources/default_theme/resizer_se.svg b/scene/resources/default_theme/resizer_se.svg
new file mode 100644
index 0000000000..2d492e976e
--- /dev/null
+++ b/scene/resources/default_theme/resizer_se.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill-opacity=".65"><path d="m11 3c-.552 0-1 .448-1 1v6h-6c-.552 0-1 .448-1 1s.448 1 1 1h7c.552 0 1-.448 1-1v-7c0-.552-.448-1-1-1z" fill="#fefffe" fill-rule="nonzero"/><circle cx="7.5" cy="7.5" fill="#b2b2b2" r="1.479"/></g></svg>
diff --git a/scene/resources/default_theme/scroll_bg.png b/scene/resources/default_theme/scroll_bg.png
deleted file mode 100644
index fb151a48b1..0000000000
--- a/scene/resources/default_theme/scroll_bg.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/scroll_button_left.png b/scene/resources/default_theme/scroll_button_left.png
deleted file mode 100644
index e430cb4673..0000000000
--- a/scene/resources/default_theme/scroll_button_left.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/scroll_button_left.svg b/scene/resources/default_theme/scroll_button_left.svg
new file mode 100644
index 0000000000..947b417a00
--- /dev/null
+++ b/scene/resources/default_theme/scroll_button_left.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" fill="#fefffe" fill-opacity=".75" r="6"/><path d="m9.014 4c-.27-.004-.53.102-.721.293l-3 3c-.388.388-.388 1.026 0 1.414l3 3c.388.388 1.026.388 1.414 0s.388-1.026 0-1.414l-2.293-2.293 2.293-2.293c.388-.388.388-1.026 0-1.414-.184-.184-.433-.289-.693-.293z" fill="#1a1a1a" fill-opacity=".65"/></svg>
diff --git a/scene/resources/default_theme/scroll_button_left_hl.png b/scene/resources/default_theme/scroll_button_left_hl.png
deleted file mode 100644
index 2a6ef17a34..0000000000
--- a/scene/resources/default_theme/scroll_button_left_hl.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/scroll_button_left_hl.svg b/scene/resources/default_theme/scroll_button_left_hl.svg
new file mode 100644
index 0000000000..fa092c861a
--- /dev/null
+++ b/scene/resources/default_theme/scroll_button_left_hl.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" fill="#fefffe" r="6"/><path d="m9.014 4c-.27-.004-.53.102-.721.293l-3 3c-.388.388-.388 1.026 0 1.414l3 3c.388.388 1.026.388 1.414 0s.388-1.026 0-1.414l-2.293-2.293 2.293-2.293c.388-.388.388-1.026 0-1.414-.184-.184-.433-.289-.693-.293z" fill="#1a1a1a"/></svg>
diff --git a/scene/resources/default_theme/scroll_button_right.png b/scene/resources/default_theme/scroll_button_right.png
deleted file mode 100644
index 4f61687aa4..0000000000
--- a/scene/resources/default_theme/scroll_button_right.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/scroll_button_right.svg b/scene/resources/default_theme/scroll_button_right.svg
new file mode 100644
index 0000000000..84619e7aa9
--- /dev/null
+++ b/scene/resources/default_theme/scroll_button_right.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" fill="#fefffe" fill-opacity=".75" r="6"/><path d="m6.986 4c.27-.004.53.102.721.293l3 3c.388.388.388 1.026 0 1.414l-3 3c-.388.388-1.026.388-1.414 0s-.388-1.026 0-1.414l2.293-2.293-2.293-2.293c-.388-.388-.388-1.026 0-1.414.184-.184.433-.289.693-.293z" fill="#1a1a1a" fill-opacity=".65"/></svg>
diff --git a/scene/resources/default_theme/scroll_button_right_hl.png b/scene/resources/default_theme/scroll_button_right_hl.png
deleted file mode 100644
index 10e2722509..0000000000
--- a/scene/resources/default_theme/scroll_button_right_hl.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/scroll_button_right_hl.svg b/scene/resources/default_theme/scroll_button_right_hl.svg
new file mode 100644
index 0000000000..601f98c0d5
--- /dev/null
+++ b/scene/resources/default_theme/scroll_button_right_hl.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" fill="#fefffe" r="6"/><path d="m6.986 4c.27-.004.53.102.721.293l3 3c.388.388.388 1.026 0 1.414l-3 3c-.388.388-1.026.388-1.414 0s-.388-1.026 0-1.414l2.293-2.293-2.293-2.293c-.388-.388-.388-1.026 0-1.414.184-.184.433-.289.693-.293z" fill="#1a1a1a"/></svg>
diff --git a/scene/resources/default_theme/scroll_grabber.png b/scene/resources/default_theme/scroll_grabber.png
deleted file mode 100644
index 732725a28f..0000000000
--- a/scene/resources/default_theme/scroll_grabber.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/scroll_grabber_hl.png b/scene/resources/default_theme/scroll_grabber_hl.png
deleted file mode 100644
index 21ee486e0b..0000000000
--- a/scene/resources/default_theme/scroll_grabber_hl.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/scroll_grabber_pressed.png b/scene/resources/default_theme/scroll_grabber_pressed.png
deleted file mode 100644
index f4886158fa..0000000000
--- a/scene/resources/default_theme/scroll_grabber_pressed.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/selection.png b/scene/resources/default_theme/selection.png
deleted file mode 100644
index 7d1c985b35..0000000000
--- a/scene/resources/default_theme/selection.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/selection_oof.png b/scene/resources/default_theme/selection_oof.png
deleted file mode 100644
index 2da0538389..0000000000
--- a/scene/resources/default_theme/selection_oof.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/slider_grabber.svg b/scene/resources/default_theme/slider_grabber.svg
new file mode 100644
index 0000000000..0813830134
--- /dev/null
+++ b/scene/resources/default_theme/slider_grabber.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 15.999999" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m15 8a7 7 0 0 1 -7 7 7 7 0 0 1 -7-7 7 7 0 0 1 7-7 7 7 0 0 1 7 7" fill="#fefefe" fill-opacity=".75" stroke-width="2.33333"/></svg>
diff --git a/scene/resources/default_theme/slider_grabber_disabled.svg b/scene/resources/default_theme/slider_grabber_disabled.svg
new file mode 100644
index 0000000000..659c2e9e14
--- /dev/null
+++ b/scene/resources/default_theme/slider_grabber_disabled.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 15.999999" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m15 8a7 7 0 0 1 -7 7 7 7 0 0 1 -7-7 7 7 0 0 1 7-7 7 7 0 0 1 7 7" fill="#fefefe" fill-opacity=".37" stroke-width="2.33333"/></svg>
diff --git a/scene/resources/default_theme/slider_grabber_hl.svg b/scene/resources/default_theme/slider_grabber_hl.svg
new file mode 100644
index 0000000000..d7d0594d67
--- /dev/null
+++ b/scene/resources/default_theme/slider_grabber_hl.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 15.999999" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m15 8a7 7 0 0 1 -7 7 7 7 0 0 1 -7-7 7 7 0 0 1 7-7 7 7 0 0 1 7 7" fill="#fefefe" fill-opacity=".997951" stroke-width="2.33333"/></svg>
diff --git a/scene/resources/default_theme/space.png b/scene/resources/default_theme/space.png
deleted file mode 100644
index 3c66316074..0000000000
--- a/scene/resources/default_theme/space.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/spinbox_updown.png b/scene/resources/default_theme/spinbox_updown.png
deleted file mode 100644
index 74fab19f34..0000000000
--- a/scene/resources/default_theme/spinbox_updown.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/submenu.png b/scene/resources/default_theme/submenu.png
deleted file mode 100644
index 8f7de446d4..0000000000
--- a/scene/resources/default_theme/submenu.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/submenu_mirrored.png b/scene/resources/default_theme/submenu_mirrored.png
deleted file mode 100644
index 1142b9ba9f..0000000000
--- a/scene/resources/default_theme/submenu_mirrored.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/tab.png b/scene/resources/default_theme/tab.png
deleted file mode 100644
index 895daa65e2..0000000000
--- a/scene/resources/default_theme/tab.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/tab_behind.png b/scene/resources/default_theme/tab_behind.png
deleted file mode 100644
index 2803d9db65..0000000000
--- a/scene/resources/default_theme/tab_behind.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/tab_close.png b/scene/resources/default_theme/tab_close.png
deleted file mode 100644
index af2775a132..0000000000
--- a/scene/resources/default_theme/tab_close.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/tab_container_bg.png b/scene/resources/default_theme/tab_container_bg.png
deleted file mode 100644
index c189b61b89..0000000000
--- a/scene/resources/default_theme/tab_container_bg.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/tab_current.png b/scene/resources/default_theme/tab_current.png
deleted file mode 100644
index ce2b9b0925..0000000000
--- a/scene/resources/default_theme/tab_current.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/tab_disabled.png b/scene/resources/default_theme/tab_disabled.png
deleted file mode 100644
index a7c04effa3..0000000000
--- a/scene/resources/default_theme/tab_disabled.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/tab_menu.png b/scene/resources/default_theme/tab_menu.png
deleted file mode 100644
index fa4421a28a..0000000000
--- a/scene/resources/default_theme/tab_menu.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/tab_menu_hl.png b/scene/resources/default_theme/tab_menu_hl.png
deleted file mode 100644
index fa4421a28a..0000000000
--- a/scene/resources/default_theme/tab_menu_hl.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/tabs_menu.svg b/scene/resources/default_theme/tabs_menu.svg
new file mode 100644
index 0000000000..4670a5deae
--- /dev/null
+++ b/scene/resources/default_theme/tabs_menu.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m8 0c-1.097 0-2 .903-2 2s.903 2 2 2 2-.903 2-2-.903-2-2-2zm0 6c-1.097 0-2 .903-2 2s.903 2 2 2 2-.903 2-2-.903-2-2-2zm0 6c-1.097 0-2 .903-2 2s.903 2 2 2 2-.903 2-2-.903-2-2-2z" fill="#b2b2b2" fill-opacity=".45" fill-rule="nonzero"/></svg>
diff --git a/scene/resources/default_theme/tabs_menu_hl.svg b/scene/resources/default_theme/tabs_menu_hl.svg
new file mode 100644
index 0000000000..4ea54a2fda
--- /dev/null
+++ b/scene/resources/default_theme/tabs_menu_hl.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m8 0c-1.097 0-2 .903-2 2s.903 2 2 2 2-.903 2-2-.903-2-2-2zm0 6c-1.097 0-2 .903-2 2s.903 2 2 2 2-.903 2-2-.903-2-2-2zm0 6c-1.097 0-2 .903-2 2s.903 2 2 2 2-.903 2-2-.903-2-2-2z" fill="#fefffe" fill-opacity=".65" fill-rule="nonzero"/></svg>
diff --git a/scene/resources/default_theme/text_edit_ellipsis.svg b/scene/resources/default_theme/text_edit_ellipsis.svg
new file mode 100644
index 0000000000..026a1fcba7
--- /dev/null
+++ b/scene/resources/default_theme/text_edit_ellipsis.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 14 8" xmlns="http://www.w3.org/2000/svg"><path d="m3.859 0c-2.138 0-3.859 1.721-3.859 3.859v.282c0 2.138 1.721 3.859 3.859 3.859h6.282c2.138 0 3.859-1.721 3.859-3.859v-.282c0-2.138-1.721-3.859-3.859-3.859zm-.859 3c.549 0 1 .451 1 1s-.451 1-1 1-1-.451-1-1 .451-1 1-1zm4 0c.549 0 1 .451 1 1s-.451 1-1 1-1-.451-1-1 .451-1 1-1zm4 0c.549 0 1 .451 1 1s-.451 1-1 1-1-.451-1-1 .451-1 1-1z" fill="#fefffe" fill-opacity=".25" fill-rule="nonzero"/></svg>
diff --git a/scene/resources/default_theme/text_edit_space.svg b/scene/resources/default_theme/text_edit_space.svg
new file mode 100644
index 0000000000..b2b1dd4676
--- /dev/null
+++ b/scene/resources/default_theme/text_edit_space.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 8 8" xmlns="http://www.w3.org/2000/svg"><circle cx="4" cy="4" fill="#b2b2b2" fill-opacity=".25" r="1.5"/></svg>
diff --git a/scene/resources/default_theme/text_edit_tab.svg b/scene/resources/default_theme/text_edit_tab.svg
new file mode 100644
index 0000000000..1968afb1e7
--- /dev/null
+++ b/scene/resources/default_theme/text_edit_tab.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 8 8" xmlns="http://www.w3.org/2000/svg"><path d="m6 0v8h2v-8zm-5.014.002c-.26.003-.509.108-.693.291-.388.388-.388 1.026 0 1.414l2.293 2.293-2.293 2.293c-.388.388-.388 1.026 0 1.414s1.026.388 1.414 0l3-3c.388-.388.388-1.026 0-1.414l-3-3c-.191-.19-.451-.295-.721-.291z" fill="#b2b2b2" fill-opacity=".25" fill-rule="nonzero"/></svg>
diff --git a/scene/resources/default_theme/theme_data.h b/scene/resources/default_theme/theme_data.h
deleted file mode 100644
index 1cec50eab4..0000000000
--- a/scene/resources/default_theme/theme_data.h
+++ /dev/null
@@ -1,517 +0,0 @@
-// THIS FILE HAS BEEN AUTOGENERATED, DON'T EDIT!!
-
-// png image block
-
-static const unsigned char arrow_down_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0xc, 0x8, 0x4, 0x0, 0x0, 0x0, 0xfc, 0x7c, 0x94, 0x6c, 0x0, 0x0, 0x0, 0x34, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0xa0, 0x32, 0x78, 0xf0, 0x1f, 0x15, 0x52, 0x20, 0xf1, 0x30, 0xee, 0xc1, 0x17, 0xb8, 0xf0, 0xb7, 0x87, 0x69, 0x48, 0xb6, 0xdc, 0xd7, 0xb8, 0x7f, 0x9, 0x2c, 0x7c, 0xfd, 0xb1, 0x2e, 0x9a, 0x3, 0x5e, 0x70, 0x3f, 0x9c, 0xff, 0x70, 0xfe, 0xb, 0x6e, 0x6, 0xea, 0x3, 0x0, 0xfb, 0x81, 0x48, 0xb8, 0x4d, 0xe4, 0x75, 0xd9, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char arrow_left_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0xc, 0x8, 0x4, 0x0, 0x0, 0x0, 0xfc, 0x7c, 0x94, 0x6c, 0x0, 0x0, 0x0, 0x1, 0x6f, 0x72, 0x4e, 0x54, 0x1, 0xcf, 0xa2, 0x77, 0x9a, 0x0, 0x0, 0x0, 0x59, 0x49, 0x44, 0x41, 0x54, 0x18, 0xd3, 0x63, 0x60, 0xa0, 0x0, 0xdc, 0x4f, 0x78, 0xf0, 0xff, 0xc1, 0xff, 0x7, 0xff, 0x21, 0x3c, 0x46, 0x98, 0xf0, 0x43, 0xed, 0xff, 0x27, 0x19, 0xb8, 0x19, 0x18, 0x18, 0x18, 0x14, 0x18, 0x19, 0x18, 0x18, 0x18, 0x98, 0x20, 0xc2, 0x2f, 0xb8, 0xff, 0xaf, 0x82, 0x8, 0xc3, 0x0, 0x54, 0xe2, 0xe7, 0x14, 0x6, 0x2d, 0x54, 0x83, 0x99, 0x70, 0xd9, 0x8, 0x95, 0x60, 0xcf, 0x61, 0xb8, 0x86, 0x55, 0x42, 0xe2, 0x2b, 0x63, 0x18, 0xc3, 0x57, 0xac, 0x46, 0xc9, 0x5f, 0xfd, 0x9f, 0x43, 0x89, 0x67, 0x19, 0x18, 0x0, 0xf4, 0x30, 0x14, 0x49, 0xef, 0xe6, 0x74, 0x60, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char arrow_right_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0xc, 0x8, 0x4, 0x0, 0x0, 0x0, 0xfc, 0x7c, 0x94, 0x6c, 0x0, 0x0, 0x0, 0x2e, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x20, 0x17, 0x3c, 0xf8, 0xf, 0x82, 0xf7, 0x13, 0x70, 0x48, 0x3c, 0xf8, 0xf2, 0x50, 0x1b, 0x43, 0x2, 0xa, 0xaf, 0xbe, 0xe0, 0xc6, 0x2e, 0xf1, 0xff, 0xe1, 0x7c, 0x12, 0x24, 0x10, 0x46, 0x11, 0xb6, 0x1c, 0xe1, 0x5c, 0xa, 0x0, 0x0, 0xe0, 0x14, 0x48, 0xb1, 0x3d, 0x1b, 0x7a, 0xf0, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char bar_arrow_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x14, 0x8, 0x4, 0x0, 0x0, 0x0, 0x2e, 0x6b, 0x75, 0xfc, 0x0, 0x0, 0x0, 0x4, 0x67, 0x41, 0x4d, 0x41, 0x0, 0x0, 0xb1, 0x8f, 0xb, 0xfc, 0x61, 0x5, 0x0, 0x0, 0x0, 0x1, 0x73, 0x52, 0x47, 0x42, 0x0, 0xae, 0xce, 0x1c, 0xe9, 0x0, 0x0, 0x0, 0x9, 0x70, 0x48, 0x59, 0x73, 0x0, 0x0, 0xe, 0xc0, 0x0, 0x0, 0xe, 0xc0, 0x1, 0x6a, 0xd6, 0x89, 0x9, 0x0, 0x0, 0x0, 0x65, 0x49, 0x44, 0x41, 0x54, 0x28, 0xcf, 0x63, 0xfc, 0xcf, 0x80, 0x1f, 0x30, 0x8e, 0x20, 0x5, 0x8c, 0x38, 0x24, 0xff, 0x53, 0x5f, 0xc1, 0xb, 0xee, 0x9f, 0x53, 0x18, 0x18, 0xd8, 0x73, 0x24, 0xbe, 0x62, 0x55, 0x70, 0x5f, 0x83, 0x61, 0x15, 0xa3, 0x2e, 0x3, 0x3, 0xc3, 0xd, 0xe6, 0x30, 0xd9, 0xcb, 0x18, 0xa, 0x1e, 0xc6, 0xfd, 0x9f, 0xc6, 0xc0, 0xd, 0x35, 0xea, 0x3b, 0x63, 0x81, 0xfc, 0x2c, 0x14, 0x5, 0xf, 0x2a, 0x18, 0xda, 0xd1, 0x1c, 0x50, 0xa9, 0xd0, 0x1, 0x57, 0xf0, 0x10, 0x53, 0x9a, 0x81, 0x81, 0x81, 0xa1, 0x52, 0xbe, 0x83, 0x81, 0x81, 0xf1, 0x3f, 0x2e, 0x69, 0xa8, 0x12, 0x3a, 0x4, 0x14, 0x0, 0x7b, 0xda, 0x34, 0x1, 0xbb, 0xb5, 0x3e, 0x6c, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char bookmark_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x4, 0x73, 0x42, 0x49, 0x54, 0x8, 0x8, 0x8, 0x8, 0x7c, 0x8, 0x64, 0x88, 0x0, 0x0, 0x0, 0x57, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xed, 0x93, 0x31, 0xa, 0xc0, 0x30, 0xc, 0x3, 0xa5, 0xd0, 0xff, 0x7f, 0x59, 0x1d, 0x8a, 0x42, 0x8, 0x9, 0x95, 0xc9, 0xd2, 0xa1, 0x9a, 0x8c, 0xf1, 0xdd, 0x62, 0x1b, 0x38, 0xc, 0x87, 0x5a, 0x5, 0xae, 0x79, 0xde, 0x2, 0x1, 0x80, 0x94, 0x39, 0x48, 0x76, 0x49, 0x17, 0xa4, 0xf0, 0x24, 0x61, 0x2b, 0x51, 0x8b, 0xfc, 0x82, 0xcf, 0xb, 0x48, 0x7a, 0xdf, 0x75, 0x81, 0xf, 0xe5, 0x29, 0xf7, 0x92, 0x6b, 0x3, 0x1a, 0x1e, 0xda, 0x7c, 0x3d, 0x77, 0x21, 0x7b, 0xa8, 0x74, 0x2e, 0xcb, 0xd, 0xc8, 0x75, 0x13, 0x28, 0x9, 0xed, 0xc2, 0xc8, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char button_disabled_png[] = {
- 0x89, 0x50, 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49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0xc0, 0x2, 0x84, 0x4c, 0x42, 0x43, 0x9d, 0x15, 0x81, 0x8c, 0xf4, 0xce, 0x99, 0x33, 0x67, 0x94, 0x1, 0x19, 0xab, 0x41, 0xc2, 0xbb, 0x80, 0x38, 0x6, 0xc4, 0x38, 0xa, 0xc4, 0x91, 0x20, 0xc6, 0x54, 0x3c, 0xc, 0xb8, 0x62, 0x98, 0x76, 0x29, 0x20, 0xce, 0xdd, 0x39, 0x73, 0xe6, 0x3c, 0x90, 0x81, 0x62, 0x10, 0x2b, 0x30, 0x1, 0x0, 0xec, 0xe0, 0x11, 0x6d, 0xb5, 0xe0, 0x8c, 0x99, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char button_hover_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x3, 0x0, 0x0, 0x0, 0x28, 0x2d, 0xf, 0x53, 0x0, 0x0, 0x0, 0x8a, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x42, 0x40, 0x4b, 0x5f, 0x5a, 0x6c, 0x5f, 0x5a, 0x6b, 0x56, 0x53, 0x64, 0x57, 0x53, 0x64, 0x3e, 0x3b, 0x46, 0x57, 0x53, 0x63, 0x57, 0x53, 0x63, 0x5b, 0x57, 0x68, 0x5a, 0x56, 0x67, 0x4d, 0x4a, 0x57, 0x49, 0x46, 0x52, 0x48, 0x45, 0x51, 0x5b, 0x57, 0x66, 0x59, 0x55, 0x64, 0x47, 0x44, 0x50, 0x58, 0x54, 0x64, 0x46, 0x43, 0x50, 0x56, 0x53, 0x63, 0x45, 0x42, 0x4f, 0x56, 0x53, 0x62, 0x45, 0x42, 0x4e, 0x55, 0x51, 0x62, 0x44, 0x41, 0x4e, 0x55, 0x51, 0x60, 0x44, 0x41, 0x4d, 0x43, 0x40, 0x4c, 0x47, 0x43, 0x51, 0x43, 0x3f, 0x4d, 0x42, 0x3f, 0x4c, 0x53, 0x50, 0x5f, 0x53, 0x4f, 0x5e, 0x40, 0xdc, 0xe6, 0x80, 0x0, 0x0, 0x0, 0x16, 0x74, 0x52, 0x4e, 0x53, 0x4, 0xa, 0x11, 0x19, 0x1f, 0x22, 0x24, 0x15, 0x25, 0x34, 0x3f, 0x46, 0x47, 0x48, 0x77, 0xef, 0xef, 0xef, 0xef, 0x77, 0xef, 0xed, 0x6b, 0x28, 0x52, 0x7a, 0x0, 0x0, 0x0, 0x65, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x6d, 0xcf, 0xc5, 0x1, 0x84, 0x40, 0x14, 0x4, 0xd1, 0x2e, 0x5c, 0xf3, 0xf, 0x92, 0xbd, 0xaf, 0xd3, 0xb8, 0x53, 0x30, 0xf6, 0x6e, 0x1f, 0x31, 0x26, 0xc9, 0x63, 0x90, 0xcc, 0xe2, 0xb1, 0x4f, 0x34, 0x48, 0x8a, 0x86, 0xfc, 0xf6, 0x87, 0x1e, 0x82, 0x8c, 0x19, 0xf2, 0x17, 0x4, 0x50, 0xce, 0x6f, 0x8d, 0xd7, 0x88, 0x7e, 0x69, 0xc9, 0x23, 0x4, 0x1c, 0x40, 0x47, 0x50, 0x24, 0xed, 0x41, 0x3d, 0x78, 0xf, 0x56, 0xe4, 0x23, 0xb8, 0x7, 0x69, 0x11, 0xf7, 0x12, 0x12, 0x7e, 0xea, 0x60, 0xa, 0x9a, 0xef, 0x3f, 0xb0, 0x83, 0x26, 0x98, 0x7b, 0x70, 0x33, 0xdc, 0x65, 0xfc, 0xe, 0x81, 0x4e, 0x3b, 0x55, 0xea, 0xaa, 0xb0, 0xe, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char button_normal_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x3, 0x0, 0x0, 0x0, 0x28, 0x2d, 0xf, 0x53, 0x0, 0x0, 0x0, 0x87, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3c, 0x3a, 0x44, 0x56, 0x53, 0x61, 0x56, 0x52, 0x60, 0x47, 0x44, 0x52, 0x33, 0x31, 0x39, 0x47, 0x44, 0x50, 0x47, 0x44, 0x51, 0x52, 0x50, 0x5d, 0x51, 0x4f, 0x5d, 0x46, 0x42, 0x4e, 0x42, 0x3e, 0x4a, 0x41, 0x3e, 0x49, 0x51, 0x4e, 0x5b, 0x40, 0x3e, 0x48, 0x4f, 0x4c, 0x59, 0x3f, 0x3d, 0x47, 0x4e, 0x4a, 0x58, 0x3e, 0x3b, 0x46, 0x4b, 0x49, 0x55, 0x3c, 0x3a, 0x44, 0x4a, 0x47, 0x54, 0x3b, 0x39, 0x43, 0x49, 0x46, 0x53, 0x3a, 0x38, 0x42, 0x47, 0x45, 0x50, 0x39, 0x37, 0x40, 0x47, 0x43, 0x50, 0x38, 0x35, 0x3f, 0x36, 0x34, 0x3e, 0x44, 0x42, 0x4d, 0x44, 0x41, 0x4c, 0x3f, 0x38, 0xaa, 0x5e, 0x0, 0x0, 0x0, 0x15, 0x74, 0x52, 0x4e, 0x53, 0x4, 0xa, 0x11, 0x19, 0x1f, 0x22, 0x24, 0x15, 0x25, 0x34, 0x3f, 0x46, 0x47, 0x48, 0x77, 0xef, 0xef, 0xef, 0x77, 0xef, 0xed, 0xe8, 0xff, 0x76, 0xed, 0x0, 0x0, 0x0, 0x63, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x6d, 0xcf, 0x45, 0x2, 0x84, 0x30, 0x0, 0x4, 0xc1, 0x69, 0x1c, 0xfe, 0xff, 0xca, 0xd5, 0xeb, 0x2a, 0x83, 0x6b, 0xd2, 0xb7, 0x54, 0x1c, 0x31, 0x26, 0xc9, 0x63, 0x50, 0xcc, 0x32, 0x8d, 0x3f, 0xd9, 0x20, 0x5, 0x1a, 0xf2, 0xc7, 0x1f, 0x7a, 0x48, 0x4a, 0x66, 0xa8, 0xde, 0xc, 0xd0, 0x38, 0xd1, 0x54, 0xdb, 0x4c, 0x2b, 0xd0, 0x5c, 0x62, 0x8e, 0xa0, 0x1, 0x74, 0x4, 0x65, 0xd2, 0x1e, 0xd4, 0x83, 0xf7, 0x60, 0x65, 0x3e, 0x82, 0x3, 0x48, 0x49, 0xdf, 0x55, 0xca, 0xd4, 0xef, 0xfa, 0xfb, 0x27, 0x36, 0xf, 0x92, 0x31, 0x9e, 0x44, 0x3e, 0x17, 0x7c, 0xbf, 0x3, 0xef, 0x34, 0x3f, 0x3e, 0xe0, 0x24, 0x67, 0xb9, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char button_pressed_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0x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0xab, 0x95, 0x41, 0x9f, 0x32, 0x20, 0x69, 0x2d, 0xbc, 0x50, 0x46, 0x3a, 0x10, 0x17, 0x5f, 0x49, 0x4, 0x7f, 0x90, 0x57, 0x89, 0xb7, 0xc5, 0x5f, 0x96, 0x17, 0x2e, 0x93, 0xcb, 0x8e, 0x3a, 0x83, 0xb, 0xc4, 0x8e, 0xd4, 0xff, 0x5c, 0x73, 0x83, 0x69, 0x9e, 0x95, 0xfc, 0x3b, 0xf4, 0x33, 0xe0, 0xf8, 0x61, 0xd3, 0xf1, 0x7d, 0x5d, 0x30, 0x7a, 0x6f, 0x89, 0xb, 0xd4, 0x5a, 0xe1, 0x40, 0xf, 0xfc, 0x34, 0x6c, 0xd2, 0x56, 0x80, 0xef, 0xfd, 0x9, 0xd2, 0x3a, 0x5e, 0x41, 0x15, 0x21, 0x77, 0x6, 0xc7, 0x6b, 0x47, 0x4e, 0x3a, 0x2f, 0x53, 0xb4, 0x10, 0xc7, 0x8c, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char checked_disabled_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x3, 0x0, 0x0, 0x0, 0x28, 0x2d, 0xf, 0x53, 0x0, 0x0, 0x0, 0x9, 0x70, 0x48, 0x59, 0x73, 0x0, 0x0, 0xb, 0x13, 0x0, 0x0, 0xb, 0x13, 0x1, 0x0, 0x9a, 0x9c, 0x18, 0x0, 0x0, 0x0, 0x99, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x7a, 0x78, 0x83, 0x7a, 0x78, 0x83, 0x73, 0x72, 0x7b, 0x7a, 0x78, 0x83, 0x7a, 0x78, 0x83, 0x7a, 0x78, 0x83, 0x82, 0x80, 0x8a, 0x90, 0x90, 0x93, 0x6a, 0x69, 0x70, 0x6a, 0x68, 0x70, 0x93, 0x93, 0x95, 0x58, 0x58, 0x5c, 0x58, 0x58, 0x5b, 0x7d, 0x7d, 0x7f, 0x58, 0x58, 0x5b, 0xa4, 0xa4, 0xa4, 0x9e, 0x9e, 0xa0, 0x9e, 0x9e, 0x9e, 0x9b, 0x9b, 0x9c, 0x9b, 0x9b, 0x9b, 0x9a, 0x9a, 0x9a, 0x99, 0x99, 0x99, 0x98, 0x98, 0x98, 0x97, 0x97, 0x97, 0x96, 0x96, 0x96, 0x95, 0x95, 0x95, 0x93, 0x93, 0x94, 0x8f, 0x8f, 0x8f, 0x86, 0x86, 0x88, 0x85, 0x85, 0x86, 0x82, 0x82, 0x83, 0x81, 0x81, 0x83, 0x7f, 0x7f, 0x81, 0x7c, 0x7c, 0x7e, 0x7a, 0x7a, 0x7d, 0x78, 0x78, 0x7b, 0x71, 0x71, 0x74, 0x68, 0x68, 0x6c, 0x66, 0x66, 0x6a, 0x65, 0x65, 0x68, 0x63, 0x63, 0x66, 0x5f, 0x5f, 0x63, 0x5c, 0x5c, 0x60, 0x5c, 0x5c, 0x5f, 0x5a, 0x5a, 0x5e, 0x59, 0x59, 0x5d, 0x59, 0x59, 0x5c, 0x58, 0x58, 0x5b, 0x57, 0x57, 0x5a, 0x56, 0x56, 0x59, 0x10, 0x13, 0xbb, 0xf, 0x0, 0x0, 0x0, 0x10, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x7, 0x27, 0x27, 0x50, 0x66, 0x68, 0x6a, 0x81, 0xb4, 0xb4, 0xdd, 0xfa, 0xfa, 0xfb, 0xfb, 0x5b, 0xd1, 0xf1, 0xe6, 0x0, 0x0, 0x0, 0x96, 0x49, 0x44, 0x41, 0x54, 0x78, 0x5e, 0x5d, 0x8f, 0xc9, 0x12, 0x82, 0x30, 0x14, 0x4, 0x87, 0x18, 0x50, 0x51, 0x44, 0x25, 0x42, 0x4, 0x77, 0xc4, 0x8d, 0x97, 0x0, 0xf9, 0xff, 0x8f, 0xb3, 0x88, 0xa4, 0x4a, 0xed, 0x63, 0x5f, 0xa6, 0x7, 0xf8, 0x7, 0x1e, 0xe3, 0x7e, 0x60, 0x19, 0x4f, 0x46, 0x1e, 0x0, 0x36, 0x8d, 0x4c, 0x67, 0x59, 0x65, 0x33, 0x6, 0x80, 0x47, 0xad, 0x56, 0x3d, 0xb7, 0x3c, 0x5d, 0x70, 0x0, 0xbe, 0xd1, 0x44, 0x65, 0x4d, 0x94, 0xc8, 0xc2, 0xf8, 0x0, 0x82, 0x4e, 0x91, 0x94, 0x15, 0x5d, 0xd2, 0xec, 0xde, 0x5, 0x83, 0x38, 0xc8, 0xe3, 0x63, 0x23, 0xce, 0xca, 0x9, 0x7a, 0x6e, 0xf3, 0x93, 0x48, 0x1a, 0x27, 0x14, 0x35, 0x3b, 0xb9, 0x5e, 0x56, 0xe4, 0x84, 0x22, 0xba, 0xa, 0x51, 0xd0, 0xb7, 0xa8, 0xcb, 0xfd, 0xcb, 0x9, 0x3b, 0xfb, 0x41, 0xdb, 0x59, 0x17, 0xa6, 0x94, 0x6e, 0xe3, 0x3e, 0x8c, 0x85, 0xf1, 0x90, 0x6e, 0xe6, 0x21, 0xfb, 0x39, 0xe7, 0x73, 0xe6, 0xfd, 0x5f, 0x7, 0xde, 0xc3, 0xb5, 0x16, 0x87, 0xb0, 0x9e, 0x42, 0x46, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char checker_bg_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x8, 0x0, 0x0, 0x0, 0x0, 0xe1, 0x64, 0xe1, 0x57, 0x0, 0x0, 0x0, 0x14, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0xfc, 0xcf, 0xc0, 0xc0, 0xd0, 0x0, 0xc4, 0xf8, 0x18, 0xf5, 0x84, 0x19, 0x0, 0x9f, 0x5f, 0xa, 0x1, 0xf8, 0xef, 0x65, 0xf4, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char close_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0x62, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0xa0, 0x16, 0xe0, 0x8c, 0xe0, 0x11, 0x43, 0xe6, 0xf3, 0x88, 0x71, 0x46, 0xa0, 0x48, 0x73, 0xfc, 0xe3, 0xb8, 0xcc, 0x23, 0x86, 0x90, 0xe6, 0xb8, 0xcc, 0xf1, 0xf, 0x49, 0x9, 0x8f, 0x28, 0xe7, 0x25, 0x8e, 0xff, 0x1c, 0xd7, 0xb9, 0x24, 0x91, 0x79, 0xdc, 0x12, 0x40, 0xe, 0xa6, 0x12, 0x54, 0x69, 0x4c, 0x25, 0xb7, 0x38, 0xae, 0x21, 0xa4, 0x31, 0x94, 0x80, 0x24, 0x81, 0xf0, 0x36, 0x48, 0x1a, 0xaf, 0x2, 0x88, 0x5b, 0xf0, 0x5a, 0x81, 0xa1, 0x4, 0xe1, 0x34, 0x84, 0x73, 0xb1, 0x4a, 0xa3, 0x7b, 0x9a, 0x70, 0x40, 0x11, 0xe, 0x6a, 0xca, 0x1, 0x0, 0x2a, 0x28, 0x37, 0x83, 0x3e, 0x27, 0xb0, 0x34, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char close_hl_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0x62, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0xa0, 0x16, 0xe0, 0x8c, 0xe0, 0x11, 0x43, 0xe6, 0xf3, 0x88, 0x71, 0x46, 0xa0, 0x48, 0x73, 0xfc, 0xe3, 0xb8, 0xcc, 0x23, 0x86, 0x90, 0xe6, 0xb8, 0xcc, 0xf1, 0xf, 0x49, 0x9, 0x8f, 0x28, 0xe7, 0x25, 0x8e, 0xff, 0x1c, 0xd7, 0xb9, 0x24, 0x91, 0x79, 0xdc, 0x12, 0x40, 0xe, 0xa6, 0x12, 0x54, 0x69, 0x4c, 0x25, 0xb7, 0x38, 0xae, 0x21, 0xa4, 0x31, 0x94, 0x80, 0x24, 0x81, 0xf0, 0x36, 0x48, 0x1a, 0xaf, 0x2, 0x88, 0x5b, 0xf0, 0x5a, 0x81, 0xa1, 0x4, 0xe1, 0x34, 0x84, 0x73, 0xb1, 0x4a, 0xa3, 0x7b, 0x9a, 0x70, 0x40, 0x11, 0xe, 0x6a, 0xca, 0x1, 0x0, 0x2a, 0x28, 0x37, 0x83, 0x3e, 0x27, 0xb0, 0x34, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char color_picker_hue_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x1, 0x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, 0x9d, 0x35, 0x2b, 0xe, 0x0, 0x0, 0x0, 0x80, 0xed, 0x66, 0xc5, 0x1, 0x0, 0x0, 0x0, 0xe0, 0x6, 0x1, 0x0, 0x0, 0x90, 0x6, 0x70, 0x83, 0x0, 0x0, 0x0, 0x28, 0x3, 0x7c, 0x54, 0x93, 0xd6, 0xf1, 0xd1, 0x16, 0x8a, 0x17, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char dialog_bg_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0x26, 0x8, 0x3, 0x0, 0x0, 0x0, 0xf7, 0x10, 0x9b, 0xa4, 0x0, 0x0, 0x2, 0xf5, 0x7a, 0x54, 0x58, 0x74, 0x52, 0x61, 0x77, 0x20, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x65, 0x78, 0x69, 0x66, 0x0, 0x0, 0x78, 0xda, 0xb5, 0x95, 0x6d, 0x72, 0xe4, 0x28, 0xc, 0x86, 0xff, 0x73, 0x8a, 0x3d, 0x2, 0xfa, 0x42, 0x70, 0x1c, 0xc, 0xa6, 0x6a, 0x6f, 0xb0, 0xc7, 0x9f, 0x17, 0xec, 0x38, 0xd9, 0x4c, 0x57, 0xda, 0x49, 0xcf, 0x40, 0xb5, 0xa5, 0x92, 0x5, 0x12, 0x3c, 0x92, 0x3b, 0xec, 0xff, 0xfd, 0x3b, 0xc2, 0x3f, 0x18, 0xa4, 0x39, 0x6, 0x35, 0xcf, 0xa9, 0xa4, 0x14, 0x31, 0xb4, 0x68, 0xe1, 0xa, 0x25, 0xc7, 0xf7, 0xb1, 0x9f, 0xf2, 0xb0, 0x51, 0xd4, 0xf5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0xac, 0x64, 0x21, 0x49, 0x35, 0x33, 0x15, 0x54, 0xe3, 0xa, 0x6f, 0x26, 0x6a, 0xa8, 0x26, 0xc9, 0x4a, 0xaa, 0x44, 0x3, 0x89, 0x89, 0x8d, 0x99, 0xee, 0xe9, 0x1b, 0x87, 0x30, 0x0, 0x20, 0x4, 0x0, 0xed, 0x48, 0xa7, 0x26, 0x6c, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char dropdown_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x8, 0x4, 0x0, 0x0, 0x0, 0x6e, 0x6, 0x76, 0x0, 0x0, 0x0, 0x0, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x60, 0x60, 0xf8, 0xc0, 0xcc, 0x0, 0x2, 0x60, 0x16, 0x98, 0x78, 0x67, 0x8, 0x81, 0x6f, 0x4d, 0xde, 0x9a, 0x0, 0x5, 0xde, 0x3a, 0x3d, 0xfc, 0x8f, 0x80, 0xaf, 0xba, 0x18, 0xde, 0x29, 0x2, 0x19, 0xbf, 0x61, 0x2, 0x6f, 0x62, 0x18, 0x3e, 0xb0, 0xbd, 0x97, 0x4, 0x32, 0xff, 0x80, 0xb9, 0xb1, 0x20, 0x93, 0xc0, 0x42, 0x8, 0x2e, 0x54, 0xe8, 0x9d, 0xdc, 0x9b, 0x54, 0x10, 0xb, 0x21, 0xc4, 0x4, 0x63, 0x1, 0x0, 0x86, 0x1f, 0x3b, 0x1e, 0x92, 0x22, 0x3f, 0x40, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char ellipsis_png[] = {
- 0x89, 0x50, 0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
-static const unsigned char error_icon_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0x9, 0x70, 0x48, 0x59, 0x73, 0x0, 0x0, 0xb, 0x13, 0x0, 0x0, 0xb, 0x13, 0x1, 0x0, 0x9a, 0x9c, 0x18, 0x0, 0x0, 0x0, 0x2, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x87, 0x8f, 0xcc, 0xbf, 0x0, 0x0, 0x0, 0xe, 0x49, 0x44, 0x41, 0x54, 0x28, 0xcf, 0x63, 0x60, 0x18, 0x5, 0xa3, 0x0, 0x1, 0x0, 0x2, 0x10, 0x0, 0x1, 0x14, 0xc2, 0xc0, 0x92, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char focus_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0xc, 0x4, 0x3, 0x0, 0x0, 0x0, 0xa4, 0x5b, 0x41, 0xd4, 0x0, 0x0, 0x0, 0x30, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x47, 0x8c, 0xbf, 0x47, 0x8c, 0xbf, 0x47, 0x8c, 0xbf, 0x47, 0x8c, 0xbf, 0x47, 0x8c, 0xbf, 0x47, 0x8c, 0xbf, 0x47, 0x8c, 0xbf, 0x47, 0x8c, 0xbf, 0x47, 0x8c, 0xbf, 0x47, 0x8c, 0xbf, 0x47, 0x8c, 0xbf, 0x47, 0x8c, 0xbf, 0x47, 0x8c, 0xbf, 0x47, 0x8c, 0xbf, 0xff, 0xff, 0xff, 0xb9, 0xa2, 0x9b, 0xc9, 0x0, 0x0, 0x0, 0xf, 0x74, 0x52, 0x4e, 0x53, 0x0, 0xe, 0x39, 0x68, 0x7a, 0x7b, 0x3a, 0x74, 0x10, 0x8, 0x69, 0xf, 0x6, 0x75, 0x11, 0xb8, 0x16, 0x0, 0x1, 0x0, 0x0, 0x0, 0x38, 0x49, 0x44, 0x41, 0x54, 0x8, 0xd7, 0x63, 0x10, 0x32, 0x9, 0xd, 0x75, 0x56, 0x64, 0x48, 0xef, 0x9c, 0x39, 0x73, 0x46, 0x19, 0xc3, 0x6a, 0x6, 0x20, 0xd8, 0xc5, 0x10, 0x3, 0xa2, 0x8e, 0x32, 0x44, 0x82, 0xa8, 0xa9, 0xd8, 0x29, 0xa8, 0x12, 0xb0, 0x6, 0x29, 0x86, 0xdc, 0x9d, 0x33, 0x67, 0xce, 0x2b, 0x63, 0x10, 0x3, 0x1b, 0x6, 0x0, 0xdf, 0xc6, 0x11, 0x6d, 0xb8, 0xf4, 0x9c, 0xac, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char graph_node_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x40, 0x8, 0x6, 0x0, 0x0, 0x0, 0x13, 0x7d, 0xf7, 0x96, 0x0, 0x0, 0x0, 0x9, 0x70, 0x48, 0x59, 0x73, 0x0, 0x0, 0xb, 0x13, 0x0, 0x0, 0xb, 0x13, 0x1, 0x0, 0x9a, 0x9c, 0x18, 0x0, 0x0, 0x0, 0x7, 0x74, 0x49, 0x4d, 0x45, 0x7, 0xe0, 0x8, 0x17, 0xd, 0x5, 0x12, 0xa1, 0x38, 0x83, 0x9b, 0x0, 0x0, 0x0, 0x19, 0x74, 0x45, 0x58, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x0, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x47, 0x49, 0x4d, 0x50, 0x57, 0x81, 0xe, 0x17, 0x0, 0x0, 0x2, 0x74, 0x49, 0x44, 0x41, 0x54, 0x58, 0xc3, 0xed, 0x97, 0x3d, 0x6f, 0xd3, 0x60, 0x10, 0xc7, 0x7f, 0x17, 0x9b, 0x26, 0x25, 0x22, 0xad, 0xa, 0x8, 0xf1, 0x52, 0x75, 0x0, 0x16, 0x24, 0x90, 0x2a, 0x96, 0x7c, 0x1, 0x6, 0xc4, 0xce, 0xc4, 0x17, 0x0, 0x31, 0xb0, 0x30, 0x0, 0x23, 0x82, 0x85, 0x5, 0x9, 0x4, 0x5f, 0x80, 0x89, 0x1d, 0x31, 0xf0, 0x5, 0x58, 0x50, 0x25, 0x50, 0x59, 0x80, 0xa1, 0xe2, 0xad, 0x28, 0x34, 0x4a, 0x3, 0x25, 0x76, 0xea, 0xe7, 0x39, 0x6, 0x3f, 0x76, 0x6d, 0xc7, 0x49, 0x5f, 0xd8, 0x90, 0x6f, 0xb1, 0xf5, 0xe4, 0xb9, 0xdf, 0xdd, 0xfd, 0xef, 0x22, 0xf9, 0x84, 0x2d, 0x13, 0xa0, 0x6, 0x78, 0xee, 0x29, 0xe4, 0x4d, 0x1, 0xb, 0x18, 0xf7, 0x54, 0x32, 0x97, 0x6a, 0xc0, 0x7e, 0x60, 0xe, 0x38, 0xc, 0xb4, 0x80, 0x7d, 0x5, 0xc0, 0x26, 0xd0, 0x7, 0x3a, 0x40, 0x17, 0xf8, 0x3, 0xd8, 0x24, 0x6a, 0x13, 0x38, 0x35, 0x73, 0x60, 0xf6, 0x6a, 0xa3, 0xde, 0xb8, 0x38, 0x35, 0x55, 0x3f, 0x41, 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 0x18, 0x13, 0xda, 0x68, 0x7, 0x5e, 0x11, 0x18, 0x63, 0x42, 0x20, 0x0, 0x6c, 0xcd, 0xad, 0xb2, 0x6b, 0x41, 0x38, 0x58, 0xee, 0x74, 0x57, 0xdb, 0x93, 0x20, 0x36, 0x82, 0x4e, 0x77, 0xb5, 0x1d, 0x84, 0x83, 0x65, 0x60, 0xd, 0x30, 0xc9, 0xe6, 0x3a, 0x3, 0x9c, 0x6b, 0x35, 0x67, 0x1f, 0x37, 0xea, 0xd3, 0x67, 0x3c, 0xcf, 0x2b, 0x15, 0xd7, 0x18, 0x63, 0x83, 0x70, 0xf0, 0xbe, 0xbf, 0xd1, 0xbb, 0xe, 0xbc, 0x5, 0xd6, 0x25, 0xb3, 0xc2, 0xb5, 0x80, 0x63, 0xc0, 0x21, 0xa0, 0x3e, 0x66, 0xf9, 0xe, 0x81, 0x9f, 0xc0, 0x37, 0xb7, 0x47, 0x1b, 0x29, 0x8, 0xea, 0x27, 0xfb, 0xe0, 0x98, 0x2a, 0xd4, 0x95, 0x1c, 0xed, 0x51, 0xf8, 0x51, 0xfb, 0xb, 0x1, 0xbe, 0x20, 0x9f, 0x90, 0x81, 0x17, 0xaa, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char graph_node_breakpoint_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x40, 0x2, 0x3, 0x0, 0x0, 0x0, 0x6e, 0x13, 0x1f, 0x5, 0x0, 0x0, 0x0, 0x9, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0xf4, 0xe7, 0x2c, 0xf4, 0xe7, 0x2c, 0xec, 0x5a, 0x6b, 0x42, 0x0, 0x0, 0x0, 0x2, 0x74, 0x52, 0x4e, 0x53, 0x0, 0xe4, 0xd1, 0xf4, 0xeb, 0x59, 0x0, 0x0, 0x0, 0x30, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x0, 0x3, 0xb6, 0x55, 0xab, 0x26, 0x30, 0x88, 0x30, 0x0, 0x91, 0x42, 0xd6, 0x4a, 0xe, 0x6, 0x45, 0x7, 0x46, 0xf, 0x6, 0x25, 0x6, 0x86, 0xe, 0x20, 0x31, 0x4a, 0x80, 0x42, 0x3, 0x1c, 0x2e, 0xe0, 0x10, 0x82, 0x84, 0x15, 0x1c, 0x0, 0x0, 0x41, 0x2d, 0x2b, 0x21, 0xbb, 0xb7, 0x1a, 0xa9, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char graph_node_close_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0xc, 0x8, 0x4, 0x0, 0x0, 0x0, 0xfc, 0x7c, 0x94, 0x6c, 0x0, 0x0, 0x0, 0x5f, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x75, 0x90, 0xb5, 0x1, 0xc0, 0x30, 0x10, 0x3, 0x55, 0x1a, 0xbe, 0xc, 0x6e, 0xe6, 0xb5, 0xc3, 0x34, 0x4b, 0x98, 0xcc, 0xee, 0x7c, 0x4f, 0x92, 0x0, 0x70, 0x45, 0x19, 0x8c, 0x47, 0x19, 0x57, 0x37, 0x66, 0x1b, 0x6b, 0x74, 0x89, 0x32, 0xd6, 0xb0, 0xed, 0x2c, 0x51, 0xca, 0x6b, 0xb6, 0xb3, 0x41, 0x94, 0x0, 0xfe, 0x9f, 0x2c, 0x0, 0xa3, 0x64, 0x61, 0xa3, 0x6f, 0x66, 0xbd, 0xc6, 0x7f, 0xe9, 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 0xd0, 0x66, 0x68, 0xf5, 0x74, 0xa2, 0xb7, 0x43, 0x43, 0x31, 0x91, 0x98, 0x48, 0x16, 0x82, 0x49, 0x78, 0x1b, 0x1, 0xf, 0xa7, 0x50, 0x68, 0x35, 0xb8, 0x84, 0x4, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char graph_node_default_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x3, 0x0, 0x0, 0x0, 0x28, 0x2d, 0xf, 0x53, 0x0, 0x0, 0x0, 0x36, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x16, 0x12, 0x19, 0xe, 0xb, 0x10, 0xe, 0xb, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x16, 0x12, 0x19, 0x0, 0x0, 0x0, 0x19, 0x15, 0x1c, 0x24, 0x1e, 0x27, 0x16, 0x12, 0x19, 0x76, 0x9, 0xd2, 0x13, 0x0, 0x0, 0x0, 0xf, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x46, 0x47, 0x3f, 0x2b, 0x11, 0x3, 0xfd, 0xd3, 0xcd, 0x2a, 0x73, 0x45, 0xf8, 0x3d, 0x3f, 0x57, 0xda, 0x84, 0x0, 0x0, 0x0, 0x37, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x60, 0x64, 0x2, 0x2, 0x46, 0x8, 0xc9, 0xcc, 0xc2, 0xca, 0xc6, 0xc0, 0x8f, 0x4, 0xd8, 0x39, 0x98, 0x59, 0x19, 0x50, 0x80, 0x0, 0x27, 0x17, 0x3, 0x2a, 0x10, 0xe4, 0x46, 0x13, 0xe0, 0x67, 0x1a, 0x18, 0x1, 0x1e, 0x34, 0x1, 0x5e, 0x3e, 0xc, 0xa7, 0x63, 0x78, 0xe, 0xc3, 0xfb, 0x0, 0x89, 0x4d, 0x2, 0xf2, 0xa2, 0x23, 0x3b, 0xc4, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char graph_node_default_focus_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0x8a, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x0, 0x81, 0xff, 0x8c, 0xff, 0x99, 0xff, 0xb3, 0x2, 0x21, 0x3b, 0x4, 0x82, 0xd8, 0x40, 0x11, 0x46, 0x88, 0xa4, 0xf8, 0x7f, 0x49, 0x20, 0x14, 0xff, 0x2f, 0xa, 0x84, 0x8, 0xb6, 0xe0, 0x7f, 0x6e, 0xa0, 0x22, 0x90, 0x92, 0x92, 0xff, 0xd8, 0x60, 0xe5, 0x9b, 0xb6, 0x15, 0xff, 0x79, 0xc1, 0x4a, 0xb0, 0x83, 0x17, 0xc2, 0x29, 0xff, 0x1b, 0xe, 0x1, 0x4d, 0x61, 0xc6, 0xa1, 0x80, 0x5b, 0xf9, 0xf, 0x63, 0xe9, 0x77, 0xa0, 0x45, 0xac, 0xc, 0x38, 0x0, 0xd8, 0x72, 0xa0, 0x5b, 0xd8, 0xf1, 0x2b, 0x10, 0x27, 0xa4, 0x40, 0x92, 0x7c, 0x5, 0x8, 0x2b, 0xc8, 0x77, 0xe4, 0xb, 0xe1, 0xd2, 0x6f, 0x78, 0xbc, 0xf9, 0x87, 0x17, 0x18, 0x50, 0x7, 0x40, 0x1, 0x85, 0x23, 0xa8, 0x4b, 0xbf, 0x3, 0xc3, 0x91, 0x1f, 0x14, 0xd4, 0x78, 0x23, 0xb, 0x2d, 0xa0, 0xff, 0xb3, 0x23, 0x20, 0x22, 0xba, 0x1, 0x39, 0x96, 0x8a, 0xa5, 0x9b, 0x88, 0xa3, 0x56, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char graph_node_position_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x40, 0x2, 0x3, 0x0, 0x0, 0x0, 0x6e, 0x13, 0x1f, 0x5, 0x0, 0x0, 0x0, 0x9, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0xf4, 0x3f, 0x2c, 0xf4, 0x3f, 0x2c, 0x1c, 0x3e, 0x10, 0xcd, 0x0, 0x0, 0x0, 0x2, 0x74, 0x52, 0x4e, 0x53, 0x0, 0xe4, 0xd1, 0xf4, 0xeb, 0x59, 0x0, 0x0, 0x0, 0x30, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x0, 0x3, 0xb6, 0x55, 0xab, 0x26, 0x30, 0x88, 0x30, 0x0, 0x91, 0x42, 0xd6, 0x4a, 0xe, 0x6, 0x45, 0x7, 0x46, 0xf, 0x6, 0x25, 0x6, 0x86, 0xe, 0x20, 0x31, 0x4a, 0x80, 0x42, 0x3, 0x1c, 0x2e, 0xe0, 0x10, 0x82, 0x84, 0x15, 0x1c, 0x0, 0x0, 0x41, 0x2d, 0x2b, 0x21, 0xbb, 0xb7, 0x1a, 0xa9, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char graph_node_selected_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x40, 0x8, 0x3, 0x0, 0x0, 0x0, 0x24, 0xa3, 0x7, 0xa4, 0x0, 0x0, 0x1, 0x5f, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb2, 0xb2, 0xcc, 0xae, 0xa0, 0xbb, 0x9c, 0x92, 0xa6, 0x9a, 0x91, 0xa4, 0x95, 0x8c, 0x9e, 0xaf, 0x9f, 0xaf, 0xa0, 0x94, 0xa5, 0x8e, 0x84, 0x95, 0x7f, 0x75, 0x84, 0x73, 0x6a, 0x78, 0x6d, 0x64, 0x72, 0xa2, 0xa2, 0xb9, 0x9c, 0x90, 0xa2, 0x8b, 0x81, 0x90, 0xdc, 0xda, 0xce, 0xe2, 0xe1, 0xd2, 0x9d, 0x91, 0xa9, 0x85, 0x7c, 0x8c, 0xdb, 0xd9, 0xce, 0xdb, 0xd9, 0xcd, 0xda, 0xce, 0xe0, 0xde, 0xd5, 0xe3, 0xdf, 0xd6, 0xe4, 0x97, 0x8d, 0xa0, 0x7a, 0x70, 0x7f, 0xdb, 0xd0, 0xdf, 0xdb, 0xd0, 0xe1, 0xda, 0xd0, 0xe1, 0x70, 0x67, 0x75, 0xd8, 0xcb, 0xde, 0xda, 0xcf, 0xdf, 0xdb, 0xce, 0xe1, 0xdb, 0xcf, 0xe1, 0xdb, 0xd0, 0xe0, 0xda, 0xcf, 0xe0, 0xd8, 0xcc, 0xde, 0x90, 0x87, 0x99, 0x6d, 0x67, 0x72, 0xd7, 0xcc, 0xdf, 0xda, 0xce, 0xdf, 0xd8, 0xcb, 0xdf, 0xd7,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41, 0x39, 0xd0, 0xc0, 0x4, 0x88, 0xa2, 0x1a, 0xb8, 0x0, 0xe0, 0x3b, 0xd8, 0x7f, 0xc1, 0xf8, 0x25, 0x7, 0xf0, 0x4b, 0x3b, 0x80, 0xb8, 0xae, 0x17, 0x56, 0xad, 0x18, 0x97, 0xca, 0x98, 0xa1, 0xd6, 0x11, 0x33, 0x6c, 0x7f, 0x1b, 0xe3, 0xfb, 0xc6, 0xf6, 0xbe, 0xf7, 0xb6, 0xb6, 0x2c, 0x3b, 0xa, 0xb3, 0xbe, 0x6e, 0xe8, 0x59, 0xac, 0x42, 0x7a, 0xd2, 0x36, 0xee, 0x57, 0xad, 0x62, 0xec, 0x1b, 0x7f, 0xa4, 0x3d, 0x60, 0xa7, 0x6a, 0xed, 0x63, 0xa1, 0xc3, 0x3b, 0x7a, 0xa, 0xc0, 0xad, 0xda, 0x1b, 0x57, 0xec, 0xf2, 0xd8, 0x75, 0x17, 0x0, 0x6a, 0x7f, 0x97, 0x8f, 0x54, 0xa2, 0x67, 0xc8, 0xba, 0xb8, 0x46, 0x24, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char graph_port_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0xa, 0x8, 0x4, 0x0, 0x0, 0x0, 0x27, 0x3b, 0x7, 0x36, 0x0, 0x0, 0x0, 0x6e, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x65, 0x8e, 0xc1, 0xd, 0xc2, 0x30, 0x10, 0x4, 0xb7, 0x31, 0x22, 0x2a, 0x48, 0x41, 0x88, 0x4f, 0xa, 0x73, 0x42, 0x17, 0x1e, 0xd2, 0x40, 0xde, 0x3e, 0xf3, 0xb5, 0x8c, 0x8f, 0x13, 0x8, 0x29, 0x3b, 0xbf, 0xd1, 0x9e, 0xf6, 0xe4, 0xc9, 0x57, 0x36, 0x5e, 0x83, 0x95, 0x59, 0x11, 0xee, 0x34, 0xfa, 0x97, 0xbc, 0x44, 0x6b, 0xa8, 0xa3, 0xdb, 0xe0, 0x70, 0xdd, 0xf6, 0x49, 0x3c, 0x5c, 0xd5, 0x20, 0xf4, 0x2a, 0x2a, 0xdd, 0x7e, 0xb2, 0xb8, 0x34, 0x61, 0x27, 0x59, 0xc4, 0x76, 0x3a, 0x4f, 0x62, 0xa6, 0xbb, 0x2e, 0x83, 0x18, 0x7a, 0x5e, 0x7c, 0x7f, 0xf9, 0x7b, 0xa9, 0xe5, 0x9b, 0x22, 0xfb, 0x44, 0xa2, 0x62, 0xa4, 0x4f, 0x4b, 0x6f, 0x69, 0x3b, 0x9a, 0x7e, 0xcd, 0xde, 0x94, 0x27, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char hseparator_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x2, 0x3, 0x0, 0x0, 0x0, 0xb9, 0x61, 0x56, 0x18, 0x0, 0x0, 0x0, 0xc, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x73, 0x9b, 0xaa, 0xce, 0xdc, 0xe1, 0xff, 0xff, 0xff, 0x64, 0x6c, 0x1, 0xd2, 0x0, 0x0, 0x0, 0x3, 0x74, 0x52, 0x4e, 0x53, 0x0, 0xb3, 0xb3, 0x67, 0xf6, 0xdb, 0x93, 0x0, 0x0, 0x0, 0x10, 0x49, 0x44, 0x41, 0x54, 0x8, 0xd7, 0x63, 0x60, 0x64, 0x60, 0x60, 0xc2, 0x40, 0x8c, 0xc, 0x0, 0x0, 0xc7, 0x0, 0xf, 0xf5, 0x92, 0x2f, 0xa7, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char hslider_bg_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x3, 0x0, 0x0, 0x0, 0x28, 0x2d, 0xf, 0x53, 0x0, 0x0, 0x0, 0x4b, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x4d, 0x4b, 0x59, 0x4d, 0x4b, 0x59, 0x4d, 0x4b, 0x59, 0x4d, 0x4b, 0x59, 0x4d, 0x4b, 0x59, 0x4d, 0x4b, 0x59, 0x4d, 0x4b, 0x59, 0x4d, 0x4b, 0x59, 0x40, 0x3e, 0x4a, 0x2a, 0x29, 0x2f, 0x20, 0x20, 0x24, 0x3f, 0x3e, 0x49, 0x1f, 0x1f, 0x24, 0x20, 0x20, 0x24, 0x4d, 0x4b, 0x59, 0x3f, 0x3e, 0x49, 0x3f, 0x3e, 0x49, 0x1e, 0x1e, 0x23, 0x1f, 0x1f, 0x23, 0x20, 0x20, 0x25, 0x22, 0x22, 0x27, 0x23, 0x23, 0x27, 0x23, 0x23, 0x28, 0x25, 0x25, 0x2a, 0x57, 0x2e, 0xcb, 0x70, 0x0, 0x0, 0x0, 0x12, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x0, 0x4, 0x19, 0x40, 0x5d, 0x66, 0x68, 0x28, 0x93, 0xf0, 0xfc, 0x94, 0xfc, 0xfd, 0x1a, 0x96, 0x95, 0x6b, 0xe2, 0xd5, 0x49, 0x0, 0x0, 0x0, 0x59, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x85, 0x4f, 0x83, 0x11, 0x3, 0x1, 0x10, 0xcc, 0x39, 0xef, 0xfe, 0xb, 0x7d, 0xdb, 0xc6, 0x8e, 0x8e, 0xb, 0xf8, 0x9d, 0x70, 0x1d, 0x9c, 0x46, 0x2d, 0xcc, 0x18, 0xea, 0x11, 0x80, 0xda, 0xb7, 0x36, 0xe, 0xf2, 0xbe, 0x2f, 0x80, 0x1c, 0xb0, 0xe5, 0xa2, 0x1f, 0xa5, 0xc0, 0xea, 0x12, 0x2c, 0x4, 0x75, 0x52, 0x80, 0x38, 0x46, 0x2b, 0x65, 0x9d, 0xa7, 0x97, 0xc1, 0xf5, 0x25, 0x82, 0x7a, 0x47, 0x4a, 0x83, 0xac, 0x93, 0x33, 0x8f, 0x83, 0xaa, 0xb2, 0xb4, 0xb8, 0x18, 0xbb, 0x58, 0xff, 0x4e, 0xdb, 0x1, 0xc3, 0xf1, 0x34, 0x3b, 0x7e, 0xbc, 0xb3, 0xc3, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char hslider_grabber_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0xf3, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x20, 0x1e, 0x30, 0x33, 0xf0, 0x32, 0xc8, 0x30, 0xa8, 0x3, 0xa1, 0xc, 0x90, 0xc5, 0x8c, 0x29, 0x2d, 0x96, 0x96, 0xd7, 0x79, 0x70, 0xc6, 0xfb, 0x19, 0xef, 0x3b, 0xf, 0xa6, 0xe5, 0x31, 0x88, 0xa1, 0x2b, 0xe1, 0x4d, 0xcb, 0x9b, 0xf4, 0xa2, 0xef, 0x7f, 0x3b, 0x10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3, 0x20, 0xb, 0x1, 0x0, 0x86, 0xe, 0x79, 0x54, 0x16, 0xbe, 0x69, 0xf5, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char hslider_grabber_disabled_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0xe7, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x20, 0x1e, 0x30, 0x33, 0xf0, 0x32, 0xc8, 0x30, 0xa8, 0x3, 0xa1, 0xc, 0x90, 0xc5, 0x8c, 0x29, 0x2d, 0x66, 0x9c, 0xe7, 0x7a, 0xd0, 0xe7, 0xbd, 0xcf, 0x7b, 0xd7, 0x83, 0xc6, 0x79, 0xc, 0x62, 0xe8, 0x4a, 0x78, 0x8d, 0xf3, 0x3c, 0x5f, 0xb8, 0xff, 0x77, 0x1, 0x42, 0xf7, 0xff, 0x9e, 0x2f, 0x80, 0x4a, 0x78, 0x51, 0x15, 0xc8, 0xb8, 0x1e, 0x74, 0xff, 0xef, 0x4, 0x81, 0x40, 0x25, 0xae, 0x7, 0x81, 0x16, 0xa1, 0x0, 0x75, 0x9f, 0xf7, 0x2e, 0x30, 0x5, 0x40, 0x53, 0x7c, 0xde, 0x3, 0xdd, 0x82, 0x2, 0x34, 0xbc, 0x3f, 0x20, 0x2b, 0xf0, 0xfe, 0xc0, 0xa0, 0x81, 0xaa, 0x40, 0xc9, 0xe3, 0xb6, 0x2b, 0x92, 0x2, 0xf7, 0x7b, 0xc, 0x2a, 0xa8, 0xa, 0xc4, 0x1d, 0xd7, 0x7b, 0x20, 0xb9, 0xc1, 0xfd, 0x28, 0x83, 0x14, 0xaa, 0x2, 0x2e, 0xcd, 0x54, 0xef, 0x3f, 0xce, 0x60, 0x69, 0xe7, 0xff, 0xde, 0xff, 0xd4, 0x53, 0x18, 0x78, 0xd0, 0xc2, 0x41, 0xd0, 0xd0, 0xe3, 0x1, 0xc4, 0x12, 0xd7, 0xff, 0x9e, 0xf, 0x98, 0x34, 0x18, 0x98, 0x50, 0x15, 0x30, 0x32, 0x88, 0xd8, 0xcc, 0xf1, 0xfa, 0xef, 0xc, 0x84, 0x5e, 0xff, 0xad, 0xa6, 0x32, 0x8, 0x63, 0x6, 0x35, 0x2b, 0x9b, 0x8e, 0xc7, 0x6d, 0xb7, 0xff, 0x6e, 0xff, 0x3d, 0xef, 0xb0, 0xe9, 0x30, 0xb0, 0x62, 0x8b, 0xd, 0x6e, 0x19, 0x7f, 0xbf, 0x2f, 0x7e, 0xdf, 0x15, 0x42, 0x11, 0xf6, 0x63, 0x58, 0x63, 0x59, 0x6c, 0x5b, 0xcb, 0x20, 0x6, 0x64, 0xe1, 0x0, 0x2c, 0xc, 0xdc, 0x40, 0xdd, 0x2c, 0xc8, 0x42, 0x0, 0x4, 0x5c, 0x63, 0x9b, 0xfc, 0xae, 0x1b, 0x2a, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char hslider_grabber_hl_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x3, 0x0, 0x0, 0x0, 0x28, 0x2d, 0xf, 0x53, 0x0, 0x0, 0x0, 0xc3, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,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x18, 0xcd, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char hslider_tick_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x10, 0x4, 0x3, 0x0, 0x0, 0x0, 0xc3, 0x98, 0xc3, 0xc0, 0x0, 0x0, 0x0, 0x1b, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x38, 0x55, 0x5f, 0x8c, 0xac, 0xb8, 0x81, 0xa2, 0xad, 0x98, 0x98, 0x98, 0x4e, 0x4e, 0x4e, 0x8d, 0x8d, 0x8d, 0x82, 0x82, 0x82, 0x4e, 0x4e, 0x4e, 0xc9, 0xf6, 0x7, 0x31, 0x0, 0x0, 0x0, 0x9, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x0, 0x0, 0x0, 0x79, 0x31, 0x79, 0x79, 0x1c, 0x7e, 0xed, 0x4b, 0xf4, 0x0, 0x0, 0x0, 0x20, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x60, 0x9, 0x60, 0x60, 0xb, 0x60, 0x60, 0xf, 0x60, 0x60, 0x6d, 0x60, 0x60, 0x14, 0x60, 0xc0, 0x4, 0x4c, 0x2, 0xc, 0xcc, 0x2, 0x70, 0x65, 0x0, 0x46, 0x9d, 0x2, 0xbe, 0xb7, 0xdf, 0x14, 0x38, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char hsplit_bg_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x1, 0x3, 0x0, 0x0, 0x0, 0xfe, 0xc1, 0x2c, 0xc8, 0x0, 0x0, 0x0, 0x6, 0x50, 0x4c, 0x54, 0x45, 0x27, 0x27, 0x29, 0xff, 0xff, 0xff, 0x11, 0xab, 0xb9, 0xf3, 0x0, 0x0, 0x0, 0xa, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x40, 0x3, 0x0, 0x0, 0x10, 0x0, 0x1, 0xb3, 0xac, 0xe2, 0xd0, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char hsplitter_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x40, 0x8, 0x0, 0x0, 0x0, 0x0, 0x2, 0x6f, 0x69, 0x56, 0x0, 0x0, 0x0, 0x2, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x0, 0x76, 0x93, 0xcd, 0x38, 0x0, 0x0, 0x0, 0x1a, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x40, 0x80, 0x5, 0xa9, 0x10, 0xcc, 0x90, 0x6a, 0xd, 0xc6, 0x70, 0x80, 0x4b, 0xcd, 0xa8, 0x9a, 0x51, 0x35, 0x0, 0x78, 0xd5, 0x34, 0xa1, 0x54, 0x8c, 0xd5, 0x84, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char icon_add_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0x1d, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x20, 0x11, 0x3c, 0xf8, 0xff, 0xe0, 0xff, 0xd0, 0x52, 0x80, 0x10, 0xc4, 0xd, 0x9, 0x2a, 0x18, 0x26, 0xe1, 0x40, 0x18, 0x0, 0x0, 0x5b, 0x26, 0x61, 0x4d, 0xc9, 0xc1, 0x48, 0x81, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char icon_close_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0x62, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0xa0, 0x16, 0xe0, 0x8c, 0xe0, 0x11, 0x43, 0xe6, 0xf3, 0x88, 0x71, 0x46, 0xa0, 0x48, 0x73, 0xfc, 0xe3, 0xb8, 0xcc, 0x23, 0x86, 0x90, 0xe6, 0xb8, 0xcc, 0xf1, 0xf, 0x49, 0x9, 0x8f, 0x28, 0xe7, 0x25, 0x8e, 0xff, 0x1c, 0xd7, 0xb9, 0x24, 0x91, 0x79, 0xdc, 0x12, 0x40, 0xe, 0xa6, 0x12, 0x54, 0x69, 0x4c, 0x25, 0xb7, 0x38, 0xae, 0x21, 0xa4, 0x31, 0x94, 0x80, 0x24, 0x81, 0xf0, 0x36, 0x48, 0x1a, 0xaf, 0x2, 0x88, 0x5b, 0xf0, 0x5a, 0x81, 0xa1, 0x4, 0xe1, 0x34, 0x84, 0x73, 0xb1, 0x4a, 0xa3, 0x7b, 0x9a, 0x70, 0x40, 0x11, 0xe, 0x6a, 0xca, 0x1, 0x0, 0x2a, 0x28, 0x37, 0x83, 0x3e, 0x27, 0xb0, 0x34, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char icon_color_pick_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0xaa, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x9d, 0x8e, 0x35, 0x82, 0x2, 0x41, 0x10, 0x45, 0x3b, 0xda, 0x3d, 0xca, 0xba, 0x44, 0x2b, 0x70, 0x9, 0xdc, 0xe1, 0x20, 0xe8, 0x91, 0x90, 0x78, 0x6e, 0x40, 0x4c, 0x82, 0x74, 0xff, 0xc2, 0x9d, 0x18, 0xa7, 0x6, 0x77, 0x7b, 0x23, 0x2d, 0xaf, 0x4c, 0xdc, 0xc, 0xbd, 0x65, 0x1e, 0x84, 0x80, 0x19, 0x55, 0x34, 0x60, 0x3e, 0xd0, 0xea, 0x17, 0x3d, 0x4a, 0xc8, 0x80, 0x1a, 0x60, 0xc2, 0x4f, 0xfd, 0x30, 0xe0, 0x1b, 0x2d, 0x16, 0xab, 0xa7, 0x2c, 0xe, 0x41, 0x68, 0xa5, 0xb9, 0xca, 0x91, 0x16, 0x2e, 0x54, 0xe0, 0x59, 0x54, 0x91, 0xfe, 0xa3, 0x3a, 0xff, 0xce, 0xab, 0x5b, 0xf, 0xa0, 0x4, 0x8f, 0x7b, 0x4c, 0xd3, 0x1b, 0xca, 0x32, 0xcc, 0x55, 0x7a, 0xf4, 0x76, 0x42, 0x2b, 0x97, 0x3e, 0xae, 0xfa, 0xdd, 0xd2, 0xd2, 0x8e, 0x72, 0xe1, 0x83, 0xaf, 0x9f, 0xa9, 0x28, 0x7d, 0x5b, 0xe2, 0x2a, 0xd, 0xc3, 0xa2, 0x78, 0xfe, 0x7d, 0x51, 0xfc, 0x0, 0x8a, 0x41, 0xcb, 0x3d, 0xb2, 0xae, 0x1c, 0xd3, 0xc, 0xa5, 0x30, 0x81, 0xc6, 0xda, 0x29, 0x8e, 0x83, 0x34, 0x25, 0x29, 0x4a, 0x46, 0x71, 0x1f, 0x33, 0xbe, 0x51, 0x89, 0xaf, 0x78, 0xe3, 0x97, 0x7e, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char icon_file_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x2, 0x3, 0x0, 0x0, 0x0, 0x62, 0x9d, 0x17, 0xf2, 0x0, 0x0, 0x0, 0x9, 0x70, 0x48, 0x59, 0x73, 0x0, 0x0, 0xe, 0xc3, 0x0, 0x0, 0xe, 0xc3, 0x1, 0xc7, 0x6f, 0xa8, 0x64, 0x0, 0x0, 0x0, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x0, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x0, 0x0, 0x0, 0x9, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0xdf, 0xdf, 0xdf, 0xe0, 0xe0, 0xe0, 0x42, 0xf, 0xc7, 0x49, 0x0, 0x0, 0x0, 0x2, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x88, 0x95, 0xf0, 0xc6, 0x2a, 0x0, 0x0, 0x0, 0x21, 0x49, 0x44, 0x41, 0x54, 0x8, 0xd7, 0x63, 0x60, 0x0, 0x1, 0xae, 0x55, 0x2d, 0x20, 0xa2, 0x13, 0x44, 0x74, 0x39, 0x80, 0x88, 0x9, 0x40, 0xa2, 0x1, 0xc4, 0x5d, 0xb5, 0x80, 0x68, 0x2, 0x4, 0x0, 0x95, 0x34, 0x18, 0xe4, 0x5e, 0x46, 0xf7, 0x27, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char icon_folder_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0x2e, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0xa0, 0x6, 0x78, 0x70, 0xf4, 0xc1, 0x7f, 0x24, 0x78, 0x18, 0x53, 0xc1, 0x7f, 0x54, 0x48, 0x50, 0xc1, 0x43, 0x1b, 0xbc, 0xa, 0x50, 0xad, 0x23, 0xa4, 0xe0, 0xff, 0x70, 0x52, 0x70, 0x18, 0x97, 0xf4, 0xfd, 0x43, 0xd4, 0x88, 0x4a, 0x0, 0x5a, 0xcb, 0x18, 0xab, 0x5e, 0xd9, 0x1a, 0x53, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char icon_grid_layout_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x5, 0x52, 0x69, 0x54, 0x58, 0x74, 0x58, 0x4d, 0x4c, 0x3a, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x2e, 0x78, 0x6d, 0x70, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3c, 0x3f, 0x78, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x3d, 0x22, 0xef, 0xbb, 0xbf, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x57, 0x35, 0x4d, 0x30, 0x4d, 0x70, 0x43, 0x65, 0x68, 0x69, 0x48, 0x7a, 0x72, 0x65, 0x53, 0x7a, 0x4e, 0x54, 0x63, 0x7a, 0x6b, 0x63, 0x39, 0x64, 0x22, 0x3f, 0x3e, 0xa, 0x3c, 0x78, 0x3a, 0x78, 0x6d, 0x70, 0x6d, 0x65, 0x74, 0x61, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x78, 0x3d, 0x22, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x3a, 0x6e, 0x73, 0x3a, 0x6d, 0x65, 0x74, 0x61, 0x2f, 0x22, 0x20, 0x78, 0x3a, 0x78, 0x6d, 0x70, 0x74, 0x6b, 0x3d, 0x22, 0x58, 0x4d, 0x50, 0x20, 0x43, 0x6f, 0x72, 0x65, 0x20, 0x35, 0x2e, 0x35, 0x2e, 0x30, 0x22, 0x3e, 0xa, 0x20, 0x3c, 0x72, 0x64, 0x66, 0x3a, 0x52, 0x44, 0x46, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x72, 0x64, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x31, 0x39, 0x39, 0x39, 0x2f, 0x30, 0x32, 0x2f, 0x32, 0x32, 0x2d, 0x72, 0x64, 0x66, 0x2d, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x2d, 0x6e, 0x73, 0x23, 0x22, 0x3e, 0xa, 0x20, 0x20, 0x3c, 0x72, 0x64, 0x66, 0x3a, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x72, 0x64, 0x66, 0x3a, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x3d, 0x22, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x64, 0x63, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x70, 0x75, 0x72, 0x6c, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x64, 0x63, 0x2f, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x31, 0x2e, 0x31, 0x2f, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x65, 0x78, 0x69, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x6e, 0x73, 0x2e, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x78, 0x69, 0x66, 0x2f, 0x31, 0x2e, 0x30, 0x2f, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x74, 0x69, 0x66, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x6e, 0x73, 0x2e, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x69, 0x66, 0x66, 0x2f, 0x31, 0x2e, 0x30, 0x2f, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x6e, 0x73, 0x2e, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x2f, 0x31, 0x2e, 0x30, 0x2f, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x78, 0x6d, 0x70, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x6e, 0x73, 0x2e, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x61, 0x70, 0x2f, 0x31, 0x2e, 0x30, 0x2f, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x78, 0x6d, 0x70, 0x4d, 0x4d, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x6e, 0x73, 0x2e, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x61, 0x70, 0x2f, 0x31, 0x2e, 0x30, 0x2f, 0x6d, 0x6d, 0x2f, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x73, 0x74, 0x45, 0x76, 0x74, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x6e, 0x73, 0x2e, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x61, 0x70, 0x2f, 0x31, 0x2e, 0x30, 0x2f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x2f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x23, 0x22, 0xa, 0x20, 0x20, 0x20, 0x65, 0x78, 0x69, 0x66, 0x3a, 0x50, 0x69, 0x78, 0x65, 0x6c, 0x58, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x31, 0x36, 0x22, 0xa, 0x20, 0x20, 0x20, 0x65, 0x78, 0x69, 0x66, 0x3a, 0x50, 0x69, 0x78, 0x65, 0x6c, 0x59, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x31, 0x36, 0x22, 0xa, 0x20, 0x20, 0x20, 0x65, 0x78, 0x69, 0x66, 0x3a, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x3d, 0x22, 0x31, 0x22, 0xa, 0x20, 0x20, 0x20, 0x74, 0x69, 0x66, 0x66, 0x3a, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x57, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x31, 0x36, 0x22, 0xa, 0x20, 0x20, 0x20, 0x74, 0x69, 0x66, 0x66, 0x3a, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3d, 0x22, 0x31, 0x36, 0x22, 0xa, 0x20, 0x20, 0x20, 0x74, 0x69, 0x66, 0x66, 0x3a, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x6e, 0x69, 0x74, 0x3d, 0x22, 0x32, 0x22, 0xa, 0x20, 0x20, 0x20, 0x74, 0x69, 0x66, 0x66, 0x3a, 0x58, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x37, 0x32, 0x2e, 0x30, 0x22, 0xa, 0x20, 0x20, 0x20, 0x74, 0x69, 0x66, 0x66, 0x3a, 0x59, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x37, 0x32, 0x2e, 0x30, 0x22, 0xa, 0x20, 0x20, 0x20, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x3a, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x3d, 0x22, 0x33, 0x22, 0xa, 0x20, 0x20, 0x20, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x3a, 0x49, 0x43, 0x43, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x3d, 0x22, 0x73, 0x52, 0x47, 0x42, 0x20, 0x49, 0x45, 0x43, 0x36, 0x31, 0x39, 0x36, 0x36, 0x2d, 0x32, 0x2e, 0x31, 0x22, 0xa, 0x20, 0x20, 0x20, 0x78, 0x6d, 0x70, 0x3a, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x44, 0x61, 0x74, 0x65, 0x3d, 0x22, 0x32, 0x30, 0x32, 0x31, 0x2d, 0x30, 0x38, 0x2d, 0x31, 0x35, 0x54, 0x30, 0x39, 0x3a, 0x34, 0x31, 0x3a, 0x34, 0x30, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0x22, 0xa, 0x20, 0x20, 0x20, 0x78, 0x6d, 0x70, 0x3a, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x44, 0x61, 0x74, 0x65, 0x3d, 0x22, 0x32, 0x30, 0x32, 0x31, 0x2d, 0x30, 0x38, 0x2d, 0x31, 0x35, 0x54, 0x30, 0x39, 0x3a, 0x34, 0x31, 0x3a, 0x34, 0x30, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0x22, 0x3e, 0xa, 0x20, 0x20, 0x20, 0x3c, 0x64, 0x63, 0x3a, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x72, 0x64, 0x66, 0x3a, 0x41, 0x6c, 0x74, 0x3e, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x72, 0x64, 0x66, 0x3a, 0x6c, 0x69, 0x20, 0x78, 0x6d, 0x6c, 0x3a, 0x6c, 0x61, 0x6e, 0x67, 0x3d, 0x22, 0x78, 0x2d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x3e, 0x47, 0x72, 0x69, 0x64, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x3c, 0x2f, 0x72, 0x64, 0x66, 0x3a, 0x6c, 0x69, 0x3e, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x72, 0x64, 0x66, 0x3a, 0x41, 0x6c, 0x74, 0x3e, 0xa, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x64, 0x63, 0x3a, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0xa, 0x20, 0x20, 0x20, 0x3c, 0x78, 0x6d, 0x70, 0x4d, 0x4d, 0x3a, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x3e, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x72, 0x64, 0x66, 0x3a, 0x53, 0x65, 0x71, 0x3e, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x72, 0x64, 0x66, 0x3a, 0x6c, 0x69, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x45, 0x76, 0x74, 0x3a, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x45, 0x76, 0x74, 0x3a, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3d, 0x22, 0x41, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x20, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x20, 0x31, 0x2e, 0x39, 0x2e, 0x31, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x45, 0x76, 0x74, 0x3a, 0x77, 0x68, 0x65, 0x6e, 0x3d, 0x22, 0x32, 0x30, 0x32, 0x31, 0x2d, 0x30, 0x38, 0x2d, 0x31, 0x35, 0x54, 0x30, 0x39, 0x3a, 0x34, 0x31, 0x3a, 0x34, 0x30, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0x22, 0x2f, 0x3e, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x72, 0x64, 0x66, 0x3a, 0x53, 0x65, 0x71, 0x3e, 0xa, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x78, 0x6d, 0x70, 0x4d, 0x4d, 0x3a, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x3e, 0xa, 0x20, 0x20, 0x3c, 0x2f, 0x72, 0x64, 0x66, 0x3a, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3e, 0xa, 0x20, 0x3c, 0x2f, 0x72, 0x64, 0x66, 0x3a, 0x52, 0x44, 0x46, 0x3e, 0xa, 0x3c, 0x2f, 0x78, 0x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x4b, 0xbc, 0x79, 0x6a, 0xe5, 0x65, 0xb, 0x5f, 0x53, 0x4a, 0x67, 0x29, 0xa5, 0xf7, 0x25, 0x6f, 0x76, 0x12, 0xdc, 0x13, 0x7b, 0x98, 0x88, 0x88, 0xef, 0x25, 0xbc, 0x1, 0x6c, 0x4d, 0x56, 0x9e, 0x2a, 0x4e, 0x48, 0xae, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char icon_grid_minimap_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x9, 0x70, 0x48, 0x59, 0x73, 0x0, 0x0, 0xe, 0xc3, 0x0, 0x0, 0xe, 0xc3, 0x1, 0xc7, 0x6f, 0xa8, 0x64, 0x0, 0x0, 0x0, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x0, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x0, 0x0, 0x2, 0xd, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0x75, 0x93, 0x31, 0x68, 0x14, 0x51, 0x10, 0x86, 0xbf, 0xd9, 0xd, 0xbb, 0xde, 0x76, 0x82, 0x21, 0xf8, 0xe0, 0xbc, 0x5d, 0x8b, 0x80, 0x69, 0x6c, 0xd2, 0x5a, 0x6a, 0x91, 0xc3, 0xd2, 0x46, 0x22, 0x8, 0x9, 0x89, 0x70, 0x85, 0x10, 0x41, 0xd,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 0x9e, 0x17, 0x1, 0x3d, 0xe0, 0x55, 0x1e, 0x6c, 0x79, 0x9e, 0x17, 0x55, 0x2a, 0x95, 0xc5, 0x1, 0x5, 0xcd, 0x66, 0x33, 0x30, 0xc6, 0x9c, 0xc6, 0x71, 0xbc, 0x2d, 0x22, 0x8f, 0x87, 0x78, 0xb0, 0x6d, 0x8c, 0x39, 0xed, 0xae, 0x74, 0xdf, 0x83, 0x3a, 0x70, 0x9c, 0x65, 0x59, 0x23, 0x49, 0x92, 0x5, 0x11, 0x9, 0x86, 0x79, 0x20, 0x22, 0x41, 0x92, 0x24, 0xb, 0x59, 0x96, 0x35, 0x80, 0x63, 0xa0, 0x2e, 0x3d, 0xf6, 0xc2, 0x91, 0xdc, 0x0, 0x5c, 0x55, 0x5d, 0xbf, 0x4, 0x9e, 0x3, 0x72, 0xfe, 0xaf, 0xfb, 0xaa, 0xe7, 0x79, 0x1f, 0x8d, 0x31, 0x6d, 0x29, 0x36, 0xf5, 0xce, 0x14, 0xb8, 0x33, 0x44, 0xc4, 0x6f, 0xdf, 0xf7, 0xd7, 0x8d, 0x31, 0xed, 0x5e, 0xe2, 0x1f, 0xb, 0x5c, 0xe2, 0xcb, 0xd, 0x9b, 0x69, 0xcb, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char icon_parent_folder_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0x68, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0xa0, 0x33, 0xb8, 0x27, 0xfe, 0xe0, 0xfc, 0x83, 0x73, 0xf7, 0xc4, 0x71, 0x48, 0xdf, 0x11, 0x7b, 0x78, 0xe9, 0xc1, 0x3f, 0x20, 0xbc, 0xfe, 0x40, 0x12, 0x8f, 0x34, 0x4c, 0x9, 0xa6, 0xe1, 0x57, 0x80, 0x12, 0x17, 0x81, 0xf8, 0x2f, 0x58, 0xe1, 0x15, 0x34, 0x8b, 0x1e, 0x9c, 0x5, 0xa, 0x5e, 0xb8, 0x23, 0x6, 0x52, 0x70, 0x5b, 0x14, 0xac, 0xf0, 0xc, 0xaa, 0x82, 0x7d, 0xf, 0x8e, 0xde, 0x14, 0xf9, 0xcf, 0x8, 0x52, 0xc0, 0xc0, 0x70, 0x5b, 0xf4, 0xe1, 0xc9, 0x7, 0x47, 0xb1, 0xb8, 0x3, 0xaa, 0x0, 0xa, 0x48, 0x52, 0x80, 0xb0, 0xea, 0xc8, 0xc3, 0x83, 0xc, 0x83, 0xe, 0x0, 0x0, 0xb8, 0x27, 0x55, 0x4c, 0xbe, 0xc0, 0xd2, 0xac, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char icon_reload_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0xb1, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0xad, 0x50, 0x35, 0xba, 0xc2, 0x40, 0x10, 0x7e, 0xcd, 0x33, 0x5c, 0xca, 0x1c, 0x21, 0x87, 0xc1, 0xa9, 0xd3, 0x23, 0x47, 0xca, 0x69, 0xb0, 0x6, 0x77, 0xdb, 0xfd, 0x17, 0x2f, 0x91, 0x3e, 0xee, 0xd2, 0xc1, 0x4e, 0xb5, 0xdf, 0xcc, 0x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0x2d, 0xf, 0x53, 0x0, 0x0, 0x0, 0x33, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0xf3, 0xf3, 0xf3, 0xff, 0x84, 0x84, 0xff, 0x84, 0x84, 0xff, 0x84, 0x84, 0xff, 0x85, 0x85, 0xff, 0x83, 0x83, 0xff, 0x84, 0x84, 0xff, 0x84, 0x84, 0xff, 0x84, 0x84, 0xff, 0x84, 0x84, 0xff, 0x84, 0x84, 0xff, 0x80, 0x80, 0xff, 0x84, 0x84, 0xff, 0x84, 0x84, 0xff, 0x84, 0x84, 0xff, 0xff, 0xff, 0xa, 0xa5, 0x43, 0x1, 0x0, 0x0, 0x0, 0x10, 0x74, 0x52, 0x4e, 0x53, 0x0, 0xff, 0x1d, 0xac, 0xf2, 0xaf, 0x27, 0xed, 0xff, 0xee, 0xb4, 0x1b, 0x1c, 0xb6, 0xaa, 0xf1, 0x50, 0xa6, 0xdd, 0x5f, 0x0, 0x0, 0x0, 0x4e, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x62, 0x0, 0x2, 0x40, 0x23, 0xd3, 0x60, 0x0, 0x40, 0xc, 0x3, 0xaf, 0x76, 0x93, 0xfd, 0x97, 0x7d, 0x9b, 0x55, 0x70, 0x12, 0x62, 0xaf, 0x68, 0x0, 0xc4, 0xe9, 0x3c, 0x1, 0x67, 0xf7, 0x17, 0x20, 0x95, 0xd6, 0xc6, 0xee, 0x80, 0x74, 0xde, 0x7b, 0x1f, 0x24, 0xb0, 0x64, 0x29, 0x1f, 0x53, 0x2e, 0xbe, 0x6e, 0x80, 0xf6, 0x19, 0x90, 0x9e, 0x36, 0x8b, 0xf7, 0xc0, 0x5c, 0xdf, 0x0, 0x66, 0x60, 0xae, 0xf3, 0xb9, 0x1, 0xfb, 0xe9, 0x1, 0xa6, 0x26, 0x1, 0xcd, 0x30, 0x66, 0x63, 0x6, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0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 0x1e, 0xd8, 0x35, 0xf5, 0x96, 0xa3, 0xbe, 0x1, 0x89, 0x2e, 0xa8, 0xb5, 0x62, 0xa9, 0x9, 0x90, 0x9e, 0xc7, 0x4a, 0x53, 0x20, 0xd0, 0x3d, 0xdb, 0xba, 0xda, 0x70, 0xd2, 0x77, 0x60, 0xde, 0x18, 0xad, 0x1, 0x2e, 0x6b, 0xab, 0x39, 0xc0, 0xc3, 0x60, 0x75, 0x5c, 0x2e, 0x4f, 0xb5, 0xc3, 0x1d, 0x3f, 0xdd, 0x17, 0xaa, 0x9a, 0xff, 0x19, 0x66, 0x2f, 0x61, 0xdf, 0x87, 0xcf, 0x33, 0x46, 0xf5, 0x9, 0xdb, 0xf3, 0x10, 0xc5, 0x55, 0x93, 0xc, 0xea, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char icon_zoom_less_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0x13, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x18, 0x31, 0xe0, 0xc1, 0x7f, 0x3c, 0x90, 0xb0, 0x82, 0x11, 0x2, 0x0, 0xbf, 0x57, 0x36, 0x25, 0x52, 0x24, 0x7b, 0x26, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char icon_zoom_more_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0x1c, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x20, 0x11, 0x3c, 0xf8, 0xf, 0x84, 0x43, 0x4a, 0x1, 0x42, 0x10, 0xf, 0x24, 0xa8, 0x60, 0x78, 0x84, 0x3, 0x61, 0x0, 0x0, 0xca, 0x3a, 0x6d, 0x8d, 0x50, 0x1e, 0x9a, 0xaa, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char icon_zoom_reset_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0x33, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x20, 0xa, 0x3c, 0xc, 0x7b, 0xf0, 0xff, 0xc1, 0x7f, 0x9c, 0x22, 0xcf, 0x44, 0x1e, 0xbc, 0x84, 0x72, 0xb1, 0x8b, 0x3c, 0x58, 0x5, 0xe4, 0x40, 0xb8, 0x38, 0x45, 0x18, 0x60, 0x5c, 0x84, 0x30, 0x59, 0xa, 0xa0, 0x80, 0x6e, 0xa, 0x86, 0x92, 0x2f, 0x8, 0x3, 0x0, 0x69, 0xc8, 0x86, 0x87, 0x72, 0xca, 0x85, 0x23, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char indeterminate_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0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xc, 0x67, 0x9f, 0xc3, 0xe2, 0x39, 0xc, 0x52, 0xec, 0xd3, 0xd7, 0x4, 0xb3, 0xcf, 0xbd, 0x3a, 0x0, 0xa0, 0xa2, 0x8, 0xbc, 0xf6, 0x84, 0x3a, 0x9d, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char line_edit_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0xa, 0x4, 0x3, 0x0, 0x0, 0x0, 0x7f, 0x1c, 0xd2, 0x8e, 0x0, 0x0, 0x0, 0x2a, 0x50, 0x4c, 0x54, 0x45, 0x17, 0x16, 0x1a, 0x1d, 0x1c, 0x21, 0x20, 0x1e, 0x24, 0x21, 0x1f, 0x25, 0x1d, 0x1c, 0x21, 0x20, 0x1e, 0x24, 0x1d, 0x1c, 0x21, 0x1d, 0x1c, 0x21, 0x24, 0x22, 0x29, 0x28, 0x26, 0x2d, 0x28, 0x26, 0x2e, 0x2b, 0x2a, 0x31, 0x2c, 0x2a, 0x32, 0xff, 0xff, 0xff, 0xb9, 0x11, 0x56, 0x3e, 0x0, 0x0, 0x0, 0x8, 0x74, 0x52, 0x4e, 0x53, 0x6f, 0xef, 0xf7, 0xf7, 0xf0, 0xf9, 0xf1, 0xee, 0xcf, 0x21, 0xd2, 0xdf, 0x0, 0x0, 0x0, 0x2d, 0x49, 0x44, 0x41, 0x54, 0x8, 0xd7, 0x63, 0x60, 0x54, 0x36, 0x36, 0x12, 0x60, 0xf0, 0x98, 0xb5, 0x6a, 0x65, 0xb, 0x43, 0xe4, 0x9e, 0x33, 0xa7, 0xa7, 0x32, 0x58, 0x9d, 0x39, 0x73, 0x66, 0x31, 0x16, 0x12, 0x22, 0xb, 0x52, 0xd9, 0xc6, 0xc0, 0x2, 0xd4, 0x55, 0x0, 0x0, 0xc, 0x14, 0x1a, 0x90, 0x55, 0x1a, 0xec, 0xdb, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char line_edit_clear_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0x65, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0xad, 0x90, 0x1, 0x6, 0xc0, 0x30, 0xc, 0x45, 0x77, 0x89, 0xd5, 0x76, 0xb3, 0x9e, 0x7b, 0x65, 0x63, 0xd, 0xf9, 0xbb, 0x48, 0x3b, 0xb3, 0x92, 0x54, 0x42, 0xb1, 0x5, 0x88, 0xf7, 0xc8, 0xcf, 0x9f, 0xfe, 0x1a, 0x8e, 0x14, 0xf4, 0x4e, 0x81, 0x63, 0x87, 0x51, 0x90, 0x28, 0x8, 0x46, 0x42, 0x51, 0x4a, 0x9e, 0x79, 0x43, 0xc5, 0x81, 0x55, 0x6f, 0xbc, 0x34, 0xdc, 0x2b, 0x2e, 0x16, 0xe5, 0x3a, 0xb1, 0xb, 0xb6, 0xca, 0x3, 0x2b, 0xb2, 0xc2, 0xbe, 0xf0, 0x66, 0x71, 0x4f, 0x70, 0x3b, 0x61, 0x14, 0x89, 0x26, 0x71, 0x5d, 0x6c, 0x9f, 0x1e, 0x17, 0x35, 0xae, 0xfa, 0xeb, 0xdc, 0x62, 0xc3, 0x84, 0x2d, 0x77, 0x22, 0xda, 0x98, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char line_edit_disabled_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0xa, 0x8, 0x4, 0x0, 0x0, 0x0, 0x27, 0x3b, 0x7, 0x36, 0x0, 0x0, 0x0, 0x4e, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x94, 0xc8, 0x67, 0x6b, 0x60, 0xe6, 0x60, 0x64, 0x80, 0x80, 0xff, 0xc, 0x7f, 0x7f, 0xfc, 0x6a, 0x60, 0x94, 0xfb, 0xc0, 0xce, 0xcf, 0xc2, 0x80, 0x10, 0xfc, 0xc3, 0xf0, 0xf3, 0x23, 0xa3, 0xe2, 0x4f, 0xe, 0x36, 0x54, 0xc1, 0x1f, 0xbf, 0x18, 0x95, 0xbe, 0x73, 0x70, 0xb0, 0x30, 0xc0, 0x1, 0x48, 0xf0, 0x7, 0x85, 0x82, 0x58, 0x2d, 0xc2, 0xe6, 0xa4, 0x4f, 0x20, 0xc7, 0x37, 0x32, 0xb3, 0x23, 0x39, 0xfe, 0xfb, 0xaf, 0x46, 0x0, 0xee, 0x2a, 0x2f, 0xce, 0x4c, 0x47, 0x66, 0xf6, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char mini_checkerboard_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x0, 0x0, 0x0, 0x0, 0x3a, 0x98, 0xa0, 0xbd, 0x0, 0x0, 0x0, 0x17, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x78, 0x0, 0x5, 0xff, 0xa1, 0x60, 0xa0, 0x4, 0x60, 0xc, 0x98, 0xc4, 0x0, 0x9, 0x0, 0x0, 0x44, 0x81, 0xef, 0x81, 0xc1, 0x26, 0x8e, 0x8, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char option_arrow_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0xc, 0x8, 0x4, 0x0, 0x0, 0x0, 0xfc, 0x7c, 0x94, 0x6c, 0x0, 0x0, 0x0, 0x3e, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x20, 0x2, 0xdc, 0x4f, 0xb8, 0x9f, 0x80, 0x45, 0xf8, 0xa1, 0xf6, 0x83, 0x2f, 0xf, 0xbe, 0x3c, 0xd4, 0x46, 0x13, 0x7e, 0xc1, 0xfd, 0xe0, 0xea, 0x83, 0xff, 0x40, 0x78, 0xf5, 0x5, 0x37, 0xaa, 0xfa, 0xf9, 0x40, 0x41, 0x30, 0x7c, 0x38, 0x9f, 0x81, 0x12, 0x80, 0x69, 0x14, 0x61, 0xcb, 0x11, 0xce, 0xc5, 0xe5, 0x41, 0xc2, 0x0, 0x0, 0x95, 0x48, 0x37, 0x91, 0x1f, 0xec, 0x77, 0x5, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char option_button_disabled_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x10, 0x8, 0x3, 0x0, 0x0, 0x0, 0x40, 0xde, 0x8d, 0x6b, 0x0, 0x0, 0x1, 0x2f, 0x50, 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x28, 0x4a, 0x4a, 0x4a, 0x36, 0x36, 0x36, 0x2a, 0x2a, 0x30, 0x2c, 0x2c, 0x32, 0x2d, 0x2d, 0x34, 0x2e, 0x2e, 0x35, 0x2f, 0x2f, 0x36, 0x2a, 0x2a, 0x31, 0x62, 0x62, 0x62, 0x56, 0x56, 0x56, 0x23, 0x23, 0x28, 0x25, 0x25, 0x2b, 0x27, 0x27, 0x2d, 0x28, 0x28, 0x2e, 0x29, 0x29, 0x2f, 0x24, 0x24, 0x28, 0x26, 0x26, 0x2b, 0x54, 0x54, 0x54, 0x43, 0x43, 0x43, 0x44, 0x44, 0x44, 0x48, 0x48, 0x48, 0x22, 0x22, 0x26, 0x25, 0x25, 0x2a, 0x2a, 0x2a, 0x2f, 0x2b, 0x2b, 0x31, 0x26, 0x26, 0x2c, 0x22, 0x22, 0x27, 0x2d, 0x2d, 0x33, 0x52, 0x52, 0x52, 0x42, 0x42, 0x42, 0x27, 0x27, 0x2b, 0x29, 0x29, 0x2e, 0x2c, 0x2c, 0x31, 0x2e, 0x2e, 0x34, 0x51, 0x51, 0x51, 0x40, 0x40, 0x40, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0x20, 0x20, 0x25, 0x24, 0x24, 0x29, 0x24, 0x24, 0x2a, 0x4d, 0x4d, 0x4d, 0x3e, 0x3e, 0x3e, 0x20, 0x20, 0x23, 0x29, 0x29, 0x2d, 0x2b, 0x2b, 0x30, 0x28, 0x28, 0x2d, 0x4c, 0x4c, 0x4c, 0x3d, 0x3d, 0x3d, 0x1e, 0x1e, 0x22, 0x27, 0x27, 0x2c, 0x22, 0x22, 0x28, 0x4a, 0x4a, 0x4a, 0x3b, 0x3b, 0x3b, 0x1d, 0x1d, 0x21, 0x20, 0x20, 0x24, 0x23, 0x23, 0x27, 0x21, 0x21, 0x25, 0x21, 0x21, 0x26, 0x3a, 0x3a, 0x3a, 0x49, 0x49, 0x49, 0x1e, 0x1e, 0x21, 0x1f, 0x1f, 0x23,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 0x9e, 0x6a, 0x8c, 0x8a, 0xa0, 0xa0, 0x8f, 0x9c, 0x15, 0xb7, 0x52, 0x61, 0x12, 0xa8, 0x6, 0x56, 0x4d, 0x2b, 0xcb, 0x98, 0xb8, 0xc4, 0x3, 0x5d, 0x2f, 0x24, 0x43, 0xc3, 0xc0, 0x6, 0xcd, 0x2a, 0xcb, 0x4c, 0xe, 0x4a, 0x95, 0x2a, 0x57, 0x49, 0x88, 0x24, 0x70, 0xc, 0x70, 0xcf, 0xcb, 0x17, 0x8c, 0x5, 0x8e, 0x77, 0xc9, 0x79, 0xf1, 0x20, 0x9, 0x80, 0x4, 0xd6, 0x64, 0x50, 0xbb, 0xe2, 0x6a, 0xd2, 0x30, 0xc0, 0xd7, 0xf5, 0x89, 0x19, 0xb4, 0x46, 0xbe, 0x79, 0xc3, 0x35, 0x69, 0x80, 0x6e, 0x15, 0xb8, 0x33, 0xef, 0x99, 0x7, 0x84, 0x5a, 0x6d, 0xae, 0x45, 0x8f, 0xb0, 0x1f, 0xed, 0x86, 0x3f, 0xbe, 0xa6, 0x6f, 0x3f, 0x75, 0x9e, 0xb9, 0xe, 0x1d, 0xd2, 0x78, 0x79, 0xed, 0x62, 0xf0, 0x19, 0xdc, 0xeb, 0x17, 0xdf, 0xb8, 0x77, 0x7a, 0xcd, 0xed, 0x8f, 0xcf, 0x5e, 0xb7, 0x8e, 0x19, 0xe5, 0xab, 0x3f, 0xf8, 0x66, 0xda, 0x3b, 0xf4, 0xa1, 0x76, 0xf7, 0x90, 0xe3, 0x8e, 0x67, 0x70, 0x1, 0xbc, 0x9f, 0x91, 0xc1, 0xfe, 0x1, 0x7d, 0xea, 0x7f, 0x3f, 0xeb, 0xef, 0xef, 0xfe, 0x5, 0xd6, 0xe3, 0x56, 0x89, 0xd8, 0x62, 0xb6, 0x83, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char option_button_hover_png[] = {
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, 0x29, 0x29, 0x2f, 0x28, 0x28, 0x2e, 0x25, 0x25, 0x2b, 0x23, 0x23, 0x28, 0x5b, 0x57, 0x66, 0x26, 0x26, 0x2c, 0x25, 0x25, 0x2a, 0x2a, 0x2a, 0x2f, 0x2b, 0x2b, 0x31, 0x22, 0x22, 0x26, 0x59, 0x55, 0x64, 0x47, 0x44, 0x50, 0x2d, 0x2d, 0x33, 0x22, 0x22, 0x27, 0x58, 0x54, 0x64, 0x46, 0x43, 0x50, 0x27, 0x27, 0x2b, 0x2e, 0x2e, 0x34, 0x2c, 0x2c, 0x31, 0x29, 0x29, 0x2e, 0x56, 0x53, 0x63, 0x45, 0x42, 0x4f, 0x56, 0x53, 0x62, 0x45, 0x42, 0x4e, 0x24, 0x24, 0x2a, 0x24, 0x24, 0x29, 0x20, 0x20, 0x25, 0x55, 0x51, 0x62, 0x44, 0x41, 0x4e, 0x28, 0x28, 0x2d, 0x2b, 0x2b, 0x30, 0x29, 0x29, 0x2d, 0x20, 0x20, 0x23, 0x55, 0x51, 0x60, 0x44, 0x41, 0x4d, 0x22, 0x22, 0x28, 0x27, 0x27, 0x2c, 0x1e, 0x1e, 0x22, 0x43, 0x40, 0x4c, 0x54, 0x50, 0x5f, 0x21, 0x21, 0x26, 0x21, 0x21, 0x25, 0x23, 0x23, 0x27, 0x20, 0x20, 0x24, 0x1d, 0x1d, 0x21, 0x47, 0x43, 0x51, 0x43, 0x3f, 0x4d, 0x42, 0x3f, 0x4c, 0x53, 0x4f, 0x5f, 0x1f, 0x1f, 0x24, 0x1f, 0x1f, 0x23, 0x1e, 0x1e, 0x21, 0x53, 0x50, 0x5f, 0x53, 0x4f, 0x5e, 0x5f, 0x5a, 0x6c, 0xd3, 0x26, 0x54, 0x35, 0x0, 0x0, 0x0, 0x24, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x4, 0xa, 0x11, 0x19, 0x1f, 0x22, 0x24, 0x1d, 0x16, 0xd, 0x7, 0x2, 0x15, 0x25, 0x34, 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, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2d, 0x2d, 0x34, 0x2b, 0x2b, 0x31, 0x5f, 0x5a, 0x6c, 0x42, 0x40, 0x4b, 0x2a, 0x2a, 0x30, 0x5f, 0x5a, 0x6b, 0x22, 0x22, 0x27, 0x56, 0x53, 0x64, 0x22, 0x22, 0x29, 0x24, 0x24, 0x28, 0x57, 0x53, 0x63, 0x3e, 0x3c, 0x47, 0x2a, 0x2a, 0x30, 0x2c, 0x2c, 0x32, 0x2d, 0x2d, 0x34, 0x2e, 0x2e, 0x35, 0x2f, 0x2f, 0x36, 0x2a, 0x2a, 0x31, 0x67, 0x63, 0x76, 0x5a, 0x56, 0x67, 0x5b, 0x57, 0x68, 0x23, 0x23, 0x28, 0x25, 0x25, 0x2b, 0x27, 0x27, 0x2d, 0x28, 0x28, 0x2e, 0x29, 0x29, 0x2f, 0x24, 0x24, 0x28, 0x26, 0x26, 0x2b, 0x5a, 0x56, 0x65, 0x48, 0x45, 0x51, 0x49, 0x46, 0x52, 0x4d, 0x4a, 0x57, 0x22, 0x22, 0x26, 0x25, 0x25, 0x2a, 0x2a, 0x2a, 0x2f, 0x2b, 0x2b, 0x31, 0x26, 0x26, 0x2c, 0x5b, 0x57, 0x66, 0x22, 0x22, 0x27, 0x2d, 0x2d, 0x33, 0x59, 0x55, 0x64, 0x47, 0x44, 0x50, 0x27, 0x27, 0x2b, 0x29, 0x29, 0x2e, 0x2c, 0x2c, 0x31, 0x2e, 0x2e, 0x34, 0x58, 0x54, 0x64, 0x46, 0x43, 0x50, 0x56, 0x53, 0x63, 0x45, 0x42, 0x4f, 0x20, 0x20, 0x25, 0x24, 0x24, 0x29, 0x24, 0x24, 0x2a, 0x56, 0x53, 0x62, 0x45, 0x42, 0x4e, 0x20, 0x20, 0x23, 0x29, 0x29, 0x2d, 0x2b, 0x2b, 0x30, 0x28, 0x28, 0x2d, 0x55, 0x51, 0x62, 0x44, 0x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, 0x33, 0x31, 0x39, 0x47, 0x44, 0x50, 0x24, 0x24, 0x28, 0x24, 0x24, 0x29, 0x52, 0x50, 0x5d, 0x51, 0x4f, 0x5d, 0x5d, 0x5a, 0x6a, 0x2a, 0x2a, 0x31, 0x2a, 0x2a, 0x30, 0x2d, 0x2d, 0x34, 0x2f, 0x2f, 0x36, 0x2e, 0x2e, 0x35, 0x2c, 0x2c, 0x32, 0x46, 0x42, 0x4e, 0x42, 0x3e, 0x4a, 0x41, 0x3e, 0x49, 0x51, 0x4e, 0x5b, 0x26, 0x26, 0x2b, 0x24, 0x24, 0x28, 0x27, 0x27, 0x2d, 0x29, 0x29, 0x2f, 0x28, 0x28, 0x2e, 0x25, 0x25, 0x2b, 0x23, 0x23, 0x28, 0x40, 0x3e, 0x48, 0x50, 0x4e, 0x5a, 0x26, 0x26, 0x2c, 0x25, 0x25, 0x2a, 0x2a, 0x2a, 0x2f, 0x2b, 0x2b, 0x31, 0x22, 0x22, 0x26, 0x4f, 0x4c, 0x59, 0x3f, 0x3d, 0x47, 0x2d, 0x2d, 0x33, 0x22, 0x22, 0x27, 0x4e, 0x4a, 0x58, 0x3e, 0x3b, 0x46, 0x27, 0x27, 0x2b, 0x2e, 0x2e, 0x34, 0x2c, 0x2c, 0x31, 0x29, 0x29, 0x2e, 0x4b, 0x49, 0x55, 0x3c, 0x3a, 0x44, 0x4a, 0x47, 0x54, 0x3b, 0x39, 0x43, 0x24, 0x24, 0x2a, 0x24, 0x24, 0x29, 0x20, 0x20, 0x25, 0x49, 0x46, 0x53, 0x3a, 0x38, 0x42, 0x28, 0x28, 0x2d, 0x2b, 0x2b, 0x30, 0x29, 0x29, 0x2d, 0x20, 0x20, 0x23, 0x47, 0x45, 0x50, 0x39, 0x37, 0x40, 0x22, 0x22, 0x28, 0x27, 0x27, 0x2c, 0x1e, 0x1e, 0x22, 0x47, 0x43, 0x50, 0x38, 0x35, 0x3f, 0x46, 0x42, 0x4f, 0x21, 0x21, 0x26, 0x21, 0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8a, 0xec, 0xd4, 0xeb, 0x9a, 0x1a, 0x1b, 0x82, 0xf5, 0x79, 0x20, 0x2, 0x46, 0x1f, 0x58, 0x8d, 0x95, 0xe4, 0x6a, 0x1d, 0xcf, 0x4f, 0x89, 0x85, 0x10, 0x80, 0x56, 0x1f, 0x8, 0xf4, 0x53, 0xf7, 0x81, 0x6c, 0x4, 0xa0, 0xf5, 0x41, 0x69, 0xeb, 0xb7, 0xd0, 0x7b, 0x86, 0xcc, 0x36, 0xbb, 0x11, 0x90, 0x66, 0x1f, 0x88, 0xef, 0xbd, 0x64, 0x92, 0x5a, 0x7b, 0x4e, 0xed, 0x34, 0x42, 0x20, 0xa5, 0xd5, 0x7, 0x27, 0x69, 0xfb, 0x51, 0x8d, 0x69, 0x6e, 0xd5, 0xcc, 0xb9, 0x18, 0xf4, 0xaf, 0x40, 0x6e, 0x3f, 0x1d, 0xab, 0xf1, 0xdd, 0xc7, 0xf1, 0x12, 0x45, 0xc, 0xce, 0x4f, 0x17, 0x12, 0xd0, 0xb6, 0xc4, 0x87, 0x1a, 0x6f, 0x2f, 0x48, 0x8b, 0xef, 0x31, 0xd0, 0x6e, 0xce, 0xa8, 0xc0, 0x25, 0x56, 0x7d, 0x5, 0x52, 0xed, 0x6e, 0xae, 0x68, 0x0, 0xd4, 0x86, 0x7f, 0x56, 0x43, 0x62, 0x38, 0xc, 0x46, 0x28, 0xba, 0x1, 0x7a, 0xad, 0x4f, 0x59, 0x90, 0xab, 0xbf, 0xa4, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char option_button_normal_mirrored_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x10, 0x8, 0x3, 0x0, 0x0, 0x0, 0x40, 0xde, 0x8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a, 0x40, 0x3e, 0x48, 0x22, 0x22, 0x27, 0x2d, 0x2d, 0x33, 0x4f, 0x4c, 0x59, 0x3f, 0x3d, 0x47, 0x27, 0x27, 0x2b, 0x29, 0x29, 0x2e, 0x2c, 0x2c, 0x31, 0x2e, 0x2e, 0x34, 0x4e, 0x4a, 0x58, 0x3e, 0x3b, 0x46, 0x4b, 0x49, 0x55, 0x3c, 0x3a, 0x44, 0x20, 0x20, 0x25, 0x24, 0x24, 0x29, 0x24, 0x24, 0x2a, 0x4a, 0x47, 0x54, 0x3b, 0x39, 0x43, 0x20, 0x20, 0x23, 0x29, 0x29, 0x2d, 0x2b, 0x2b, 0x30, 0x28, 0x28, 0x2d, 0x49, 0x46, 0x53, 0x3a, 0x38, 0x42, 0x1e, 0x1e, 0x22, 0x27, 0x27, 0x2c, 0x22, 0x22, 0x28, 0x47, 0x45, 0x50, 0x39, 0x37, 0x40, 0x1d, 0x1d, 0x21, 0x20, 0x20, 0x24, 0x23, 0x23, 0x27, 0x21, 0x21, 0x25, 0x21, 0x21, 0x26, 0x46, 0x42, 0x4f, 0x38, 0x35, 0x3f, 0x47, 0x43, 0x50, 0x1e, 0x1e, 0x21, 0x1f, 0x1f, 0x23, 0x1f, 0x1f, 0x24, 0x44, 0x41, 0x4e, 0x36, 0x34, 0x3e, 0x4e, 0x4b, 0x58, 0x44, 0x41, 0x4c, 0x44, 0x42, 0x4d, 0x7d, 0x2e, 0xcf, 0xc5, 0x0, 0x0, 0x0, 0x24, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x2, 0x7, 0xd, 0x16, 0x1d, 0x22, 0x24, 0x1f, 0x19, 0x11, 0xa, 0x4, 0x1b, 0x2d, 0x3a, 0x43, 0x48, 0x47, 0x46, 0x3f, 0x34, 0x25, 0x15, 0x49, 0xe6, 0xef, 0x77, 0xe6, 0xef, 0xe7, 0xef, 0x4a, 0xe4, 0xef, 0x77, 0x7e, 0xb9, 0x59, 0x66, 0x0, 0x0, 0x0, 0x1, 0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, 0xaa, 0x67, 0x4c, 0x55, 0xe8, 0x7, 0xe8, 0xbc, 0x36, 0x34, 0x83, 0x52, 0xcf, 0x34, 0x2e, 0x98, 0x6, 0x9, 0xd4, 0x4b, 0x9, 0xae, 0xf4, 0x6b, 0xea, 0x46, 0x55, 0x9b, 0x2d, 0xa6, 0x49, 0x8e, 0x30, 0x6f, 0xcd, 0xba, 0x33, 0xb8, 0xa6, 0x63, 0xde, 0xb5, 0xef, 0x99, 0x36, 0x19, 0x52, 0x7b, 0x78, 0xec, 0x20, 0x70, 0x28, 0xd4, 0xed, 0x3d, 0x3d, 0x33, 0x2f, 0xe4, 0x9a, 0xab, 0xaf, 0x6f, 0xdd, 0x4e, 0xd, 0x51, 0xd2, 0x7b, 0xef, 0xe3, 0x93, 0x6a, 0x25, 0xc8, 0x43, 0xad, 0xad, 0xab, 0x96, 0x3d, 0x98, 0xc1, 0x6, 0xf8, 0xfa, 0x76, 0xfd, 0x6c, 0x6c, 0x92, 0xa7, 0xfe, 0xf7, 0xb3, 0xfe, 0xfe, 0xee, 0x5f, 0xa1, 0x5f, 0x59, 0xbd, 0x75, 0x41, 0x2b, 0xf8, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char option_button_pressed_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x10, 0x8, 0x3, 0x0, 0x0, 0x0, 0x40, 0xde, 0x8d, 0x6b, 0x0, 0x0, 0x1, 0x4a, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x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49, 0x46, 0x53, 0x3a, 0x38, 0x42, 0x4a, 0x47, 0x54, 0x3b, 0x39, 0x43, 0x24, 0x24, 0x2a, 0x24, 0x24, 0x29, 0x20, 0x20, 0x25, 0x4b, 0x49, 0x55, 0x3c, 0x3a, 0x44, 0x28, 0x28, 0x2d, 0x2b, 0x2b, 0x30, 0x29, 0x29, 0x2d, 0x20, 0x20, 0x23, 0x4e, 0x4a, 0x58, 0x3e, 0x3b, 0x46, 0x22, 0x22, 0x28, 0x27, 0x27, 0x2c, 0x1e, 0x1e, 0x22, 0x50, 0x4d, 0x5a, 0x3f, 0x3d, 0x48, 0x3f, 0x3d, 0x47, 0x4f, 0x4c, 0x59, 0x21, 0x21, 0x26, 0x21, 0x21, 0x25, 0x23, 0x23, 0x27, 0x20, 0x20, 0x24, 0x1d, 0x1d, 0x21, 0x45, 0x42, 0x4d, 0x41, 0x3e, 0x49, 0x40, 0x3e, 0x48, 0x50, 0x4e, 0x5a, 0x1f, 0x1f, 0x24, 0x1f, 0x1f, 0x23, 0x1e, 0x1e, 0x21, 0x52, 0x4e, 0x5c, 0x51, 0x4e, 0x5b, 0x5d, 0x59, 0x69, 0x10, 0x9d, 0xe0, 0x3c, 0x0, 0x0, 0x0, 0x24, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x4, 0xa, 0x11, 0x19, 0x1f, 0x22, 0x24, 0x1d, 0x16, 0xd, 0x7, 0x2, 0x15, 0x25, 0x34, 0x3f, 0x46, 0x47, 0x48, 0x43, 0x3a, 0x2d, 0x1b, 0x77, 0xef, 0xe6, 0x49, 0xef, 0xe6, 0xef, 0xe7, 0x77, 0xef, 0xe4, 0x4a, 0xba, 0xea, 0xc1, 0xeb, 0x0, 0x0, 0x0, 0xe6, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x6c, 0xcf, 0x3, 0x62, 0x4, 0x51, 0x10, 0x4, 0xd0, 0xaa, 0x31, 0x62, 0xdb, 0xb8, 0x49, 0x2e, 0x9e, 0x3b, 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0x2a, 0x30, 0x2c, 0x2c, 0x32, 0x2d, 0x2d, 0x34, 0x2e, 0x2e, 0x35, 0x2f, 0x2f, 0x36, 0x2a, 0x2a, 0x31, 0x4c, 0x49, 0x56, 0x42, 0x40, 0x4b, 0x43, 0x40, 0x4c, 0x23, 0x23, 0x28, 0x25, 0x25, 0x2b, 0x27, 0x27, 0x2d, 0x28, 0x28, 0x2e, 0x29, 0x29, 0x2f, 0x24, 0x24, 0x28, 0x26, 0x26, 0x2b, 0x44, 0x41, 0x4c, 0x36, 0x34, 0x3d, 0x3a, 0x38, 0x41, 0x22, 0x22, 0x26, 0x25, 0x25, 0x2a, 0x2a, 0x2a, 0x2f, 0x2b, 0x2b, 0x31, 0x26, 0x26, 0x2c, 0x44, 0x41, 0x4e, 0x36, 0x34, 0x3e, 0x44, 0x42, 0x4e, 0x22, 0x22, 0x27, 0x2d, 0x2d, 0x33, 0x46, 0x42, 0x4f, 0x38, 0x35, 0x3f, 0x27, 0x27, 0x2b, 0x29, 0x29, 0x2e, 0x2c, 0x2c, 0x31, 0x2e, 0x2e, 0x34, 0x47, 0x45, 0x50, 0x39, 0x37, 0x40, 0x49, 0x46, 0x53, 0x3a, 0x38, 0x42, 0x20, 0x20, 0x25, 0x24, 0x24, 0x29, 0x24, 0x24, 0x2a, 0x4a, 0x47, 0x54, 0x3b, 0x39, 0x43, 0x20, 0x20, 0x23, 0x29, 0x29, 0x2d, 0x2b, 0x2b, 0x30, 0x28, 0x28, 0x2d, 0x4b, 0x49, 0x55, 0x3c, 0x3a, 0x44, 0x1e, 0x1e, 0x22, 0x27, 0x27, 0x2c, 0x22, 0x22, 0x28, 0x4e, 0x4a, 0x58, 0x3e, 0x3b, 0x46, 0x1d, 0x1d, 0x21, 0x20, 0x20, 0x24, 0x23, 0x23, 0x27, 0x21, 0x21, 0x25, 0x21, 0x21, 0x26, 0x4f, 0x4c, 0x59, 0x3f, 0x3d, 0x47, 0x3f, 0x3d, 0x48, 0x50, 0x4d, 0x5a,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, 0xe9, 0xa4, 0x40, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char overbright_indicator_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x9, 0x70, 0x48, 0x59, 0x73, 0x0, 0x0, 0xe, 0xc3, 0x0, 0x0, 0xe, 0xc3, 0x1, 0xc7, 0x6f, 0xa8, 0x64, 0x0, 0x0, 0x0, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x0, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x0, 0x0, 0x0, 0x5f, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xcd, 0xcd, 0x4b, 0xe, 0x80, 0x20, 0xc, 0x45, 0xd1, 0x9b, 0xea, 0xbe, 0x40, 0x97, 0x87, 0x8b, 0xae, 0x13, 0x34, 0x88, 0x1f, 0xa, 0x9d, 0xf8, 0x92, 0xe, 0xcf, 0x2d, 0x80, 0xda, 0x4f, 0x14, 0x26, 0x5, 0x49, 0x14, 0x53, 0xcb, 0x42, 0x58, 0xe, 0xbc, 0x51, 0xcd, 0x85, 0x9b, 0x81, 0x16, 0xfe, 0xc, 0x58, 0xf0, 0x6b, 0xc0, 0x8a, 0x1f, 0x3, 0x3d, 0xf8, 0x16, 0xe8, 0xc5, 0x97, 0x40, 0x81, 0x53, 0x9b, 0x55, 0x81, 0x91, 0xcf, 0x67, 0x20, 0xc6, 0x75, 0xe8, 0x73, 0x9e, 0xc, 0x7f, 0xce, 0x73, 0x61, 0x80, 0xd9, 0x83, 0x7f, 0xb0, 0x1d, 0xec, 0x30, 0xf0, 0x78, 0x5a, 0x7, 0xa8, 0x21, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char panel_bg_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x1, 0x3, 0x0, 0x0, 0x0, 0xfe, 0xc1, 0x2c, 0xc8, 0x0, 0x0, 0x0, 0x6, 0x50, 0x4c, 0x54, 0x45, 0x25, 0x25, 0x2a, 0x35, 0x32, 0x3b, 0x4a, 0x73, 0x58, 0x4a, 0x0, 0x0, 0x0, 0xa, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x40, 0x3, 0x0, 0x0, 0x10, 0x0, 0x1, 0xb3, 0xac, 0xe2, 0xd0, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char picker_cursor_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0xc, 0x8, 0x4, 0x0, 0x0, 0x0, 0xfc, 0x7c, 0x94, 0x6c, 0x0, 0x0, 0x0, 0x9, 0x70, 0x48, 0x59, 0x73, 0x0, 0x0, 0xe, 0xc3, 0x0, 0x0, 0xe, 0xc3, 0x1, 0xc7, 0x6f, 0xa8, 0x64, 0x0, 0x0, 0x0, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 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 0x4c, 0x3c, 0x21, 0x4, 0xd8, 0xf0, 0x2, 0x28, 0x24, 0xcd, 0x3, 0xa9, 0x19, 0x64, 0xce, 0x83, 0x4c, 0x45, 0xe6, 0x69, 0x1a, 0xd8, 0xe9, 0x99, 0x96, 0x7f, 0x77, 0x37, 0x59, 0x83, 0xcc, 0xef, 0x7f, 0x89, 0x1f, 0x8e, 0xbf, 0x95, 0xd3, 0x1d, 0xf0, 0xff, 0x7a, 0x63, 0x7e, 0x86, 0xcb, 0x73, 0x8c, 0x5e, 0xee, 0xca, 0xb1, 0xad, 0x5f, 0x3, 0xaf, 0xdb, 0x49, 0x94, 0x4b, 0x90, 0x40, 0xdf, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char popup_bg_disabled_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x3, 0x0, 0x0, 0x0, 0x28, 0x2d, 0xf, 0x53, 0x0, 0x0, 0x0, 0x78, 0x50, 0x4c, 0x54, 0x45, 0xff, 0x0, 0xff, 0x67, 0x7a, 0x85, 0x66, 0x7a, 0x86, 0x68, 0x7b, 0x86, 0x57, 0x51, 0x51, 0x4c, 0x42, 0x40, 0x4d, 0x43, 0x41, 0x56, 0x4c, 0x4b, 0x4d, 0x44, 0x41, 0x4e, 0x44, 0x42, 0x4f, 0x45, 0x43, 0x67, 0x7b, 0x87, 0x4f, 0x44, 0x43, 0x50, 0x45, 0x44, 0x52, 0x46, 0x44, 0x51, 0x46, 0x45, 0x4b, 0x40, 0x3f, 0x51, 0x47, 0x45, 0x52, 0x48, 0x46, 0x53, 0x48, 0x47, 0x4b, 0x41, 0x3f, 0x54, 0x49, 0x46, 0x55, 0x4a, 0x47, 0x55, 0x49, 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, 0xe6, 0xa3, 0xb0, 0x50, 0x64, 0xab, 0x86, 0x3f, 0x82, 0xb3, 0xc6, 0xc7, 0x7e, 0x88, 0x66, 0x42, 0x78, 0x82, 0x31, 0x94, 0x22, 0x77, 0xd4, 0x2d, 0xbe, 0x9e, 0x25, 0x9d, 0x7b, 0xb0, 0x59, 0x6d, 0x9f, 0xd7, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char progress_bar_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x4, 0x3, 0x0, 0x0, 0x0, 0xed, 0xdd, 0xe2, 0x52, 0x0, 0x0, 0x0, 0x30, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2d, 0x2c, 0x2f, 0x48, 0x46, 0x4a, 0x4c, 0x4a, 0x4e, 0x48, 0x46, 0x4a, 0x40, 0x3e, 0x42, 0x38, 0x36, 0x3a, 0x43, 0x65, 0x7d, 0x95, 0x0, 0x0, 0x0, 0xc, 0x74, 0x52, 0x4e, 0x53, 0xa, 0x1a, 0x26, 0x29, 0x2a, 0x48, 0x65, 0x6d, 0x6e, 0x66, 0xf5, 0xfe, 0xb7, 0x4a, 0xbe, 0x33, 0x0, 0x0, 0x0, 0x35, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x64, 0x54, 0x52, 0x64, 0x60, 0x60, 0x78, 0x77, 0x8f, 0x51, 0x34, 0x8, 0xcc, 0xb8, 0xcd, 0xa8, 0xd9, 0x4, 0x66, 0xdc, 0x60, 0x74, 0x9f, 0xe, 0x66, 0xb4, 0x33, 0x7a, 0xb4, 0x1b, 0x0, 0x19, 0x7f, 0x3b, 0x28, 0x64, 0xc0, 0xd, 0x84, 0x5b, 0x1, 0xb7, 0x14, 0xee, 0xc, 0x0, 0xcf, 0x9d, 0x26, 0xff, 0xba, 0xcb, 0x90, 0x39, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char progress_fill_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0x37, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x18, 0x4c, 0xc0, 0xc1, 0xc2, 0xf8, 0xa5, 0xfa, 0x7f, 0x8, 0x34, 0x7e, 0xe9, 0x60, 0x81, 0xa1, 0xc0, 0xf8, 0xa5, 0xca, 0x17, 0x85, 0xff, 0x10, 0xa8, 0xf2, 0xc5, 0xf8, 0x25, 0x86, 0x2, 0x75, 0xa0, 0x4, 0x1c, 0x2, 0x4d, 0xa1, 0xbf, 0x2, 0x4c, 0x47, 0x12, 0xf6, 0xe6, 0x20, 0x2, 0x0, 0x78, 0x21, 0x45, 0x61, 0x7f, 0xe2, 0xad, 0xaf, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char radio_checked_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0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0x8a, 0x5d, 0x21, 0x80, 0x74, 0x83, 0x1e, 0x97, 0xc7, 0x22, 0x59, 0x4c, 0xd7, 0xd8, 0xb5, 0x18, 0x4a, 0x7b, 0x57, 0x57, 0xdb, 0x1a, 0xf7, 0x77, 0x17, 0x3a, 0x56, 0x4e, 0x11, 0x6f, 0x82, 0x20, 0xde, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char radio_checked_disabled_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x3, 0x0, 0x0, 0x0, 0x28, 0x2d, 0xf, 0x53, 0x0, 0x0, 0x0, 0x9, 0x70, 0x48, 0x59, 0x73, 0x0, 0x0, 0xb, 0x13, 0x0, 0x0, 0xb, 0x13, 0x1, 0x0, 0x9a, 0x9c, 0x18, 0x0, 0x0, 0x0, 0x45, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x3, 0x4, 0x9, 0x9, 0x9, 0x6, 0x6, 0x6, 0xa, 0xa, 0xb, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x7f, 0x7f, 0x82, 0xd8, 0xd8, 0xd8, 0xd9, 0xd9, 0xd9, 0x47, 0x47, 0x48, 0xd3, 0xd3, 0xd3, 0xa2, 0xa2, 0xa2, 0x79, 0x79, 0x79, 0x73, 0x73, 0x73, 0x1c, 0x1c, 0x1c, 0x3, 0x3, 0x3, 0x0, 0x0, 0x0, 0x83, 0xac, 0xe9, 0xaf, 0x0, 0x0, 0x0, 0x1, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x40, 0xe6, 0xd8, 0x66, 0x0, 0x0, 0x0, 0x3f, 0x49, 0x44, 0x41, 0x54, 0x18, 0xd3, 0x63, 0x60, 0x20, 0xe, 0xf0, 0x8, 0x2, 0x1, 0xf, 0x9c, 0x2b, 0x2c, 0x8, 0x5, 0xc2, 0x50, 0x1, 0xb0, 0x34, 0x58, 0x11, 0x5c, 0xbd, 0x10, 0x3f, 0x10, 0x8, 0xc1, 0x74, 0x1, 0x65, 0xf8, 0xc1, 0x0, 0xa6, 0x4, 0x28, 0x1, 0x11, 0xe0, 0xc1, 0x2d, 0x80, 0xa6, 0x5, 0xc3, 0x50, 0xc, 0x6b, 0x31, 0x1d, 0x86, 0xe1, 0x74, 0xfc, 0x0, 0x0, 0x1b, 0xc, 0x7, 0xb9, 0xa, 0x5e, 0x2e, 0x12, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char radio_unchecked_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x4, 0x3, 0x0, 0x0, 0x0, 0xed, 0xdd, 0xe2, 0x52, 0x0, 0x0, 0x0, 0x2a, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x4, 0x3, 0x4, 0x9, 0x9, 0x9, 0x6, 0x6, 0x6, 0xa, 0xa, 0xb, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x7f, 0x7f, 0x82, 0xd9, 0xd9, 0xd9, 0x47, 0x47, 0x48, 0x2b, 0x6e, 0xf2, 0xbf, 0x0, 0x0, 0x0, 0xb, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1b, 0x88, 0xd1, 0xf7, 0x64, 0xf6, 0x2, 0xb3, 0xed, 0xd7, 0x0, 0x0, 0x0, 0x49, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x40, 0x2, 0x61, 0x15, 0xed, 0xa9, 0x20, 0x5a, 0x72, 0xf5, 0x99, 0x33, 0xbb, 0x26, 0x1, 0x19, 0x73, 0xcf, 0x0, 0xc1, 0x4d, 0x6, 0x6, 0xd6, 0x35, 0x20, 0xc6, 0xa9, 0x0, 0x6, 0xb6, 0x3d, 0x20, 0xc6, 0xe9, 0x4, 0x6, 0xf6, 0x33, 0x60, 0x50, 0xc0, 0xc0, 0x1, 0x61, 0x34, 0xc0, 0x19, 0x70, 0x29, 0xb8, 0x62, 0xb8, 0x76, 0x84, 0x81, 0xc, 0x96, 0x20, 0x2b, 0xa6, 0xc0, 0x2d, 0x45, 0x0, 0x0, 0x37, 0xca, 0x3d, 0x81, 0xb4, 0x84, 0xb6, 0x80, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char radio_unchecked_disabled_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x4, 0x3, 0x0, 0x0, 0x0, 0xed, 0xdd, 0xe2, 0x52, 0x0, 0x0, 0x0, 0x9, 0x70, 0x48, 0x59, 0x73, 0x0, 0x0, 0xb, 0x13, 0x0, 0x0, 0xb, 0x13, 0x1, 0x0, 0x9a, 0x9c, 0x18, 0x0, 0x0, 0x0, 0xf, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x54, 0x54, 0x54, 0xad, 0xad, 0xad, 0x80, 0x80, 0x81, 0x64, 0x64, 0x64, 0xf4, 0x17, 0x36, 0x28, 0x0, 0x0, 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0x59, 0x3f, 0x3e, 0x49, 0x3f, 0x3e, 0x49, 0x1e, 0x1e, 0x23, 0x20, 0x20, 0x25, 0x22, 0x22, 0x27, 0x23, 0x23, 0x27, 0x23, 0x23, 0x28, 0x25, 0x25, 0x2a, 0x14, 0xee, 0x69, 0x20, 0x0, 0x0, 0x0, 0x11, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x4, 0x19, 0x40, 0x5d, 0x66, 0x28, 0x93, 0xf0, 0xfc, 0x94, 0xfc, 0xfd, 0x67, 0x1a, 0x96, 0x95, 0x1c, 0xf0, 0x43, 0x52, 0x0, 0x0, 0x0, 0x55, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x55, 0x8e, 0x45, 0x2, 0x80, 0x50, 0x10, 0x42, 0xc1, 0xee, 0xfb, 0x5f, 0xd4, 0xd6, 0xdf, 0xfd, 0x36, 0xd3, 0x3, 0x4, 0xd, 0x90, 0x6, 0xb2, 0x25, 0x39, 0xe0, 0xd2, 0xf9, 0xcb, 0x6a, 0x60, 0x6f, 0x27, 0xb7, 0xbc, 0x58, 0xb7, 0x53, 0x4d, 0x0, 0xf2, 0x3f, 0x5e, 0x36, 0x43, 0x5f, 0xc3, 0xf0, 0xdf, 0x17, 0xd7, 0xa6, 0xae, 0x60, 0x10, 0xff, 0x57, 0x16, 0xc5, 0x5a, 0xf1, 0x60, 0xe3, 0xe7, 0x5f, 0x37, 0x46, 0x74, 0xba, 0x9a, 0x16, 0xef, 0x37, 0x1c, 0x6f, 0x61, 0x47, 0x1, 0xa5, 0xc7, 0x32, 0x47, 0x38, 0x12, 0x92, 0xb1, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char scroll_button_left_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x4, 0x3, 0x0, 0x0, 0x0, 0xed, 0xdd, 0xe2, 0x52, 0x0, 0x0, 0x0, 0x30, 0x50, 0x4c, 0x54, 0x45, 0x2d, 0x2c, 0x2f, 0x48, 0x46, 0x4a, 0x2d, 0x2c, 0x2f, 0x2d, 0x2c, 0x2f, 0x2d, 0x2c, 0x2f, 0x4c, 0x4a, 0x4e, 0x48, 0x46, 0x4a, 0x40, 0x3e, 0x42, 0x38, 0x36, 0x3a, 0xc3, 0xc3, 0xc3, 0xc2, 0xc2, 0xc2, 0xc1, 0xc1, 0xc1, 0xc0, 0xc0, 0xc0, 0xbf, 0xbf, 0xbf, 0xbe, 0xbe, 0xbe, 0x59, 0x59, 0x59, 0x8e, 0x47, 0x76, 0xf1, 0x0, 0x0, 0x0, 0x5, 0x74, 0x52, 0x4e, 0x53, 0x8, 0xfe, 0x9, 0xd, 0x19, 0x4a, 0xb6, 0xc1, 0xe6, 0x0, 0x0, 0x0, 0x3e, 0x49, 0x44, 0x41, 0x54, 0x8, 0xd7, 0x63, 0x60, 0xc, 0x5, 0x3, 0x21, 0x86, 0xf4, 0xe, 0x30, 0x28, 0x63, 0x88, 0x80, 0x30, 0x5a, 0x51, 0x19, 0x33, 0xa1, 0x8c, 0xae, 0x55, 0x50, 0xc6, 0x2e, 0x28, 0xa3, 0x7b, 0xf7, 0x6e, 0x8, 0xa3, 0xe7, 0xcc, 0x19, 0xa8, 0x14, 0x9c, 0xd1, 0x7b, 0x17, 0xa6, 0xfd, 0x1d, 0x86, 0x81, 0x60, 0x6, 0xdc, 0x52, 0x43, 0x88, 0x33, 0x44, 0x0, 0xcc, 0x4e, 0x3f, 0xd1, 0x4, 0x90, 0xbf, 0x60, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char scroll_button_left_hl_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 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42, 0x60, 0x82
-};
-
-static const unsigned char scroll_button_right_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x4, 0x3, 0x0, 0x0, 0x0, 0xed, 0xdd, 0xe2, 0x52, 0x0, 0x0, 0x0, 0x30, 0x50, 0x4c, 0x54, 0x45, 0x2d, 0x2c, 0x2f, 0x48, 0x46, 0x4a, 0x2d, 0x2c, 0x2f, 0x2d, 0x2c, 0x2f, 0x2d, 0x2c, 0x2f, 0x4c, 0x4a, 0x4e, 0x48, 0x46, 0x4a, 0x40, 0x3e, 0x42, 0x38, 0x36, 0x3a, 0xc3, 0xc3, 0xc3, 0xc2, 0xc2, 0xc2, 0xc1, 0xc1, 0xc1, 0xc0, 0xc0, 0xc0, 0xbf, 0xbf, 0xbf, 0xbe, 0xbe, 0xbe, 0x59, 0x59, 0x59, 0x8e, 0x47, 0x76, 0xf1, 0x0, 0x0, 0x0, 0x5, 0x74, 0x52, 0x4e, 0x53, 0x8, 0xfe, 0x9, 0xd, 0x19, 0x4a, 0xb6, 0xc1, 0xe6, 0x0, 0x0, 0x0, 0x40, 0x49, 0x44, 0x41, 0x54, 0x8, 0xd7, 0x63, 0x60, 0xc, 0x5, 0x3, 0x21, 0x86, 0xf4, 0xe, 0x30, 0x28, 0x63, 0x88, 0x80, 0x30, 0x5a, 0x51, 0x18, 0x33, 0x61, 0x8c, 0x59, 0x2b, 0xa0, 0x8c, 0x5d, 0xab, 0xa0, 0x8c, 0xdd, 0xbb, 0x77, 0x40, 0x18, 0x67, 0xce, 0x9c, 0x80, 0x31, 0xa0, 0x52, 0x77, 0x6f, 0x40, 0x19, 0xef, 0x30, 0xc, 0x84, 0x30, 0xe0, 0x96, 0x1a, 0x42, 0x9c, 0x21, 0x2, 0x0, 0xfd, 0x36, 0x40, 0x93, 0xf1, 0x83, 0x5f, 0xf2, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char scroll_button_right_hl_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x3, 0x0, 0x0, 0x0, 0x28, 0x2d, 0xf, 0x53, 0x0, 0x0, 0x0, 0x33, 0x50, 0x4c, 0x54, 0x45, 0x3d, 0x3b, 0x3f, 0x60, 0x5d, 0x62, 0x3d, 0x3b, 0x3f, 0x3d, 0x3b, 0x3f, 0x3d, 0x3b, 0x3f, 0x65, 0x62, 0x67, 0x60, 0x5d, 0x62, 0x56, 0x53, 0x58, 0x4b, 0x49, 0x4e, 0xc9, 0xc9, 0xc9, 0xc8, 0xc8, 0xc8, 0xc6, 0xc6, 0xc6, 0xc7, 0xc7, 0xc7, 0xc5, 0xc5, 0xc5, 0xc4, 0xc4, 0xc4, 0xc3, 0xc3, 0xc3, 0xc2, 0xc2, 0xc2, 0x2e, 0x3d, 0xb1, 0x1e, 0x0, 0x0, 0x0, 0x5, 0x74, 0x52, 0x4e, 0x53, 0x7, 0xfe, 0xc, 0x9, 0x1c, 0xda, 0x2b, 0xa5, 0x57, 0x0, 0x0, 0x0, 0x49, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x65, 0xc8, 0x31, 0x16, 0x2, 0x20, 0x10, 0x43, 0xc1, 0xe4, 0x83, 0xdc, 0xff, 0xb8, 0x88, 0xf, 0x57, 0xb, 0x8b, 0x80, 0x53, 0xe, 0xf2, 0x23, 0x18, 0xc6, 0x68, 0x61, 0x74, 0xca, 0xa, 0x2e, 0x74, 0xf9, 0x85, 0xfd, 0x17, 0x5c, 0x81, 0xfb, 0x11, 0x2a, 0xaa, 0x65, 0x80, 0x20, 0xc3, 0x5f, 0xaf, 0x2b, 0x96, 0xce, 0x78, 0xea, 0x88, 0x39, 0x95, 0x91, 0x70, 0x29, 0x94, 0xd9, 0x6b, 0x87, 0xf5, 0xfe, 0x0, 0xc6, 0xa7, 0x1b, 0x66, 0x7b, 0x42, 0xf1, 0x14, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char scroll_grabber_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0xc, 0x8, 0x3, 0x0, 0x0, 0x0, 0x61, 0xab, 0xac, 0xd5, 0x0, 0x0, 0x0, 0x5d, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x5b, 0x59, 0x61, 0x5b, 0x59, 0x61, 0x5a, 0x58, 0x60, 0x59, 0x57, 0x5f, 0x5a, 0x58, 0x60, 0x5a, 0x58, 0x60, 0x57, 0x56, 0x5e, 0x58, 0x56, 0x5e, 0x56, 0x55, 0x5d, 0x57, 0x55, 0x5d, 0x57, 0x55, 0x5d, 0x55, 0x53, 0x5b, 0x55, 0x53, 0x5b, 0x54, 0x53, 0x5b, 0x55, 0x54, 0x5c, 0x54, 0x52, 0x5a, 0x55, 0x53, 0x5b, 0x5a, 0x58, 0x60, 0x56, 0x54, 0x5c, 0x54, 0x53, 0x5a, 0x55, 0x53, 0x5b, 0x53, 0x51, 0x59, 0x52, 0x51, 0x59, 0x52, 0x50, 0x58, 0x51, 0x50, 0x58, 0x51, 0x4f, 0x57, 0x50, 0x4e, 0x56, 0x4f, 0x4d, 0x55, 0x50, 0x4f, 0x57, 0x54, 0x52, 0x5a, 0xae, 0x55, 0xff, 0xf7, 0x0, 0x0, 0x0, 0x12, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x2c, 0xb8, 0xf4, 0x2e, 0xf2, 0xb8, 0xf4, 0xf5, 0xf4, 0xf5, 0xb8, 0x2f, 0xf2, 0x2e, 0xb8, 0xf4, 0xb8, 0x66, 0xf6, 0xf7, 0x12, 0x0, 0x0, 0x0, 0x48, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x64, 0xc7, 0xb1, 0x11, 0x80, 0x40, 0x8, 0x45, 0x41, 0xff, 0x83, 0x2, 0xe, 0xfb, 0x2f, 0x13, 0xe2, 0xf3, 0x6, 0x12, 0x1d, 0x37, 0x5b, 0xae, 0x97, 0x5f, 0x84, 0xdd, 0x68, 0xe2, 0x1e, 0x41, 0xb8, 0x77, 0x58, 0x6, 0xb6, 0xe8, 0x88, 0xd1, 0xe1, 0x93, 0xad, 0x63, 0xab, 0xa3, 0x3a, 0xa3, 0x26, 0xa9, 0x4a, 0x52, 0xf9, 0xc, 0x62, 0xcf, 0xa7, 0x8f, 0x1f, 0x1e, 0xbd, 0xff, 0x84, 0xee, 0x2, 0x0, 0x54, 0x76, 0x10, 0x19, 0x1e, 0xd7, 0x1d, 0x9b, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char scroll_grabber_hl_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0xc, 0x8, 0x3, 0x0, 0x0, 0x0, 0x61, 0xab, 0xac, 0xd5, 0x0, 0x0, 0x0, 0x69, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x97, 0xd0, 0xdf, 0x92, 0xcb, 0xdc, 0x84, 0xbb, 0xd4, 0x92, 0xca, 0xdc, 0x95, 0xd0, 0xdd, 0x83, 0xbb, 0xd3, 0x8b, 0xc8, 0xd7, 0x79, 0xb5, 0xcb, 0x78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, 0x22, 0x4, 0xb, 0xcc, 0xf7, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char scroll_grabber_pressed_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0xc, 0x8, 0x4, 0x0, 0x0, 0x0, 0xfc, 0x7c, 0x94, 0x6c, 0x0, 0x0, 0x0, 0x2f, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0xa0, 0x3a, 0xd8, 0xcf, 0xb2, 0xc1, 0x7d, 0xc3, 0x14, 0x20, 0x74, 0xdf, 0xcf, 0x82, 0x22, 0xb1, 0xc1, 0x7d, 0xfd, 0x2e, 0x8, 0xdc, 0xe0, 0x8e, 0x2a, 0x31, 0x5, 0x2e, 0x31, 0x85, 0x90, 0x4, 0xa6, 0x51, 0xb8, 0x2d, 0xa7, 0x36, 0x0, 0x0, 0x7b, 0xcd, 0x2b, 0x75, 0x45, 0x5e, 0xf8, 0x88, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char selection_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x4, 0x3, 0x0, 0x0, 0x0, 0xed, 0xdd, 0xe2, 0x52, 0x0, 0x0, 0x0, 0x2d, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfd, 0xfb, 0xff, 0xfd, 0xf7, 0xff, 0xfd, 0xf7, 0xff, 0xfd, 0xf7, 0xff, 0xfd, 0xf6, 0xff, 0xf6, 0xf4, 0xff, 0x15, 0x15, 0x17, 0xff, 0x70, 0xc0, 0x21, 0x0, 0x0, 0x0, 0xe, 0x74, 0x52, 0x4e, 0x53, 0x6, 0xf, 0x16, 0x18, 0x2a, 0x3b, 0x40, 0x3c, 0x6, 0x3d, 0x44, 0x3e, 0x31, 0x25, 0x8, 0x3d, 0x16, 0xb4, 0x0, 0x0, 0x0, 0x37, 0x49, 0x44, 0x41, 0x54, 0x8, 0xd7, 0x63, 0x60, 0x54, 0x36, 0x6, 0x2, 0x23, 0x1, 0x6, 0x91, 0xb0, 0x34, 0x20, 0x48, 0x75, 0x64, 0x50, 0xef, 0x5c, 0x5, 0x4, 0x33, 0x8a, 0x18, 0xcc, 0xf6, 0xdc, 0x5, 0x82, 0xd3, 0xc9, 0xc, 0x66, 0x6b, 0x41, 0x8c, 0x5b, 0x94, 0x33, 0x60, 0x6, 0xc2, 0xad, 0x80, 0x5b, 0xa, 0x73, 0x6, 0x0, 0x45, 0x34, 0x48, 0x41, 0xa3, 0xc5, 0x91, 0x23, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char selection_oof_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x4, 0x3, 0x0, 0x0, 0x0, 0xed, 0xdd, 0xe2, 0x52, 0x0, 0x0, 0x0, 0x2d, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2c, 0x2, 0xfd, 0xfb, 0xff, 0xfd, 0xfb, 0xff, 0xfd, 0xfb, 0xff, 0xfd, 0xfb, 0xff, 0xaf, 0xdf, 0x90, 0xa5, 0x0, 0x0, 0x0, 0xf, 0x74, 0x52, 0x4e, 0x53, 0xa, 0x1a, 0x26, 0x29, 0x2a, 0x48, 0x65, 0x6d, 0x6e, 0x66, 0x3, 0x20, 0x25, 0x16, 0xc, 0x1f, 0x74, 0xbf, 0x74, 0x0, 0x0, 0x0, 0x37, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x64, 0x54, 0x52, 0x64, 0x60, 0x60, 0x78, 0x77, 0x8f, 0x51, 0x34, 0x8, 0xcc, 0xb8, 0xcd, 0xa8, 0xd9, 0x4, 0x66, 0xdc, 0x60, 0x74, 0x2f, 0x33, 0x4, 0x32, 0xde, 0xce, 0x64, 0xf4, 0x68, 0x53, 0x0, 0x32, 0xfe, 0xcd, 0xa0, 0x90, 0x1, 0x37, 0x10, 0x6e, 0x5, 0xdc, 0x52, 0xb8, 0x33, 0x0, 0xcc, 0x7, 0x26, 0xff, 0x1f, 0x38, 0x23, 0x97, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char space_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x8, 0x4, 0x0, 0x0, 0x0, 0x6e, 0x6, 0x76, 0x0, 0x0, 0x0, 0x0, 0x2, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x87, 0x8f, 0xcc, 0xbf, 0x0, 0x0, 0x0, 0x1c, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x20, 0x16, 0xfc, 0x17, 0xfc, 0x2f, 0x88, 0xcc, 0x15, 0xfa, 0x6f, 0x4, 0x84, 0x82, 0x18, 0x2, 0xe8, 0x5a, 0x88, 0x4, 0x0, 0x8c, 0xa4, 0xd, 0x47, 0x8, 0xea, 0xcc, 0xbb, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char spinbox_updown_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0x59, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x20, 0x11, 0xdc, 0x4f, 0x7f, 0x98, 0x86, 0x47, 0xfa, 0x81, 0xe5, 0x83, 0x1f, 0xf, 0x7e, 0x3d, 0xb2, 0xc5, 0xa5, 0x5b, 0xe2, 0xc1, 0x93, 0x7, 0xff, 0x81, 0xf0, 0xf9, 0x63, 0x69, 0x2c, 0xd2, 0x67, 0x58, 0xef, 0x1f, 0x2, 0x4a, 0x42, 0xe0, 0xf1, 0xdb, 0xec, 0x98, 0xfa, 0x67, 0x2, 0x25, 0xe0, 0xf0, 0xe1, 0x2, 0x86, 0x41, 0x7, 0x30, 0x1d, 0x39, 0x3, 0xbf, 0x37, 0x8f, 0xdd, 0x66, 0x27, 0x29, 0xa0, 0x10, 0x4a, 0x2c, 0xa0, 0x41, 0x8d, 0x1b, 0x3c, 0x4c, 0x3, 0x46, 0x16, 0x69, 0x0, 0x0, 0x87, 0x2a, 0x58, 0xb5, 0x18, 0xe9, 0x80, 0x2c, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char submenu_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x8, 0x4, 0x0, 0x0, 0x0, 0x6e, 0x6, 0x76, 0x0, 0x0, 0x0, 0x0, 0x2e, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x78, 0xc0, 0xf0, 0xe0, 0x3f, 0x8, 0xde, 0x4f, 0x60, 0x0, 0x3, 0xb8, 0xc0, 0x83, 0x2f, 0xf, 0xb5, 0xe1, 0x2, 0x50, 0x78, 0xf5, 0x5, 0x37, 0xaa, 0xc0, 0xff, 0x87, 0xf3, 0x31, 0x4, 0x30, 0xb5, 0x60, 0x1a, 0x8a, 0x61, 0x2d, 0x0, 0xa6, 0x55, 0x4f, 0xb1, 0x91, 0xd6, 0xa7, 0xae, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char submenu_mirrored_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x8, 0x4, 0x0, 0x0, 0x0, 0x6e, 0x6, 0x76, 0x0, 0x0, 0x0, 0x0, 0x1, 0x6f, 0x72, 0x4e, 0x54, 0x1, 0xcf, 0xa2, 0x77, 0x9a, 0x0, 0x0, 0x0, 0x57, 0x49, 0x44, 0x41, 0x54, 0x8, 0xd7, 0x55, 0xcb, 0xa1, 0x11, 0x83, 0x40, 0x14, 0x45, 0xd1, 0xb3, 0x6b, 0x10, 0x34, 0x10, 0x47, 0x34, 0xf4, 0x13, 0x9d, 0x2, 0x28, 0x87, 0x2a, 0xe8, 0x84, 0x2, 0x82, 0x65, 0x71, 0x69, 0x0, 0x11, 0xf5, 0x11, 0x4c, 0x66, 0xd8, 0xe7, 0xee, 0x99, 0x79, 0x80, 0xed, 0x5d, 0xa2, 0x44, 0x9, 0x12, 0xec, 0x43, 0x2c, 0x5a, 0x78, 0xa6, 0xcc, 0xb7, 0x8d, 0xf9, 0x4a, 0xc8, 0xfc, 0x26, 0x3d, 0x37, 0xa8, 0x97, 0x69, 0x46, 0x6b, 0x5, 0x8f, 0x23, 0xbd, 0x1c, 0xd5, 0xa5, 0xfb, 0xc4, 0xf8, 0x87, 0x13, 0xd2, 0x2f, 0x14, 0x49, 0x6f, 0xb1, 0x11, 0xe1, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char tab_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x8, 0x4, 0x0, 0x0, 0x0, 0x6e, 0x6, 0x76, 0x0, 0x0, 0x0, 0x0, 0x19, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0xc0, 0x2, 0xfe, 0x47, 0xfe, 0x17, 0x1, 0xc2, 0x48, 0xd2, 0x84, 0x10, 0x2, 0x84, 0xb9, 0x98, 0x0, 0x0, 0xbf, 0x67, 0x1d, 0x5, 0x89, 0x9b, 0x48, 0x90, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char tab_behind_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 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 0x69, 0x98, 0xba, 0xb6, 0x45, 0x9a, 0x2b, 0xbd, 0xe9, 0xd5, 0x69, 0xda, 0x0, 0xa9, 0x94, 0x9f, 0x68, 0x7, 0xc5, 0xd2, 0x50, 0x4a, 0x69, 0x71, 0x18, 0x63, 0xb3, 0x18, 0x7a, 0x71, 0x2e, 0xa3, 0xfd, 0x1b, 0xff, 0xc9, 0xff, 0x34, 0x86, 0x31, 0x3, 0x12, 0xb2, 0x4c, 0x6a, 0xfb, 0x60, 0xc7, 0xdc, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char tab_close_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0x65, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0xad, 0x90, 0x1, 0x6, 0xc0, 0x30, 0xc, 0x45, 0x77, 0x89, 0xd5, 0x76, 0xb3, 0x9e, 0x7b, 0x65, 0x63, 0xd, 0xf9, 0xbb, 0x48, 0x3b, 0xb3, 0x92, 0x54, 0x42, 0xb1, 0x5, 0x88, 0xf7, 0xc8, 0xcf, 0x9f, 0xfe, 0x1a, 0x8e, 0x14, 0xf4, 0x4e, 0x81, 0x63, 0x87, 0x51, 0x90, 0x28, 0x8, 0x46, 0x42, 0x51, 0x4a, 0x9e, 0x79, 0x43, 0xc5, 0x81, 0x55, 0x6f, 0xbc, 0x34, 0xdc, 0x2b, 0x2e, 0x16, 0xe5, 0x3a, 0xb1, 0xb, 0xb6, 0xca, 0x3, 0x2b, 0xb2, 0xc2, 0xbe, 0xf0, 0x66, 0x71, 0x4f, 0x70, 0x3b, 0x61, 0x14, 0x89, 0x26, 0x71, 0x5d, 0x6c, 0x9f, 0x1e, 0x17, 0x35, 0xae, 0xfa, 0xeb, 0xdc, 0x62, 0xc3, 0x84, 0x2d, 0x77, 0x22, 0xda, 0x98, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char tab_container_bg_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x3, 0x0, 0x0, 0x0, 0x28, 0x2d, 0xf, 0x53, 0x0, 0x0, 0x0, 0x87, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3c, 0x3a, 0x44, 0x56, 0x53, 0x61, 0x56, 0x52, 0x60, 0x47, 0x44, 0x52, 0x33, 0x31, 0x39, 0x47, 0x44, 0x50, 0x47, 0x44, 0x51, 0x52, 0x50, 0x5d, 0x51, 0x4f, 0x5d, 0x46, 0x42, 0x4e, 0x42, 0x3e, 0x4a, 0x41, 0x3e, 0x49, 0x51, 0x4e, 0x5b, 0x40, 0x3e, 0x48, 0x4f, 0x4c, 0x59, 0x3f, 0x3d, 0x47, 0x4e, 0x4a, 0x58, 0x3e, 0x3b, 0x46, 0x4b, 0x49, 0x55, 0x3c, 0x3a, 0x44, 0x4a, 0x47, 0x54, 0x3b, 0x39, 0x43, 0x49, 0x46, 0x53, 0x3a, 0x38, 0x42, 0x47, 0x45, 0x50, 0x39, 0x37, 0x40, 0x47, 0x43, 0x50, 0x38, 0x35, 0x3f, 0x36, 0x34, 0x3e, 0x44, 0x42, 0x4d, 0x44, 0x41, 0x4c, 0x3f, 0x38, 0xaa, 0x5e, 0x0, 0x0, 0x0, 0x15, 0x74, 0x52, 0x4e, 0x53, 0x4, 0xa, 0x11, 0x19, 0x1f, 0x22, 0x24, 0x15, 0x25, 0x34, 0x3f, 0x46, 0x47, 0x48, 0x77, 0xef, 0xef, 0xef, 0x77, 0xef, 0xed, 0xe8, 0xff, 0x76, 0xed, 0x0, 0x0, 0x0, 0x63, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x6d, 0xcf, 0x45, 0x2, 0x84, 0x30, 0x0, 0x4, 0xc1, 0x69, 0x1c, 0xfe, 0xff, 0xca, 0xd5, 0xeb, 0x2a, 0x83, 0x6b, 0xd2, 0xb7, 0x54, 0x1c, 0x31, 0x26, 0xc9, 0x63, 0x50, 0xcc, 0x32, 0x8d, 0x3f, 0xd9, 0x20, 0x5, 0x1a, 0xf2, 0xc7, 0x1f, 0x7a, 0x48, 0x4a, 0x66, 0xa8, 0xde, 0xc, 0xd0, 0x38, 0xd1, 0x54, 0xdb, 0x4c, 0x2b, 0xd0, 0x5c, 0x62, 0x8e, 0xa0, 0x1, 0x74, 0x4, 0x65, 0xd2, 0x1e, 0xd4, 0x83, 0xf7, 0x60, 0x65, 0x3e, 0x82, 0x3, 0x48, 0x49, 0xdf, 0x55, 0xca, 0xd4, 0xef, 0xfa, 0xfb, 0x27, 0x36, 0xf, 0x92, 0x31, 0x9e, 0x44, 0x3e, 0x17, 0x7c, 0xbf, 0x3, 0xef, 0x34, 0x3f, 0x3e, 0xe0, 0x24, 0x67, 0xb9, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char tab_current_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x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e, 0x1a, 0x98, 0x31, 0x2a, 0x3a, 0x91, 0x6, 0x7f, 0x25, 0xa1, 0x2b, 0x88, 0xe6, 0x85, 0xa0, 0x40, 0x73, 0x0, 0x5, 0x99, 0xf2, 0xff, 0x17, 0xf9, 0x79, 0x61, 0x98, 0x78, 0x21, 0x9a, 0x17, 0x82, 0xf2, 0x99, 0x34, 0x74, 0x13, 0xbb, 0x49, 0x87, 0xd0, 0x12, 0x4f, 0x3, 0x29, 0x20, 0x0, 0x0, 0xe, 0x38, 0x38, 0x83, 0xd2, 0xe8, 0x36, 0x36, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char tab_menu_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0x36, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x40, 0x5, 0xa3, 0xe0, 0xc1, 0x7f, 0x54, 0x48, 0x3, 0x5, 0xf, 0xe3, 0x1e, 0x7c, 0x81, 0x4b, 0x7f, 0x7b, 0x98, 0x86, 0xc5, 0x15, 0xf7, 0x35, 0xee, 0x5f, 0x2, 0x4b, 0x5f, 0x7f, 0xac, 0x8b, 0xc3, 0xa1, 0x2f, 0xb8, 0x1f, 0xce, 0x7f, 0x38, 0xff, 0x5, 0x37, 0x75, 0xbd, 0xf, 0x0, 0x52, 0xd4, 0x48, 0xb8, 0x2d, 0x78, 0x5a, 0x91, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char tab_menu_hl_png[] = {
- 0x89, 0x50, 0x4e, 0x47,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 0x88, 0x30, 0xb9, 0xd5, 0x66, 0x3f, 0x17, 0xda, 0xb6, 0x26, 0x85, 0x11, 0x96, 0x31, 0x99, 0x4c, 0xfc, 0xf, 0x40, 0x27, 0xd3, 0xbf, 0xc4, 0x77, 0x82, 0xde, 0x40, 0xde, 0x4b, 0x3f, 0xe2, 0x98, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char toggle_off_disabled_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x20, 0x8, 0x3, 0x0, 0x0, 0x0, 0x95, 0x43, 0x8e, 0xb6, 0x0, 0x0, 0x0, 0xfc, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x14, 0x14, 0x17, 0x20, 0x20, 0x25, 0x24, 0x24, 0x28, 0x24, 0x24, 0x29, 0x24, 0x24, 0x29, 0x25, 0x25, 0x2a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x10, 0x13, 0x22, 0x22, 0x27, 0x24, 0x24, 0x28, 0x25, 0x25, 0x28, 0x25, 0x25, 0x29, 0x25, 0x25, 0x27, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x19, 0x19, 0x1c, 0x2b, 0x26, 0x2c, 0x40, 0x40, 0x44, 0x4e, 0x4e, 0x52, 0x1a, 0x1a, 0x1d, 0x32, 0x32, 0x37, 0x2c, 0x26, 0x2c, 0x26, 0x25, 0x2a, 0x27, 0x25, 0x2a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x11, 0x11, 0x14, 0x2f, 0x26, 0x2d, 0x12, 0x12, 0x14, 0x23, 0x23, 0x27, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x15, 0x15, 0x18, 0x20, 0x20, 0x25, 0x20, 0x20, 0x24, 0x5b, 0x5b, 0x5f, 0x84, 0x84, 0x87, 0x77, 0x77, 0x7a, 0x20, 0x20, 0x24, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x69, 0x69, 0x6c, 0x24, 0x24, 0x28, 0x0, 0x0, 0x0, 0x24, 0x24, 0x28, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x24, 0x24, 0x27, 0x15, 0x15, 0x18, 0x23, 0x23, 0x28, 0x12, 0x12, 0x14, 0x0, 0x0, 0x0, 0x1a, 0x1a, 0x1e, 0x0, 0x0, 0x0, 0x11, 0x11, 0x13, 0x22, 0x22, 0x26, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x71, 0xb, 0x1b, 0xbb, 0x0, 0x0, 0x0, 0x54, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0xe, 0x13, 0x16, 0x18, 0x19, 0xa, 0x26, 0x36, 0x44, 0x4d, 0x52, 0x54, 0x55, 0x6, 0x12, 0x27, 0x43, 0x98, 0xe5, 0xfa, 0xfe, 0xff, 0xff, 0x8, 0x17, 0x35, 0x86, 0xf3, 0xff, 0xff, 0xff, 0xff, 0x7, 0x3a, 0xb4, 0xff, 0xff, 0xff, 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15, 0xa0, 0x9b, 0xe9, 0xff, 0xc2, 0x67, 0x14, 0xf4, 0xa5, 0xb3, 0x35, 0x5e, 0x63, 0x97, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char toggle_off_disabled_mirrored_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x20, 0x8, 0x3, 0x0, 0x0, 0x0, 0x95, 0x43, 0x8e, 0xb6, 0x0, 0x0, 0x0, 0x9c, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0xd, 0xd, 0xf, 0x1a, 0x1a, 0x1e, 0x20, 0x20, 0x24, 0x22, 0x22, 0x27, 0x24, 0x24, 0x29, 0x25, 0x25, 0x2a, 0x1d, 0x1d, 0x21, 0x11, 0x11, 0x14, 0x23, 0x23, 0x28, 0x2e, 0x2e, 0x2e, 0x46, 0x46, 0x46, 0x57, 0x57, 0x57, 0x60, 0x60, 0x60, 0x62, 0x62, 0x62, 0x5e, 0x5e, 0x5e, 0x4a, 0x4a, 0x4a, 0x12, 0x12, 0x15, 0x25, 0x27, 0x2d, 0x42, 0x42, 0x42, 0x59, 0x59, 0x59, 0x32, 0x32, 0x32, 0x25, 0x26, 0x2d, 0x25, 0x25, 0x2b, 0x25, 0x26, 0x2c, 0x39, 0x39, 0x39, 0x49, 0x49, 0x49, 0x5a, 0x5a, 0x5a, 0x48, 0x48, 0x48, 0x54, 0x54, 0x54, 0x34, 0x34, 0x34, 0x35, 0x35, 0x35, 0x1e, 0x1e, 0x22, 0x25, 0x26, 0x2b, 0x3f, 0x3f, 0x3f, 0xe, 0xe, 0x10, 0x2c, 0x2c, 0x2c, 0x58, 0x58, 0x58, 0x5d, 0x5d, 0x5f, 0x80, 0x80, 0x80, 0x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27, 0xe, 0xe, 0x10, 0x15, 0x15, 0x18, 0x1a, 0x1a, 0x1e, 0x20, 0x20, 0x25, 0x0, 0x0, 0x0, 0x24, 0x24, 0x28, 0x0, 0x0, 0x0, 0x20, 0x20, 0x24, 0x24, 0x24, 0x27, 0x0, 0x0, 0x0, 0xe, 0xe, 0x10, 0x15, 0x15, 0x18, 0x23, 0x23, 0x28, 0xb, 0xb, 0xd, 0x12, 0x12, 0x14, 0x0, 0x0, 0x0, 0x13, 0x13, 0x15, 0x1a, 0x1a, 0x1e, 0xb, 0xb, 0xc, 0x1d, 0x1d, 0x21, 0x22, 0x22, 0x26, 0x11, 0x11, 0x13, 0x24, 0x24, 0x28, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x25, 0x25, 0x2a, 0x24, 0x24, 0x29, 0x25, 0x25, 0x28, 0x25, 0x25, 0x29, 0x24, 0x24, 0x28, 0x2d, 0x26, 0x2c, 0x51, 0x2c, 0x39, 0x6c, 0x31, 0x42, 0x71, 0x32, 0x44, 0x6e, 0x31, 0x43, 0x63, 0x2f, 0x3f, 0x4d, 0x2b, 0x37, 0x27, 0x25, 0x2a, 0x47, 0x2a, 0x35, 0x68, 0x30, 0x40, 0x52, 0x2c, 0x39, 0x3c, 0x28, 0x31, 0x2e, 0x25, 0x2c, 0x26, 0x25, 0x2a, 0x32, 0x26, 0x2e, 0x4d, 0x2b, 0x38, 0x66, 0x30, 0x40, 0x50, 0x2c, 0x38, 0x5e, 0x2e, 0x3d, 0x38, 0x27, 0x30, 0x35, 0x27, 0x2f, 0x5f, 0x2e, 0x3d, 0x44, 0x2a, 0x34, 0x5f, 0x2f, 0x3e, 0x2f, 0x25, 0x2c, 0x43, 0x2a, 0x34, 0x2c, 0x26, 0x2c, 0x66, 0x2f, 0x40, 0x37, 0x27, 0x30, 0x36, 0x27, 0x30, 0x64, 0x2f, 0x3f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0x56, 0x58, 0x80, 0x80, 0x80, 0x79, 0x79, 0x79, 0x3c, 0x3c, 0x3d, 0x2e, 0x2e, 0x30, 0x27, 0x27, 0x29, 0x64, 0x64, 0x66, 0x41, 0x41, 0x41, 0x1a, 0x1a, 0x1d, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5d, 0x5d, 0x5f, 0x34, 0x34, 0x36, 0x52, 0x52, 0x52, 0x3a, 0x3a, 0x3a, 0x20, 0x20, 0x24, 0x0, 0x0, 0x0, 0x32, 0x32, 0x37, 0x42, 0x42, 0x44, 0x6a, 0x6a, 0x6d, 0x5b, 0x5b, 0x5b, 0x2f, 0x2f, 0x2f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x49, 0x49, 0x4a, 0x0, 0x0, 0x0, 0x50, 0x50, 0x51, 0x70, 0x70, 0x74, 0xe, 0xe, 0x10, 0xb, 0xb, 0xd, 0x0, 0x0, 0x0, 0x13, 0x13, 0x15, 0x0, 0x0, 0x0, 0xb, 0xb, 0xc, 0x1d, 0x1d, 0x21, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xbd, 0xb, 0x85, 0x35, 0x0, 0x0, 0x0, 0x71, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0xe, 0x13, 0x16, 0x18, 0x19, 0xa, 0x26, 0x36, 0x44, 0x4d, 0x52, 0x54, 0x55, 0x6, 0x12, 0x27, 0x43, 0x80, 0xc5, 0xe7, 0xf5, 0xfe, 0xff, 0x8, 0x17, 0x35, 0x73, 0xd9, 0xff, 0x7, 0x3a, 0x96, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x9a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb, 0x28, 0x76, 0xfb, 0xff, 0xff, 0xff, 0xff, 0x77, 0xde, 0xff, 0xff, 0x45, 0x5, 0x82, 0xff, 0xff, 0xc6, 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8, 0xcd, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char toggle_on_disabled_mirrored_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x20, 0x8, 0x3, 0x0, 0x0, 0x0, 0x95, 0x43, 0x8e, 0xb6, 0x0, 0x0, 0x0, 0x69, 0x50, 0x4c, 0x54, 0x45, 0x93, 0x7f, 0x2b, 0x14, 0x14, 0x17, 0x20, 0x20, 0x25, 0x24, 0x24, 0x28, 0x24, 0x24, 0x29, 0x25, 0x25, 0x2a, 0x10, 0x10, 0x13, 0x22, 0x22, 0x27, 0x25, 0x25, 0x28, 0x25, 0x25, 0x29, 0x25, 0x25, 0x27, 0x19, 0x19, 0x1c, 0x2b, 0x26, 0x2c, 0x40, 0x40, 0x44, 0x4e, 0x4e, 0x52, 0x1a, 0x1a, 0x1d, 0x32, 0x32, 0x37, 0x2c, 0x26, 0x2c, 0x26, 0x25, 0x2a, 0x27, 0x25, 0x2a, 0x11, 0x11, 0x14, 0x2f, 0x26, 0x2d, 0x12, 0x12, 0x14, 0x23, 0x23, 0x27, 0x15, 0x15, 0x18, 0x5b, 0x5b, 0x5f, 0x84, 0x84, 0x87, 0x77, 0x77, 0x7a, 0x69, 0x69, 0x6c, 0x20, 0x20, 0x24, 0x24, 0x24, 0x27, 0x23, 0x23, 0x28, 0x1a, 0x1a, 0x1e, 0x11, 0x11, 0x13, 0x22, 0x22, 0x26, 0xd7, 0x77, 0xc6, 0x92, 0x0, 0x0, 0x0, 0x1, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x40, 0xe6, 0xd8, 0x66, 0x0, 0x0, 0x1, 0x35, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xed, 0x94, 0xd1, 0x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a, 0x1a, 0x1e, 0xb, 0xb, 0xc, 0x1d, 0x1d, 0x21, 0x11, 0x11, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x25, 0x25, 0x2a, 0x24, 0x24, 0x29, 0x25, 0x25, 0x29, 0x25, 0x25, 0x27, 0x25, 0x2c, 0x36, 0x28, 0x4c, 0x6b, 0x29, 0x64, 0x92, 0x2a, 0x68, 0x99, 0x2a, 0x66, 0x95, 0x29, 0x5d, 0x85, 0x27, 0x49, 0x65, 0x25, 0x25, 0x28, 0x25, 0x27, 0x2d, 0x27, 0x44, 0x5c, 0x29, 0x60, 0x8c, 0x27, 0x4d, 0x6b, 0x25, 0x3a, 0x4c, 0x25, 0x2d, 0x38, 0x25, 0x26, 0x2c, 0x25, 0x25, 0x2b, 0x25, 0x26, 0x2d, 0x25, 0x30, 0x3e, 0x27, 0x49, 0x66, 0x29, 0x5f, 0x89, 0x27, 0x43, 0x5c, 0x27, 0x4b, 0x69, 0x28, 0x58, 0x7f, 0x25, 0x35, 0x45, 0x25, 0x34, 0x43, 0x28, 0x59, 0x7f, 0x25, 0x26, 0x2b, 0x27, 0x41, 0x57, 0x27, 0x40, 0x57, 0x25, 0x2b, 0x34, 0x25, 0x34, 0x44, 0x29, 0x5d, 0x87, 0x25, 0x2a, 0x33, 0x27, 0x43, 0x5b, 0x27, 0x4e, 0x6d, 0x27, 0x4d, 0x6c, 0x40, 0x40, 0x44, 0xad, 0xad, 0xaf, 0xff, 0xff, 0xff, 0xf2, 0xf2, 0xf2, 0x77, 0x77, 0x7a, 0x5b, 0x5b, 0x5f, 0x4e, 0x4e, 0x52, 0xc9, 0xc9, 0xca, 0x28, 0x56, 0x7b, 0x26, 0x3a, 0x4e, 0x26, 0x3b, 0x4e, 0xbb, 0xbb, 0xbd, 0x69, 0x69, 0x6c, 0x29, 0x61, 0x8d, 0x25, 0x2e, 0x39, 0x32, 0x32, 0x37, 0x84, 0x84, 0x87, 0xd6, 0xd6, 0xd7, 0x92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, 0x1c, 0x21, 0x20, 0x1e, 0x24, 0x1d, 0x1c, 0x21, 0x1d, 0x1c, 0x21, 0x24, 0x22, 0x29, 0x28, 0x26, 0x2d, 0x28, 0x26, 0x2e, 0x2b, 0x2a, 0x31, 0x2c, 0x2a, 0x32, 0xff, 0xff, 0xff, 0xb9, 0x11, 0x56, 0x3e, 0x0, 0x0, 0x0, 0x8, 0x74, 0x52, 0x4e, 0x53, 0x6f, 0xef, 0xf7, 0xf7, 0xf0, 0xf9, 0xf1, 0xee, 0xcf, 0x21, 0xd2, 0xdf, 0x0, 0x0, 0x0, 0x2d, 0x49, 0x44, 0x41, 0x54, 0x8, 0xd7, 0x63, 0x60, 0x54, 0x36, 0x36, 0x12, 0x60, 0xf0, 0x98, 0xb5, 0x6a, 0x65, 0xb, 0x43, 0xe4, 0x9e, 0x33, 0xa7, 0xa7, 0x32, 0x58, 0x9d, 0x39, 0x73, 0x66, 0x31, 0x16, 0x12, 0x22, 0xb, 0x52, 0xd9, 0xc6, 0xc0, 0x2, 0xd4, 0x55, 0x0, 0x0, 0xc, 0x14, 0x1a, 0x90, 0x55, 0x1a, 0xec, 0xdb, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char tree_bg_disabled_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0xa, 0x8, 0x4, 0x0, 0x0, 0x0, 0x27, 0x3b, 0x7, 0x36, 0x0, 0x0, 0x0, 0x4e, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x94, 0xc8, 0x67, 0x6b, 0x60, 0xe6, 0x60, 0x64, 0x80, 0x80, 0xff, 0xc, 0x7f, 0x7f, 0xfc, 0x6a, 0x60, 0x94, 0xfb, 0xc0, 0xce, 0xcf, 0xc2, 0x80, 0x10, 0xfc, 0xc3, 0xf0, 0xf3, 0x23, 0xa3, 0xe2, 0x4f, 0xe, 0x36, 0x54, 0xc1, 0x1f, 0xbf, 0x18, 0x95, 0xbe, 0x73, 0x70, 0xb0, 0x30, 0xc0, 0x1, 0x48, 0xf0, 0x7, 0x85, 0x82, 0x58, 0x2d, 0xc2, 0xe6, 0xa4, 0x4f, 0x20, 0xc7, 0x37, 0x32, 0xb3, 0x23, 0x39, 0xfe, 0xfb, 0xaf, 0x46, 0x0, 0xee, 0x2a, 0x2f, 0xce, 0x4c, 0x47, 0x66, 0xf6, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char tree_title_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x1, 0x3, 0x0, 0x0, 0x0, 0x25, 0x3d, 0x6d, 0x22, 0x0, 0x0, 0x0, 0x6, 0x50, 0x4c, 0x54, 0x45, 0x25, 0x23, 0x25, 0x4c, 0x4a, 0x4e, 0x1, 0xf9, 0x98, 0x2e, 0x0, 0x0, 0x0, 0xb, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x20, 0x11, 0x0, 0x0, 0x0, 0x30, 0x0, 0x1, 0x6e, 0xa6, 0xf, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char tree_title_pressed_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x1, 0x3, 0x0, 0x0, 0x0, 0x25, 0x3d, 0x6d, 0x22, 0x0, 0x0, 0x0, 0x6, 0x50, 0x4c, 0x54, 0x45, 0x36, 0x34, 0x36, 0x4c, 0x4a, 0x4e, 0x14, 0xd7, 0x5b, 0xf8, 0x0, 0x0, 0x0, 0xb, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x20, 0x11, 0x0, 0x0, 0x0, 0x30, 0x0, 0x1, 0x6e, 0xa6, 0xf, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char unchecked_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x3, 0x0, 0x0, 0x0, 0x28, 0x2d, 0xf, 0x53, 0x0, 0x0, 0x0, 0x33, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x4d, 0x4b, 0x59, 0x4d, 0x4b, 0x59, 0x4d, 0x4b, 0x59, 0x4d, 0x4b, 0x59, 0x4d, 0x4b, 0x59, 0x38, 0x37, 0x40, 0x20, 0x20, 0x24, 0x20, 0x20, 0x24, 0x38, 0x36, 0x40, 0x20, 0x20, 0x25, 0x1e, 0x1e, 0x22, 0x1f, 0x1f, 0x23, 0x20, 0x20, 0x24, 0x22, 0x22, 0x27, 0x23, 0x23, 0x28, 0x25, 0x25, 0x2a, 0x23, 0xc3, 0x49, 0x39, 0x0, 0x0, 0x0, 0xb, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x7, 0x27, 0x50, 0x66, 0x68, 0xb4, 0xfa, 0xfb, 0xb4, 0xfa, 0xa4, 0x7f, 0xe1, 0x5a, 0x0, 0x0, 0x0, 0x4f, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0xb5, 0xcf, 0x45, 0x2, 0x80, 0x40, 0x8, 0x0, 0x40, 0x97, 0x66, 0xfb, 0xff, 0x9f, 0xb5, 0xdb, 0xb3, 0x73, 0xa4, 0x19, 0xbe, 0x2, 0x20, 0xf1, 0x8a, 0x10, 0xc2, 0x1c, 0x0, 0xd1, 0x94, 0x57, 0x49, 0x5, 0xe6, 0x0, 0x6a, 0xa9, 0x6d, 0x55, 0x8b, 0xe2, 0x1c, 0xa0, 0x54, 0xfb, 0xae, 0x26, 0x9a, 0x3, 0x9c, 0xdb, 0x11, 0x68, 0x99, 0xff, 0xa, 0x7c, 0xd6, 0xde, 0xf, 0x33, 0x9c, 0x3, 0xe0, 0x76, 0x9c, 0x1e, 0x1d, 0xbe, 0xcf, 0x7d, 0x4c, 0x93, 0xe2, 0x8, 0xa4, 0x66, 0x3c, 0xec, 0xed, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char unchecked_disabled_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x3, 0x0, 0x0, 0x0, 0x28, 0x2d, 0xf, 0x53, 0x0, 0x0, 0x0, 0x9, 0x70, 0x48, 0x59, 0x73, 0x0, 0x0, 0xb, 0x13, 0x0, 0x0, 0xb, 0x13, 0x1, 0x0, 0x9a, 0x9c, 0x18, 0x0, 0x0, 0x0, 0x33, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x7a, 0x78, 0x83, 0x7a, 0x78, 0x83, 0x7a, 0x78, 0x83, 0x7a, 0x78, 0x83, 0x7a, 0x78, 0x83, 0x6a, 0x69, 0x70, 0x6a, 0x68, 0x70, 0x58, 0x58, 0x5c, 0x58, 0x58, 0x5b, 0x58, 0x58, 0x5b, 0x5c, 0x5c, 0x5f, 0x5a, 0x5a, 0x5e, 0x59, 0x59, 0x5d, 0x58, 0x58, 0x5b, 0x57, 0x57, 0x5a, 0x56, 0x56, 0x59, 0x27, 0xa1, 0xa6, 0x53, 0x0, 0x0, 0x0, 0xb, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x7, 0x27, 0x50, 0x66, 0x68, 0xb4, 0xb4, 0xfa, 0xfa, 0xfb, 0xc7, 0x8b, 0xf6, 0x7e, 0x0, 0x0, 0x0, 0x52, 0x49, 0x44, 0x41, 0x54, 0x78, 0x5e, 0xb5, 0xcf, 0x31, 0x12, 0xc0, 0x20, 0x8, 0x44, 0xd1, 0x15, 0x50, 0x83, 0x11, 0xe5, 0xfe, 0xa7, 0xcd, 0xe8, 0xc4, 0x22, 0xf4, 0x79, 0xe5, 0x36, 0x7c, 0x80, 0x8, 0x89, 0x58, 0xf2, 0x26, 0x4c, 0x9, 0x0, 0x15, 0xf5, 0xb9, 0xb9, 0x16, 0x2, 0xc0, 0x3a, 0xac, 0x6f, 0x36, 0x94, 0x1, 0x88, 0xdb, 0xfd, 0x32, 0x17, 0x0, 0x79, 0xf6, 0x33, 0xf4, 0x99, 0xff, 0x1a, 0xe2, 0xd9, 0x4f, 0x58, 0x5b, 0x61, 0x54, 0xdb, 0x49, 0xbf, 0xea, 0x4a, 0x8f, 0xcf, 0x45, 0xf, 0x4, 0x40, 0x7, 0x90, 0xb0, 0x7b, 0x47, 0x4, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char updown_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0x81, 0x83, 0xf6, 0xf6, 0x0, 0x0, 0x0, 0x57, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x8d, 0x4e, 0xb5, 0x1, 0xc0, 0x30, 0xc, 0xf3, 0x15, 0xfe, 0xff, 0x96, 0x64, 0xa, 0x6c, 0xca, 0x56, 0xd2, 0x25, 0x65, 0xe6, 0xc8, 0x8b, 0x49, 0x20, 0x79, 0x28, 0x95, 0x81, 0xa1, 0xd4, 0x7d, 0x4, 0xbb, 0xa1, 0x50, 0xea, 0x3c, 0xa6, 0x71, 0x98, 0x96, 0x69, 0x58, 0x31, 0xcc, 0xb7, 0xe5, 0x2f, 0x48, 0x63, 0x26, 0xf6, 0xa2, 0xd4, 0x18, 0xf9, 0x7, 0x2d, 0xe3, 0x46, 0x89, 0xb4, 0xd2, 0xf8, 0xa3, 0x68, 0xe3, 0xd7, 0x14, 0x20, 0xe6, 0xc3, 0x3d, 0xd8, 0xca, 0x5e, 0x94, 0x32, 0xd0, 0x3, 0x91, 0xba, 0x5f, 0x1b, 0x4a, 0x9b, 0x12, 0x62, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char vseparator_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x2, 0x3, 0x0, 0x0, 0x0, 0xb9, 0x61, 0x56, 0x18, 0x0, 0x0, 0x0, 0x9, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x73, 0x9b, 0xaa, 0xce, 0xdc, 0xe1, 0xeb, 0x64, 0x9a, 0x78, 0x0, 0x0, 0x0, 0x3, 0x74, 0x52, 0x4e, 0x53, 0x0, 0xb3, 0xb3, 0x67, 0xf6, 0xdb, 0x93, 0x0, 0x0, 0x0, 0xf, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x80, 0x83, 0xac, 0x95, 0xc, 0x48, 0x0, 0x0, 0xe, 0x79, 0x1, 0x14, 0x17, 0x9a, 0x55, 0x26, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char vslider_bg_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x3, 0x0, 0x0, 0x0, 0x28, 0x2d, 0xf, 0x53, 0x0, 0x0, 0x0, 0x51, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x4d, 0x4b, 0x59, 0x34, 0x33, 0x3a, 0x2d, 0x2c, 0x32, 0x4d, 0x4b, 0x59, 0x4d, 0x4b, 0x59, 0x4d, 0x4b, 0x59, 0x4d, 0x4b, 0x59, 0x4d, 0x4b, 0x59, 0x4d, 0x4b, 0x59, 0x3f, 0x3e, 0x49, 0x2a, 0x29, 0x2f, 0x20, 0x20, 0x24, 0x3f, 0x3e, 0x49, 0x3f, 0x3e, 0x49, 0x1f, 0x1f, 0x24, 0x40, 0x3e, 0x4a, 0x20, 0x20, 0x24, 0x34, 0x33, 0x3a, 0x20, 0x20, 0x25, 0x22, 0x22, 0x27, 0x23, 0x23, 0x28, 0x25, 0x25, 0x2a, 0x1e, 0x1e, 0x23, 0x23, 0x23, 0x27, 0x2d, 0x2c, 0x32, 0x1f, 0x1f, 0x23, 0x30, 0x7, 0x9c, 0xfe, 0x0, 0x0, 0x0, 0x13, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x0, 0x0, 0x0, 0x4, 0x1a, 0x40, 0x5d, 0x19, 0x28, 0x96, 0xf0, 0xfd, 0x94, 0x95, 0xfc, 0x93, 0xfc, 0xc0, 0x0, 0xb4, 0xa, 0x5f, 0x0, 0x0, 0x0, 0x5f, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x2c, 0xc8, 0x83, 0x11, 0x0, 0x30, 0x0, 0xc0, 0xc0, 0xda, 0xf6, 0xfe, 0x8b, 0xd6, 0x39, 0xe6, 0xc1, 0xe, 0x12, 0xca, 0x38, 0x67, 0x82, 0xc0, 0x73, 0xe7, 0xa5, 0xd2, 0xc6, 0x68, 0x2b, 0xbf, 0x40, 0xe1, 0x7c, 0x2e, 0x25, 0xfb, 0x20, 0x3e, 0x30, 0x9d, 0x6b, 0x6b, 0x35, 0x6b, 0xf6, 0x81, 0x9b, 0xd2, 0x76, 0x25, 0xf2, 0x7, 0x28, 0xf5, 0x71, 0x60, 0xf4, 0x84, 0x2e, 0xe0, 0x35, 0x49, 0x29, 0x51, 0x90, 0x80, 0xa8, 0x94, 0x24, 0x33, 0x19, 0x2, 0x18, 0x86, 0xa2, 0x5b, 0x8b, 0xe9, 0x30, 0x4c, 0xa7, 0x63, 0x7a, 0xe, 0xc3, 0xfb, 0x0, 0x89, 0x5c, 0xa, 0x6b, 0x4f, 0x78, 0xac, 0x83, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char vslider_grabber_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0xbc, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0xa0, 0x17, 0x60, 0x66, 0xe0, 0x65, 0x90, 0x61, 0x50, 0x67, 0xd0, 0x60, 0x50, 0x62, 0x10, 0x67, 0xe0, 0x2, 0xf2, 0x19, 0x51, 0xa5, 0xc5, 0xd2, 0xf2, 0x3a, 0xf, 0xce, 0x78, 0x3f, 0xed, 0x43, 0xff, 0xed, 0xc6, 0xf5, 0x41, 0xa9, 0x8a, 0x86, 0xc, 0x22, 0xc, 0xac, 0x8, 0x5, 0xbc, 0x69, 0x79, 0x93, 0x5e, 0xf4, 0xfd, 0x6f, 0x7, 0xc2, 0xae, 0xff, 0xfd, 0xff, 0xa7, 0xfd, 0xe9, 0x7f, 0x50, 0x31, 0x87, 0x47, 0x87, 0x81, 0x1b, 0x66, 0x8e, 0x4c, 0xe7, 0xc1, 0xbe, 0xff, 0x2d, 0xff, 0x9b, 0xa1, 0xb0, 0xf5, 0x7f, 0xe7, 0xff, 0xc9, 0xff, 0x27, 0xdc, 0xb6, 0xf0, 0x7, 0x9a, 0xc3, 0x2, 0x52, 0xa0, 0x3e, 0xe3, 0x7d, 0x3b, 0x54, 0x12, 0xa1, 0xa8, 0xe7, 0xff, 0x9c, 0x2f, 0x45, 0xc5, 0xc, 0xdc, 0xf8, 0x14, 0x7c, 0xaf, 0xaa, 0x65, 0xe0, 0xc1, 0x69, 0xc5, 0xc4, 0x3b, 0xe, 0xa1, 0xc, 0x62, 0xc, 0x2c, 0x68, 0x8e, 0xec, 0xf8, 0xdf, 0xfb, 0x7f, 0xda, 0xbf, 0x89, 0xf, 0x4a, 0xa6, 0xf2, 0xe8, 0x0, 0x75, 0x33, 0xa2, 0x79, 0x73, 0xea, 0x87, 0xbe, 0x7b, 0xbd, 0x47, 0x7d, 0x53, 0x58, 0x34, 0x18, 0x84, 0x19, 0x58, 0xb1, 0x7, 0x94, 0xa, 0x83, 0x14, 0x50, 0x27, 0x13, 0x3, 0x3d, 0x1, 0x0, 0x79, 0xc3, 0x79, 0x54, 0x19, 0x56, 0x3b, 0x28, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char vslider_grabber_disabled_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 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4b, 0x92, 0xc2, 0x7f, 0xcb, 0x5d, 0x16, 0x0, 0x0, 0x0, 0x1, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x40, 0xe6, 0xd8, 0x66, 0x0, 0x0, 0x0, 0x47, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0xa0, 0x16, 0x60, 0x65, 0x61, 0x66, 0x62, 0x44, 0xe2, 0x73, 0x4a, 0x88, 0x8b, 0x89, 0x8a, 0x70, 0xb0, 0xb3, 0xc1, 0xe4, 0x25, 0x64, 0x65, 0x80, 0x40, 0x5a, 0x4a, 0x92, 0xb, 0x22, 0xc0, 0x22, 0x2e, 0x3, 0x1, 0xd2, 0x72, 0xdc, 0x68, 0x2, 0xf2, 0x3c, 0xa8, 0x5a, 0x14, 0x78, 0x11, 0x86, 0x2a, 0x2b, 0x29, 0xa, 0xf0, 0xf3, 0x21, 0x59, 0x2b, 0x2c, 0x24, 0xc8, 0x40, 0x3d, 0x0, 0x0, 0x19, 0x8b, 0x5, 0xfc, 0x96, 0x5c, 0x15, 0x3b, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char vslider_tick_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x4, 0x4, 0x3, 0x0, 0x0, 0x0, 0x75, 0x9a, 0xa2, 0xdf, 0x0, 0x0, 0x0, 0x1b, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x81, 0xa2, 0xad, 0x8c, 0xac, 0xb8, 0x38, 0x55, 0x5f, 0x82, 0x82, 0x82, 0x8d, 0x8d, 0x8d, 0x98, 0x98, 0x98, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x7c, 0xda, 0x48, 0x6d, 0x0, 0x0, 0x0, 0x9, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x0, 0x0, 0x0, 0x79, 0x79, 0x79, 0x31, 0x1c, 0x18, 0xed, 0xfe, 0x2b, 0x0, 0x0, 0x0, 0x1c, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x80, 0x3, 0xd7, 0x44, 0x5, 0x6, 0x6, 0xe6, 0x92, 0x30, 0x86, 0xf2, 0x62, 0x3, 0x20, 0xa3, 0xbd, 0x1c, 0x2e, 0x3, 0x0, 0x3f, 0xce, 0x3, 0xaf, 0xed, 0xed, 0x7c, 0x2f, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char vsplit_bg_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x1, 0x3, 0x0, 0x0, 0x0, 0xfe, 0xc1, 0x2c, 0xc8, 0x0, 0x0, 0x0, 0x6, 0x50, 0x4c, 0x54, 0x45, 0x27, 0x27, 0x29, 0xff, 0xff, 0xff, 0x11, 0xab, 0xb9, 0xf3, 0x0, 0x0, 0x0, 0xa, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x40, 0x3, 0x0, 0x0, 0x10, 0x0, 0x1, 0xb3, 0xac, 0xe2, 0xd0, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char vsplitter_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x8, 0x8, 0x0, 0x0, 0x0, 0x0, 0x6c, 0x9, 0xa6, 0x3, 0x0, 0x0, 0x0, 0x2, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x0, 0x76, 0x93, 0xcd, 0x38, 0x0, 0x0, 0x0, 0x18, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0xa0, 0x1c, 0x2c, 0x48, 0xa5, 0xc, 0x33, 0xa4, 0x5a, 0x53, 0x86, 0x29, 0x7, 0xa3, 0x61, 0x0, 0x0, 0x18, 0x61, 0x34, 0xa1, 0xba, 0xa4, 0x4d, 0xe, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char window_resizer_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0x1e, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x18, 0xbc, 0xe0, 0x45, 0x3f, 0x1, 0xe9, 0xec, 0xfe, 0x81, 0x94, 0x86, 0xb1, 0x70, 0x48, 0x23, 0x58, 0x84, 0xa4, 0x7, 0x15, 0x0, 0x0, 0xed, 0x9f, 0x18, 0xe8, 0xcd, 0x91, 0xd8, 0xe, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char window_resizer_mirrored_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0x1, 0x6f, 0x72, 0x4e, 0x54, 0x1, 0xcf, 0xa2, 0x77, 0x9a, 0x0, 0x0, 0x0, 0x27, 0x49, 0x44, 0x41, 0x54, 0x28, 0xcf, 0x63, 0x60, 0x18, 0x44, 0xe0, 0x45, 0x3f, 0x76, 0x71, 0x26, 0x18, 0xa3, 0x19, 0xa7, 0x12, 0x38, 0xc8, 0xee, 0xa7, 0xb1, 0x12, 0x98, 0x4, 0x4e, 0x25, 0x8, 0x9, 0x4a, 0x94, 0xc, 0x10, 0x0, 0x0, 0x9d, 0x84, 0x18, 0x73, 0x33, 0x1c, 0x96, 0xd6, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-// shaders block
diff --git a/scene/resources/default_theme/toggle_off.png b/scene/resources/default_theme/toggle_off.png
deleted file mode 100644
index 64b51c8c9d..0000000000
--- a/scene/resources/default_theme/toggle_off.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/toggle_off.svg b/scene/resources/default_theme/toggle_off.svg
new file mode 100644
index 0000000000..95ec679cbe
--- /dev/null
+++ b/scene/resources/default_theme/toggle_off.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 32 15.999999" width="32" xmlns="http://www.w3.org/2000/svg"><g fill-opacity=".5" stroke-width=".999997"><rect fill="#1a1a1a" height="14" rx="7.000001" width="30" x="1" y="1"/><circle cx="8" cy="8" fill="#fff" r="5"/></g></svg>
diff --git a/scene/resources/default_theme/toggle_off_disabled.png b/scene/resources/default_theme/toggle_off_disabled.png
deleted file mode 100644
index 250cd29b66..0000000000
--- a/scene/resources/default_theme/toggle_off_disabled.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/toggle_off_disabled.svg b/scene/resources/default_theme/toggle_off_disabled.svg
new file mode 100644
index 0000000000..c86a678768
--- /dev/null
+++ b/scene/resources/default_theme/toggle_off_disabled.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 32 15.999999" width="32" xmlns="http://www.w3.org/2000/svg"><g fill-opacity=".25" stroke-width=".999997"><rect fill="#1a1a1a" height="14" rx="7.000001" width="30" x="1" y="1"/><circle cx="8" cy="8" fill="#fff" r="5"/></g></svg>
diff --git a/scene/resources/default_theme/toggle_off_disabled_mirrored.png b/scene/resources/default_theme/toggle_off_disabled_mirrored.png
deleted file mode 100644
index 799b63c098..0000000000
--- a/scene/resources/default_theme/toggle_off_disabled_mirrored.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/toggle_off_disabled_mirrored.svg b/scene/resources/default_theme/toggle_off_disabled_mirrored.svg
new file mode 100644
index 0000000000..0182dd738e
--- /dev/null
+++ b/scene/resources/default_theme/toggle_off_disabled_mirrored.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 32 15.999999" width="32" xmlns="http://www.w3.org/2000/svg"><g fill-opacity=".25" stroke-width=".999997" transform="scale(-1 1)"><rect fill="#1a1a1a" height="14" rx="7.000001" width="30" x="-31" y="1"/><circle cx="-24" cy="8" fill="#fff" r="5"/></g></svg>
diff --git a/scene/resources/default_theme/toggle_off_mirrored.png b/scene/resources/default_theme/toggle_off_mirrored.png
deleted file mode 100644
index 3487605d58..0000000000
--- a/scene/resources/default_theme/toggle_off_mirrored.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/toggle_off_mirrored.svg b/scene/resources/default_theme/toggle_off_mirrored.svg
new file mode 100644
index 0000000000..f61517a4ae
--- /dev/null
+++ b/scene/resources/default_theme/toggle_off_mirrored.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 32 15.999999" width="32" xmlns="http://www.w3.org/2000/svg"><g fill-opacity=".5" stroke-width=".999997" transform="scale(-1 1)"><rect fill="#1a1a1a" height="14" rx="7.000001" width="30" x="-31" y="1"/><circle cx="-24" cy="8" fill="#fff" r="5"/></g></svg>
diff --git a/scene/resources/default_theme/toggle_on.png b/scene/resources/default_theme/toggle_on.png
deleted file mode 100644
index f0c699c181..0000000000
--- a/scene/resources/default_theme/toggle_on.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/toggle_on.svg b/scene/resources/default_theme/toggle_on.svg
new file mode 100644
index 0000000000..7e02602792
--- /dev/null
+++ b/scene/resources/default_theme/toggle_on.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 32 15.999999" width="32" xmlns="http://www.w3.org/2000/svg"><g stroke-width=".999997" transform="scale(-1 1)"><rect fill="#fff" fill-opacity=".75" height="14" rx="7.000001" width="30" x="-31" y="1"/><circle cx="-24" cy="8" fill="#1a1a1a" r="5"/></g></svg>
diff --git a/scene/resources/default_theme/toggle_on_disabled.png b/scene/resources/default_theme/toggle_on_disabled.png
deleted file mode 100644
index b1dacbaf32..0000000000
--- a/scene/resources/default_theme/toggle_on_disabled.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/toggle_on_disabled.svg b/scene/resources/default_theme/toggle_on_disabled.svg
new file mode 100644
index 0000000000..72ce5bb9b2
--- /dev/null
+++ b/scene/resources/default_theme/toggle_on_disabled.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 32 15.999999" width="32" xmlns="http://www.w3.org/2000/svg"><g stroke-width=".999997" transform="scale(-1 1)"><rect fill="#fff" fill-opacity=".37" height="14" rx="7.000001" width="30" x="-31" y="1"/><circle cx="-24" cy="8" fill="#1a1a1a" fill-opacity=".5" r="5"/></g></svg>
diff --git a/scene/resources/default_theme/toggle_on_disabled_mirrored.png b/scene/resources/default_theme/toggle_on_disabled_mirrored.png
deleted file mode 100644
index 0758babd4f..0000000000
--- a/scene/resources/default_theme/toggle_on_disabled_mirrored.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/toggle_on_disabled_mirrored.svg b/scene/resources/default_theme/toggle_on_disabled_mirrored.svg
new file mode 100644
index 0000000000..340a386def
--- /dev/null
+++ b/scene/resources/default_theme/toggle_on_disabled_mirrored.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 32 15.999999" width="32" xmlns="http://www.w3.org/2000/svg"><g stroke-width=".999997"><rect fill="#fff" fill-opacity=".37" height="14" rx="7.000001" width="30" x="1" y="1"/><circle cx="8" cy="8" fill="#1a1a1a" fill-opacity=".5" r="5"/></g></svg>
diff --git a/scene/resources/default_theme/toggle_on_mirrored.png b/scene/resources/default_theme/toggle_on_mirrored.png
deleted file mode 100644
index 3fd953c8e2..0000000000
--- a/scene/resources/default_theme/toggle_on_mirrored.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/toggle_on_mirrored.svg b/scene/resources/default_theme/toggle_on_mirrored.svg
new file mode 100644
index 0000000000..fbc6be2af9
--- /dev/null
+++ b/scene/resources/default_theme/toggle_on_mirrored.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 32 15.999999" width="32" xmlns="http://www.w3.org/2000/svg"><g stroke-width=".999997"><rect fill="#fff" fill-opacity=".75" height="14" rx="7.000001" width="30" x="1" y="1"/><circle cx="8" cy="8" fill="#1a1a1a" r="5"/></g></svg>
diff --git a/scene/resources/default_theme/tooltip_bg.png b/scene/resources/default_theme/tooltip_bg.png
deleted file mode 100644
index 07b7d942ca..0000000000
--- a/scene/resources/default_theme/tooltip_bg.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/tree_bg.png b/scene/resources/default_theme/tree_bg.png
deleted file mode 100644
index 2b0c506f34..0000000000
--- a/scene/resources/default_theme/tree_bg.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/tree_bg_disabled.png b/scene/resources/default_theme/tree_bg_disabled.png
deleted file mode 100644
index 69d78febd9..0000000000
--- a/scene/resources/default_theme/tree_bg_disabled.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/tree_title.png b/scene/resources/default_theme/tree_title.png
deleted file mode 100644
index e5f3f49695..0000000000
--- a/scene/resources/default_theme/tree_title.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/tree_title_pressed.png b/scene/resources/default_theme/tree_title_pressed.png
deleted file mode 100644
index 35e2bb3008..0000000000
--- a/scene/resources/default_theme/tree_title_pressed.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/unchecked.png b/scene/resources/default_theme/unchecked.png
deleted file mode 100644
index 8c818af755..0000000000
--- a/scene/resources/default_theme/unchecked.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/unchecked.svg b/scene/resources/default_theme/unchecked.svg
new file mode 100644
index 0000000000..f475108f44
--- /dev/null
+++ b/scene/resources/default_theme/unchecked.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 15.999999" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3.3333333 1c-1.2887 0-2.3333333 1.0446683-2.3333333 2.3333333v9.3333337c0 1.2887 1.0446683 2.333333 2.3333333 2.333333h9.3333337c1.2887 0 2.333333-1.044668 2.333333-2.333333v-9.3333337c0-1.2887-1.044668-2.3333333-2.333333-2.3333333z" fill="#1a1a1a" fill-opacity=".5" stroke-width="1.16667"/></svg>
diff --git a/scene/resources/default_theme/unchecked_disabled.png b/scene/resources/default_theme/unchecked_disabled.png
deleted file mode 100644
index bef9316f58..0000000000
--- a/scene/resources/default_theme/unchecked_disabled.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/unchecked_disabled.svg b/scene/resources/default_theme/unchecked_disabled.svg
new file mode 100644
index 0000000000..195b85e37f
--- /dev/null
+++ b/scene/resources/default_theme/unchecked_disabled.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 15.999999" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3.3333333 1c-1.2887 0-2.3333333 1.0446683-2.3333333 2.3333333v9.3333337c0 1.2887 1.0446683 2.333333 2.3333333 2.333333h9.3333337c1.2887 0 2.333333-1.044668 2.333333-2.333333v-9.3333337c0-1.2887-1.044668-2.3333333-2.333333-2.3333333z" fill="#1a1a1a" fill-opacity=".25" stroke-width="1.16667"/></svg>
diff --git a/scene/resources/default_theme/updown.png b/scene/resources/default_theme/updown.png
deleted file mode 100644
index 56f81921e8..0000000000
--- a/scene/resources/default_theme/updown.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/updown.svg b/scene/resources/default_theme/updown.svg
new file mode 100644
index 0000000000..d6a630740f
--- /dev/null
+++ b/scene/resources/default_theme/updown.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 15.999999" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="#fff" stroke-opacity=".75" stroke-width="2"><path d="m4 6 4-3.5 4 3.5"/><path d="m12 10-4 3.5-4-3.5"/></g></svg>
diff --git a/scene/resources/default_theme/visibility_visible.svg b/scene/resources/default_theme/visibility_visible.svg
new file mode 100644
index 0000000000..ac1af8db0a
--- /dev/null
+++ b/scene/resources/default_theme/visibility_visible.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m8 2c-2.557 0-5.791 1.948-6.955 5.705-.057.186-.059.384-.006.57 1.124 3.936 4.461 5.725 6.961 5.725s5.836-1.789 6.961-5.725c.052-.18.052-.372 0-.552-1.1-3.788-4.407-5.723-6.961-5.723zm0 2c2.194 0 4 1.806 4 4s-1.806 4-4 4-4-1.806-4-4 1.806-4 4-4zm0 2c-1.097 0-2 .903-2 2s.903 2 2 2 2-.903 2-2-.903-2-2-2z" fill="#b2b2b2"/></svg>
diff --git a/scene/resources/default_theme/vseparator.png b/scene/resources/default_theme/vseparator.png
deleted file mode 100644
index 51e79f3ac5..0000000000
--- a/scene/resources/default_theme/vseparator.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/vslider_bg.png b/scene/resources/default_theme/vslider_bg.png
deleted file mode 100644
index ba3244e3e5..0000000000
--- a/scene/resources/default_theme/vslider_bg.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/vslider_grabber.png b/scene/resources/default_theme/vslider_grabber.png
deleted file mode 100644
index 6c6bf93e68..0000000000
--- a/scene/resources/default_theme/vslider_grabber.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/vslider_grabber_disabled.png b/scene/resources/default_theme/vslider_grabber_disabled.png
deleted file mode 100644
index 49cced5055..0000000000
--- a/scene/resources/default_theme/vslider_grabber_disabled.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/vslider_grabber_hl.png b/scene/resources/default_theme/vslider_grabber_hl.png
deleted file mode 100644
index 28774fdbf8..0000000000
--- a/scene/resources/default_theme/vslider_grabber_hl.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/vslider_tick.png b/scene/resources/default_theme/vslider_tick.png
deleted file mode 100644
index bde788b563..0000000000
--- a/scene/resources/default_theme/vslider_tick.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/vslider_tick.svg b/scene/resources/default_theme/vslider_tick.svg
new file mode 100644
index 0000000000..1365d36aca
--- /dev/null
+++ b/scene/resources/default_theme/vslider_tick.svg
@@ -0,0 +1 @@
+<svg height="4" viewBox="0 0 16 3.9999998" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m-3 0h2v16h-2z" fill="#fff" fill-opacity=".25" stroke-width=".285079" transform="rotate(-90)"/></svg>
diff --git a/scene/resources/default_theme/vsplit_bg.png b/scene/resources/default_theme/vsplit_bg.png
deleted file mode 100644
index a5749f6d5c..0000000000
--- a/scene/resources/default_theme/vsplit_bg.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/vsplitter.png b/scene/resources/default_theme/vsplitter.png
deleted file mode 100644
index dde1f390df..0000000000
--- a/scene/resources/default_theme/vsplitter.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/vsplitter.svg b/scene/resources/default_theme/vsplitter.svg
new file mode 100644
index 0000000000..c46d785925
--- /dev/null
+++ b/scene/resources/default_theme/vsplitter.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linecap="round" viewBox="0 0 48 8" xmlns="http://www.w3.org/2000/svg"><path d="m4 4h40" fill="none" stroke="#808080" stroke-opacity=".65" stroke-width="1.7"/></svg>
diff --git a/scene/resources/default_theme/window_resizer.png b/scene/resources/default_theme/window_resizer.png
deleted file mode 100644
index b06e6f5366..0000000000
--- a/scene/resources/default_theme/window_resizer.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/window_resizer_mirrored.png b/scene/resources/default_theme/window_resizer_mirrored.png
deleted file mode 100644
index bbce5f1406..0000000000
--- a/scene/resources/default_theme/window_resizer_mirrored.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/zoom_less.svg b/scene/resources/default_theme/zoom_less.svg
new file mode 100644
index 0000000000..a438f7f683
--- /dev/null
+++ b/scene/resources/default_theme/zoom_less.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" fill="#b2b2b2" fill-opacity=".65" r="8"/><circle cx="8" cy="8" fill="#fefffe" r="7"/><path d="m4 7h8v2h-8z" fill="#010001"/></svg>
diff --git a/scene/resources/default_theme/zoom_more.svg b/scene/resources/default_theme/zoom_more.svg
new file mode 100644
index 0000000000..192e0ed907
--- /dev/null
+++ b/scene/resources/default_theme/zoom_more.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" fill="#b2b2b2" fill-opacity=".65" r="8"/><circle cx="8" cy="8" fill="#fefffe" r="7"/><path d="m7 4h2v3h3v2h-3v3h-2v-3h-3v-2h3z" fill="#010001"/></svg>
diff --git a/scene/resources/default_theme/zoom_reset.svg b/scene/resources/default_theme/zoom_reset.svg
new file mode 100644
index 0000000000..427214cda2
--- /dev/null
+++ b/scene/resources/default_theme/zoom_reset.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" fill="#b2b2b2" fill-opacity=".65" r="8"/><circle cx="8" cy="8" fill="#fefffe" r="7"/><path d="m8.016 4.002h.029c.548 0 .999.45 1 .998v7h-2v-5.131l-1.445.963-1.11-1.664 3-2c.156-.103.338-.161.526-.166z" fill="#010001"/></svg>
diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp
index 7e71ad8986..0afe040f33 100644
--- a/scene/resources/environment.cpp
+++ b/scene/resources/environment.cpp
@@ -496,13 +496,13 @@ bool Environment::is_sdfgi_enabled() const {
return sdfgi_enabled;
}
-void Environment::set_sdfgi_cascades(SDFGICascades p_cascades) {
- ERR_FAIL_INDEX(p_cascades, SDFGI_CASCADES_8 + 1);
+void Environment::set_sdfgi_cascades(int p_cascades) {
+ ERR_FAIL_COND_MSG(p_cascades < 1 || p_cascades > 8, "Invalid number of SDFGI cascades (must be between 1 and 8).");
sdfgi_cascades = p_cascades;
_update_sdfgi();
}
-Environment::SDFGICascades Environment::get_sdfgi_cascades() const {
+int Environment::get_sdfgi_cascades() const {
return sdfgi_cascades;
}
@@ -517,9 +517,7 @@ float Environment::get_sdfgi_min_cell_size() const {
void Environment::set_sdfgi_max_distance(float p_distance) {
p_distance /= 64.0;
- int cc[3] = { 4, 6, 8 };
- int cascades = cc[sdfgi_cascades];
- for (int i = 0; i < cascades; i++) {
+ for (int i = 0; i < sdfgi_cascades; i++) {
p_distance *= 0.5; //halve for each cascade
}
sdfgi_min_cell_size = p_distance;
@@ -529,9 +527,7 @@ void Environment::set_sdfgi_max_distance(float p_distance) {
float Environment::get_sdfgi_max_distance() const {
float md = sdfgi_min_cell_size;
md *= 64.0;
- int cc[3] = { 4, 6, 8 };
- int cascades = cc[sdfgi_cascades];
- for (int i = 0; i < cascades; i++) {
+ for (int i = 0; i < sdfgi_cascades; i++) {
md *= 2.0;
}
return md;
@@ -612,7 +608,7 @@ void Environment::_update_sdfgi() {
RS::get_singleton()->environment_set_sdfgi(
environment,
sdfgi_enabled,
- RS::EnvironmentSDFGICascades(sdfgi_cascades),
+ sdfgi_cascades,
sdfgi_min_cell_size,
RS::EnvironmentSDFGIYScale(sdfgi_y_scale),
sdfgi_use_occlusion,
@@ -1303,7 +1299,7 @@ void Environment::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sdfgi_use_occlusion"), "set_sdfgi_use_occlusion", "is_sdfgi_using_occlusion");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sdfgi_read_sky_light"), "set_sdfgi_read_sky_light", "is_sdfgi_reading_sky_light");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sdfgi_bounce_feedback", PROPERTY_HINT_RANGE, "0,1.99,0.01"), "set_sdfgi_bounce_feedback", "get_sdfgi_bounce_feedback");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "sdfgi_cascades", PROPERTY_HINT_ENUM, "4 Cascades,6 Cascades,8 Cascades"), "set_sdfgi_cascades", "get_sdfgi_cascades");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "sdfgi_cascades", PROPERTY_HINT_RANGE, "1,8,1"), "set_sdfgi_cascades", "get_sdfgi_cascades");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sdfgi_min_cell_size", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_sdfgi_min_cell_size", "get_sdfgi_min_cell_size");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sdfgi_cascade0_distance", PROPERTY_HINT_RANGE, "0.1,16384,0.1,or_greater"), "set_sdfgi_cascade0_distance", "get_sdfgi_cascade0_distance");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sdfgi_max_distance", PROPERTY_HINT_RANGE, "0.1,16384,0.1,or_greater"), "set_sdfgi_max_distance", "get_sdfgi_max_distance");
@@ -1480,10 +1476,6 @@ void Environment::_bind_methods() {
BIND_ENUM_CONSTANT(GLOW_BLEND_MODE_REPLACE);
BIND_ENUM_CONSTANT(GLOW_BLEND_MODE_MIX);
- BIND_ENUM_CONSTANT(SDFGI_CASCADES_4);
- BIND_ENUM_CONSTANT(SDFGI_CASCADES_6);
- BIND_ENUM_CONSTANT(SDFGI_CASCADES_8);
-
BIND_ENUM_CONSTANT(SDFGI_Y_SCALE_DISABLED);
BIND_ENUM_CONSTANT(SDFGI_Y_SCALE_75_PERCENT);
BIND_ENUM_CONSTANT(SDFGI_Y_SCALE_50_PERCENT);
diff --git a/scene/resources/environment.h b/scene/resources/environment.h
index 98e755c336..3f05315013 100644
--- a/scene/resources/environment.h
+++ b/scene/resources/environment.h
@@ -70,12 +70,6 @@ public:
TONE_MAPPER_ACES,
};
- enum SDFGICascades {
- SDFGI_CASCADES_4,
- SDFGI_CASCADES_6,
- SDFGI_CASCADES_8,
- };
-
enum SDFGIYScale {
SDFGI_Y_SCALE_DISABLED,
SDFGI_Y_SCALE_75_PERCENT,
@@ -153,7 +147,7 @@ private:
// SDFGI
bool sdfgi_enabled = false;
- SDFGICascades sdfgi_cascades = SDFGI_CASCADES_6;
+ int sdfgi_cascades = 6;
float sdfgi_min_cell_size = 0.2;
SDFGIYScale sdfgi_y_scale = SDFGI_Y_SCALE_DISABLED;
bool sdfgi_use_occlusion = false;
@@ -320,8 +314,8 @@ public:
// SDFGI
void set_sdfgi_enabled(bool p_enabled);
bool is_sdfgi_enabled() const;
- void set_sdfgi_cascades(SDFGICascades p_cascades);
- SDFGICascades get_sdfgi_cascades() const;
+ void set_sdfgi_cascades(int p_cascades);
+ int get_sdfgi_cascades() const;
void set_sdfgi_min_cell_size(float p_size);
float get_sdfgi_min_cell_size() const;
void set_sdfgi_max_distance(float p_distance);
@@ -433,7 +427,6 @@ VARIANT_ENUM_CAST(Environment::BGMode)
VARIANT_ENUM_CAST(Environment::AmbientSource)
VARIANT_ENUM_CAST(Environment::ReflectionSource)
VARIANT_ENUM_CAST(Environment::ToneMapper)
-VARIANT_ENUM_CAST(Environment::SDFGICascades)
VARIANT_ENUM_CAST(Environment::SDFGIYScale)
VARIANT_ENUM_CAST(Environment::GlowBlendMode)
diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp
index d9e0c301de..f040041aa5 100644
--- a/scene/resources/font.cpp
+++ b/scene/resources/font.cpp
@@ -30,6 +30,7 @@
#include "font.h"
+#include "core/io/image_loader.h"
#include "core/io/resource_loader.h"
#include "core/string/translation.h"
#include "core/templates/hashfuncs.h"
@@ -64,6 +65,9 @@ _FORCE_INLINE_ void FontData::_ensure_rid(int p_cache_index) const {
}
void FontData::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("load_bitmap_font", "path"), &FontData::load_bitmap_font);
+ ClassDB::bind_method(D_METHOD("load_dynamic_font", "path"), &FontData::load_dynamic_font);
+
ClassDB::bind_method(D_METHOD("set_data", "data"), &FontData::set_data);
ClassDB::bind_method(D_METHOD("get_data"), &FontData::get_data);
@@ -428,11 +432,766 @@ void FontData::reset_state() {
hinting = TextServer::HINTING_LIGHT;
msdf_pixel_range = 14;
msdf_size = 128;
+ fixed_size = 0;
oversampling = 0.f;
}
+void FontData::_convert_packed_8bit(Ref<Image> &p_source, int p_page, int p_sz) {
+ int w = p_source->get_width();
+ int h = p_source->get_height();
+
+ PackedByteArray imgdata = p_source->get_data();
+ const uint8_t *r = imgdata.ptr();
+
+ PackedByteArray imgdata_r;
+ imgdata_r.resize(w * h * 2);
+ uint8_t *wr = imgdata_r.ptrw();
+
+ PackedByteArray imgdata_g;
+ imgdata_g.resize(w * h * 2);
+ uint8_t *wg = imgdata_g.ptrw();
+
+ PackedByteArray imgdata_b;
+ imgdata_b.resize(w * h * 2);
+ uint8_t *wb = imgdata_b.ptrw();
+
+ PackedByteArray imgdata_a;
+ imgdata_a.resize(w * h * 2);
+ uint8_t *wa = imgdata_a.ptrw();
+
+ for (int i = 0; i < h; i++) {
+ for (int j = 0; j < w; j++) {
+ int ofs_src = (i * w + j) * 4;
+ int ofs_dst = (i * w + j) * 2;
+ wr[ofs_dst + 0] = 255;
+ wr[ofs_dst + 1] = r[ofs_src + 0];
+ wg[ofs_dst + 0] = 255;
+ wg[ofs_dst + 1] = r[ofs_src + 1];
+ wb[ofs_dst + 0] = 255;
+ wb[ofs_dst + 1] = r[ofs_src + 2];
+ wa[ofs_dst + 0] = 255;
+ wa[ofs_dst + 1] = r[ofs_src + 3];
+ }
+ }
+ Ref<Image> img_r = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_r));
+ set_texture_image(0, Vector2i(p_sz, 0), p_page * 4 + 0, img_r);
+ Ref<Image> img_g = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_g));
+ set_texture_image(0, Vector2i(p_sz, 0), p_page * 4 + 1, img_g);
+ Ref<Image> img_b = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_b));
+ set_texture_image(0, Vector2i(p_sz, 0), p_page * 4 + 2, img_b);
+ Ref<Image> img_a = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_a));
+ set_texture_image(0, Vector2i(p_sz, 0), p_page * 4 + 3, img_a);
+}
+
+void FontData::_convert_packed_4bit(Ref<Image> &p_source, int p_page, int p_sz) {
+ int w = p_source->get_width();
+ int h = p_source->get_height();
+
+ PackedByteArray imgdata = p_source->get_data();
+ const uint8_t *r = imgdata.ptr();
+
+ PackedByteArray imgdata_r;
+ imgdata_r.resize(w * h * 2);
+ uint8_t *wr = imgdata_r.ptrw();
+
+ PackedByteArray imgdata_g;
+ imgdata_g.resize(w * h * 2);
+ uint8_t *wg = imgdata_g.ptrw();
+
+ PackedByteArray imgdata_b;
+ imgdata_b.resize(w * h * 2);
+ uint8_t *wb = imgdata_b.ptrw();
+
+ PackedByteArray imgdata_a;
+ imgdata_a.resize(w * h * 2);
+ uint8_t *wa = imgdata_a.ptrw();
+
+ PackedByteArray imgdata_ro;
+ imgdata_ro.resize(w * h * 2);
+ uint8_t *wro = imgdata_ro.ptrw();
+
+ PackedByteArray imgdata_go;
+ imgdata_go.resize(w * h * 2);
+ uint8_t *wgo = imgdata_go.ptrw();
+
+ PackedByteArray imgdata_bo;
+ imgdata_bo.resize(w * h * 2);
+ uint8_t *wbo = imgdata_bo.ptrw();
+
+ PackedByteArray imgdata_ao;
+ imgdata_ao.resize(w * h * 2);
+ uint8_t *wao = imgdata_ao.ptrw();
+
+ for (int i = 0; i < h; i++) {
+ for (int j = 0; j < w; j++) {
+ int ofs_src = (i * w + j) * 4;
+ int ofs_dst = (i * w + j) * 2;
+ wr[ofs_dst + 0] = 255;
+ wro[ofs_dst + 0] = 255;
+ if (r[ofs_src + 0] > 0x0F) {
+ wr[ofs_dst + 1] = (r[ofs_src + 0] - 0x0F) * 2;
+ wro[ofs_dst + 1] = 0;
+ } else {
+ wr[ofs_dst + 1] = 0;
+ wro[ofs_dst + 1] = r[ofs_src + 0] * 2;
+ }
+ wg[ofs_dst + 0] = 255;
+ wgo[ofs_dst + 0] = 255;
+ if (r[ofs_src + 1] > 0x0F) {
+ wg[ofs_dst + 1] = (r[ofs_src + 1] - 0x0F) * 2;
+ wgo[ofs_dst + 1] = 0;
+ } else {
+ wg[ofs_dst + 1] = 0;
+ wgo[ofs_dst + 1] = r[ofs_src + 1] * 2;
+ }
+ wb[ofs_dst + 0] = 255;
+ wbo[ofs_dst + 0] = 255;
+ if (r[ofs_src + 2] > 0x0F) {
+ wb[ofs_dst + 1] = (r[ofs_src + 2] - 0x0F) * 2;
+ wbo[ofs_dst + 1] = 0;
+ } else {
+ wb[ofs_dst + 1] = 0;
+ wbo[ofs_dst + 1] = r[ofs_src + 2] * 2;
+ }
+ wa[ofs_dst + 0] = 255;
+ wao[ofs_dst + 0] = 255;
+ if (r[ofs_src + 3] > 0x0F) {
+ wa[ofs_dst + 1] = (r[ofs_src + 3] - 0x0F) * 2;
+ wao[ofs_dst + 1] = 0;
+ } else {
+ wa[ofs_dst + 1] = 0;
+ wao[ofs_dst + 1] = r[ofs_src + 3] * 2;
+ }
+ }
+ }
+ Ref<Image> img_r = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_r));
+ set_texture_image(0, Vector2i(p_sz, 0), p_page * 4 + 0, img_r);
+ Ref<Image> img_g = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_g));
+ set_texture_image(0, Vector2i(p_sz, 0), p_page * 4 + 1, img_g);
+ Ref<Image> img_b = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_b));
+ set_texture_image(0, Vector2i(p_sz, 0), p_page * 4 + 2, img_b);
+ Ref<Image> img_a = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_a));
+ set_texture_image(0, Vector2i(p_sz, 0), p_page * 4 + 3, img_a);
+
+ Ref<Image> img_ro = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_ro));
+ set_texture_image(0, Vector2i(p_sz, 1), p_page * 4 + 0, img_ro);
+ Ref<Image> img_go = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_go));
+ set_texture_image(0, Vector2i(p_sz, 1), p_page * 4 + 1, img_go);
+ Ref<Image> img_bo = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_bo));
+ set_texture_image(0, Vector2i(p_sz, 1), p_page * 4 + 2, img_bo);
+ Ref<Image> img_ao = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_ao));
+ set_texture_image(0, Vector2i(p_sz, 1), p_page * 4 + 3, img_ao);
+}
+
+void FontData::_convert_rgba_4bit(Ref<Image> &p_source, int p_page, int p_sz) {
+ int w = p_source->get_width();
+ int h = p_source->get_height();
+
+ PackedByteArray imgdata = p_source->get_data();
+ const uint8_t *r = imgdata.ptr();
+
+ PackedByteArray imgdata_g;
+ imgdata_g.resize(w * h * 4);
+ uint8_t *wg = imgdata_g.ptrw();
+
+ PackedByteArray imgdata_o;
+ imgdata_o.resize(w * h * 4);
+ uint8_t *wo = imgdata_o.ptrw();
+
+ for (int i = 0; i < h; i++) {
+ for (int j = 0; j < w; j++) {
+ int ofs = (i * w + j) * 4;
+
+ if (r[ofs + 0] > 0x7F) {
+ wg[ofs + 0] = r[ofs + 0];
+ wo[ofs + 0] = 0;
+ } else {
+ wg[ofs + 0] = 0;
+ wo[ofs + 0] = r[ofs + 0] * 2;
+ }
+ if (r[ofs + 1] > 0x7F) {
+ wg[ofs + 1] = r[ofs + 1];
+ wo[ofs + 1] = 0;
+ } else {
+ wg[ofs + 1] = 0;
+ wo[ofs + 1] = r[ofs + 1] * 2;
+ }
+ if (r[ofs + 2] > 0x7F) {
+ wg[ofs + 2] = r[ofs + 2];
+ wo[ofs + 2] = 0;
+ } else {
+ wg[ofs + 2] = 0;
+ wo[ofs + 2] = r[ofs + 2] * 2;
+ }
+ if (r[ofs + 3] > 0x7F) {
+ wg[ofs + 3] = r[ofs + 3];
+ wo[ofs + 3] = 0;
+ } else {
+ wg[ofs + 3] = 0;
+ wo[ofs + 3] = r[ofs + 3] * 2;
+ }
+ }
+ }
+ Ref<Image> img_g = memnew(Image(w, h, 0, Image::FORMAT_RGBA8, imgdata_g));
+ set_texture_image(0, Vector2i(p_sz, 0), p_page, img_g);
+
+ Ref<Image> img_o = memnew(Image(w, h, 0, Image::FORMAT_RGBA8, imgdata_o));
+ set_texture_image(0, Vector2i(p_sz, 1), p_page, img_o);
+}
+
+void FontData::_convert_mono_8bit(Ref<Image> &p_source, int p_page, int p_ch, int p_sz, int p_ol) {
+ int w = p_source->get_width();
+ int h = p_source->get_height();
+
+ PackedByteArray imgdata = p_source->get_data();
+ const uint8_t *r = imgdata.ptr();
+
+ int size = 4;
+ if (p_source->get_format() == Image::FORMAT_L8) {
+ size = 1;
+ p_ch = 0;
+ }
+
+ PackedByteArray imgdata_g;
+ imgdata_g.resize(w * h * 2);
+ uint8_t *wg = imgdata_g.ptrw();
+
+ for (int i = 0; i < h; i++) {
+ for (int j = 0; j < w; j++) {
+ int ofs_src = (i * w + j) * size;
+ int ofs_dst = (i * w + j) * 2;
+ wg[ofs_dst + 0] = 255;
+ wg[ofs_dst + 1] = r[ofs_src + p_ch];
+ }
+ }
+ Ref<Image> img_g = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_g));
+ set_texture_image(0, Vector2i(p_sz, p_ol), p_page, img_g);
+}
+
+void FontData::_convert_mono_4bit(Ref<Image> &p_source, int p_page, int p_ch, int p_sz, int p_ol) {
+ int w = p_source->get_width();
+ int h = p_source->get_height();
+
+ PackedByteArray imgdata = p_source->get_data();
+ const uint8_t *r = imgdata.ptr();
+
+ int size = 4;
+ if (p_source->get_format() == Image::FORMAT_L8) {
+ size = 1;
+ p_ch = 0;
+ }
+
+ PackedByteArray imgdata_g;
+ imgdata_g.resize(w * h * 2);
+ uint8_t *wg = imgdata_g.ptrw();
+
+ PackedByteArray imgdata_o;
+ imgdata_o.resize(w * h * 2);
+ uint8_t *wo = imgdata_o.ptrw();
+
+ for (int i = 0; i < h; i++) {
+ for (int j = 0; j < w; j++) {
+ int ofs_src = (i * w + j) * size;
+ int ofs_dst = (i * w + j) * 2;
+ wg[ofs_dst + 0] = 255;
+ wo[ofs_dst + 0] = 255;
+ if (r[ofs_src + p_ch] > 0x7F) {
+ wg[ofs_dst + 1] = r[ofs_src + p_ch];
+ wo[ofs_dst + 1] = 0;
+ } else {
+ wg[ofs_dst + 1] = 0;
+ wo[ofs_dst + 1] = r[ofs_src + p_ch] * 2;
+ }
+ }
+ }
+ Ref<Image> img_g = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_g));
+ set_texture_image(0, Vector2i(p_sz, 0), p_page, img_g);
+
+ Ref<Image> img_o = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_o));
+ set_texture_image(0, Vector2i(p_sz, p_ol), p_page, img_o);
+}
+
/*************************************************************************/
+Error FontData::load_bitmap_font(const String &p_path) {
+ reset_state();
+
+ antialiased = false;
+ msdf = false;
+ force_autohinter = false;
+ hinting = TextServer::HINTING_NONE;
+ oversampling = 1.0f;
+
+ FileAccessRef f = FileAccess::open(p_path, FileAccess::READ);
+ if (f == nullptr) {
+ ERR_FAIL_V_MSG(ERR_CANT_CREATE, TTR("Cannot open font from file ") + "\"" + p_path + "\".");
+ }
+
+ int base_size = 16;
+ int height = 0;
+ int ascent = 0;
+ int outline = 0;
+ uint32_t st_flags = 0;
+ String font_name;
+
+ bool packed = false;
+ uint8_t ch[4] = { 0, 0, 0, 0 }; // RGBA
+ int first_gl_ch = -1;
+ int first_ol_ch = -1;
+ int first_cm_ch = -1;
+
+ unsigned char magic[4];
+ f->get_buffer((unsigned char *)&magic, 4);
+ if (magic[0] == 'B' && magic[1] == 'M' && magic[2] == 'F') {
+ // Binary BMFont file.
+ ERR_FAIL_COND_V_MSG(magic[3] != 3, ERR_CANT_CREATE, vformat(TTR("Version %d of BMFont is not supported."), (int)magic[3]));
+
+ uint8_t block_type = f->get_8();
+ uint32_t block_size = f->get_32();
+ while (!f->eof_reached()) {
+ uint64_t off = f->get_position();
+ switch (block_type) {
+ case 1: /* info */ {
+ ERR_FAIL_COND_V_MSG(block_size < 15, ERR_CANT_CREATE, TTR("Invalid BMFont info block size."));
+ base_size = f->get_16();
+ uint8_t flags = f->get_8();
+ ERR_FAIL_COND_V_MSG(flags & 0x02, ERR_CANT_CREATE, TTR("Non-unicode version of BMFont is not supported."));
+ if (flags & (1 << 3)) {
+ st_flags |= TextServer::FONT_BOLD;
+ }
+ if (flags & (1 << 2)) {
+ st_flags |= TextServer::FONT_ITALIC;
+ }
+ f->get_8(); // non-unicode charset, skip
+ f->get_16(); // stretch_h, skip
+ f->get_8(); // aa, skip
+ f->get_32(); // padding, skip
+ f->get_16(); // spacing, skip
+ outline = f->get_8();
+ // font name
+ PackedByteArray name_data;
+ name_data.resize(block_size - 14);
+ f->get_buffer(name_data.ptrw(), block_size - 14);
+ font_name = String::utf8((const char *)name_data.ptr(), block_size - 14);
+ set_fixed_size(base_size);
+ } break;
+ case 2: /* common */ {
+ ERR_FAIL_COND_V_MSG(block_size != 15, ERR_CANT_CREATE, TTR("Invalid BMFont common block size."));
+ height = f->get_16();
+ ascent = f->get_16();
+ f->get_32(); // scale, skip
+ f->get_16(); // pages, skip
+ uint8_t flags = f->get_8();
+ packed = (flags & 0x01);
+ ch[3] = f->get_8();
+ ch[0] = f->get_8();
+ ch[1] = f->get_8();
+ ch[2] = f->get_8();
+ for (int i = 0; i < 4; i++) {
+ if (ch[i] == 0 && first_gl_ch == -1) {
+ first_gl_ch = i;
+ }
+ if (ch[i] == 1 && first_ol_ch == -1) {
+ first_ol_ch = i;
+ }
+ if (ch[i] == 2 && first_cm_ch == -1) {
+ first_cm_ch = i;
+ }
+ }
+ } break;
+ case 3: /* pages */ {
+ int page = 0;
+ CharString cs;
+ char32_t c = f->get_8();
+ while (!f->eof_reached() && f->get_position() <= off + block_size) {
+ if (c == '\0') {
+ String base_dir = p_path.get_base_dir();
+ String file = base_dir.plus_file(String::utf8(cs.ptr(), cs.length()));
+ if (RenderingServer::get_singleton() != nullptr) {
+ Ref<Image> img;
+ img.instantiate();
+ Error err = ImageLoader::load_image(file, img);
+ ERR_FAIL_COND_V_MSG(err != OK, ERR_FILE_CANT_READ, TTR("Can't load font texture: ") + "\"" + file + "\".");
+
+ if (packed) {
+ if (ch[3] == 0) { // 4 x 8 bit monochrome, no outline
+ outline = 0;
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ _convert_packed_8bit(img, page, base_size);
+ } else if ((ch[3] == 2) && (outline > 0)) { // 4 x 4 bit monochrome, gl + outline
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ _convert_packed_4bit(img, page, base_size);
+ } else {
+ ERR_FAIL_V_MSG(ERR_CANT_CREATE, TTR("Unsupported BMFont texture format."));
+ }
+ } else {
+ if ((ch[0] == 0) && (ch[1] == 0) && (ch[2] == 0) && (ch[3] == 0)) { // RGBA8 color, no outline
+ outline = 0;
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ set_texture_image(0, Vector2i(base_size, 0), page, img);
+ } else if ((ch[0] == 2) && (ch[1] == 2) && (ch[2] == 2) && (ch[3] == 2) && (outline > 0)) { // RGBA4 color, gl + outline
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ _convert_rgba_4bit(img, page, base_size);
+ } else if ((first_gl_ch >= 0) && (first_ol_ch >= 0) && (outline > 0)) { // 1 x 8 bit monochrome, gl + outline
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8 && img->get_format() != Image::FORMAT_L8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ _convert_mono_8bit(img, page, first_gl_ch, base_size, 0);
+ _convert_mono_8bit(img, page, first_ol_ch, base_size, 1);
+ } else if ((first_cm_ch >= 0) && (outline > 0)) { // 1 x 4 bit monochrome, gl + outline
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8 && img->get_format() != Image::FORMAT_L8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ _convert_mono_4bit(img, page, first_cm_ch, base_size, 1);
+ } else if (first_gl_ch >= 0) { // 1 x 8 bit monochrome, no outline
+ outline = 0;
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8 && img->get_format() != Image::FORMAT_L8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ _convert_mono_8bit(img, page, first_gl_ch, base_size, 0);
+ } else {
+ ERR_FAIL_V_MSG(ERR_CANT_CREATE, TTR("Unsupported BMFont texture format."));
+ }
+ }
+ }
+ page++;
+ cs = "";
+ } else {
+ cs += c;
+ }
+ c = f->get_8();
+ }
+ } break;
+ case 4: /* chars */ {
+ int char_count = block_size / 20;
+ for (int i = 0; i < char_count; i++) {
+ Vector2 advance;
+ Vector2 size;
+ Vector2 offset;
+ Rect2 uv_rect;
+
+ char32_t idx = f->get_32();
+ uv_rect.position.x = (int16_t)f->get_16();
+ uv_rect.position.y = (int16_t)f->get_16();
+ uv_rect.size.width = (int16_t)f->get_16();
+ size.width = uv_rect.size.width;
+ uv_rect.size.height = (int16_t)f->get_16();
+ size.height = uv_rect.size.height;
+ offset.x = (int16_t)f->get_16();
+ offset.y = (int16_t)f->get_16() - ascent;
+ advance.x = (int16_t)f->get_16();
+ if (advance.x < 0) {
+ advance.x = size.width + 1;
+ }
+
+ int texture_idx = f->get_8();
+ uint8_t channel = f->get_8();
+
+ ERR_FAIL_COND_V_MSG(!packed && channel != 15, ERR_CANT_CREATE, TTR("Invalid glyph channel."));
+ int ch_off = 0;
+ switch (channel) {
+ case 1:
+ ch_off = 2;
+ break; // B
+ case 2:
+ ch_off = 1;
+ break; // G
+ case 4:
+ ch_off = 0;
+ break; // R
+ case 8:
+ ch_off = 3;
+ break; // A
+ default:
+ ch_off = 0;
+ break;
+ }
+ set_glyph_advance(0, base_size, idx, advance);
+ set_glyph_offset(0, Vector2i(base_size, 0), idx, offset);
+ set_glyph_size(0, Vector2i(base_size, 0), idx, size);
+ set_glyph_uv_rect(0, Vector2i(base_size, 0), idx, uv_rect);
+ set_glyph_texture_idx(0, Vector2i(base_size, 0), idx, texture_idx * (packed ? 4 : 1) + ch_off);
+ if (outline > 0) {
+ set_glyph_offset(0, Vector2i(base_size, 1), idx, offset);
+ set_glyph_size(0, Vector2i(base_size, 1), idx, size);
+ set_glyph_uv_rect(0, Vector2i(base_size, 1), idx, uv_rect);
+ set_glyph_texture_idx(0, Vector2i(base_size, 1), idx, texture_idx * (packed ? 4 : 1) + ch_off);
+ }
+ }
+ } break;
+ case 5: /* kerning */ {
+ int pair_count = block_size / 10;
+ for (int i = 0; i < pair_count; i++) {
+ Vector2i kpk;
+ kpk.x = f->get_32();
+ kpk.y = f->get_32();
+ set_kerning(0, base_size, kpk, Vector2((int16_t)f->get_16(), 0));
+ }
+ } break;
+ default: {
+ ERR_FAIL_V_MSG(ERR_CANT_CREATE, TTR("Invalid BMFont block type."));
+ } break;
+ }
+ f->seek(off + block_size);
+ block_type = f->get_8();
+ block_size = f->get_32();
+ }
+
+ } else {
+ // Text BMFont file.
+ f->seek(0);
+ while (true) {
+ String line = f->get_line();
+
+ int delimiter = line.find(" ");
+ String type = line.substr(0, delimiter);
+ int pos = delimiter + 1;
+ Map<String, String> keys;
+
+ while (pos < line.size() && line[pos] == ' ') {
+ pos++;
+ }
+
+ while (pos < line.size()) {
+ int eq = line.find("=", pos);
+ if (eq == -1) {
+ break;
+ }
+ String key = line.substr(pos, eq - pos);
+ int end = -1;
+ String value;
+ if (line[eq + 1] == '"') {
+ end = line.find("\"", eq + 2);
+ if (end == -1) {
+ break;
+ }
+ value = line.substr(eq + 2, end - 1 - eq - 1);
+ pos = end + 1;
+ } else {
+ end = line.find(" ", eq + 1);
+ if (end == -1) {
+ end = line.size();
+ }
+ value = line.substr(eq + 1, end - eq);
+ pos = end;
+ }
+
+ while (pos < line.size() && line[pos] == ' ') {
+ pos++;
+ }
+
+ keys[key] = value;
+ }
+
+ if (type == "info") {
+ if (keys.has("size")) {
+ base_size = keys["size"].to_int();
+ set_fixed_size(base_size);
+ }
+ if (keys.has("outline")) {
+ outline = keys["outline"].to_int();
+ }
+ if (keys.has("bold")) {
+ if (keys["bold"].to_int()) {
+ st_flags |= TextServer::FONT_BOLD;
+ }
+ }
+ if (keys.has("italic")) {
+ if (keys["italic"].to_int()) {
+ st_flags |= TextServer::FONT_ITALIC;
+ }
+ }
+ if (keys.has("face")) {
+ font_name = keys["face"];
+ }
+ ERR_FAIL_COND_V_MSG((!keys.has("unicode") || keys["unicode"].to_int() != 1), ERR_CANT_CREATE, TTR("Non-unicode version of BMFont is not supported."));
+ } else if (type == "common") {
+ if (keys.has("lineHeight")) {
+ height = keys["lineHeight"].to_int();
+ }
+ if (keys.has("base")) {
+ ascent = keys["base"].to_int();
+ }
+ if (keys.has("packed")) {
+ packed = (keys["packed"].to_int() == 1);
+ }
+ if (keys.has("alphaChnl")) {
+ ch[3] = keys["alphaChnl"].to_int();
+ }
+ if (keys.has("redChnl")) {
+ ch[0] = keys["redChnl"].to_int();
+ }
+ if (keys.has("greenChnl")) {
+ ch[1] = keys["greenChnl"].to_int();
+ }
+ if (keys.has("blueChnl")) {
+ ch[2] = keys["blueChnl"].to_int();
+ }
+ for (int i = 0; i < 4; i++) {
+ if (ch[i] == 0 && first_gl_ch == -1) {
+ first_gl_ch = i;
+ }
+ if (ch[i] == 1 && first_ol_ch == -1) {
+ first_ol_ch = i;
+ }
+ if (ch[i] == 2 && first_cm_ch == -1) {
+ first_cm_ch = i;
+ }
+ }
+ } else if (type == "page") {
+ int page = 0;
+ if (keys.has("id")) {
+ page = keys["id"].to_int();
+ }
+ if (keys.has("file")) {
+ String base_dir = p_path.get_base_dir();
+ String file = base_dir.plus_file(keys["file"]);
+ if (RenderingServer::get_singleton() != nullptr) {
+ Ref<Image> img;
+ img.instantiate();
+ Error err = ImageLoader::load_image(file, img);
+ ERR_FAIL_COND_V_MSG(err != OK, ERR_FILE_CANT_READ, TTR("Can't load font texture: ") + "\"" + file + "\".");
+ if (packed) {
+ if (ch[3] == 0) { // 4 x 8 bit monochrome, no outline
+ outline = 0;
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ _convert_packed_8bit(img, page, base_size);
+ } else if ((ch[3] == 2) && (outline > 0)) { // 4 x 4 bit monochrome, gl + outline
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ _convert_packed_4bit(img, page, base_size);
+ } else {
+ ERR_FAIL_V_MSG(ERR_CANT_CREATE, TTR("Unsupported BMFont texture format."));
+ }
+ } else {
+ if ((ch[0] == 0) && (ch[1] == 0) && (ch[2] == 0) && (ch[3] == 0)) { // RGBA8 color, no outline
+ outline = 0;
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ set_texture_image(0, Vector2i(base_size, 0), page, img);
+ } else if ((ch[0] == 2) && (ch[1] == 2) && (ch[2] == 2) && (ch[3] == 2) && (outline > 0)) { // RGBA4 color, gl + outline
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ _convert_rgba_4bit(img, page, base_size);
+ } else if ((first_gl_ch >= 0) && (first_ol_ch >= 0) && (outline > 0)) { // 1 x 8 bit monochrome, gl + outline
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8 && img->get_format() != Image::FORMAT_L8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ _convert_mono_8bit(img, page, first_gl_ch, base_size, 0);
+ _convert_mono_8bit(img, page, first_ol_ch, base_size, 1);
+ } else if ((first_cm_ch >= 0) && (outline > 0)) { // 1 x 4 bit monochrome, gl + outline
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8 && img->get_format() != Image::FORMAT_L8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ _convert_mono_4bit(img, page, first_cm_ch, base_size, 1);
+ } else if (first_gl_ch >= 0) { // 1 x 8 bit monochrome, no outline
+ outline = 0;
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8 && img->get_format() != Image::FORMAT_L8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ _convert_mono_8bit(img, page, first_gl_ch, base_size, 0);
+ } else {
+ ERR_FAIL_V_MSG(ERR_CANT_CREATE, TTR("Unsupported BMFont texture format."));
+ }
+ }
+ }
+ }
+ } else if (type == "char") {
+ char32_t idx = 0;
+ Vector2 advance;
+ Vector2 size;
+ Vector2 offset;
+ Rect2 uv_rect;
+ int texture_idx = -1;
+ uint8_t channel = 15;
+
+ if (keys.has("id")) {
+ idx = keys["id"].to_int();
+ }
+ if (keys.has("x")) {
+ uv_rect.position.x = keys["x"].to_int();
+ }
+ if (keys.has("y")) {
+ uv_rect.position.y = keys["y"].to_int();
+ }
+ if (keys.has("width")) {
+ uv_rect.size.width = keys["width"].to_int();
+ size.width = keys["width"].to_int();
+ }
+ if (keys.has("height")) {
+ uv_rect.size.height = keys["height"].to_int();
+ size.height = keys["height"].to_int();
+ }
+ if (keys.has("xoffset")) {
+ offset.x = keys["xoffset"].to_int();
+ }
+ if (keys.has("yoffset")) {
+ offset.y = keys["yoffset"].to_int() - ascent;
+ }
+ if (keys.has("page")) {
+ texture_idx = keys["page"].to_int();
+ }
+ if (keys.has("xadvance")) {
+ advance.x = keys["xadvance"].to_int();
+ }
+ if (advance.x < 0) {
+ advance.x = size.width + 1;
+ }
+ if (keys.has("chnl")) {
+ channel = keys["chnl"].to_int();
+ }
+
+ ERR_FAIL_COND_V_MSG(!packed && channel != 15, ERR_CANT_CREATE, TTR("Invalid glyph channel."));
+ int ch_off = 0;
+ switch (channel) {
+ case 1:
+ ch_off = 2;
+ break; // B
+ case 2:
+ ch_off = 1;
+ break; // G
+ case 4:
+ ch_off = 0;
+ break; // R
+ case 8:
+ ch_off = 3;
+ break; // A
+ default:
+ ch_off = 0;
+ break;
+ }
+ set_glyph_advance(0, base_size, idx, advance);
+ set_glyph_offset(0, Vector2i(base_size, 0), idx, offset);
+ set_glyph_size(0, Vector2i(base_size, 0), idx, size);
+ set_glyph_uv_rect(0, Vector2i(base_size, 0), idx, uv_rect);
+ set_glyph_texture_idx(0, Vector2i(base_size, 0), idx, texture_idx * (packed ? 4 : 1) + ch_off);
+ if (outline > 0) {
+ set_glyph_offset(0, Vector2i(base_size, 1), idx, offset);
+ set_glyph_size(0, Vector2i(base_size, 1), idx, size);
+ set_glyph_uv_rect(0, Vector2i(base_size, 1), idx, uv_rect);
+ set_glyph_texture_idx(0, Vector2i(base_size, 1), idx, texture_idx * (packed ? 4 : 1) + ch_off);
+ }
+ } else if (type == "kerning") {
+ Vector2i kpk;
+ if (keys.has("first")) {
+ kpk.x = keys["first"].to_int();
+ }
+ if (keys.has("second")) {
+ kpk.y = keys["second"].to_int();
+ }
+ if (keys.has("amount")) {
+ set_kerning(0, base_size, kpk, Vector2(keys["amount"].to_int(), 0));
+ }
+ }
+
+ if (f->eof_reached()) {
+ break;
+ }
+ }
+ }
+
+ set_font_name(font_name);
+ set_font_style(st_flags);
+ set_ascent(0, base_size, ascent);
+ set_descent(0, base_size, height - ascent);
+
+ return OK;
+}
+
+Error FontData::load_dynamic_font(const String &p_path) {
+ reset_state();
+
+ Vector<uint8_t> data = FileAccess::get_file_as_array(p_path);
+ set_data(data);
+
+ return OK;
+}
+
void FontData::set_data_ptr(const uint8_t *p_data, size_t p_size) {
data.clear();
data_ptr = p_data;
diff --git a/scene/resources/font.h b/scene/resources/font.h
index 1b4ecc73ce..93351a3493 100644
--- a/scene/resources/font.h
+++ b/scene/resources/font.h
@@ -63,6 +63,12 @@ class FontData : public Resource {
_FORCE_INLINE_ void _clear_cache();
_FORCE_INLINE_ void _ensure_rid(int p_cache_index) const;
+ void _convert_packed_8bit(Ref<Image> &p_source, int p_page, int p_sz);
+ void _convert_packed_4bit(Ref<Image> &p_source, int p_page, int p_sz);
+ void _convert_rgba_4bit(Ref<Image> &p_source, int p_page, int p_sz);
+ void _convert_mono_8bit(Ref<Image> &p_source, int p_page, int p_ch, int p_sz, int p_ol);
+ void _convert_mono_4bit(Ref<Image> &p_source, int p_page, int p_ch, int p_sz, int p_ol);
+
protected:
static void _bind_methods();
@@ -73,6 +79,9 @@ protected:
virtual void reset_state() override;
public:
+ Error load_bitmap_font(const String &p_path);
+ Error load_dynamic_font(const String &p_path);
+
// Font source data.
virtual void set_data_ptr(const uint8_t *p_data, size_t p_size);
virtual void set_data(const PackedByteArray &p_data);
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index 402e67a0f1..f9a4eba978 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -175,14 +175,12 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
#endif
}
} else {
- Object *obj = nullptr;
+ //node belongs to this scene and must be created
+ Object *obj = ClassDB::instantiate(snames[n.type]);
- if (ClassDB::is_class_enabled(snames[n.type])) {
- //node belongs to this scene and must be created
- obj = ClassDB::instantiate(snames[n.type]);
- }
+ node = Object::cast_to<Node>(obj);
- if (!Object::cast_to<Node>(obj)) {
+ if (!node) {
if (obj) {
memdelete(obj);
obj = nullptr;
@@ -203,9 +201,9 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
if (!obj) {
obj = memnew(Node);
}
- }
- node = Object::cast_to<Node>(obj);
+ node = Object::cast_to<Node>(obj);
+ }
}
if (node) {
diff --git a/servers/display_server.cpp b/servers/display_server.cpp
index 01f58e37eb..d4ff42bc34 100644
--- a/servers/display_server.cpp
+++ b/servers/display_server.cpp
@@ -139,10 +139,6 @@ void DisplayServer::mouse_warp_to_position(const Point2i &p_to) {
WARN_PRINT("Mouse warping is not supported by this display server.");
}
-Point2i DisplayServer::mouse_get_absolute_position() const {
- ERR_FAIL_V_MSG(Point2i(), "Mouse is not supported by this display server.");
-}
-
Point2i DisplayServer::mouse_get_position() const {
ERR_FAIL_V_MSG(Point2i(), "Mouse is not supported by this display server.");
}
@@ -159,6 +155,10 @@ String DisplayServer::clipboard_get() const {
ERR_FAIL_V_MSG(String(), "Clipboard is not supported by this display server.");
}
+bool DisplayServer::clipboard_has() const {
+ return !clipboard_get().is_empty();
+}
+
void DisplayServer::clipboard_set_primary(const String &p_text) {
WARN_PRINT("Primary clipboard is not supported by this display server.");
}
@@ -228,14 +228,6 @@ String DisplayServer::ime_get_text() const {
ERR_FAIL_V_MSG(String(), "IME or NOTIFICATION_WM_IME_UPDATEnot supported by this display server.");
}
-void DisplayServer::console_set_visible(bool p_enabled) {
- WARN_PRINT("Console window not supported by this display server.");
-}
-
-bool DisplayServer::is_console_visible() const {
- return false;
-}
-
void DisplayServer::virtual_keyboard_show(const String &p_existing_text, const Rect2 &p_screen_rect, bool p_multiline, int p_max_length, int p_cursor_start, int p_cursor_end) {
WARN_PRINT("Virtual keyboard not supported by this display server.");
}
@@ -367,11 +359,11 @@ void DisplayServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("mouse_warp_to_position", "position"), &DisplayServer::mouse_warp_to_position);
ClassDB::bind_method(D_METHOD("mouse_get_position"), &DisplayServer::mouse_get_position);
- ClassDB::bind_method(D_METHOD("mouse_get_absolute_position"), &DisplayServer::mouse_get_absolute_position);
ClassDB::bind_method(D_METHOD("mouse_get_button_state"), &DisplayServer::mouse_get_button_state);
ClassDB::bind_method(D_METHOD("clipboard_set", "clipboard"), &DisplayServer::clipboard_set);
ClassDB::bind_method(D_METHOD("clipboard_get"), &DisplayServer::clipboard_get);
+ ClassDB::bind_method(D_METHOD("clipboard_has"), &DisplayServer::clipboard_has);
ClassDB::bind_method(D_METHOD("clipboard_set_primary", "clipboard_primary"), &DisplayServer::clipboard_set_primary);
ClassDB::bind_method(D_METHOD("clipboard_get_primary"), &DisplayServer::clipboard_get_primary);
@@ -446,9 +438,6 @@ void DisplayServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("ime_get_selection"), &DisplayServer::ime_get_selection);
ClassDB::bind_method(D_METHOD("ime_get_text"), &DisplayServer::ime_get_text);
- ClassDB::bind_method(D_METHOD("console_set_visible", "console_visible"), &DisplayServer::console_set_visible);
- ClassDB::bind_method(D_METHOD("is_console_visible"), &DisplayServer::is_console_visible);
-
ClassDB::bind_method(D_METHOD("virtual_keyboard_show", "existing_text", "position", "multiline", "max_length", "cursor_start", "cursor_end"), &DisplayServer::virtual_keyboard_show, DEFVAL(Rect2i()), DEFVAL(false), DEFVAL(-1), DEFVAL(-1), DEFVAL(-1));
ClassDB::bind_method(D_METHOD("virtual_keyboard_hide"), &DisplayServer::virtual_keyboard_hide);
@@ -493,7 +482,6 @@ void DisplayServer::_bind_methods() {
BIND_ENUM_CONSTANT(FEATURE_CURSOR_SHAPE);
BIND_ENUM_CONSTANT(FEATURE_CUSTOM_CURSOR_SHAPE);
BIND_ENUM_CONSTANT(FEATURE_NATIVE_DIALOG);
- BIND_ENUM_CONSTANT(FEATURE_CONSOLE_WINDOW);
BIND_ENUM_CONSTANT(FEATURE_IME);
BIND_ENUM_CONSTANT(FEATURE_WINDOW_TRANSPARENCY);
BIND_ENUM_CONSTANT(FEATURE_HIDPI);
diff --git a/servers/display_server.h b/servers/display_server.h
index a84290be77..0c2bc5dd3a 100644
--- a/servers/display_server.h
+++ b/servers/display_server.h
@@ -105,7 +105,6 @@ public:
FEATURE_CURSOR_SHAPE,
FEATURE_CUSTOM_CURSOR_SHAPE,
FEATURE_NATIVE_DIALOG,
- FEATURE_CONSOLE_WINDOW,
FEATURE_IME,
FEATURE_WINDOW_TRANSPARENCY,
FEATURE_HIDPI,
@@ -157,11 +156,11 @@ public:
virtual void mouse_warp_to_position(const Point2i &p_to);
virtual Point2i mouse_get_position() const;
- virtual Point2i mouse_get_absolute_position() const;
virtual MouseButton mouse_get_button_state() const;
virtual void clipboard_set(const String &p_text);
virtual String clipboard_get() const;
+ virtual bool clipboard_has() const;
virtual void clipboard_set_primary(const String &p_text);
virtual String clipboard_get_primary() const;
@@ -304,9 +303,6 @@ public:
virtual Point2i ime_get_selection() const;
virtual String ime_get_text() const;
- virtual void console_set_visible(bool p_enabled);
- virtual bool is_console_visible() const;
-
virtual void virtual_keyboard_show(const String &p_existing_text, const Rect2 &p_screen_rect = Rect2(), bool p_multiline = false, int p_max_length = -1, int p_cursor_start = -1, int p_cursor_end = -1);
virtual void virtual_keyboard_hide();
diff --git a/servers/rendering/rasterizer_dummy.h b/servers/rendering/rasterizer_dummy.h
index f02a01c97d..83da8388e4 100644
--- a/servers/rendering/rasterizer_dummy.h
+++ b/servers/rendering/rasterizer_dummy.h
@@ -120,7 +120,7 @@ public:
void environment_set_ssil(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_sharpness, float p_normal_rejection) override {}
void environment_set_ssil_quality(RS::EnvironmentSSILQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) override {}
- void environment_set_sdfgi(RID p_env, bool p_enable, RS::EnvironmentSDFGICascades p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) override {}
+ void environment_set_sdfgi(RID p_env, bool p_enable, int p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) override {}
void environment_set_sdfgi_ray_count(RS::EnvironmentSDFGIRayCount p_ray_count) override {}
void environment_set_sdfgi_frames_to_converge(RS::EnvironmentSDFGIFramesToConverge p_frames) override {}
diff --git a/servers/rendering/renderer_canvas_cull.cpp b/servers/rendering/renderer_canvas_cull.cpp
index f5e2cbcd6c..418d2bc42e 100644
--- a/servers/rendering/renderer_canvas_cull.cpp
+++ b/servers/rendering/renderer_canvas_cull.cpp
@@ -1440,7 +1440,7 @@ void RendererCanvasCull::canvas_light_occluder_set_polygon(RID p_occluder, RID p
ERR_FAIL_COND(!occluder);
if (occluder->polygon.is_valid()) {
- LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.get_or_null(p_polygon);
+ LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.get_or_null(occluder->polygon);
if (occluder_poly) {
occluder_poly->owners.erase(occluder);
}
diff --git a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp
index a27ea75017..7987a98b0e 100644
--- a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp
+++ b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp
@@ -463,7 +463,6 @@ SceneShaderForwardClustered::MaterialData::~MaterialData() {
RendererStorageRD::MaterialData *SceneShaderForwardClustered::_create_material_func(ShaderData *p_shader) {
MaterialData *material_data = memnew(MaterialData);
material_data->shader_data = p_shader;
- material_data->last_frame = false;
//update will happen later anyway so do nothing.
return material_data;
}
diff --git a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.h b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.h
index 8e7bbad63e..33049fad9c 100644
--- a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.h
+++ b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.h
@@ -189,7 +189,6 @@ public:
}
struct MaterialData : public RendererStorageRD::MaterialData {
- uint64_t last_frame;
ShaderData *shader_data;
RID uniform_set;
uint64_t last_pass = 0;
diff --git a/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp b/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp
index 1613a307ec..0b99948063 100644
--- a/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp
+++ b/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp
@@ -452,7 +452,6 @@ SceneShaderForwardMobile::MaterialData::~MaterialData() {
RendererStorageRD::MaterialData *SceneShaderForwardMobile::_create_material_func(ShaderData *p_shader) {
MaterialData *material_data = memnew(MaterialData);
material_data->shader_data = p_shader;
- material_data->last_frame = false;
//update will happen later anyway so do nothing.
return material_data;
}
diff --git a/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.h b/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.h
index c136afd9f3..92db15e3b0 100644
--- a/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.h
+++ b/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.h
@@ -163,7 +163,6 @@ public:
}
struct MaterialData : public RendererStorageRD::MaterialData {
- uint64_t last_frame;
ShaderData *shader_data;
RID uniform_set;
uint64_t last_pass = 0;
diff --git a/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp b/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp
index 7e188926e0..0f3daef371 100644
--- a/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp
@@ -1377,14 +1377,6 @@ void RendererCanvasRenderRD::canvas_render_items(RID p_to_render_target, Item *p
if (md->shader_data->uses_time) {
time_used = true;
}
- if (md->last_frame != RendererCompositorRD::singleton->get_frame_number()) {
- md->last_frame = RendererCompositorRD::singleton->get_frame_number();
- if (!RD::get_singleton()->uniform_set_is_valid(md->uniform_set)) {
- // uniform set may be gone because a dependency was erased. In this case, it will happen
- // if a texture is deleted, so just re-create it.
- storage->material_force_update_textures(material, RendererStorageRD::SHADER_TYPE_2D);
- }
- }
}
}
@@ -2240,7 +2232,6 @@ RendererCanvasRenderRD::MaterialData::~MaterialData() {
RendererStorageRD::MaterialData *RendererCanvasRenderRD::_create_material_func(ShaderData *p_shader) {
MaterialData *material_data = memnew(MaterialData);
material_data->shader_data = p_shader;
- material_data->last_frame = false;
//update will happen later anyway so do nothing.
return material_data;
}
diff --git a/servers/rendering/renderer_rd/renderer_canvas_render_rd.h b/servers/rendering/renderer_rd/renderer_canvas_render_rd.h
index b409264c9a..84f64b6fda 100644
--- a/servers/rendering/renderer_rd/renderer_canvas_render_rd.h
+++ b/servers/rendering/renderer_rd/renderer_canvas_render_rd.h
@@ -200,7 +200,6 @@ class RendererCanvasRenderRD : public RendererCanvasRender {
}
struct MaterialData : public RendererStorageRD::MaterialData {
- uint64_t last_frame;
ShaderData *shader_data;
RID uniform_set;
diff --git a/servers/rendering/renderer_rd/renderer_scene_environment_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_environment_rd.cpp
index 7ea117ef33..0d0d7513d0 100644
--- a/servers/rendering/renderer_rd/renderer_scene_environment_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_scene_environment_rd.cpp
@@ -68,7 +68,7 @@ void RendererSceneEnvironmentRD::set_glow(bool p_enable, Vector<float> p_levels,
glow_hdr_luminance_cap = p_hdr_luminance_cap;
}
-void RendererSceneEnvironmentRD::set_sdfgi(bool p_enable, RS::EnvironmentSDFGICascades p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) {
+void RendererSceneEnvironmentRD::set_sdfgi(bool p_enable, int p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) {
sdfgi_enabled = p_enable;
sdfgi_cascades = p_cascades;
sdfgi_min_cell_size = p_min_cell_size;
diff --git a/servers/rendering/renderer_rd/renderer_scene_environment_rd.h b/servers/rendering/renderer_rd/renderer_scene_environment_rd.h
index 9e36a61870..629d224b49 100644
--- a/servers/rendering/renderer_rd/renderer_scene_environment_rd.h
+++ b/servers/rendering/renderer_rd/renderer_scene_environment_rd.h
@@ -133,7 +133,7 @@ public:
/// SDFGI
bool sdfgi_enabled = false;
- RS::EnvironmentSDFGICascades sdfgi_cascades;
+ int sdfgi_cascades = 6;
float sdfgi_min_cell_size = 0.2;
bool sdfgi_use_occlusion = false;
float sdfgi_bounce_feedback = 0.0;
@@ -155,7 +155,7 @@ public:
void set_ambient_light(const Color &p_color, RS::EnvironmentAmbientSource p_ambient, float p_energy, float p_sky_contribution, RS::EnvironmentReflectionSource p_reflection_source);
void set_tonemap(RS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white, bool p_auto_exposure, float p_min_luminance, float p_max_luminance, float p_auto_exp_speed, float p_auto_exp_scale);
void set_glow(bool p_enable, Vector<float> p_levels, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap);
- void set_sdfgi(bool p_enable, RS::EnvironmentSDFGICascades p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias);
+ void set_sdfgi(bool p_enable, int p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias);
void set_fog(bool p_enable, const Color &p_light_color, float p_light_energy, float p_sun_scatter, float p_density, float p_height, float p_height_density, float p_fog_aerial_perspective);
void set_volumetric_fog(bool p_enable, float p_density, const Color &p_scatterin, const Color &p_emission, float p_emission_energy, float p_anisotropy, float p_length, float p_detail_spread, float p_gi_inject, bool p_temporal_reprojection, float p_temporal_reprojection_amount, float p_ambient_inject);
void set_ssr(bool p_enable, int p_max_steps, float p_fade_int, float p_fade_out, float p_depth_tolerance);
diff --git a/servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp
index 73cb088f6a..3069b1c379 100644
--- a/servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp
@@ -42,14 +42,13 @@ const Vector3i RendererSceneGIRD::SDFGI::Cascade::DIRTY_ALL = Vector3i(0x7FFFFFF
void RendererSceneGIRD::SDFGI::create(RendererSceneEnvironmentRD *p_env, const Vector3 &p_world_position, uint32_t p_requested_history_size, RendererSceneGIRD *p_gi) {
storage = p_gi->storage;
gi = p_gi;
- cascade_mode = p_env->sdfgi_cascades;
+ num_cascades = p_env->sdfgi_cascades;
min_cell_size = p_env->sdfgi_min_cell_size;
uses_occlusion = p_env->sdfgi_use_occlusion;
y_scale_mode = p_env->sdfgi_y_scale;
static const float y_scale[3] = { 1.0, 1.5, 2.0 };
y_mult = y_scale[y_scale_mode];
- static const int cascasde_size[3] = { 4, 6, 8 };
- cascades.resize(cascasde_size[cascade_mode]);
+ cascades.resize(num_cascades);
probe_axis_count = SDFGI::PROBE_DIVISOR + 1;
solid_cell_ratio = gi->sdfgi_solid_cell_ratio;
solid_cell_count = uint32_t(float(cascade_size * cascade_size * cascade_size) * solid_cell_ratio);
@@ -716,7 +715,10 @@ void RendererSceneGIRD::SDFGI::create(RendererSceneEnvironmentRD *p_env, const V
u.uniform_type = RD::UNIFORM_TYPE_IMAGE;
u.binding = 13;
RID parent_average;
- if (i < cascades.size() - 1) {
+ if (cascades.size() == 1) {
+ // If there is only one SDFGI cascade, we can't use the previous cascade for blending.
+ parent_average = cascades[i].lightprobe_average_tex;
+ } else if (i < cascades.size() - 1) {
parent_average = cascades[i + 1].lightprobe_average_tex;
} else {
parent_average = cascades[i - 1].lightprobe_average_tex; //to use something, but it won't be used
diff --git a/servers/rendering/renderer_rd/renderer_scene_gi_rd.h b/servers/rendering/renderer_rd/renderer_scene_gi_rd.h
index a407199d0a..5e55262798 100644
--- a/servers/rendering/renderer_rd/renderer_scene_gi_rd.h
+++ b/servers/rendering/renderer_rd/renderer_scene_gi_rd.h
@@ -495,7 +495,7 @@ public:
float solid_cell_ratio = 0;
uint32_t solid_cell_count = 0;
- RS::EnvironmentSDFGICascades cascade_mode;
+ int num_cascades = 6;
float min_cell_size = 0;
uint32_t probe_axis_count = 0; //amount of probes per axis, this is an odd number because it encloses endpoints
diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
index a499cedd2c..33f5a178e0 100644
--- a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
@@ -65,7 +65,7 @@ void RendererSceneRenderRD::sdfgi_update(RID p_render_buffers, RID p_environment
static const uint32_t history_frames_to_converge[RS::ENV_SDFGI_CONVERGE_MAX] = { 5, 10, 15, 20, 25, 30 };
uint32_t requested_history_size = history_frames_to_converge[gi.sdfgi_frames_to_converge];
- if (rb->sdfgi && (rb->sdfgi->cascade_mode != env->sdfgi_cascades || rb->sdfgi->min_cell_size != env->sdfgi_min_cell_size || requested_history_size != rb->sdfgi->history_size || rb->sdfgi->uses_occlusion != env->sdfgi_use_occlusion || rb->sdfgi->y_scale_mode != env->sdfgi_y_scale)) {
+ if (rb->sdfgi && (rb->sdfgi->num_cascades != env->sdfgi_cascades || rb->sdfgi->min_cell_size != env->sdfgi_min_cell_size || requested_history_size != rb->sdfgi->history_size || rb->sdfgi->uses_occlusion != env->sdfgi_use_occlusion || rb->sdfgi->y_scale_mode != env->sdfgi_y_scale)) {
//configuration changed, erase
rb->sdfgi->erase();
memdelete(rb->sdfgi);
@@ -303,7 +303,7 @@ void RendererSceneRenderRD::environment_glow_set_use_high_quality(bool p_enable)
glow_high_quality = p_enable;
}
-void RendererSceneRenderRD::environment_set_sdfgi(RID p_env, bool p_enable, RS::EnvironmentSDFGICascades p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) {
+void RendererSceneRenderRD::environment_set_sdfgi(RID p_env, bool p_enable, int p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) {
RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND(!env);
@@ -3993,7 +3993,6 @@ RendererStorageRD::ShaderData *RendererSceneRenderRD::_create_fog_shader_funcs()
RendererStorageRD::MaterialData *RendererSceneRenderRD::_create_fog_material_func(FogShaderData *p_shader) {
FogMaterialData *material_data = memnew(FogMaterialData);
material_data->shader_data = p_shader;
- material_data->last_frame = false;
//update will happen later anyway so do nothing.
return material_data;
}
@@ -4011,6 +4010,9 @@ void RendererSceneRenderRD::_volumetric_fog_erase(RenderBuffers *rb) {
RD::get_singleton()->free(rb->volumetric_fog->prev_light_density_map);
RD::get_singleton()->free(rb->volumetric_fog->light_density_map);
RD::get_singleton()->free(rb->volumetric_fog->fog_map);
+ RD::get_singleton()->free(rb->volumetric_fog->density_map);
+ RD::get_singleton()->free(rb->volumetric_fog->light_map);
+ RD::get_singleton()->free(rb->volumetric_fog->emissive_map);
if (rb->volumetric_fog->fog_uniform_set.is_valid() && RD::get_singleton()->uniform_set_is_valid(rb->volumetric_fog->fog_uniform_set)) {
RD::get_singleton()->free(rb->volumetric_fog->fog_uniform_set);
diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.h b/servers/rendering/renderer_rd/renderer_scene_render_rd.h
index 6432ca99f0..276cb8f229 100644
--- a/servers/rendering/renderer_rd/renderer_scene_render_rd.h
+++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.h
@@ -942,7 +942,6 @@ private:
};
struct FogMaterialData : public RendererStorageRD::MaterialData {
- uint64_t last_frame;
FogShaderData *shader_data;
RID uniform_set;
bool uniform_set_updated;
@@ -1093,7 +1092,7 @@ public:
bool environment_is_ssr_enabled(RID p_env) const;
bool environment_is_sdfgi_enabled(RID p_env) const;
- virtual void environment_set_sdfgi(RID p_env, bool p_enable, RS::EnvironmentSDFGICascades p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) override;
+ virtual void environment_set_sdfgi(RID p_env, bool p_enable, int p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) override;
virtual void environment_set_sdfgi_ray_count(RS::EnvironmentSDFGIRayCount p_ray_count) override;
virtual void environment_set_sdfgi_frames_to_converge(RS::EnvironmentSDFGIFramesToConverge p_frames) override;
virtual void environment_set_sdfgi_frames_to_update_light(RS::EnvironmentSDFGIFramesToUpdateLight p_update) override;
diff --git a/servers/rendering/renderer_rd/renderer_scene_sky_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_sky_rd.cpp
index f0419b7907..856ea5e74d 100644
--- a/servers/rendering/renderer_rd/renderer_scene_sky_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_scene_sky_rd.cpp
@@ -750,7 +750,6 @@ RendererStorageRD::ShaderData *RendererSceneSkyRD::_create_sky_shader_funcs() {
RendererStorageRD::MaterialData *RendererSceneSkyRD::_create_sky_material_func(SkyShaderData *p_shader) {
SkyMaterialData *material_data = memnew(SkyMaterialData);
material_data->shader_data = p_shader;
- material_data->last_frame = false;
//update will happen later anyway so do nothing.
return material_data;
}
diff --git a/servers/rendering/renderer_rd/renderer_scene_sky_rd.h b/servers/rendering/renderer_rd/renderer_scene_sky_rd.h
index 46d376e667..d81a415c2d 100644
--- a/servers/rendering/renderer_rd/renderer_scene_sky_rd.h
+++ b/servers/rendering/renderer_rd/renderer_scene_sky_rd.h
@@ -228,7 +228,6 @@ public:
} sky_shader;
struct SkyMaterialData : public RendererStorageRD::MaterialData {
- uint64_t last_frame;
SkyShaderData *shader_data;
RID uniform_set;
bool uniform_set_updated;
diff --git a/servers/rendering/renderer_rd/renderer_storage_rd.cpp b/servers/rendering/renderer_rd/renderer_storage_rd.cpp
index 19075fab86..2e63ac57d9 100644
--- a/servers/rendering/renderer_rd/renderer_storage_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_storage_rd.cpp
@@ -2962,24 +2962,19 @@ bool RendererStorageRD::MaterialData::update_parameters_uniform_set(const Map<St
return true;
}
-void RendererStorageRD::_material_uniform_set_erased(const RID &p_set, void *p_material) {
+void RendererStorageRD::_material_uniform_set_erased(void *p_material) {
RID rid = *(RID *)p_material;
Material *material = base_singleton->material_owner.get_or_null(rid);
if (material) {
+ if (material->data) {
+ // Uniform set may be gone because a dependency was erased. This happens
+ // if a texture is deleted, so re-create it.
+ base_singleton->_material_queue_update(material, false, true);
+ }
material->dependency.changed_notify(DEPENDENCY_CHANGED_MATERIAL);
}
}
-void RendererStorageRD::material_force_update_textures(RID p_material, ShaderType p_shader_type) {
- Material *material = material_owner.get_or_null(p_material);
- if (material->shader_type != p_shader_type) {
- return;
- }
- if (material->data) {
- material->data->update_parameters(material->params, false, true);
- }
-}
-
void RendererStorageRD::_update_queued_materials() {
while (material_update_list.first()) {
Material *material = material_update_list.first()->self();
@@ -5882,8 +5877,6 @@ RendererStorageRD::ShaderData *RendererStorageRD::_create_particles_shader_func(
}
bool RendererStorageRD::ParticlesMaterialData::update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) {
- uniform_set_updated = true;
-
return update_parameters_uniform_set(p_parameters, p_uniform_dirty, p_textures_dirty, shader_data->uniforms, shader_data->ubo_offsets.ptr(), shader_data->texture_uniforms, shader_data->default_texture_params, shader_data->ubo_size, uniform_set, base_singleton->particles_shader.shader.version_get_shader(shader_data->version, 0), 3);
}
@@ -5894,7 +5887,6 @@ RendererStorageRD::ParticlesMaterialData::~ParticlesMaterialData() {
RendererStorageRD::MaterialData *RendererStorageRD::_create_particles_material_func(ParticlesShaderData *p_shader) {
ParticlesMaterialData *material_data = memnew(ParticlesMaterialData);
material_data->shader_data = p_shader;
- material_data->last_frame = false;
//update will happen later anyway so do nothing.
return material_data;
}
diff --git a/servers/rendering/renderer_rd/renderer_storage_rd.h b/servers/rendering/renderer_rd/renderer_storage_rd.h
index 8c04274c3f..43bbcf6520 100644
--- a/servers/rendering/renderer_rd/renderer_storage_rd.h
+++ b/servers/rendering/renderer_rd/renderer_storage_rd.h
@@ -177,7 +177,7 @@ public:
Vector<RID> texture_cache;
};
typedef MaterialData *(*MaterialDataRequestFunction)(ShaderData *);
- static void _material_uniform_set_erased(const RID &p_set, void *p_material);
+ static void _material_uniform_set_erased(void *p_material);
enum DefaultRDTexture {
DEFAULT_RD_TEXTURE_WHITE,
@@ -910,10 +910,8 @@ private:
}
struct ParticlesMaterialData : public MaterialData {
- uint64_t last_frame = 0;
ParticlesShaderData *shader_data = nullptr;
RID uniform_set;
- bool uniform_set_updated = false;
virtual void set_render_priority(int p_priority) {}
virtual void set_next_pass(RID p_pass) {}
@@ -1448,7 +1446,6 @@ public:
void material_get_instance_shader_parameters(RID p_material, List<InstanceShaderParam> *r_parameters);
void material_update_dependency(RID p_material, DependencyTracker *p_instance);
- void material_force_update_textures(RID p_material, ShaderType p_shader_type);
void material_set_data_request_function(ShaderType p_shader_type, MaterialDataRequestFunction p_function);
diff --git a/servers/rendering/renderer_scene.h b/servers/rendering/renderer_scene.h
index 20ca49cd71..426d22f83e 100644
--- a/servers/rendering/renderer_scene.h
+++ b/servers/rendering/renderer_scene.h
@@ -149,7 +149,7 @@ public:
virtual void environment_set_ssil(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_sharpness, float p_normal_rejection) = 0;
virtual void environment_set_ssil_quality(RS::EnvironmentSSILQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) = 0;
- virtual void environment_set_sdfgi(RID p_env, bool p_enable, RS::EnvironmentSDFGICascades p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) = 0;
+ virtual void environment_set_sdfgi(RID p_env, bool p_enable, int p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) = 0;
virtual void environment_set_sdfgi_ray_count(RS::EnvironmentSDFGIRayCount p_ray_count) = 0;
virtual void environment_set_sdfgi_frames_to_converge(RS::EnvironmentSDFGIFramesToConverge p_frames) = 0;
diff --git a/servers/rendering/renderer_scene_cull.h b/servers/rendering/renderer_scene_cull.h
index 071d88233f..1e770ef66c 100644
--- a/servers/rendering/renderer_scene_cull.h
+++ b/servers/rendering/renderer_scene_cull.h
@@ -1127,7 +1127,7 @@ public:
PASS2(environment_set_volumetric_fog_volume_size, int, int)
PASS1(environment_set_volumetric_fog_filter_active, bool)
- PASS11(environment_set_sdfgi, RID, bool, RS::EnvironmentSDFGICascades, float, RS::EnvironmentSDFGIYScale, bool, float, bool, float, float, float)
+ PASS11(environment_set_sdfgi, RID, bool, int, float, RS::EnvironmentSDFGIYScale, bool, float, bool, float, float, float)
PASS1(environment_set_sdfgi_ray_count, RS::EnvironmentSDFGIRayCount)
PASS1(environment_set_sdfgi_frames_to_converge, RS::EnvironmentSDFGIFramesToConverge)
PASS1(environment_set_sdfgi_frames_to_update_light, RS::EnvironmentSDFGIFramesToUpdateLight)
diff --git a/servers/rendering/renderer_scene_render.h b/servers/rendering/renderer_scene_render.h
index f99d34d292..c34a46d166 100644
--- a/servers/rendering/renderer_scene_render.h
+++ b/servers/rendering/renderer_scene_render.h
@@ -140,7 +140,7 @@ public:
virtual void environment_set_ssil(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_sharpness, float p_normal_rejection) = 0;
virtual void environment_set_ssil_quality(RS::EnvironmentSSILQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) = 0;
- virtual void environment_set_sdfgi(RID p_env, bool p_enable, RS::EnvironmentSDFGICascades p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) = 0;
+ virtual void environment_set_sdfgi(RID p_env, bool p_enable, int p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) = 0;
virtual void environment_set_sdfgi_ray_count(RS::EnvironmentSDFGIRayCount p_ray_count) = 0;
virtual void environment_set_sdfgi_frames_to_converge(RS::EnvironmentSDFGIFramesToConverge p_frames) = 0;
diff --git a/servers/rendering/rendering_device.h b/servers/rendering/rendering_device.h
index 3e74741de0..655a32a805 100644
--- a/servers/rendering/rendering_device.h
+++ b/servers/rendering/rendering_device.h
@@ -742,7 +742,7 @@ public:
virtual RID uniform_set_create(const Vector<Uniform> &p_uniforms, RID p_shader, uint32_t p_shader_set) = 0;
virtual bool uniform_set_is_valid(RID p_uniform_set) = 0;
- typedef void (*UniformSetInvalidatedCallback)(const RID &, void *);
+ typedef void (*UniformSetInvalidatedCallback)(void *);
virtual void uniform_set_set_invalidation_callback(RID p_uniform_set, UniformSetInvalidatedCallback p_callback, void *p_userdata) = 0;
virtual Error buffer_update(RID p_buffer, uint32_t p_offset, uint32_t p_size, const void *p_data, uint32_t p_post_barrier = BARRIER_MASK_ALL) = 0;
diff --git a/servers/rendering/rendering_server_default.h b/servers/rendering/rendering_server_default.h
index ead49f053c..ee684c69ed 100644
--- a/servers/rendering/rendering_server_default.h
+++ b/servers/rendering/rendering_server_default.h
@@ -643,7 +643,7 @@ public:
FUNC2(environment_set_volumetric_fog_volume_size, int, int)
FUNC1(environment_set_volumetric_fog_filter_active, bool)
- FUNC11(environment_set_sdfgi, RID, bool, EnvironmentSDFGICascades, float, EnvironmentSDFGIYScale, bool, float, bool, float, float, float)
+ FUNC11(environment_set_sdfgi, RID, bool, int, float, EnvironmentSDFGIYScale, bool, float, bool, float, float, float)
FUNC1(environment_set_sdfgi_ray_count, EnvironmentSDFGIRayCount)
FUNC1(environment_set_sdfgi_frames_to_converge, EnvironmentSDFGIFramesToConverge)
FUNC1(environment_set_sdfgi_frames_to_update_light, EnvironmentSDFGIFramesToUpdateLight)
diff --git a/servers/rendering/shader_compiler.cpp b/servers/rendering/shader_compiler.cpp
index b0629de2f0..78e81eac0b 100644
--- a/servers/rendering/shader_compiler.cpp
+++ b/servers/rendering/shader_compiler.cpp
@@ -832,16 +832,49 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene
} else {
declaration += _prestr(vdnode->precision) + _typestr(vdnode->datatype);
}
+ declaration += " ";
for (int i = 0; i < vdnode->declarations.size(); i++) {
+ bool is_array = vdnode->declarations[i].size > 0;
if (i > 0) {
declaration += ",";
- } else {
- declaration += " ";
}
declaration += _mkid(vdnode->declarations[i].name);
- if (vdnode->declarations[i].initializer) {
- declaration += "=";
- declaration += _dump_node_code(vdnode->declarations[i].initializer, p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
+ if (is_array) {
+ declaration += "[";
+ if (vdnode->declarations[i].size_expression != nullptr) {
+ declaration += _dump_node_code(vdnode->declarations[i].size_expression, p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
+ } else {
+ declaration += itos(vdnode->declarations[i].size);
+ }
+ declaration += "]";
+ }
+
+ if (!is_array || vdnode->declarations[i].single_expression) {
+ if (!vdnode->declarations[i].initializer.is_empty()) {
+ declaration += "=";
+ declaration += _dump_node_code(vdnode->declarations[i].initializer[0], p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
+ }
+ } else {
+ int size = vdnode->declarations[i].initializer.size();
+ if (size > 0) {
+ declaration += "=";
+ if (vdnode->datatype == SL::TYPE_STRUCT) {
+ declaration += _mkid(vdnode->struct_name);
+ } else {
+ declaration += _typestr(vdnode->datatype);
+ }
+ declaration += "[";
+ declaration += itos(size);
+ declaration += "]";
+ declaration += "(";
+ for (int j = 0; j < size; j++) {
+ if (j > 0) {
+ declaration += ",";
+ }
+ declaration += _dump_node_code(vdnode->declarations[i].initializer[j], p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
+ }
+ declaration += ")";
+ }
}
}
@@ -943,58 +976,6 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene
}
code += ")";
} break;
- case SL::Node::TYPE_ARRAY_DECLARATION: {
- SL::ArrayDeclarationNode *adnode = (SL::ArrayDeclarationNode *)p_node;
- String declaration;
- declaration += _constr(adnode->is_const);
- if (adnode->datatype == SL::TYPE_STRUCT) {
- declaration += _mkid(adnode->struct_name);
- } else {
- declaration += _prestr(adnode->precision) + _typestr(adnode->datatype);
- }
- for (int i = 0; i < adnode->declarations.size(); i++) {
- if (i > 0) {
- declaration += ",";
- } else {
- declaration += " ";
- }
- declaration += _mkid(adnode->declarations[i].name);
- declaration += "[";
- if (adnode->size_expression != nullptr) {
- declaration += _dump_node_code(adnode->size_expression, p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
- } else {
- declaration += itos(adnode->declarations[i].size);
- }
- declaration += "]";
- if (adnode->declarations[i].single_expression) {
- declaration += "=";
- declaration += _dump_node_code(adnode->declarations[i].initializer[0], p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
- } else {
- int sz = adnode->declarations[i].initializer.size();
- if (sz > 0) {
- declaration += "=";
- if (adnode->datatype == SL::TYPE_STRUCT) {
- declaration += _mkid(adnode->struct_name);
- } else {
- declaration += _typestr(adnode->datatype);
- }
- declaration += "[";
- declaration += itos(sz);
- declaration += "]";
- declaration += "(";
- for (int j = 0; j < sz; j++) {
- declaration += _dump_node_code(adnode->declarations[i].initializer[j], p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
- if (j != sz - 1) {
- declaration += ", ";
- }
- }
- declaration += ")";
- }
- }
- }
-
- code += declaration;
- } break;
case SL::Node::TYPE_ARRAY: {
SL::ArrayNode *anode = (SL::ArrayNode *)p_node;
bool use_fragment_varying = false;
diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp
index 7641943fe9..4e07582187 100644
--- a/servers/rendering/shader_language.cpp
+++ b/servers/rendering/shader_language.cpp
@@ -2742,13 +2742,13 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, const FunctionI
//stage based function
const StageFunctionInfo &sf = p_function_info.stage_functions[name];
if (argcount != sf.arguments.size()) {
- _set_error(vformat("Invalid number of arguments when calling stage function '%s', which expects %d arguments.", String(name), sf.arguments.size()));
+ _set_error(vformat(RTR("Invalid number of arguments when calling stage function '%s', which expects %d arguments."), String(name), sf.arguments.size()));
return false;
}
//validate arguments
for (int i = 0; i < argcount; i++) {
if (args[i] != sf.arguments[i].type) {
- _set_error(vformat("Invalid argument type when calling stage function '%s', type expected is '%s'.", String(name), String(get_datatype_name(sf.arguments[i].type))));
+ _set_error(vformat(RTR("Invalid argument type when calling stage function '%s', type expected is '%s'."), String(name), get_datatype_name(sf.arguments[i].type)));
return false;
}
}
@@ -2852,7 +2852,7 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, const FunctionI
}
}
if (error) {
- _set_error(vformat("Expected integer constant within %s..%s range.", min, max));
+ _set_error(vformat(RTR("Expected integer constant within [%d..%d] range."), min, max));
return false;
}
}
@@ -2871,7 +2871,7 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, const FunctionI
}
if (arg_idx < argcount) {
if (p_func->arguments[arg_idx + 1]->type != Node::TYPE_VARIABLE && p_func->arguments[arg_idx + 1]->type != Node::TYPE_MEMBER && p_func->arguments[arg_idx + 1]->type != Node::TYPE_ARRAY) {
- _set_error("Argument " + itos(arg_idx + 1) + " of function '" + String(name) + "' is not a variable, array or member.");
+ _set_error(vformat(RTR("Argument %d of function '%s' is not a variable, array, or member."), arg_idx + 1, String(name)));
return false;
}
@@ -2895,7 +2895,7 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, const FunctionI
fail = true;
} else {
if (shader->varyings.has(varname)) {
- _set_error(vformat("Varyings cannot be passed for '%s' parameter!", "out"));
+ _set_error(vformat(RTR("Varyings cannot be passed for the '%s' parameter."), "out"));
return false;
}
if (p_function_info.built_ins.has(varname)) {
@@ -2908,7 +2908,7 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, const FunctionI
}
}
if (fail) {
- _set_error(vformat("Constant value cannot be passed for '%s' parameter!", "out"));
+ _set_error(vformat(RTR("A constant value cannot be passed for the '%s' parameter."), "out"));
return false;
}
@@ -2921,7 +2921,7 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, const FunctionI
n = static_cast<const MemberNode *>(n)->owner;
}
if (n->type != Node::TYPE_VARIABLE && n->type != Node::TYPE_ARRAY) {
- _set_error("Argument " + itos(arg_idx + 1) + " of function '" + String(name) + "' is not a variable, array or member.");
+ _set_error(vformat(RTR("Argument %d of function '%s' is not a variable, array, or member."), arg_idx + 1, String(name)));
return false;
}
if (n->type == Node::TYPE_VARIABLE) {
@@ -2951,7 +2951,7 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, const FunctionI
}
if (!valid) {
- _set_error("Argument " + itos(arg_idx + 1) + " of function '" + String(name) + "' can only take a local variable, array or member.");
+ _set_error(vformat(RTR("Argument %d of function '%s' can only take a local variable, array, or member."), arg_idx + 1, String(name)));
return false;
}
}
@@ -2998,16 +2998,15 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, const FunctionI
arglist += get_datatype_name(builtin_func_defs[builtin_idx].args[i]);
}
- String err = "Built-in function \"" + String(name) + "(" + arglist + ")\" is supported only on high-end platform!";
- _set_error(err);
+ _set_error(vformat(RTR("Built-in function \"%s(%s)\" is only supported on high-end platforms."), String(name), arglist));
return false;
}
if (failed_builtin) {
- String err = "Invalid arguments for built-in function: " + String(name) + "(";
+ String arg_list;
for (int i = 0; i < argcount; i++) {
if (i > 0) {
- err += ",";
+ arg_list += ",";
}
String arg_name;
@@ -3021,10 +3020,9 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, const FunctionI
arg_name += itos(args3[i]);
arg_name += "]";
}
- err += arg_name;
+ arg_list += arg_name;
}
- err += ")";
- _set_error(err);
+ _set_error(vformat(RTR("Invalid arguments for the built-in function: \"%s(%s)\"."), String(name), arg_list));
return false;
}
@@ -3041,7 +3039,7 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, const FunctionI
}
if (name == exclude_function) {
- _set_error("Recursion is not allowed");
+ _set_error(RTR("Recursion is not allowed."));
return false;
}
@@ -3054,7 +3052,7 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, const FunctionI
}
if (!shader->functions[i].callable) {
- _set_error("Function '" + String(name) + " can't be called from source code.");
+ _set_error(vformat(RTR("Function '%s' can't be called from source code."), String(name)));
return false;
}
@@ -3113,7 +3111,7 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, const FunctionI
arg_name += "]";
}
- _set_error(vformat("Invalid argument for \"%s(%s)\" function: argument %s should be %s but is %s.", String(name), arg_list, j + 1, func_arg_name, arg_name));
+ _set_error(vformat(RTR("Invalid argument for \"%s(%s)\" function: argument %d should be %s but is %s."), String(name), arg_list, j + 1, func_arg_name, arg_name));
fail = true;
break;
}
@@ -3150,9 +3148,9 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, const FunctionI
}
if (last_arg_count > args.size()) {
- _set_error(vformat("Too few arguments for \"%s(%s)\" call. Expected at least %s but received %s.", String(name), arg_list, last_arg_count, args.size()));
+ _set_error(vformat(RTR("Too few arguments for \"%s(%s)\" call. Expected at least %d but received %d."), String(name), arg_list, last_arg_count, args.size()));
} else if (last_arg_count < args.size()) {
- _set_error(vformat("Too many arguments for \"%s(%s)\" call. Expected at most %s but received %s.", String(name), arg_list, last_arg_count, args.size()));
+ _set_error(vformat(RTR("Too many arguments for \"%s(%s)\" call. Expected at most %d but received %d."), String(name), arg_list, last_arg_count, args.size()));
}
return false;
@@ -3190,7 +3188,7 @@ bool ShaderLanguage::_compare_datatypes(DataType p_datatype_a, String p_datatype
type_name2 += "]";
}
- _set_error("Invalid assignment of '" + type_name2 + "' to '" + type_name + "'");
+ _set_error(vformat(RTR("Invalid assignment of '%s' to '%s'."), type_name2, type_name));
}
return result;
}
@@ -3235,7 +3233,7 @@ bool ShaderLanguage::_parse_function_arguments(BlockNode *p_block, const Functio
return true;
} else if (tk.type != TK_COMMA) {
// something is broken
- _set_error("Expected ',' or ')' after argument");
+ _set_error(RTR("Expected ',' or ')' after argument."));
return false;
}
}
@@ -4247,14 +4245,14 @@ bool ShaderLanguage::_propagate_function_call_sampler_uniform_settings(StringNam
ERR_FAIL_INDEX_V(p_argument, shader->functions[i].function->arguments.size(), false);
FunctionNode::Argument *arg = &shader->functions[i].function->arguments.write[p_argument];
if (arg->tex_builtin_check) {
- _set_error("Sampler argument #" + itos(p_argument) + " of function '" + String(p_name) + "' called more than once using both built-ins and uniform textures, this is not supported (use either one or the other).");
+ _set_error(vformat(RTR("Sampler argument %d of function '%s' called more than once using both built-ins and uniform textures, this is not supported (use either one or the other)."), p_argument, String(p_name)));
return false;
} else if (arg->tex_argument_check) {
//was checked, verify that filter and repeat are the same
if (arg->tex_argument_filter == p_filter && arg->tex_argument_repeat == p_repeat) {
return true;
} else {
- _set_error("Sampler argument #" + itos(p_argument) + " of function '" + String(p_name) + "' called more than once using textures that differ in either filter or repeat setting.");
+ _set_error(vformat(RTR("Sampler argument %d of function '%s' called more than once using textures that differ in either filter or repeat setting."), p_argument, String(p_name)));
return false;
}
} else {
@@ -4281,14 +4279,14 @@ bool ShaderLanguage::_propagate_function_call_sampler_builtin_reference(StringNa
ERR_FAIL_INDEX_V(p_argument, shader->functions[i].function->arguments.size(), false);
FunctionNode::Argument *arg = &shader->functions[i].function->arguments.write[p_argument];
if (arg->tex_argument_check) {
- _set_error("Sampler argument #" + itos(p_argument) + " of function '" + String(p_name) + "' called more than once using both built-ins and uniform textures, this is not supported (use either one or the other).");
+ _set_error(vformat(RTR("Sampler argument %d of function '%s' called more than once using both built-ins and uniform textures, this is not supported (use either one or the other)."), p_argument, String(p_name)));
return false;
} else if (arg->tex_builtin_check) {
//was checked, verify that the built-in is the same
if (arg->tex_builtin == p_builtin) {
return true;
} else {
- _set_error("Sampler argument #" + itos(p_argument) + " of function '" + String(p_name) + "' called more than once using different built-ins. Only calling with the same built-in is supported.");
+ _set_error(vformat(RTR("Sampler argument %d of function '%s' called more than once using different built-ins. Only calling with the same built-in is supported."), p_argument, String(p_name)));
return false;
}
} else {
@@ -4318,7 +4316,7 @@ Error ShaderLanguage::_parse_array_size(BlockNode *p_block, const FunctionInfo &
error = true;
}
if (error) {
- _set_error("Array size is already defined!");
+ _set_error(vformat(RTR("Array size is already defined.")));
return ERR_PARSE_ERROR;
}
@@ -4327,7 +4325,7 @@ Error ShaderLanguage::_parse_array_size(BlockNode *p_block, const FunctionInfo &
if (tk.type == TK_BRACKET_CLOSE) {
if (p_forbid_unknown_size) {
- _set_error("Unknown array size is forbidden in that context!");
+ _set_error(vformat(RTR("Unknown array size is forbidden in that context.")));
return ERR_PARSE_ERROR;
}
if (r_unknown_size != nullptr) {
@@ -4364,7 +4362,7 @@ Error ShaderLanguage::_parse_array_size(BlockNode *p_block, const FunctionInfo &
}
}
} else if (n->type == Node::TYPE_OPERATOR) {
- _set_error("Array size expressions are not yet implemented.");
+ _set_error(vformat(RTR("Array size expressions are not supported.")));
return ERR_PARSE_ERROR;
}
if (r_size_expression != nullptr) {
@@ -4376,13 +4374,13 @@ Error ShaderLanguage::_parse_array_size(BlockNode *p_block, const FunctionInfo &
}
if (array_size <= 0) {
- _set_error("Expected single integer constant > 0");
+ _set_error(RTR("Expected a positive integer constant."));
return ERR_PARSE_ERROR;
}
tk = _get_token();
if (tk.type != TK_BRACKET_CLOSE) {
- _set_error("Expected ']'");
+ _set_expected_error("]");
return ERR_PARSE_ERROR;
}
@@ -4409,7 +4407,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_array_constructor(BlockNode *p_bloc
struct_name = tk.text;
} else {
if (!is_token_variable_datatype(tk.type)) {
- _set_error("Invalid data type for array");
+ _set_error(RTR("Invalid data type for the array."));
return nullptr;
}
type = get_token_datatype(tk.type);
@@ -4422,7 +4420,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_array_constructor(BlockNode *p_bloc
}
tk = _get_token();
} else {
- _set_error("Expected '['");
+ _set_expected_error("[");
return nullptr;
}
}
@@ -4460,20 +4458,20 @@ ShaderLanguage::Node *ShaderLanguage::_parse_array_constructor(BlockNode *p_bloc
break;
} else {
if (auto_size) {
- _set_error("Expected '}' or ','");
+ _set_expected_error("}", ",");
} else {
- _set_error("Expected ')' or ','");
+ _set_expected_error(")", ",");
}
return nullptr;
}
idx++;
}
if (!auto_size && !undefined_size && an->initializer.size() != array_size) {
- _set_error("Array size mismatch");
+ _set_error(RTR("Array size mismatch."));
return nullptr;
}
} else {
- _set_error("Expected array initialization!");
+ _set_error(RTR("Expected array initialization."));
return nullptr;
}
@@ -4503,7 +4501,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_array_constructor(BlockNode *p_bloc
Node *n = _parse_and_reduce_expression(p_block, p_function_info);
if (!n) {
- _set_error("Invalid data type for array");
+ _set_error(RTR("Invalid data type for the array."));
return nullptr;
}
@@ -4526,30 +4524,32 @@ ShaderLanguage::Node *ShaderLanguage::_parse_array_constructor(BlockNode *p_bloc
}
tk = _get_token();
} else {
- _set_error("Expected '['");
+ _set_expected_error("[");
return nullptr;
}
if (type != p_type || struct_name != p_struct_name || array_size != p_array_size) {
- String error_str = "Cannot convert from '";
+ String from;
if (type == TYPE_STRUCT) {
- error_str += struct_name;
+ from += struct_name;
} else {
- error_str += get_datatype_name(type);
+ from += get_datatype_name(type);
}
- error_str += "[";
- error_str += itos(array_size);
- error_str += "]'";
- error_str += " to '";
+ from += "[";
+ from += itos(array_size);
+ from += "]'";
+
+ String to;
if (type == TYPE_STRUCT) {
- error_str += p_struct_name;
+ to += p_struct_name;
} else {
- error_str += get_datatype_name(p_type);
+ to += get_datatype_name(p_type);
}
- error_str += "[";
- error_str += itos(p_array_size);
- error_str += "]'";
- _set_error(error_str);
+ to += "[";
+ to += itos(p_array_size);
+ to += "]'";
+
+ _set_error(vformat(RTR("Cannot convert from '%s' to '%s'."), from, to));
return nullptr;
}
}
@@ -4580,19 +4580,19 @@ ShaderLanguage::Node *ShaderLanguage::_parse_array_constructor(BlockNode *p_bloc
break;
} else {
if (auto_size) {
- _set_error("Expected '}' or ','");
+ _set_expected_error("}", ",");
} else {
- _set_error("Expected ')' or ','");
+ _set_expected_error(")", ",");
}
return nullptr;
}
}
if (an->initializer.size() != p_array_size) {
- _set_error("Array size mismatch");
+ _set_error(RTR("Array size mismatch."));
return nullptr;
}
} else {
- _set_error("Expected array initialization!");
+ _set_error(RTR("Expected array initialization."));
return nullptr;
}
@@ -4623,7 +4623,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
tk = _get_token();
if (tk.type != TK_PARENTHESIS_CLOSE) {
- _set_error("Expected ')' in expression");
+ _set_error(RTR("Expected ')' in expression."));
return nullptr;
}
@@ -4671,7 +4671,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
} else if (tk.type == TK_TYPE_VOID) {
//make sure void is not used in expression
- _set_error("Void value not allowed in Expression");
+ _set_error(RTR("Void value not allowed in expression."));
return nullptr;
} else if (is_token_nonvoid_datatype(tk.type) || tk.type == TK_CURLY_BRACKET_OPEN) {
if (tk.type == TK_CURLY_BRACKET_OPEN) {
@@ -4700,7 +4700,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
expr = _parse_array_constructor(p_block, p_function_info);
} else {
if (tk.type != TK_PARENTHESIS_OPEN) {
- _set_error("Expected '(' after type name");
+ _set_error(RTR("Expected '(' after the type name."));
return nullptr;
}
//basic type constructor
@@ -4733,7 +4733,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
}
if (!_validate_function_call(p_block, p_function_info, func, &func->return_cache, &func->struct_name)) {
- _set_error("No matching constructor found for: '" + String(funcname->name) + "'");
+ _set_error(vformat(RTR("No matching constructor found for: '%s'."), String(funcname->name)));
return nullptr;
}
@@ -4790,7 +4790,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
if (i + 1 < pstruct->members.size()) {
tk = _get_token();
if (tk.type != TK_COMMA) {
- _set_error("Expected ','");
+ _set_expected_error(",");
return nullptr;
}
}
@@ -4798,7 +4798,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
}
tk = _get_token();
if (tk.type != TK_PARENTHESIS_CLOSE) {
- _set_error("Expected ')'");
+ _set_expected_error(")");
return nullptr;
}
@@ -4822,7 +4822,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
ShaderLanguage::BlockNode *bnode = p_block;
while (bnode) {
if (bnode->variables.has(name)) {
- _set_error("Expected function name");
+ _set_error(RTR("Expected a function name."));
return nullptr;
}
bnode = bnode->parent_block;
@@ -4859,7 +4859,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
}
if (!_validate_function_call(p_block, p_function_info, func, &func->return_cache, &func->struct_name)) {
- _set_error("No matching function found for: '" + String(funcname->name) + "'");
+ _set_error(vformat(RTR("No matching function found for: '%s'."), String(funcname->name)));
return nullptr;
}
completion_class = TAG_GLOBAL; // reset sub-class
@@ -4912,7 +4912,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
if (shader->varyings.has(varname)) {
switch (shader->varyings[varname].stage) {
case ShaderNode::Varying::STAGE_UNKNOWN: {
- _set_error(vformat("Varying '%s' must be assigned in the vertex or fragment function first!", varname));
+ _set_error(vformat(RTR("Varying '%s' must be assigned in the vertex or fragment function first."), varname));
return nullptr;
}
case ShaderNode::Varying::STAGE_VERTEX_TO_FRAGMENT_LIGHT:
@@ -4938,7 +4938,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
}
if (error) {
- _set_error(vformat("Varying '%s' cannot be passed for the '%s' parameter in that context!", varname, _get_qualifier_str(arg_qual)));
+ _set_error(vformat(RTR("Varying '%s' cannot be passed for the '%s' parameter in that context."), varname, _get_qualifier_str(arg_qual)));
return nullptr;
}
}
@@ -4985,7 +4985,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
}
if (error) {
- _set_error(vformat("Constant value cannot be passed for '%s' parameter!", _get_qualifier_str(arg_qual)));
+ _set_error(vformat(RTR("A constant value cannot be passed for '%s' parameter."), _get_qualifier_str(arg_qual)));
return nullptr;
}
}
@@ -5067,12 +5067,12 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
idx++;
}
if (!found) {
- _set_error("Unknown identifier in expression: " + String(identifier));
+ _set_error(vformat(RTR("Unknown identifier in expression: '%s'."), String(identifier)));
return nullptr;
}
} else {
if (!_find_identifier(p_block, false, p_function_info, identifier, &data_type, &ident_type, &is_const, &array_size, &struct_name)) {
- _set_error("Unknown identifier in expression: " + String(identifier));
+ _set_error(vformat(RTR("Unknown identifier in expression: '%s'."), String(identifier)));
return nullptr;
}
if (ident_type == IDENTIFIER_VARYING) {
@@ -5114,7 +5114,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
}
if (ident_type == IDENTIFIER_FUNCTION) {
- _set_error("Can't use function as identifier: " + String(identifier));
+ _set_error(vformat(RTR("Can't use function as identifier: '%s'."), String(identifier)));
return nullptr;
}
if (is_const) {
@@ -5136,7 +5136,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
if (tk.type == TK_OP_ASSIGN) {
if (is_const) {
- _set_error("Constants cannot be modified.");
+ _set_error(RTR("Constants cannot be modified."));
return nullptr;
}
assign_expression = _parse_array_constructor(p_block, p_function_info, data_type, struct_name, array_size);
@@ -5159,7 +5159,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
}
if (index_expression->get_array_size() != 0 || (index_expression->get_datatype() != TYPE_INT && index_expression->get_datatype() != TYPE_UINT)) {
- _set_error("Only integer expressions are allowed for indexing.");
+ _set_error(RTR("Only integer expressions are allowed for indexing."));
return nullptr;
}
@@ -5169,7 +5169,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
if (!cnode->values.is_empty()) {
int value = cnode->values[0].sint;
if (value < 0 || value >= array_size) {
- _set_error(vformat("Index [%s] out of range [%s..%s]", value, 0, array_size - 1));
+ _set_error(vformat(RTR("Index [%d] out of range [%d..%d]."), value, 0, array_size - 1));
return nullptr;
}
}
@@ -5178,7 +5178,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
tk = _get_token();
if (tk.type != TK_BRACKET_CLOSE) {
- _set_error("Expected ']'");
+ _set_expected_error("]");
return nullptr;
}
} else {
@@ -5247,12 +5247,12 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
continue;
} else {
if (tk.type != TK_SEMICOLON) {
- _set_error("Expected expression, found: " + get_token_text(tk));
+ _set_error(vformat(RTR("Expected expression, found: '%s'."), get_token_text(tk)));
return nullptr;
} else {
#ifdef DEBUG_ENABLED
if (check_warnings && HAS_WARNING(ShaderWarning::FORMATTING_ERROR_FLAG)) {
- _add_line_warning(ShaderWarning::FORMATTING_ERROR, "Empty statement. Remove ';' to fix this warning.");
+ _add_line_warning(ShaderWarning::FORMATTING_ERROR, RTR("Empty statement. Remove ';' to fix this warning."));
}
#endif // DEBUG_ENABLED
_set_tkpos(prepos);
@@ -5299,7 +5299,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
}
if (identifier == StringName()) {
- _set_error("Expected identifier as member");
+ _set_error(RTR("Expected an identifier as a member."));
return nullptr;
}
String ident = identifier;
@@ -5544,12 +5544,12 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
}
if (mix_error) {
- _set_error("Cannot combine symbols from different sets in expression ." + ident);
+ _set_error(vformat(RTR("Cannot combine symbols from different sets in expression '.%s'."), ident));
return nullptr;
}
if (!ok) {
- _set_error("Invalid member for " + (dt == TYPE_STRUCT ? st : get_datatype_name(dt)) + " expression: ." + ident);
+ _set_error(vformat(RTR("Invalid member for '%s' expression: '.%s'."), (dt == TYPE_STRUCT ? st : get_datatype_name(dt)), ident));
return nullptr;
}
@@ -5569,7 +5569,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
tk = _get_token();
if (tk.type == TK_OP_ASSIGN) {
if (last_type == IDENTIFIER_CONSTANT) {
- _set_error("Constants cannot be modified.");
+ _set_error(RTR("Constants cannot be modified."));
return nullptr;
}
Node *assign_expression = _parse_array_constructor(p_block, p_function_info, member_type, member_struct_name, array_size);
@@ -5594,7 +5594,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
}
if (index_expression->get_array_size() != 0 || (index_expression->get_datatype() != TYPE_INT && index_expression->get_datatype() != TYPE_UINT)) {
- _set_error("Only integer expressions are allowed for indexing.");
+ _set_error(RTR("Only integer expressions are allowed for indexing."));
return nullptr;
}
@@ -5604,7 +5604,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
if (!cnode->values.is_empty()) {
int value = cnode->values[0].sint;
if (value < 0 || value >= array_size) {
- _set_error(vformat("Index [%s] out of range [%s..%s]", value, 0, array_size - 1));
+ _set_error(vformat(RTR("Index [%d] out of range [%d..%d]."), value, 0, array_size - 1));
return nullptr;
}
}
@@ -5613,7 +5613,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
tk = _get_token();
if (tk.type != TK_BRACKET_CLOSE) {
- _set_error("Expected ']'");
+ _set_expected_error("]");
return nullptr;
}
mn->index_expression = index_expression;
@@ -5640,7 +5640,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
}
if (index->get_array_size() != 0 || (index->get_datatype() != TYPE_INT && index->get_datatype() != TYPE_UINT)) {
- _set_error("Only integer expressions are allowed for indexing.");
+ _set_error(RTR("Only integer expressions are allowed for indexing."));
return nullptr;
}
@@ -5651,7 +5651,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
if (index->type == Node::TYPE_CONSTANT) {
uint32_t index_constant = static_cast<ConstantNode *>(index)->values[0].uint;
if (index_constant >= (uint32_t)expr->get_array_size()) {
- _set_error(vformat("Index [%s] out of range [%s..%s]", index_constant, 0, expr->get_array_size() - 1));
+ _set_error(vformat(RTR("Index [%d] out of range [%d..%d]."), index_constant, 0, expr->get_array_size() - 1));
return nullptr;
}
}
@@ -5669,7 +5669,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
if (index->type == Node::TYPE_CONSTANT) {
uint32_t index_constant = static_cast<ConstantNode *>(index)->values[0].uint;
if (index_constant >= 2) {
- _set_error("Index out of range (0-1)");
+ _set_error(vformat(RTR("Index [%d] out of range [%d..%d]."), index_constant, 0, 1));
return nullptr;
}
}
@@ -5703,7 +5703,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
if (index->type == Node::TYPE_CONSTANT) {
uint32_t index_constant = static_cast<ConstantNode *>(index)->values[0].uint;
if (index_constant >= 3) {
- _set_error("Index out of range (0-2)");
+ _set_error(vformat(RTR("Index [%d] out of range [%d..%d]."), index_constant, 0, 2));
return nullptr;
}
}
@@ -5736,7 +5736,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
if (index->type == Node::TYPE_CONSTANT) {
uint32_t index_constant = static_cast<ConstantNode *>(index)->values[0].uint;
if (index_constant >= 4) {
- _set_error("Index out of range (0-3)");
+ _set_error(vformat(RTR("Index [%d] out of range [%d..%d]."), index_constant, 0, 3));
return nullptr;
}
}
@@ -5762,7 +5762,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
}
break;
default: {
- _set_error("Object of type '" + (expr->get_datatype() == TYPE_STRUCT ? expr->get_datatype_name() : get_datatype_name(expr->get_datatype())) + "' can't be indexed");
+ _set_error(vformat(RTR("An object of type '%s' can't be indexed."), (expr->get_datatype() == TYPE_STRUCT ? expr->get_datatype_name() : get_datatype_name(expr->get_datatype()))));
return nullptr;
}
}
@@ -5777,7 +5777,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
tk = _get_token();
if (tk.type != TK_BRACKET_CLOSE) {
- _set_error("Expected ']' after indexing expression");
+ _set_expected_error("]");
return nullptr;
}
@@ -5787,12 +5787,12 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
op->arguments.push_back(expr);
if (!_validate_operator(op, &op->return_cache, &op->return_array_size)) {
- _set_error("Invalid base type for increment/decrement operator");
+ _set_error(RTR("Invalid base type for increment/decrement operator."));
return nullptr;
}
if (!_validate_assign(expr, p_function_info)) {
- _set_error("Invalid use of increment/decrement operator in constant expression.");
+ _set_error(RTR("Invalid use of increment/decrement operator in a constant expression."));
return nullptr;
}
expr = op;
@@ -5909,7 +5909,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
o.op = OP_SELECT_ELSE;
break;
default: {
- _set_error("Invalid token for operator: " + get_token_text(tk));
+ _set_error(vformat(RTR("Invalid token for the operator: '%s'."), get_token_text(tk)));
return nullptr;
}
}
@@ -6088,7 +6088,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
expr_pos++;
if (expr_pos == expression.size()) {
//can happen..
- _set_error("Unexpected end of expression...");
+ _set_error(RTR("Unexpected end of expression."));
return nullptr;
}
}
@@ -6098,7 +6098,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
OperatorNode *op = alloc_node<OperatorNode>();
op->op = expression[i].op;
if ((op->op == OP_INCREMENT || op->op == OP_DECREMENT) && !_validate_assign(expression[i + 1].node, p_function_info)) {
- _set_error("Can't use increment/decrement operator in constant expression.");
+ _set_error(RTR("Can't use increment/decrement operator in a constant expression."));
return nullptr;
}
op->arguments.push_back(expression[i + 1].node);
@@ -6110,7 +6110,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
String at;
for (int j = 0; j < op->arguments.size(); j++) {
if (j > 0) {
- at += " and ";
+ at += ", ";
}
at += get_datatype_name(op->arguments[j]->get_datatype());
if (!op->arguments[j]->is_indexed() && op->arguments[j]->get_array_size() > 0) {
@@ -6119,7 +6119,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
at += "]";
}
}
- _set_error("Invalid arguments to unary operator '" + get_operator_text(op->op) + "' :" + at);
+ _set_error(vformat(RTR("Invalid arguments to unary operator '%s': %s."), get_operator_text(op->op), at));
return nullptr;
}
expression.remove_at(i + 1);
@@ -6127,12 +6127,12 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
} else if (is_ternary) {
if (next_op < 1 || next_op >= (expression.size() - 1)) {
- _set_error("Parser bug...");
+ _set_parsing_error();
ERR_FAIL_V(nullptr);
}
if (next_op + 2 >= expression.size() || !expression[next_op + 2].is_op || expression[next_op + 2].op != OP_SELECT_ELSE) {
- _set_error("Missing matching ':' for select operator");
+ _set_error(RTR("Missing matching ':' for select operator."));
return nullptr;
}
@@ -6148,7 +6148,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
String at;
for (int i = 0; i < op->arguments.size(); i++) {
if (i > 0) {
- at += " and ";
+ at += ", ";
}
at += get_datatype_name(op->arguments[i]->get_datatype());
if (!op->arguments[i]->is_indexed() && op->arguments[i]->get_array_size() > 0) {
@@ -6157,7 +6157,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
at += "]";
}
}
- _set_error("Invalid argument to ternary ?: operator: " + at);
+ _set_error(vformat(RTR("Invalid argument to ternary operator: '%s'."), at));
return nullptr;
}
@@ -6167,7 +6167,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
} else {
if (next_op < 1 || next_op >= (expression.size() - 1)) {
- _set_error("Parser bug...");
+ _set_parsing_error();
ERR_FAIL_V(nullptr);
}
@@ -6175,7 +6175,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
op->op = expression[next_op].op;
if (expression[next_op - 1].is_op) {
- _set_error("Parser bug...");
+ _set_parsing_error();
ERR_FAIL_V(nullptr);
}
@@ -6193,7 +6193,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
// can be followed by a unary op in a valid combination,
// due to how precedence works, unaries will always disappear first
- _set_error("Parser bug...");
+ _set_parsing_error();
}
op->arguments.push_back(expression[next_op - 1].node); //expression goes as left
@@ -6206,7 +6206,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
String at;
for (int i = 0; i < op->arguments.size(); i++) {
if (i > 0) {
- at += " and ";
+ at += ", ";
}
if (op->arguments[i]->get_datatype() == TYPE_STRUCT) {
at += op->arguments[i]->get_datatype_name();
@@ -6219,7 +6219,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
at += "]";
}
}
- _set_error("Invalid arguments to operator '" + get_operator_text(op->op) + "' :" + at);
+ _set_error(vformat(RTR("Invalid arguments to operator '%s': '%s'."), get_operator_text(op->op), at));
return nullptr;
}
@@ -6359,7 +6359,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
if (p_block && p_block->block_type == BlockNode::BLOCK_TYPE_SWITCH) {
if (tk.type != TK_CF_CASE && tk.type != TK_CF_DEFAULT && tk.type != TK_CURLY_BRACKET_CLOSE) {
- _set_error("Switch may contains only case and default blocks");
+ _set_error(vformat(RTR("A switch may only contain '%s' and '%s' blocks."), "case", "default"));
return ERR_PARSE_ERROR;
}
}
@@ -6368,7 +6368,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
if (tk.type == TK_CURLY_BRACKET_CLOSE) { //end of block
if (p_just_one) {
- _set_error("Unexpected '}'");
+ _set_expected_error("}");
return ERR_PARSE_ERROR;
}
@@ -6406,18 +6406,18 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
is_struct = shader->structs.has(tk.text); // check again.
}
if (is_struct && precision != PRECISION_DEFAULT) {
- _set_error("Precision modifier cannot be used on structs.");
+ _set_error(RTR("The precision modifier cannot be used on structs."));
return ERR_PARSE_ERROR;
}
if (!is_token_nonvoid_datatype(tk.type)) {
- _set_error("Expected datatype after precision");
+ _set_error(RTR("Expected variable type after precision modifier."));
return ERR_PARSE_ERROR;
}
}
if (!is_struct) {
if (!is_token_variable_datatype(tk.type)) {
- _set_error("Invalid data type for variable (samplers not allowed)");
+ _set_error(RTR("Invalid variable type (samplers are not allowed)."));
return ERR_PARSE_ERROR;
}
}
@@ -6428,17 +6428,23 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
return ERR_PARSE_ERROR;
}
- Node *vardecl = nullptr;
int array_size = 0;
bool fixed_array_size = false;
bool first = true;
+ VariableDeclarationNode *vdnode = alloc_node<VariableDeclarationNode>();
+ vdnode->precision = precision;
+ if (is_struct) {
+ vdnode->struct_name = struct_name;
+ vdnode->datatype = TYPE_STRUCT;
+ } else {
+ vdnode->datatype = type;
+ };
+ vdnode->is_const = is_const;
+
do {
bool unknown_size = false;
- Node *size_expr = nullptr;
-
- ArrayDeclarationNode *anode = nullptr;
- ArrayDeclarationNode::Declaration adecl;
+ VariableDeclarationNode::Declaration decl;
tk = _get_token();
@@ -6446,17 +6452,16 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
first = false;
if (tk.type != TK_IDENTIFIER && tk.type != TK_BRACKET_OPEN) {
- _set_error("Expected identifier or '[' after datatype.");
+ _set_error(RTR("Expected an identifier or '[' after type."));
return ERR_PARSE_ERROR;
}
if (tk.type == TK_BRACKET_OPEN) {
- Error error = _parse_array_size(p_block, p_function_info, false, &size_expr, &array_size, &unknown_size);
+ Error error = _parse_array_size(p_block, p_function_info, false, &decl.size_expression, &array_size, &unknown_size);
if (error != OK) {
return error;
}
- adecl.single_expression = false;
- adecl.size = array_size;
+ decl.size = array_size;
fixed_array_size = true;
tk = _get_token();
@@ -6464,7 +6469,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
}
if (tk.type != TK_IDENTIFIER) {
- _set_error("Expected identifier!");
+ _set_error(RTR("Expected an identifier."));
return ERR_PARSE_ERROR;
}
@@ -6472,12 +6477,11 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
ShaderLanguage::IdentifierType itype;
if (_find_identifier(p_block, true, p_function_info, name, (ShaderLanguage::DataType *)nullptr, &itype)) {
if (itype != IDENTIFIER_FUNCTION) {
- _set_error("Redefinition of '" + String(name) + "'");
+ _set_redefinition_error(String(name));
return ERR_PARSE_ERROR;
}
}
-
- adecl.name = name;
+ decl.name = name;
#ifdef DEBUG_ENABLED
if (check_warnings && HAS_WARNING(ShaderWarning::UNUSED_LOCAL_VARIABLE_FLAG)) {
@@ -6503,50 +6507,29 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
tk = _get_token();
- bool is_array_decl = var.array_size > 0 || unknown_size;
-
if (tk.type == TK_BRACKET_OPEN) {
if (RenderingServer::get_singleton()->is_low_end() && is_const) {
- _set_error("Local const arrays are supported only on high-end platform!");
+ _set_error(RTR("Local const arrays are only supported on high-end platforms."));
return ERR_PARSE_ERROR;
}
- Error error = _parse_array_size(p_block, p_function_info, false, &size_expr, &var.array_size, &unknown_size);
+ Error error = _parse_array_size(p_block, p_function_info, false, &decl.size_expression, &var.array_size, &unknown_size);
if (error != OK) {
return error;
}
- adecl.single_expression = false;
- adecl.size = var.array_size;
+ decl.size = var.array_size;
array_size = var.array_size;
- is_array_decl = true;
tk = _get_token();
}
- if (is_array_decl) {
- {
- anode = alloc_node<ArrayDeclarationNode>();
-
- if (is_struct) {
- anode->struct_name = struct_name;
- anode->datatype = TYPE_STRUCT;
- } else {
- anode->datatype = type;
- }
-
- anode->precision = precision;
- anode->is_const = is_const;
- anode->size_expression = size_expr;
-
- vardecl = (Node *)anode;
- }
-
+ if (var.array_size > 0 || unknown_size) {
bool full_def = false;
if (tk.type == TK_OP_ASSIGN) {
if (RenderingServer::get_singleton()->is_low_end()) {
- _set_error("Array initialization is supported only on high-end platform!");
+ _set_error(RTR("Array initialization is only supported on high-end platforms."));
return ERR_PARSE_ERROR;
}
@@ -6558,11 +6541,11 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
Node *n = _parse_and_reduce_expression(p_block, p_function_info);
if (!n) {
- _set_error("Expected correct array initializer!");
+ _set_error(RTR("Expected array initializer."));
return ERR_PARSE_ERROR;
} else {
if (unknown_size) {
- adecl.size = n->get_array_size();
+ decl.size = n->get_array_size();
var.array_size = n->get_array_size();
}
@@ -6570,15 +6553,15 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
return ERR_PARSE_ERROR;
}
- adecl.single_expression = true;
- adecl.initializer.push_back(n);
+ decl.single_expression = true;
+ decl.initializer.push_back(n);
}
tk = _get_token();
} else {
if (tk.type != TK_CURLY_BRACKET_OPEN) {
if (unknown_size) {
- _set_error("Expected '{'");
+ _set_expected_error("{");
return ERR_PARSE_ERROR;
}
@@ -6589,11 +6572,11 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
precision2 = get_token_precision(tk.type);
tk = _get_token();
if (shader->structs.has(tk.text)) {
- _set_error("Precision modifier cannot be used on structs.");
+ _set_error(RTR("The precision modifier cannot be used on structs."));
return ERR_PARSE_ERROR;
}
if (!is_token_nonvoid_datatype(tk.type)) {
- _set_error("Expected datatype after precision");
+ _set_error(RTR("Expected data type after precision modifier."));
return ERR_PARSE_ERROR;
}
}
@@ -6606,7 +6589,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
struct_name2 = tk.text;
} else {
if (!is_token_variable_datatype(tk.type)) {
- _set_error("Invalid data type for array");
+ _set_error(RTR("Invalid data type for the array."));
return ERR_PARSE_ERROR;
}
type2 = get_token_datatype(tk.type);
@@ -6626,38 +6609,40 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
}
tk = _get_token();
} else {
- _set_error("Expected '['");
+ _set_expected_error("[");
return ERR_PARSE_ERROR;
}
if (precision != precision2 || type != type2 || struct_name != struct_name2 || var.array_size != array_size2) {
- String error_str = "Cannot convert from '";
+ String from;
if (precision2 != PRECISION_DEFAULT) {
- error_str += get_precision_name(precision2);
- error_str += " ";
+ from += get_precision_name(precision2);
+ from += " ";
}
if (type2 == TYPE_STRUCT) {
- error_str += struct_name2;
+ from += struct_name2;
} else {
- error_str += get_datatype_name(type2);
+ from += get_datatype_name(type2);
}
- error_str += "[";
- error_str += itos(array_size2);
- error_str += "]'";
- error_str += " to '";
+ from += "[";
+ from += itos(array_size2);
+ from += "]'";
+
+ String to;
if (precision != PRECISION_DEFAULT) {
- error_str += get_precision_name(precision);
- error_str += " ";
+ to += get_precision_name(precision);
+ to += " ";
}
if (type == TYPE_STRUCT) {
- error_str += struct_name;
+ to += struct_name;
} else {
- error_str += get_datatype_name(type);
+ to += get_datatype_name(type);
}
- error_str += "[";
- error_str += itos(var.array_size);
- error_str += "]'";
- _set_error(error_str);
+ to += "[";
+ to += itos(var.array_size);
+ to += "]'";
+
+ _set_error(vformat(RTR("Cannot convert from '%s' to '%s'."), from, to));
return ERR_PARSE_ERROR;
}
}
@@ -6666,13 +6651,13 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
if (unknown_size) {
if (!curly) {
- _set_error("Expected '{'");
+ _set_expected_error("{");
return ERR_PARSE_ERROR;
}
} else {
if (full_def) {
if (curly) {
- _set_error("Expected '('");
+ _set_expected_error("(");
return ERR_PARSE_ERROR;
}
}
@@ -6685,8 +6670,8 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
return ERR_PARSE_ERROR;
}
- if (anode->is_const && n->type == Node::TYPE_OPERATOR && ((OperatorNode *)n)->op == OP_CALL) {
- _set_error("Expected constant expression");
+ if (is_const && n->type == Node::TYPE_OPERATOR && ((OperatorNode *)n)->op == OP_CALL) {
+ _set_error(RTR("Expected a constant expression."));
return ERR_PARSE_ERROR;
}
@@ -6696,28 +6681,28 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
tk = _get_token();
if (tk.type == TK_COMMA) {
- adecl.initializer.push_back(n);
+ decl.initializer.push_back(n);
continue;
} else if (!curly && tk.type == TK_PARENTHESIS_CLOSE) {
- adecl.initializer.push_back(n);
+ decl.initializer.push_back(n);
break;
} else if (curly && tk.type == TK_CURLY_BRACKET_CLOSE) {
- adecl.initializer.push_back(n);
+ decl.initializer.push_back(n);
break;
} else {
if (curly) {
- _set_error("Expected '}' or ','");
+ _set_expected_error("}", ",");
} else {
- _set_error("Expected ')' or ','");
+ _set_expected_error(")", ",");
}
return ERR_PARSE_ERROR;
}
}
if (unknown_size) {
- adecl.size = adecl.initializer.size();
- var.array_size = adecl.initializer.size();
- } else if (adecl.initializer.size() != var.array_size) {
- _set_error("Array size mismatch");
+ decl.size = decl.initializer.size();
+ var.array_size = decl.initializer.size();
+ } else if (decl.initializer.size() != var.array_size) {
+ _set_error(RTR("Array size mismatch."));
return ERR_PARSE_ERROR;
}
tk = _get_token();
@@ -6725,48 +6710,31 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
}
} else {
if (unknown_size) {
- _set_error("Expected array initialization");
+ _set_error(RTR("Expected array initialization."));
return ERR_PARSE_ERROR;
}
- if (anode->is_const) {
- _set_error("Expected initialization of constant");
+ if (is_const) {
+ _set_error(RTR("Expected initialization of constant."));
return ERR_PARSE_ERROR;
}
}
array_size = var.array_size;
- anode->declarations.push_back(adecl);
} else if (tk.type == TK_OP_ASSIGN) {
- VariableDeclarationNode *node = alloc_node<VariableDeclarationNode>();
- if (is_struct) {
- node->struct_name = struct_name;
- node->datatype = TYPE_STRUCT;
- } else {
- node->datatype = type;
- }
- node->precision = precision;
- node->is_const = is_const;
- vardecl = (Node *)node;
-
- VariableDeclarationNode::Declaration decl;
- decl.name = name;
- decl.initializer = nullptr;
-
//variable created with assignment! must parse an expression
Node *n = _parse_and_reduce_expression(p_block, p_function_info);
if (!n) {
return ERR_PARSE_ERROR;
}
- if (node->is_const && n->type == Node::TYPE_OPERATOR && ((OperatorNode *)n)->op == OP_CALL) {
+ if (is_const && n->type == Node::TYPE_OPERATOR && ((OperatorNode *)n)->op == OP_CALL) {
OperatorNode *op = ((OperatorNode *)n);
for (int i = 1; i < op->arguments.size(); i++) {
if (!_check_node_constness(op->arguments[i])) {
- _set_error("Expected constant expression for argument '" + itos(i - 1) + "' of function call after '='");
+ _set_error(vformat(RTR("Expected constant expression for argument %d of function call after '='."), i - 1));
return ERR_PARSE_ERROR;
}
}
}
- decl.initializer = n;
if (n->type == Node::TYPE_CONSTANT) {
ConstantNode *const_node = static_cast<ConstantNode *>(n);
@@ -6778,31 +6746,17 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
if (!_compare_datatypes(var.type, var.struct_name, var.array_size, n->get_datatype(), n->get_datatype_name(), n->get_array_size())) {
return ERR_PARSE_ERROR;
}
+
+ decl.initializer.push_back(n);
tk = _get_token();
- node->declarations.push_back(decl);
} else {
if (is_const) {
- _set_error("Expected initialization of constant");
+ _set_error(RTR("Expected initialization of constant."));
return ERR_PARSE_ERROR;
}
-
- VariableDeclarationNode *node = alloc_node<VariableDeclarationNode>();
- if (is_struct) {
- node->struct_name = struct_name;
- node->datatype = TYPE_STRUCT;
- } else {
- node->datatype = type;
- }
- node->precision = precision;
- vardecl = (Node *)node;
-
- VariableDeclarationNode::Declaration decl;
- decl.name = name;
- decl.initializer = nullptr;
- node->declarations.push_back(decl);
}
- p_block->statements.push_back(vardecl);
+ vdnode->declarations.push_back(decl);
p_block->variables[name] = var;
if (!fixed_array_size) {
@@ -6811,16 +6765,18 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
if (tk.type == TK_COMMA) {
if (p_block->block_type == BlockNode::BLOCK_TYPE_FOR) {
- _set_error("Multiple declarations in 'for' loop are not implemented yet.");
+ _set_error(vformat("Multiple declarations in '%s' loop are not supported.", "for"));
return ERR_PARSE_ERROR;
}
} else if (tk.type == TK_SEMICOLON) {
break;
} else {
- _set_error("Expected ',' or ';' after variable");
+ _set_expected_error(",", ";");
return ERR_PARSE_ERROR;
}
} while (tk.type == TK_COMMA); //another variable
+
+ p_block->statements.push_back((Node *)vdnode);
} else if (tk.type == TK_CURLY_BRACKET_OPEN) {
//a sub block, just because..
BlockNode *block = alloc_node<BlockNode>();
@@ -6833,7 +6789,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
//if () {}
tk = _get_token();
if (tk.type != TK_PARENTHESIS_OPEN) {
- _set_error("Expected '(' after if");
+ _set_expected_after_error("(", "if");
return ERR_PARSE_ERROR;
}
@@ -6845,13 +6801,13 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
}
if (n->get_datatype() != TYPE_BOOL) {
- _set_error("Expected boolean expression");
+ _set_error(RTR("Expected a boolean expression."));
return ERR_PARSE_ERROR;
}
tk = _get_token();
if (tk.type != TK_PARENTHESIS_CLOSE) {
- _set_error("Expected ')' after expression");
+ _set_expected_error(")");
return ERR_PARSE_ERROR;
}
@@ -6881,14 +6837,14 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
}
} else if (tk.type == TK_CF_SWITCH) {
if (RenderingServer::get_singleton()->is_low_end()) {
- _set_error("\"switch\" operator is supported only on high-end platform!");
+ _set_error(vformat(RTR("The '%s' operator is only supported on high-end platforms."), "switch"));
return ERR_PARSE_ERROR;
}
// switch() {}
tk = _get_token();
if (tk.type != TK_PARENTHESIS_OPEN) {
- _set_error("Expected '(' after switch");
+ _set_expected_after_error("(", "switch");
return ERR_PARSE_ERROR;
}
ControlFlowNode *cf = alloc_node<ControlFlowNode>();
@@ -6898,17 +6854,17 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
return ERR_PARSE_ERROR;
}
if (n->get_datatype() != TYPE_INT) {
- _set_error("Expected integer expression");
+ _set_error(RTR("Expected an integer expression."));
return ERR_PARSE_ERROR;
}
tk = _get_token();
if (tk.type != TK_PARENTHESIS_CLOSE) {
- _set_error("Expected ')' after expression");
+ _set_expected_error(")");
return ERR_PARSE_ERROR;
}
tk = _get_token();
if (tk.type != TK_CURLY_BRACKET_OPEN) {
- _set_error("Expected '{' after switch statement");
+ _set_expected_after_error("{", "switch");
return ERR_PARSE_ERROR;
}
BlockNode *switch_block = alloc_node<BlockNode>();
@@ -6929,10 +6885,10 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
if (tk.type == TK_CF_CASE || tk.type == TK_CF_DEFAULT) {
if (prev_type == TK_CF_DEFAULT) {
if (tk.type == TK_CF_CASE) {
- _set_error("Cases must be defined before default case.");
+ _set_error(RTR("Cases must be defined before default case."));
return ERR_PARSE_ERROR;
} else if (prev_type == TK_CF_DEFAULT) {
- _set_error("Default case must be defined only once.");
+ _set_error(RTR("Default case must be defined only once."));
return ERR_PARSE_ERROR;
}
}
@@ -6951,7 +6907,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
return ERR_PARSE_ERROR;
}
if (constants.has(cn->values[0].sint)) {
- _set_error("Duplicated case label: '" + itos(cn->values[0].sint) + "'");
+ _set_error(vformat(RTR("Duplicated case label: %d."), cn->values[0].sint));
return ERR_PARSE_ERROR;
}
constants.insert(cn->values[0].sint);
@@ -6963,7 +6919,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
ConstantNode::Value v;
_find_identifier(p_block, false, p_function_info, vn->name, nullptr, nullptr, nullptr, nullptr, nullptr, &v);
if (constants.has(v.sint)) {
- _set_error("Duplicated case label: '" + itos(v.sint) + "'");
+ _set_error(vformat(RTR("Duplicated case label: %d."), v.sint));
return ERR_PARSE_ERROR;
}
constants.insert(v.sint);
@@ -6990,7 +6946,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
}
if (!p_block || (p_block->block_type != BlockNode::BLOCK_TYPE_SWITCH)) {
- _set_error("case must be placed within switch block");
+ _set_error(vformat(RTR("'%s' must be placed within a '%s' block."), "case", "switch"));
return ERR_PARSE_ERROR;
}
@@ -7019,7 +6975,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
}
}
if (!correct_constant_expression) {
- _set_error("Expected integer constant");
+ _set_error(RTR("Expected an integer constant."));
return ERR_PARSE_ERROR;
}
@@ -7043,7 +6999,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
tk = _get_token();
if (tk.type != TK_COLON) {
- _set_error("Expected ':'");
+ _set_expected_error(":");
return ERR_PARSE_ERROR;
}
@@ -7071,14 +7027,14 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
}
if (!p_block || (p_block->block_type != BlockNode::BLOCK_TYPE_SWITCH)) {
- _set_error("default must be placed within switch block");
+ _set_error(vformat(RTR("'%s' must be placed within a '%s' block."), "default", "switch"));
return ERR_PARSE_ERROR;
}
tk = _get_token();
if (tk.type != TK_COLON) {
- _set_error("Expected ':'");
+ _set_expected_error(":");
return ERR_PARSE_ERROR;
}
@@ -7115,14 +7071,14 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
tk = _get_token();
if (tk.type != TK_CF_WHILE) {
- _set_error("Expected while after do");
+ _set_expected_after_error("while", "do");
return ERR_PARSE_ERROR;
}
}
tk = _get_token();
if (tk.type != TK_PARENTHESIS_OPEN) {
- _set_error("Expected '(' after while");
+ _set_expected_after_error("(", "while");
return ERR_PARSE_ERROR;
}
@@ -7139,7 +7095,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
tk = _get_token();
if (tk.type != TK_PARENTHESIS_CLOSE) {
- _set_error("Expected ')' after expression");
+ _set_expected_error(")");
return ERR_PARSE_ERROR;
}
if (!is_do) {
@@ -7160,7 +7116,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
tk = _get_token();
if (tk.type != TK_SEMICOLON) {
- _set_error("Expected ';'");
+ _set_expected_error(";");
return ERR_PARSE_ERROR;
}
}
@@ -7168,7 +7124,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
// for() {}
tk = _get_token();
if (tk.type != TK_PARENTHESIS_OPEN) {
- _set_error("Expected '(' after for");
+ _set_expected_after_error("(", "for");
return ERR_PARSE_ERROR;
}
@@ -7190,13 +7146,13 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
}
if (n->get_datatype() != TYPE_BOOL) {
- _set_error("Middle expression is expected to be boolean.");
+ _set_error(RTR("The middle expression is expected to be boolean."));
return ERR_PARSE_ERROR;
}
tk = _get_token();
if (tk.type != TK_SEMICOLON) {
- _set_error("Expected ';' after middle expression");
+ _set_expected_error(";");
return ERR_PARSE_ERROR;
}
@@ -7211,7 +7167,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
tk = _get_token();
if (tk.type != TK_PARENTHESIS_CLOSE) {
- _set_error("Expected ')' after third expression");
+ _set_expected_error(")");
return ERR_PARSE_ERROR;
}
@@ -7234,12 +7190,12 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
}
if (!b) {
- _set_error("Bug");
+ _set_parsing_error();
return ERR_BUG;
}
if (b && b->parent_function && p_function_info.main_function) {
- _set_error(vformat("Using 'return' in '%s' processor function results in undefined behavior!", b->parent_function->name));
+ _set_error(vformat(RTR("Using '%s' in the '%s' processor function is incorrect."), "return", b->parent_function->name));
return ERR_PARSE_ERROR;
}
@@ -7258,7 +7214,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
if (tk.type == TK_SEMICOLON) {
//all is good
if (b->parent_function->return_type != TYPE_VOID) {
- _set_error("Expected return with an expression of type '" + (!return_struct_name.is_empty() ? return_struct_name : get_datatype_name(b->parent_function->return_type)) + array_size_string + "'");
+ _set_error(vformat(RTR("Expected '%s' with an expression of type '%s'."), "return", (!return_struct_name.is_empty() ? return_struct_name : get_datatype_name(b->parent_function->return_type)) + array_size_string));
return ERR_PARSE_ERROR;
}
} else {
@@ -7270,13 +7226,13 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
}
if (b->parent_function->return_type != expr->get_datatype() || b->parent_function->return_array_size != expr->get_array_size() || return_struct_name != expr->get_datatype_name()) {
- _set_error("Expected return with an expression of type '" + (!return_struct_name.is_empty() ? return_struct_name : get_datatype_name(b->parent_function->return_type)) + array_size_string + "'");
+ _set_error(vformat(RTR("Expected return with an expression of type '%s'."), (!return_struct_name.is_empty() ? return_struct_name : get_datatype_name(b->parent_function->return_type)) + array_size_string));
return ERR_PARSE_ERROR;
}
tk = _get_token();
if (tk.type != TK_SEMICOLON) {
- _set_error("Expected ';' after return expression");
+ _set_expected_after_error(";", "return");
return ERR_PARSE_ERROR;
}
@@ -7299,12 +7255,12 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
b = b->parent_block;
}
if (!b) {
- _set_error("Bug");
+ _set_parsing_error();
return ERR_BUG;
}
if (!b->parent_function->can_discard) {
- _set_error("Use of 'discard' is not allowed here.");
+ _set_error(vformat(RTR("Use of '%s' is not allowed here."), "discard"));
return ERR_PARSE_ERROR;
}
@@ -7314,14 +7270,14 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
pos = _get_tkpos();
tk = _get_token();
if (tk.type != TK_SEMICOLON) {
- _set_error("Expected ';' after discard");
+ _set_expected_after_error(";", "discard");
return ERR_PARSE_ERROR;
}
p_block->statements.push_back(flow);
} else if (tk.type == TK_CF_BREAK) {
if (!p_can_break) {
- _set_error("'break' is not allowed outside of a loop or 'switch' statement");
+ _set_error(vformat(RTR("'%s' is not allowed outside of a loop or '%s' statement."), "break", "switch"));
return ERR_PARSE_ERROR;
}
@@ -7331,7 +7287,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
pos = _get_tkpos();
tk = _get_token();
if (tk.type != TK_SEMICOLON) {
- _set_error("Expected ';' after break");
+ _set_expected_after_error(";", "break");
return ERR_PARSE_ERROR;
}
@@ -7347,7 +7303,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
} else if (tk.type == TK_CF_CONTINUE) {
if (!p_can_continue) {
- _set_error("'continue' is not allowed outside of a loop");
+ _set_error(vformat(RTR("'%s' is not allowed outside of a loop."), "continue"));
return ERR_PARSE_ERROR;
}
@@ -7358,7 +7314,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
tk = _get_token();
if (tk.type != TK_SEMICOLON) {
//all is good
- _set_error("Expected ';' after continue");
+ _set_expected_after_error(";", "continue");
return ERR_PARSE_ERROR;
}
@@ -7375,7 +7331,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
tk = _get_token();
if (tk.type != TK_SEMICOLON) {
- _set_error("Expected ';' after statement");
+ _set_expected_error(";");
return ERR_PARSE_ERROR;
}
}
@@ -7436,7 +7392,7 @@ Error ShaderLanguage::_validate_datatype(DataType p_type) {
}
if (invalid_type) {
- _set_error(vformat("\"%s\" type is supported only on high-end platform!", get_datatype_name(p_type)));
+ _set_error(vformat(RTR("The \"%s\" type is only supported on high-end platforms."), get_datatype_name(p_type)));
return ERR_UNAVAILABLE;
}
}
@@ -7448,7 +7404,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
TkPos prev_pos;
if (tk.type != TK_SHADER_TYPE) {
- _set_error("Expected 'shader_type' at the beginning of shader. Valid types are: " + _get_shader_type_list(p_shader_types));
+ _set_error(vformat(RTR("Expected '%s' at the beginning of shader. Valid types are: %s."), "shader_type", _get_shader_type_list(p_shader_types)));
return ERR_PARSE_ERROR;
}
@@ -7456,11 +7412,11 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
_get_completable_identifier(nullptr, COMPLETION_SHADER_TYPE, shader_type_identifier);
if (shader_type_identifier == StringName()) {
- _set_error("Expected identifier after 'shader_type', indicating type of shader. Valid types are: " + _get_shader_type_list(p_shader_types));
+ _set_error(vformat(RTR("Expected an identifier after '%s', indicating the type of shader. Valid types are: %s."), "shader_type", _get_shader_type_list(p_shader_types)));
return ERR_PARSE_ERROR;
}
if (!p_shader_types.has(shader_type_identifier)) {
- _set_error("Invalid shader type. Valid types are: " + _get_shader_type_list(p_shader_types));
+ _set_error(vformat(RTR("Invalid shader type. Valid types are: %s"), _get_shader_type_list(p_shader_types)));
return ERR_PARSE_ERROR;
}
prev_pos = _get_tkpos();
@@ -7468,7 +7424,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
if (tk.type != TK_SEMICOLON) {
_set_tkpos(prev_pos);
- _set_error("Expected ';' after 'shader_type <type>'.");
+ _set_expected_after_error(";", "shader_type " + String(shader_type_identifier));
return ERR_PARSE_ERROR;
}
@@ -7508,14 +7464,14 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
_get_completable_identifier(nullptr, COMPLETION_RENDER_MODE, mode);
if (mode == StringName()) {
- _set_error("Expected identifier for render mode");
+ _set_error(RTR("Expected an identifier for render mode."));
return ERR_PARSE_ERROR;
}
const String smode = String(mode);
if (shader->render_modes.find(mode) != -1) {
- _set_error(vformat("Duplicated render mode: '%s'.", smode));
+ _set_error(vformat(RTR("Duplicated render mode: '%s'."), smode));
return ERR_PARSE_ERROR;
}
@@ -7531,7 +7487,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
found = true;
if (defined_modes.has(name)) {
- _set_error(vformat("Redefinition of render mode: '%s'. The %s mode has already been set to '%s'.", smode, name, defined_modes[name]));
+ _set_error(vformat(RTR("Redefinition of render mode: '%s'. The '%s' mode has already been set to '%s'."), smode, name, defined_modes[name]));
return ERR_PARSE_ERROR;
}
defined_modes.insert(name, smode);
@@ -7545,7 +7501,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
}
if (!found) {
- _set_error(vformat("Invalid render mode: '%s'.", smode));
+ _set_error(vformat(RTR("Invalid render mode: '%s'."), smode));
return ERR_PARSE_ERROR;
}
@@ -7557,7 +7513,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
} else if (tk.type == TK_SEMICOLON) {
break; //done
} else {
- _set_error("Unexpected token: " + get_token_text(tk));
+ _set_error(vformat(RTR("Unexpected token: '%s'."), get_token_text(tk)));
return ERR_PARSE_ERROR;
}
}
@@ -7570,16 +7526,16 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
if (tk.type == TK_IDENTIFIER) {
st.name = tk.text;
if (shader->constants.has(st.name) || shader->structs.has(st.name)) {
- _set_error("Redefinition of '" + String(st.name) + "'");
+ _set_redefinition_error(String(st.name));
return ERR_PARSE_ERROR;
}
tk = _get_token();
if (tk.type != TK_CURLY_BRACKET_OPEN) {
- _set_error("Expected '{'");
+ _set_expected_error("{");
return ERR_PARSE_ERROR;
}
} else {
- _set_error("Expected struct identifier!");
+ _set_error(RTR("Expected a struct identifier."));
return ERR_PARSE_ERROR;
}
@@ -7599,7 +7555,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
DataPrecision precision = DataPrecision::PRECISION_DEFAULT;
if (tk.type == TK_STRUCT) {
- _set_error("nested structs are not allowed!");
+ _set_error(RTR("Nested structs are not allowed."));
return ERR_PARSE_ERROR;
}
@@ -7618,22 +7574,19 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
#endif // DEBUG_ENABLED
struct_dt = true;
if (use_precision) {
- _set_error("Precision modifier cannot be used on structs.");
+ _set_error(RTR("The precision modifier cannot be used on structs."));
return ERR_PARSE_ERROR;
}
}
if (!is_token_datatype(tk.type) && !struct_dt) {
- _set_error("Expected datatype.");
+ _set_error(RTR("Expected data type."));
return ERR_PARSE_ERROR;
} else {
type = struct_dt ? TYPE_STRUCT : get_token_datatype(tk.type);
- if (is_sampler_type(type)) {
- _set_error("sampler datatype not allowed here");
- return ERR_PARSE_ERROR;
- } else if (type == TYPE_VOID) {
- _set_error("void datatype not allowed here");
+ if (type == TYPE_VOID || is_sampler_type(type)) {
+ _set_error(vformat(RTR("A '%s' data type is not allowed here."), get_datatype_name(type)));
return ERR_PARSE_ERROR;
}
@@ -7648,7 +7601,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
first = false;
if (tk.type != TK_IDENTIFIER && tk.type != TK_BRACKET_OPEN) {
- _set_error("Expected identifier or '['.");
+ _set_error(RTR("Expected an identifier or '['."));
return ERR_PARSE_ERROR;
}
@@ -7663,7 +7616,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
}
if (tk.type != TK_IDENTIFIER) {
- _set_error("Expected identifier!");
+ _set_error(RTR("Expected an identifier."));
return ERR_PARSE_ERROR;
}
@@ -7675,7 +7628,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
member->array_size = array_size;
if (member_names.has(member->name)) {
- _set_error("Redefinition of '" + String(member->name) + "'");
+ _set_redefinition_error(String(member->name));
return ERR_PARSE_ERROR;
}
member_names.insert(member->name);
@@ -7694,7 +7647,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
}
if (tk.type != TK_SEMICOLON && tk.type != TK_COMMA) {
- _set_error("Expected ',' or ';' after struct member.");
+ _set_expected_error(",", ";");
return ERR_PARSE_ERROR;
}
@@ -7704,13 +7657,13 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
}
}
if (member_count == 0) {
- _set_error("Empty structs are not allowed!");
+ _set_error(RTR("Empty structs are not allowed."));
return ERR_PARSE_ERROR;
}
tk = _get_token();
if (tk.type != TK_SEMICOLON) {
- _set_error("Expected ';'");
+ _set_expected_error(";");
return ERR_PARSE_ERROR;
}
shader->structs[st.name] = st;
@@ -7724,7 +7677,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
case TK_GLOBAL: {
tk = _get_token();
if (tk.type != TK_UNIFORM) {
- _set_error("Expected 'uniform' after 'global'");
+ _set_expected_after_error("uniform", "global");
return ERR_PARSE_ERROR;
}
uniform_scope = ShaderNode::Uniform::SCOPE_GLOBAL;
@@ -7734,7 +7687,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
if (uniform_scope == ShaderNode::Uniform::SCOPE_LOCAL) {
tk = _get_token();
if (tk.type != TK_UNIFORM) {
- _set_error("Expected 'uniform' after 'instance'");
+ _set_expected_after_error("uniform", "instance");
return ERR_PARSE_ERROR;
}
uniform_scope = ShaderNode::Uniform::SCOPE_INSTANCE;
@@ -7747,7 +7700,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
if (!uniform) {
if (shader_type_identifier == "particles" || shader_type_identifier == "sky" || shader_type_identifier == "fog") {
- _set_error(vformat("Varyings cannot be used in '%s' shaders!", shader_type_identifier));
+ _set_error(vformat(RTR("Varyings cannot be used in '%s' shaders."), shader_type_identifier));
return ERR_PARSE_ERROR;
}
}
@@ -7762,7 +7715,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
tk = _get_token();
if (is_token_interpolation(tk.type)) {
if (uniform) {
- _set_error("Interpolation qualifiers are not supported for uniforms!");
+ _set_error(RTR("Interpolation qualifiers are not supported for uniforms."));
return ERR_PARSE_ERROR;
}
interpolation = get_token_interpolation(tk.type);
@@ -7778,38 +7731,38 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
if (shader->structs.has(tk.text)) {
if (uniform) {
if (precision_defined) {
- _set_error("Precision modifier cannot be used on structs.");
+ _set_error(RTR("The precision modifier cannot be used on structs."));
return ERR_PARSE_ERROR;
}
- _set_error("struct datatype is not yet supported for uniforms!");
+ _set_error(vformat(RTR("The '%s' data type is not supported for uniforms."), "struct"));
return ERR_PARSE_ERROR;
} else {
- _set_error("struct datatype not allowed here");
+ _set_error(vformat(RTR("The '%s' data type not allowed here."), "struct"));
return ERR_PARSE_ERROR;
}
}
if (!is_token_datatype(tk.type)) {
- _set_error("Expected datatype. ");
+ _set_error(RTR("Expected data type."));
return ERR_PARSE_ERROR;
}
type = get_token_datatype(tk.type);
if (type == TYPE_VOID) {
- _set_error("void datatype not allowed here");
+ _set_error(vformat(RTR("The '%s' data type is not allowed here."), "void"));
return ERR_PARSE_ERROR;
}
if (!uniform && (type < TYPE_FLOAT || type > TYPE_MAT4)) {
- _set_error("Invalid type for varying, only float,vec2,vec3,vec4,mat2,mat3,mat4 or array of these types allowed.");
+ _set_error(RTR("Invalid type for varying, only 'float', 'vec2', 'vec3', 'vec4', 'mat2', 'mat3', 'mat4', or arrays of these types are allowed."));
return ERR_PARSE_ERROR;
}
tk = _get_token();
if (tk.type != TK_IDENTIFIER && tk.type != TK_BRACKET_OPEN) {
- _set_error("Expected identifier or '['.");
+ _set_error(RTR("Expected an identifier or '['."));
return ERR_PARSE_ERROR;
}
@@ -7822,7 +7775,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
}
if (tk.type != TK_IDENTIFIER) {
- _set_error("Expected identifier!");
+ _set_error(RTR("Expected an identifier."));
return ERR_PARSE_ERROR;
}
@@ -7830,12 +7783,12 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
name = tk.text;
if (_find_identifier(nullptr, false, constants, name)) {
- _set_error("Redefinition of '" + String(name) + "'");
+ _set_redefinition_error(String(name));
return ERR_PARSE_ERROR;
}
if (has_builtin(p_functions, name)) {
- _set_error("Redefinition of '" + String(name) + "'");
+ _set_redefinition_error(String(name));
return ERR_PARSE_ERROR;
}
@@ -7844,12 +7797,12 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
//validate global uniform
DataType gvtype = global_var_get_type_func(name);
if (gvtype == TYPE_MAX) {
- _set_error("Global uniform '" + String(name) + "' does not exist. Create it in Project Settings.");
+ _set_error(vformat(RTR("Global uniform '%s' does not exist. Create it in Project Settings."), String(name)));
return ERR_PARSE_ERROR;
}
if (type != gvtype) {
- _set_error("Global uniform '" + String(name) + "' must be of type '" + get_datatype_name(gvtype) + "'.");
+ _set_error(vformat(RTR("Global uniform '%s' must be of type '%s'."), String(name), get_datatype_name(gvtype)));
return ERR_PARSE_ERROR;
}
}
@@ -7871,7 +7824,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
if (is_sampler_type(type)) {
if (uniform_scope == ShaderNode::Uniform::SCOPE_INSTANCE) {
- _set_error("Uniforms with 'instance' qualifiers can't be of sampler type.");
+ _set_error(vformat(RTR("Uniforms with '%s' qualifiers can't be of sampler type.", "instance")));
return ERR_PARSE_ERROR;
}
uniform2.texture_order = texture_uniforms++;
@@ -7887,7 +7840,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
}
} else {
if (uniform_scope == ShaderNode::Uniform::SCOPE_INSTANCE && (type == TYPE_MAT2 || type == TYPE_MAT3 || type == TYPE_MAT4)) {
- _set_error("Uniforms with 'instance' qualifiers can't be of matrix type.");
+ _set_error(vformat(RTR("Uniforms with '%s' qualifier can't be of matrix type.", "instance")));
return ERR_PARSE_ERROR;
}
uniform2.texture_order = -1;
@@ -7916,11 +7869,11 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
if (uniform2.array_size > 0) {
if (uniform_scope == ShaderNode::Uniform::SCOPE_GLOBAL) {
- _set_error("'SCOPE_GLOBAL' qualifier is not yet supported for uniform array!");
+ _set_error(vformat(RTR("The '%s' qualifier is not supported for uniform arrays."), "SCOPE_GLOBAL"));
return ERR_PARSE_ERROR;
}
if (uniform_scope == ShaderNode::Uniform::SCOPE_INSTANCE) {
- _set_error("'SCOPE_INSTANCE' qualifier is not yet supported for uniform array!");
+ _set_error(vformat(RTR("The '%s' qualifier is not supported for uniform arrays."), "SCOPE_INSTANCE"));
return ERR_PARSE_ERROR;
}
}
@@ -7938,13 +7891,13 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
completion_line = tk.line;
if (!is_token_hint(tk.type)) {
- _set_error("Expected valid type hint after ':'.");
+ _set_error(RTR("Expected valid type hint after ':'."));
return ERR_PARSE_ERROR;
}
if (uniform2.array_size > 0) {
if (tk.type != TK_HINT_COLOR) {
- _set_error("This hint is not yet supported for uniform arrays!");
+ _set_error(RTR("This hint is not supported for uniform arrays."));
return ERR_PARSE_ERROR;
}
}
@@ -7975,20 +7928,20 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
uniform2.hint = ShaderNode::Uniform::HINT_BLACK_ALBEDO;
} else if (tk.type == TK_HINT_COLOR) {
if (type != TYPE_VEC4) {
- _set_error("Color hint is for vec4 only");
+ _set_error(vformat(RTR("Color hint is for '%s' only."), "vec4"));
return ERR_PARSE_ERROR;
}
uniform2.hint = ShaderNode::Uniform::HINT_COLOR;
} else if (tk.type == TK_HINT_RANGE) {
uniform2.hint = ShaderNode::Uniform::HINT_RANGE;
if (type != TYPE_FLOAT && type != TYPE_INT) {
- _set_error("Range hint is for float and int only");
+ _set_error(vformat(RTR("Range hint is for '%s' and '%s' only."), "float", "int"));
return ERR_PARSE_ERROR;
}
tk = _get_token();
if (tk.type != TK_PARENTHESIS_OPEN) {
- _set_error("Expected '(' after hint_range");
+ _set_expected_after_error("(", "hint_range");
return ERR_PARSE_ERROR;
}
@@ -8002,7 +7955,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
}
if (tk.type != TK_FLOAT_CONSTANT && !tk.is_integer_constant()) {
- _set_error("Expected integer constant");
+ _set_error(RTR("Expected an integer constant."));
return ERR_PARSE_ERROR;
}
@@ -8012,7 +7965,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
tk = _get_token();
if (tk.type != TK_COMMA) {
- _set_error("Expected ',' after integer constant");
+ _set_error(RTR("Expected ',' after integer constant."));
return ERR_PARSE_ERROR;
}
@@ -8026,7 +7979,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
}
if (tk.type != TK_FLOAT_CONSTANT && !tk.is_integer_constant()) {
- _set_error("Expected integer constant after ','");
+ _set_error(RTR("Expected an integer constant after ','."));
return ERR_PARSE_ERROR;
}
@@ -8039,7 +7992,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
tk = _get_token();
if (tk.type != TK_FLOAT_CONSTANT && !tk.is_integer_constant()) {
- _set_error("Expected integer constant after ','");
+ _set_error(RTR("Expected an integer constant after ','."));
return ERR_PARSE_ERROR;
}
@@ -8054,44 +8007,44 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
}
if (tk.type != TK_PARENTHESIS_CLOSE) {
- _set_error("Expected ')'");
+ _set_expected_error(")");
return ERR_PARSE_ERROR;
}
} else if (tk.type == TK_HINT_INSTANCE_INDEX) {
if (custom_instance_index != -1) {
- _set_error("Can only specify 'instance_index' once.");
+ _set_error(vformat(RTR("Can only specify '%s' once."), "instance_index"));
return ERR_PARSE_ERROR;
}
tk = _get_token();
if (tk.type != TK_PARENTHESIS_OPEN) {
- _set_error("Expected '(' after 'instance_index'");
+ _set_expected_after_error("(", "instance_index");
return ERR_PARSE_ERROR;
}
tk = _get_token();
if (tk.type == TK_OP_SUB) {
- _set_error("The instance index can't be negative.");
+ _set_error(RTR("The instance index can't be negative."));
return ERR_PARSE_ERROR;
}
if (!tk.is_integer_constant()) {
- _set_error("Expected integer constant");
+ _set_error(RTR("Expected an integer constant."));
return ERR_PARSE_ERROR;
}
custom_instance_index = tk.constant;
if (custom_instance_index >= MAX_INSTANCE_UNIFORM_INDICES) {
- _set_error("Allowed instance uniform indices are 0-" + itos(MAX_INSTANCE_UNIFORM_INDICES - 1));
+ _set_error(vformat(RTR("Allowed instance uniform indices must be within [0..%d] range."), MAX_INSTANCE_UNIFORM_INDICES - 1));
return ERR_PARSE_ERROR;
}
tk = _get_token();
if (tk.type != TK_PARENTHESIS_CLOSE) {
- _set_error("Expected ')'");
+ _set_expected_error(")");
return ERR_PARSE_ERROR;
}
} else if (tk.type == TK_FILTER_LINEAR) {
@@ -8113,7 +8066,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
}
if (uniform2.hint != ShaderNode::Uniform::HINT_RANGE && uniform2.hint != ShaderNode::Uniform::HINT_NONE && uniform2.hint != ShaderNode::Uniform::HINT_COLOR && type <= TYPE_MAT4) {
- _set_error("This hint is only for sampler types");
+ _set_error(RTR("This hint is only for sampler types."));
return ERR_PARSE_ERROR;
}
@@ -8128,7 +8081,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
} else {
uniform2.instance_index = instance_index++;
if (instance_index > MAX_INSTANCE_UNIFORM_INDICES) {
- _set_error("Too many 'instance' uniforms in shader, maximum supported is " + itos(MAX_INSTANCE_UNIFORM_INDICES));
+ _set_error(vformat(RTR("Too many '%s' uniforms in shader, maximum supported is %d."), "instance", MAX_INSTANCE_UNIFORM_INDICES));
return ERR_PARSE_ERROR;
}
}
@@ -8138,7 +8091,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
if (tk.type == TK_OP_ASSIGN) {
if (uniform2.array_size > 0) {
- _set_error("Setting default value to a uniform array is not yet supported!");
+ _set_error(RTR("Setting default values to uniform arrays is not supported."));
return ERR_PARSE_ERROR;
}
@@ -8147,7 +8100,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
return ERR_PARSE_ERROR;
}
if (expr->type != Node::TYPE_CONSTANT) {
- _set_error("Expected constant expression after '='");
+ _set_error(RTR("Expected constant expression after '='."));
return ERR_PARSE_ERROR;
}
@@ -8156,7 +8109,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
uniform2.default_value.resize(cn->values.size());
if (!convert_constant(cn, uniform2.type, uniform2.default_value.ptrw())) {
- _set_error("Can't convert constant to " + get_datatype_name(uniform2.type));
+ _set_error(vformat(RTR("Can't convert constant to '%s'."), get_datatype_name(uniform2.type)));
return ERR_PARSE_ERROR;
}
tk = _get_token();
@@ -8173,7 +8126,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
uniform_scope = ShaderNode::Uniform::SCOPE_LOCAL;
if (tk.type != TK_SEMICOLON) {
- _set_error("Expected ';'");
+ _set_expected_error(";");
return ERR_PARSE_ERROR;
}
@@ -8189,9 +8142,9 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
tk = _get_token();
if (tk.type != TK_SEMICOLON && tk.type != TK_BRACKET_OPEN) {
if (array_size == 0) {
- _set_error("Expected ';' or '['");
+ _set_expected_error(";", "[");
} else {
- _set_error("Expected ';'");
+ _set_expected_error(";");
}
return ERR_PARSE_ERROR;
}
@@ -8214,7 +8167,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
} break;
case TK_SHADER_TYPE: {
- _set_error("Shader type is already defined.");
+ _set_error(RTR("Shader type is already defined."));
return ERR_PARSE_ERROR;
} break;
default: {
@@ -8240,19 +8193,23 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
if (shader->structs.has(tk.text)) {
if (precision != PRECISION_DEFAULT) {
- _set_error("Precision modifier cannot be used on structs.");
+ _set_error(RTR("The precision modifier cannot be used on structs."));
return ERR_PARSE_ERROR;
}
is_struct = true;
struct_name = tk.text;
} else {
if (!is_token_datatype(tk.type)) {
- _set_error("Expected constant, function, uniform or varying");
+ _set_error(RTR("Expected constant, function, uniform or varying."));
return ERR_PARSE_ERROR;
}
if (!is_token_variable_datatype(tk.type)) {
- _set_error("Invalid data type for constants or function return (samplers not allowed)");
+ if (is_constant) {
+ _set_error(RTR("Invalid constant type (samplers are not allowed)."));
+ } else {
+ _set_error(RTR("Invalid function type (samplers are not allowed)."));
+ }
return ERR_PARSE_ERROR;
}
}
@@ -8270,7 +8227,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
if (tk.type == TK_BRACKET_OPEN) {
if (is_constant && RenderingServer::get_singleton()->is_low_end()) {
- _set_error("Global const arrays are only supported on high-end platform!");
+ _set_error(RTR("Global constant arrays are only supported on high-end platforms."));
return ERR_PARSE_ERROR;
}
Error error = _parse_array_size(nullptr, constants, !is_constant, nullptr, &array_size, &unknown_size);
@@ -8287,22 +8244,22 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
if (name == StringName()) {
if (is_constant) {
- _set_error("Expected identifier or '[' after datatype.");
+ _set_error(RTR("Expected an identifier or '[' after type."));
} else {
- _set_error("Expected function name after datatype.");
+ _set_error(RTR("Expected a function name after type."));
}
return ERR_PARSE_ERROR;
}
if (shader->structs.has(name) || _find_identifier(nullptr, false, constants, name) || has_builtin(p_functions, name)) {
- _set_error("Redefinition of '" + String(name) + "'");
+ _set_redefinition_error(String(name));
return ERR_PARSE_ERROR;
}
tk = _get_token();
if (tk.type != TK_PARENTHESIS_OPEN) {
if (type == TYPE_VOID) {
- _set_error("Expected '(' after function identifier");
+ _set_error(RTR("Expected '(' after function identifier."));
return ERR_PARSE_ERROR;
}
@@ -8318,7 +8275,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
if (tk.type == TK_BRACKET_OPEN) {
if (RenderingServer::get_singleton()->is_low_end()) {
- _set_error("Global const arrays are only supported on high-end platform!");
+ _set_error(RTR("Global const arrays are only supported on high-end platforms."));
return ERR_PARSE_ERROR;
}
Error error = _parse_array_size(nullptr, constants, false, nullptr, &constant.array_size, &unknown_size);
@@ -8330,14 +8287,14 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
if (tk.type == TK_OP_ASSIGN) {
if (!is_constant) {
- _set_error("Expected 'const' keyword before constant definition");
+ _set_error(vformat(RTR("Global non-constant variables are not supported. Expected '%s' keyword before constant definition."), "const"));
return ERR_PARSE_ERROR;
}
if (constant.array_size > 0 || unknown_size) {
bool full_def = false;
- ArrayDeclarationNode::Declaration decl;
+ VariableDeclarationNode::Declaration decl;
decl.name = name;
decl.size = constant.array_size;
@@ -8345,7 +8302,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
if (tk.type != TK_CURLY_BRACKET_OPEN) {
if (unknown_size) {
- _set_error("Expected '{'");
+ _set_expected_error("{");
return ERR_PARSE_ERROR;
}
@@ -8356,7 +8313,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
precision2 = get_token_precision(tk.type);
tk = _get_token();
if (!is_token_nonvoid_datatype(tk.type)) {
- _set_error("Expected datatype after precision");
+ _set_error(RTR("Expected data type after precision modifier."));
return ERR_PARSE_ERROR;
}
}
@@ -8369,7 +8326,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
struct_name2 = tk.text;
} else {
if (!is_token_variable_datatype(tk.type)) {
- _set_error("Invalid data type for array");
+ _set_error(RTR("Invalid data type for the array."));
return ERR_PARSE_ERROR;
}
type2 = get_token_datatype(tk.type);
@@ -8389,38 +8346,40 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
}
tk = _get_token();
} else {
- _set_error("Expected '[");
+ _set_expected_error("[");
return ERR_PARSE_ERROR;
}
if (constant.precision != precision2 || constant.type != type2 || struct_name != struct_name2 || constant.array_size != array_size2) {
- String error_str = "Cannot convert from '";
+ String from;
if (type2 == TYPE_STRUCT) {
- error_str += struct_name2;
+ from += struct_name2;
} else {
if (precision2 != PRECISION_DEFAULT) {
- error_str += get_precision_name(precision2);
- error_str += " ";
+ from += get_precision_name(precision2);
+ from += " ";
}
- error_str += get_datatype_name(type2);
+ from += get_datatype_name(type2);
}
- error_str += "[";
- error_str += itos(array_size2);
- error_str += "]'";
- error_str += " to '";
+ from += "[";
+ from += itos(array_size2);
+ from += "]'";
+
+ String to;
if (type == TYPE_STRUCT) {
- error_str += struct_name;
+ to += struct_name;
} else {
if (precision != PRECISION_DEFAULT) {
- error_str += get_precision_name(precision);
- error_str += " ";
+ to += get_precision_name(precision);
+ to += " ";
}
- error_str += get_datatype_name(type);
+ to += get_datatype_name(type);
}
- error_str += "[";
- error_str += itos(constant.array_size);
- error_str += "]'";
- _set_error(error_str);
+ to += "[";
+ to += itos(constant.array_size);
+ to += "]'";
+
+ _set_error(vformat(RTR("Cannot convert from '%s' to '%s'."), from, to));
return ERR_PARSE_ERROR;
}
}
@@ -8429,13 +8388,13 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
if (unknown_size) {
if (!curly) {
- _set_error("Expected '{'");
+ _set_expected_error("{");
return ERR_PARSE_ERROR;
}
} else {
if (full_def) {
if (curly) {
- _set_error("Expected '('");
+ _set_expected_error("(");
return ERR_PARSE_ERROR;
}
}
@@ -8449,7 +8408,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
}
if (n->type == Node::TYPE_OPERATOR && ((OperatorNode *)n)->op == OP_CALL) {
- _set_error("Expected constant expression");
+ _set_error(RTR("Expected constant expression."));
return ERR_PARSE_ERROR;
}
@@ -8469,9 +8428,9 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
break;
} else {
if (curly) {
- _set_error("Expected '}' or ','");
+ _set_expected_error("}", ",");
} else {
- _set_error("Expected ')' or ','");
+ _set_expected_error(")", ",");
}
return ERR_PARSE_ERROR;
}
@@ -8480,7 +8439,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
decl.size = decl.initializer.size();
constant.array_size = decl.initializer.size();
} else if (decl.initializer.size() != constant.array_size) {
- _set_error("Array size mismatch");
+ _set_error(RTR("Array size mismatch."));
return ERR_PARSE_ERROR;
}
}
@@ -8508,7 +8467,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
OperatorNode *op = ((OperatorNode *)expr);
for (int i = 1; i < op->arguments.size(); i++) {
if (!_check_node_constness(op->arguments[i])) {
- _set_error("Expected constant expression for argument '" + itos(i - 1) + "' of function call after '='");
+ _set_error(vformat(RTR("Expected constant expression for argument %d of function call after '='."), i - 1));
return ERR_PARSE_ERROR;
}
}
@@ -8523,10 +8482,10 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
tk = _get_token();
} else {
if (constant.array_size > 0 || unknown_size) {
- _set_error("Expected array initialization");
+ _set_error(RTR("Expected array initialization."));
return ERR_PARSE_ERROR;
} else {
- _set_error("Expected initialization of constant");
+ _set_error(RTR("Expected initialization of constant."));
return ERR_PARSE_ERROR;
}
}
@@ -8542,18 +8501,18 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
if (tk.type == TK_COMMA) {
tk = _get_token();
if (tk.type != TK_IDENTIFIER) {
- _set_error("Expected identifier after type");
+ _set_error(RTR("Expected an identifier after type."));
return ERR_PARSE_ERROR;
}
name = tk.text;
if (_find_identifier(nullptr, false, constants, name)) {
- _set_error("Redefinition of '" + String(name) + "'");
+ _set_redefinition_error(String(name));
return ERR_PARSE_ERROR;
}
if (has_builtin(p_functions, name)) {
- _set_error("Redefinition of '" + String(name) + "'");
+ _set_redefinition_error(String(name));
return ERR_PARSE_ERROR;
}
@@ -8567,7 +8526,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
} else if (tk.type == TK_SEMICOLON) {
break;
} else {
- _set_error("Expected ',' or ';' after constant");
+ _set_expected_error(",", ";");
return ERR_PARSE_ERROR;
}
}
@@ -8594,7 +8553,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
for (int i = 0; i < shader->functions.size(); i++) {
if (!shader->functions[i].callable && shader->functions[i].name == name) {
- _set_error("Redefinition of '" + String(name) + "'");
+ _set_redefinition_error(String(name));
return ERR_PARSE_ERROR;
}
}
@@ -8649,14 +8608,14 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
tk = _get_token();
} else if (tk.type == TK_ARG_OUT) {
if (is_const) {
- _set_error("'out' qualifier cannot be used within a function parameter declared with 'const'.");
+ _set_error(vformat(RTR("The '%s' qualifier cannot be used within a function parameter declared with '%s'."), "out", "const"));
return ERR_PARSE_ERROR;
}
qualifier = ARGUMENT_QUALIFIER_OUT;
tk = _get_token();
} else if (tk.type == TK_ARG_INOUT) {
if (is_const) {
- _set_error("'inout' qualifier cannot be used within a function parameter declared with 'const'.");
+ _set_error(vformat(RTR("The '%s' qualifier cannot be used within a function parameter declared with '%s'."), "inout", "const"));
return ERR_PARSE_ERROR;
}
qualifier = ARGUMENT_QUALIFIER_INOUT;
@@ -8687,19 +8646,19 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
}
#endif // DEBUG_ENABLED
if (use_precision) {
- _set_error("Precision modifier cannot be used on structs.");
+ _set_error(RTR("The precision modifier cannot be used on structs."));
return ERR_PARSE_ERROR;
}
}
if (!is_struct && !is_token_datatype(tk.type)) {
- _set_error("Expected a valid datatype for argument");
+ _set_error(RTR("Expected a valid data type for argument."));
return ERR_PARSE_ERROR;
}
if (qualifier == ARGUMENT_QUALIFIER_OUT || qualifier == ARGUMENT_QUALIFIER_INOUT) {
if (is_sampler_type(get_token_datatype(tk.type))) {
- _set_error("Opaque types cannot be output parameters.");
+ _set_error(RTR("Opaque types cannot be output parameters."));
return ERR_PARSE_ERROR;
}
}
@@ -8712,7 +8671,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
return ERR_PARSE_ERROR;
}
if (ptype == TYPE_VOID) {
- _set_error("void not allowed in argument");
+ _set_error(RTR("Void type not allowed as argument."));
return ERR_PARSE_ERROR;
}
}
@@ -8727,7 +8686,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
tk = _get_token();
}
if (tk.type != TK_IDENTIFIER) {
- _set_error("Expected identifier for argument name");
+ _set_error(RTR("Expected an identifier for argument name."));
return ERR_PARSE_ERROR;
}
@@ -8736,13 +8695,13 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
ShaderLanguage::IdentifierType itype;
if (_find_identifier(func_node->body, false, builtins, pname, (ShaderLanguage::DataType *)nullptr, &itype)) {
if (itype != IDENTIFIER_FUNCTION) {
- _set_error("Redefinition of '" + String(pname) + "'");
+ _set_redefinition_error(String(pname));
return ERR_PARSE_ERROR;
}
}
if (has_builtin(p_functions, pname)) {
- _set_error("Redefinition of '" + String(pname) + "'");
+ _set_redefinition_error(String(pname));
return ERR_PARSE_ERROR;
}
@@ -8774,7 +8733,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
tk = _get_token();
//do none and go on
} else if (tk.type != TK_PARENTHESIS_CLOSE) {
- _set_error("Expected ',' or ')' after identifier");
+ _set_expected_error(",", ")");
return ERR_PARSE_ERROR;
}
}
@@ -8782,11 +8741,11 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
if (p_functions.has(name)) {
//if one of the core functions, make sure they are of the correct form
if (func_node->arguments.size() > 0) {
- _set_error("Function '" + String(name) + "' expects no arguments.");
+ _set_error(vformat(RTR("Function '%s' expects no arguments."), String(name)));
return ERR_PARSE_ERROR;
}
if (func_node->return_type != TYPE_VOID) {
- _set_error("Function '" + String(name) + "' must be of void return type.");
+ _set_error(vformat(RTR("Function '%s' must be of '%s' return type."), String(name), "void"));
return ERR_PARSE_ERROR;
}
}
@@ -8794,7 +8753,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
//all good let's parse inside the function!
tk = _get_token();
if (tk.type != TK_CURLY_BRACKET_OPEN) {
- _set_error("Expected '{' to begin function");
+ _set_error(RTR("Expected a '{' to begin function."));
return ERR_PARSE_ERROR;
}
@@ -8808,7 +8767,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
if (func_node->return_type != DataType::TYPE_VOID) {
BlockNode *block = func_node->body;
if (_find_last_flow_op_in_block(block, FlowOperation::FLOW_OP_RETURN) != OK) {
- _set_error("Expected at least one return statement in a non-void function.");
+ _set_error(vformat(RTR("Expected at least one '%s' statement in a non-void function."), "return"));
return ERR_PARSE_ERROR;
}
}
@@ -8821,7 +8780,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
#ifdef DEBUG_ENABLED
if (check_device_limit_warnings && uniform_buffer_exceeded_line != -1) {
- _add_warning(ShaderWarning::DEVICE_LIMIT_EXCEEDED, uniform_buffer_exceeded_line, "uniform buffer", { uniform_buffer_size, max_uniform_buffer_size });
+ _add_warning(ShaderWarning::DEVICE_LIMIT_EXCEEDED, uniform_buffer_exceeded_line, RTR("uniform buffer"), { uniform_buffer_size, max_uniform_buffer_size });
}
#endif // DEBUG_ENABLED
return OK;
diff --git a/servers/rendering/shader_language.h b/servers/rendering/shader_language.h
index 74f97319fe..1307eeac2b 100644
--- a/servers/rendering/shader_language.h
+++ b/servers/rendering/shader_language.h
@@ -362,7 +362,6 @@ public:
TYPE_CONTROL_FLOW,
TYPE_MEMBER,
TYPE_ARRAY,
- TYPE_ARRAY_DECLARATION,
TYPE_ARRAY_CONSTRUCT,
TYPE_STRUCT,
};
@@ -428,7 +427,10 @@ public:
struct Declaration {
StringName name;
- Node *initializer;
+ uint32_t size = 0U;
+ Node *size_expression = nullptr;
+ Vector<Node *> initializer;
+ bool single_expression = false;
};
Vector<Declaration> declarations;
@@ -471,27 +473,6 @@ public:
Node(TYPE_ARRAY_CONSTRUCT) {}
};
- struct ArrayDeclarationNode : public Node {
- DataPrecision precision = PRECISION_DEFAULT;
- DataType datatype = TYPE_VOID;
- String struct_name;
- bool is_const = false;
- Node *size_expression = nullptr;
-
- struct Declaration {
- StringName name;
- uint32_t size;
- Vector<Node *> initializer;
- bool single_expression;
- };
- Vector<Declaration> declarations;
-
- virtual DataType get_datatype() const override { return datatype; }
-
- ArrayDeclarationNode() :
- Node(TYPE_ARRAY_DECLARATION) {}
- };
-
struct ConstantNode : public Node {
DataType datatype = TYPE_VOID;
String struct_name = "";
@@ -505,7 +486,7 @@ public:
};
Vector<Value> values;
- Vector<ArrayDeclarationNode::Declaration> array_declarations;
+ Vector<VariableDeclarationNode::Declaration> array_declarations;
virtual DataType get_datatype() const override { return datatype; }
virtual String get_datatype_name() const override { return struct_name; }
@@ -964,6 +945,26 @@ private:
error_str = p_str;
}
+ void _set_expected_error(const String &p_what) {
+ _set_error(vformat(RTR("Expected a '%s'."), p_what));
+ }
+
+ void _set_expected_error(const String &p_first, const String p_second) {
+ _set_error(vformat(RTR("Expected a '%s' or '%s'."), p_first, p_second));
+ }
+
+ void _set_expected_after_error(const String &p_what, const String &p_after) {
+ _set_error(vformat(RTR("Expected a '%s' after '%s'."), p_what, p_after));
+ }
+
+ void _set_redefinition_error(const String &p_what) {
+ _set_error(vformat(RTR("Redefinition of '%s'."), p_what));
+ }
+
+ void _set_parsing_error() {
+ _set_error("Parser bug.");
+ }
+
static const char *token_names[TK_MAX];
Token _make_token(TokenType p_type, const StringName &p_text = StringName());
diff --git a/servers/rendering/shader_warnings.cpp b/servers/rendering/shader_warnings.cpp
index f2e74c4d78..639b9bd165 100644
--- a/servers/rendering/shader_warnings.cpp
+++ b/servers/rendering/shader_warnings.cpp
@@ -48,23 +48,23 @@ const StringName &ShaderWarning::get_subject() const {
String ShaderWarning::get_message() const {
switch (code) {
case FLOAT_COMPARISON:
- return vformat("Direct floating-point comparison (this may not evaluate to `true` as you expect). Instead, use `abs(a - b) < 0.0001` for an approximate but predictable comparison.");
+ return vformat(RTR("Direct floating-point comparison (this may not evaluate to `true` as you expect). Instead, use `abs(a - b) < 0.0001` for an approximate but predictable comparison."));
case UNUSED_CONSTANT:
- return vformat("The const '%s' is declared but never used.", subject);
+ return vformat(RTR("The const '%s' is declared but never used."), subject);
case UNUSED_FUNCTION:
- return vformat("The function '%s' is declared but never used.", subject);
+ return vformat(RTR("The function '%s' is declared but never used."), subject);
case UNUSED_STRUCT:
- return vformat("The struct '%s' is declared but never used.", subject);
+ return vformat(RTR("The struct '%s' is declared but never used."), subject);
case UNUSED_UNIFORM:
- return vformat("The uniform '%s' is declared but never used.", subject);
+ return vformat(RTR("The uniform '%s' is declared but never used."), subject);
case UNUSED_VARYING:
- return vformat("The varying '%s' is declared but never used.", subject);
+ return vformat(RTR("The varying '%s' is declared but never used."), subject);
case UNUSED_LOCAL_VARIABLE:
- return vformat("The local variable '%s' is declared but never used.", subject);
+ return vformat(RTR("The local variable '%s' is declared but never used."), subject);
case FORMATTING_ERROR:
return subject;
case DEVICE_LIMIT_EXCEEDED:
- return vformat("The total size of the %s for this shader on this device has been exceeded (%s/%s). The shader may not work correctly.", subject, (int)extra_args[0], (int)extra_args[1]);
+ return vformat(RTR("The total size of the %s for this shader on this device has been exceeded (%d/%d). The shader may not work correctly."), subject, (int)extra_args[0], (int)extra_args[1]);
default:
break;
}
diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp
index 020c850f46..863aae6e4c 100644
--- a/servers/rendering_server.cpp
+++ b/servers/rendering_server.cpp
@@ -2388,10 +2388,6 @@ void RenderingServer::_bind_methods() {
BIND_ENUM_CONSTANT(ENV_SSIL_QUALITY_HIGH);
BIND_ENUM_CONSTANT(ENV_SSIL_QUALITY_ULTRA);
- BIND_ENUM_CONSTANT(ENV_SDFGI_CASCADES_4);
- BIND_ENUM_CONSTANT(ENV_SDFGI_CASCADES_6);
- BIND_ENUM_CONSTANT(ENV_SDFGI_CASCADES_8);
-
BIND_ENUM_CONSTANT(ENV_SDFGI_Y_SCALE_DISABLED);
BIND_ENUM_CONSTANT(ENV_SDFGI_Y_SCALE_75_PERCENT);
BIND_ENUM_CONSTANT(ENV_SDFGI_Y_SCALE_50_PERCENT);
diff --git a/servers/rendering_server.h b/servers/rendering_server.h
index 5dbec04665..945fd052c6 100644
--- a/servers/rendering_server.h
+++ b/servers/rendering_server.h
@@ -1041,19 +1041,13 @@ public:
virtual void environment_set_ssil_quality(EnvironmentSSILQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) = 0;
- enum EnvironmentSDFGICascades {
- ENV_SDFGI_CASCADES_4,
- ENV_SDFGI_CASCADES_6,
- ENV_SDFGI_CASCADES_8,
- };
-
enum EnvironmentSDFGIYScale {
ENV_SDFGI_Y_SCALE_DISABLED,
ENV_SDFGI_Y_SCALE_75_PERCENT,
ENV_SDFGI_Y_SCALE_50_PERCENT
};
- virtual void environment_set_sdfgi(RID p_env, bool p_enable, EnvironmentSDFGICascades p_cascades, float p_min_cell_size, EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) = 0;
+ virtual void environment_set_sdfgi(RID p_env, bool p_enable, int p_cascades, float p_min_cell_size, EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) = 0;
enum EnvironmentSDFGIRayCount {
ENV_SDFGI_RAY_COUNT_4,
@@ -1608,7 +1602,6 @@ VARIANT_ENUM_CAST(RenderingServer::EnvironmentToneMapper);
VARIANT_ENUM_CAST(RenderingServer::EnvironmentSSRRoughnessQuality);
VARIANT_ENUM_CAST(RenderingServer::EnvironmentSSAOQuality);
VARIANT_ENUM_CAST(RenderingServer::EnvironmentSSILQuality);
-VARIANT_ENUM_CAST(RenderingServer::EnvironmentSDFGICascades);
VARIANT_ENUM_CAST(RenderingServer::EnvironmentSDFGIFramesToConverge);
VARIANT_ENUM_CAST(RenderingServer::EnvironmentSDFGIRayCount);
VARIANT_ENUM_CAST(RenderingServer::EnvironmentSDFGIFramesToUpdateLight);
diff --git a/servers/text/text_server_extension.cpp b/servers/text/text_server_extension.cpp
index a2195d1ddf..d7e7960496 100644
--- a/servers/text/text_server_extension.cpp
+++ b/servers/text/text_server_extension.cpp
@@ -271,6 +271,9 @@ void TextServerExtension::_bind_methods() {
GDVIRTUAL_BIND(_format_number, "string", "language");
GDVIRTUAL_BIND(_parse_number, "string", "language");
GDVIRTUAL_BIND(_percent_sign, "language");
+
+ GDVIRTUAL_BIND(_string_to_upper, "string", "language");
+ GDVIRTUAL_BIND(_string_to_lower, "string", "language");
}
bool TextServerExtension::has_feature(Feature p_feature) const {
@@ -1365,6 +1368,22 @@ String TextServerExtension::percent_sign(const String &p_language) const {
return TextServer::percent_sign(p_language);
}
+String TextServerExtension::string_to_upper(const String &p_string, const String &p_language) const {
+ String ret;
+ if (GDVIRTUAL_CALL(_string_to_upper, p_string, p_language, ret)) {
+ return ret;
+ }
+ return p_string;
+}
+
+String TextServerExtension::string_to_lower(const String &p_string, const String &p_language) const {
+ String ret;
+ if (GDVIRTUAL_CALL(_string_to_lower, p_string, p_language, ret)) {
+ return ret;
+ }
+ return p_string;
+}
+
TextServerExtension::TextServerExtension() {
//NOP
}
diff --git a/servers/text/text_server_extension.h b/servers/text/text_server_extension.h
index 77f2ced951..6e203f22ee 100644
--- a/servers/text/text_server_extension.h
+++ b/servers/text/text_server_extension.h
@@ -449,6 +449,11 @@ public:
GDVIRTUAL2RC(String, _parse_number, const String &, const String &);
GDVIRTUAL1RC(String, _percent_sign, const String &);
+ virtual String string_to_upper(const String &p_string, const String &p_language = "") const override;
+ virtual String string_to_lower(const String &p_string, const String &p_language = "") const override;
+ GDVIRTUAL2RC(String, _string_to_upper, const String &, const String &);
+ GDVIRTUAL2RC(String, _string_to_lower, const String &, const String &);
+
TextServerExtension();
~TextServerExtension();
};
diff --git a/servers/text_server.cpp b/servers/text_server.cpp
index 0cc4358785..17840584ee 100644
--- a/servers/text_server.cpp
+++ b/servers/text_server.cpp
@@ -422,6 +422,9 @@ void TextServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("strip_diacritics", "string"), &TextServer::strip_diacritics);
+ ClassDB::bind_method(D_METHOD("string_to_upper", "string", "language"), &TextServer::string_to_upper, DEFVAL(""));
+ ClassDB::bind_method(D_METHOD("string_to_lower", "string", "language"), &TextServer::string_to_lower, DEFVAL(""));
+
/* Direction */
BIND_ENUM_CONSTANT(DIRECTION_AUTO);
BIND_ENUM_CONSTANT(DIRECTION_LTR);
@@ -480,6 +483,7 @@ void TextServer::_bind_methods() {
BIND_ENUM_CONSTANT(FEATURE_BREAK_ITERATORS);
BIND_ENUM_CONSTANT(FEATURE_FONT_SYSTEM);
BIND_ENUM_CONSTANT(FEATURE_FONT_VARIABLE);
+ BIND_ENUM_CONSTANT(FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION);
BIND_ENUM_CONSTANT(FEATURE_USE_SUPPORT_DATA);
/* FT Contour Point Types */
diff --git a/servers/text_server.h b/servers/text_server.h
index 07f0ae5045..599cc3afd0 100644
--- a/servers/text_server.h
+++ b/servers/text_server.h
@@ -109,7 +109,8 @@ public:
FEATURE_BREAK_ITERATORS = 1 << 4,
FEATURE_FONT_SYSTEM = 1 << 5,
FEATURE_FONT_VARIABLE = 1 << 6,
- FEATURE_USE_SUPPORT_DATA = 1 << 7
+ FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION = 1 << 7,
+ FEATURE_USE_SUPPORT_DATA = 1 << 8,
};
enum ContourPointTag {
@@ -457,6 +458,10 @@ public:
virtual String strip_diacritics(const String &p_string) const;
+ // Other string operations.
+ virtual String string_to_upper(const String &p_string, const String &p_language = "") const = 0;
+ virtual String string_to_lower(const String &p_string, const String &p_language = "") const = 0;
+
TextServer();
~TextServer();
};
diff --git a/servers/xr/xr_pose.cpp b/servers/xr/xr_pose.cpp
index 0862fefef5..400f13b9c2 100644
--- a/servers/xr/xr_pose.cpp
+++ b/servers/xr/xr_pose.cpp
@@ -33,6 +33,10 @@
#include "servers/xr_server.h"
void XRPose::_bind_methods() {
+ BIND_ENUM_CONSTANT(XR_TRACKING_CONFIDENCE_NONE);
+ BIND_ENUM_CONSTANT(XR_TRACKING_CONFIDENCE_LOW);
+ BIND_ENUM_CONSTANT(XR_TRACKING_CONFIDENCE_HIGH);
+
ClassDB::bind_method(D_METHOD("set_has_tracking_data", "has_tracking_data"), &XRPose::set_has_tracking_data);
ClassDB::bind_method(D_METHOD("get_has_tracking_data"), &XRPose::get_has_tracking_data);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "has_tracking_data"), "set_has_tracking_data", "get_has_tracking_data");
@@ -53,6 +57,10 @@ void XRPose::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_angular_velocity", "velocity"), &XRPose::set_angular_velocity);
ClassDB::bind_method(D_METHOD("get_angular_velocity"), &XRPose::get_angular_velocity);
ADD_PROPERTY(PropertyInfo(Variant::STRING, "angular_velocity"), "set_angular_velocity", "get_angular_velocity");
+
+ ClassDB::bind_method(D_METHOD("set_tracking_confidence", "tracking_confidence"), &XRPose::set_tracking_confidence);
+ ClassDB::bind_method(D_METHOD("get_tracking_confidence"), &XRPose::get_tracking_confidence);
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "tracking_confidence"), "set_tracking_confidence", "get_tracking_confidence");
}
void XRPose::set_has_tracking_data(const bool p_has_tracking_data) {
@@ -108,3 +116,11 @@ void XRPose::set_angular_velocity(const Vector3 p_velocity) {
Vector3 XRPose::get_angular_velocity() const {
return angular_velocity;
}
+
+void XRPose::set_tracking_confidence(const XRPose::TrackingConfidence p_tracking_confidence) {
+ tracking_confidence = p_tracking_confidence;
+}
+
+XRPose::TrackingConfidence XRPose::get_tracking_confidence() const {
+ return tracking_confidence;
+}
diff --git a/servers/xr/xr_pose.h b/servers/xr/xr_pose.h
index 8c1fc63360..f306c22390 100644
--- a/servers/xr/xr_pose.h
+++ b/servers/xr/xr_pose.h
@@ -37,12 +37,20 @@ class XRPose : public RefCounted {
GDCLASS(XRPose, RefCounted);
public:
+ // TrackingConfidence gives an indication of how reliable our transform data is.
+ enum TrackingConfidence {
+ XR_TRACKING_CONFIDENCE_NONE, // No tracking information is available for this pose.
+ XR_TRACKING_CONFIDENCE_LOW, // Tracking information may be inaccurate or estimated.
+ XR_TRACKING_CONFIDENCE_HIGH // Tracking information is deemed accurate and up to date.
+ };
+
private:
bool has_tracking_data = false;
StringName name;
Transform3D transform;
Vector3 linear_velocity;
Vector3 angular_velocity;
+ TrackingConfidence tracking_confidence = XR_TRACKING_CONFIDENCE_NONE;
protected:
static void _bind_methods();
@@ -63,6 +71,11 @@ public:
void set_angular_velocity(const Vector3 p_velocity);
Vector3 get_angular_velocity() const;
+
+ void set_tracking_confidence(const TrackingConfidence p_tracking_confidence);
+ TrackingConfidence get_tracking_confidence() const;
};
+VARIANT_ENUM_CAST(XRPose::TrackingConfidence);
+
#endif
diff --git a/servers/xr/xr_positional_tracker.cpp b/servers/xr/xr_positional_tracker.cpp
index 74907a5675..62e011654e 100644
--- a/servers/xr/xr_positional_tracker.cpp
+++ b/servers/xr/xr_positional_tracker.cpp
@@ -56,7 +56,7 @@ void XRPositionalTracker::_bind_methods() {
ClassDB::bind_method(D_METHOD("has_pose", "name"), &XRPositionalTracker::has_pose);
ClassDB::bind_method(D_METHOD("get_pose", "name"), &XRPositionalTracker::get_pose);
ClassDB::bind_method(D_METHOD("invalidate_pose", "name"), &XRPositionalTracker::invalidate_pose);
- ClassDB::bind_method(D_METHOD("set_pose", "name", "transform", "linear_velocity", "angular_velocity"), &XRPositionalTracker::set_pose);
+ ClassDB::bind_method(D_METHOD("set_pose", "name", "transform", "linear_velocity", "angular_velocity", "tracking_confidence"), &XRPositionalTracker::set_pose);
ADD_SIGNAL(MethodInfo("pose_changed", PropertyInfo(Variant::OBJECT, "pose", PROPERTY_HINT_RESOURCE_TYPE, "XRPose")));
ClassDB::bind_method(D_METHOD("get_input", "name"), &XRPositionalTracker::get_input);
@@ -137,7 +137,7 @@ void XRPositionalTracker::invalidate_pose(const StringName &p_action_name) {
}
}
-void XRPositionalTracker::set_pose(const StringName &p_action_name, const Transform3D &p_transform, const Vector3 &p_linear_velocity, const Vector3 &p_angular_velocity) {
+void XRPositionalTracker::set_pose(const StringName &p_action_name, const Transform3D &p_transform, const Vector3 &p_linear_velocity, const Vector3 &p_angular_velocity, const XRPose::TrackingConfidence p_tracking_confidence) {
Ref<XRPose> new_pose;
new_pose.instantiate();
@@ -146,6 +146,7 @@ void XRPositionalTracker::set_pose(const StringName &p_action_name, const Transf
new_pose->set_transform(p_transform);
new_pose->set_linear_velocity(p_linear_velocity);
new_pose->set_angular_velocity(p_angular_velocity);
+ new_pose->set_tracking_confidence(p_tracking_confidence);
poses[p_action_name] = new_pose;
emit_signal("pose_changed", new_pose);
diff --git a/servers/xr/xr_positional_tracker.h b/servers/xr/xr_positional_tracker.h
index 2bcbf2c018..2f358cbb21 100644
--- a/servers/xr/xr_positional_tracker.h
+++ b/servers/xr/xr_positional_tracker.h
@@ -82,7 +82,7 @@ public:
bool has_pose(const StringName &p_action_name) const;
Ref<XRPose> get_pose(const StringName &p_action_name) const;
void invalidate_pose(const StringName &p_action_name);
- void set_pose(const StringName &p_action_name, const Transform3D &p_transform, const Vector3 &p_linear_velocity, const Vector3 &p_angular_velocity);
+ void set_pose(const StringName &p_action_name, const Transform3D &p_transform, const Vector3 &p_linear_velocity, const Vector3 &p_angular_velocity, const XRPose::TrackingConfidence p_tracking_confidence = XRPose::XR_TRACKING_CONFIDENCE_HIGH);
Variant get_input(const StringName &p_action_name) const;
void set_input(const StringName &p_action_name, const Variant &p_value);
diff --git a/tests/core/math/test_vector2.h b/tests/core/math/test_vector2.h
index 7dd14736e8..cb447acd17 100644
--- a/tests/core/math/test_vector2.h
+++ b/tests/core/math/test_vector2.h
@@ -246,6 +246,25 @@ TEST_CASE("[Vector2] Operators") {
CHECK_MESSAGE(
Vector2(Vector2i(1, 2)) == Vector2(1, 2),
"Vector2 constructed from Vector2i should work as expected.");
+
+ CHECK_MESSAGE(
+ ((String)decimal1) == "(2.3, 4.9)",
+ "Vector2 cast to String should work as expected.");
+ CHECK_MESSAGE(
+ ((String)decimal2) == "(1.2, 3.4)",
+ "Vector2 cast to String should work as expected.");
+ CHECK_MESSAGE(
+ ((String)Vector2(9.8, 9.9)) == "(9.8, 9.9)",
+ "Vector2 cast to String should work as expected.");
+#ifdef REAL_T_IS_DOUBLE
+ CHECK_MESSAGE(
+ ((String)Vector2(Math_PI, Math_TAU)) == "(3.14159265358979, 6.28318530717959)",
+ "Vector2 cast to String should print the correct amount of digits for real_t = double.");
+#else
+ CHECK_MESSAGE(
+ ((String)Vector2(Math_PI, Math_TAU)) == "(3.141593, 6.283185)",
+ "Vector2 cast to String should print the correct amount of digits for real_t = float.");
+#endif // REAL_T_IS_DOUBLE
}
TEST_CASE("[Vector2] Other methods") {
diff --git a/tests/core/math/test_vector3.h b/tests/core/math/test_vector3.h
index 97da035046..136a531946 100644
--- a/tests/core/math/test_vector3.h
+++ b/tests/core/math/test_vector3.h
@@ -271,6 +271,25 @@ TEST_CASE("[Vector3] Operators") {
CHECK_MESSAGE(
Vector3(Vector3i(1, 2, 3)) == Vector3(1, 2, 3),
"Vector3 constructed from Vector3i should work as expected.");
+
+ CHECK_MESSAGE(
+ ((String)decimal1) == "(2.3, 4.9, 7.8)",
+ "Vector3 cast to String should work as expected.");
+ CHECK_MESSAGE(
+ ((String)decimal2) == "(1.2, 3.4, 5.6)",
+ "Vector3 cast to String should work as expected.");
+ CHECK_MESSAGE(
+ ((String)Vector3(9.7, 9.8, 9.9)) == "(9.7, 9.8, 9.9)",
+ "Vector3 cast to String should work as expected.");
+#ifdef REAL_T_IS_DOUBLE
+ CHECK_MESSAGE(
+ ((String)Vector3(Math_E, Math_SQRT2, Math_SQRT3)) == "(2.71828182845905, 1.4142135623731, 1.73205080756888)",
+ "Vector3 cast to String should print the correct amount of digits for real_t = double.");
+#else
+ CHECK_MESSAGE(
+ ((String)Vector3(Math_E, Math_SQRT2, Math_SQRT3)) == "(2.718282, 1.414214, 1.732051)",
+ "Vector3 cast to String should print the correct amount of digits for real_t = float.");
+#endif // REAL_T_IS_DOUBLE
}
TEST_CASE("[Vector3] Other methods") {
diff --git a/tests/core/string/test_string.h b/tests/core/string/test_string.h
index 2f611c26a9..baab5ddfe7 100644
--- a/tests/core/string/test_string.h
+++ b/tests/core/string/test_string.h
@@ -355,11 +355,17 @@ TEST_CASE("[String] Number to string") {
CHECK(String::num(42.100023, 4) == "42.1"); // No trailing zeros.
// String::num_real tests.
+ CHECK(String::num_real(1.0) == "1.0");
+ CHECK(String::num_real(1.0, false) == "1");
+ CHECK(String::num_real(9.9) == "9.9");
+ CHECK(String::num_real(9.99) == "9.99");
+ CHECK(String::num_real(9.999) == "9.999");
+ CHECK(String::num_real(9.9999) == "9.9999");
CHECK(String::num_real(3.141593) == "3.141593");
CHECK(String::num_real(3.141) == "3.141"); // No trailing zeros.
#ifdef REAL_T_IS_DOUBLE
CHECK_MESSAGE(String::num_real(Math_PI) == "3.14159265358979", "Prints the appropriate amount of digits for real_t = double.");
- CHECK_MESSAGE(String::num_real(3.1415f) == "3.14149999618530", "Prints more digits of 32-bit float when real_t = double (ones that would be reliable for double).");
+ CHECK_MESSAGE(String::num_real(3.1415f) == "3.1414999961853", "Prints more digits of 32-bit float when real_t = double (ones that would be reliable for double) and no trailing zero.");
#else
CHECK_MESSAGE(String::num_real(Math_PI) == "3.141593", "Prints the appropriate amount of digits for real_t = float.");
CHECK_MESSAGE(String::num_real(3.1415f) == "3.1415", "Prints only reliable digits of 32-bit float when real_t = float.");
diff --git a/tests/core/templates/test_vector.h b/tests/core/templates/test_vector.h
index 24b3547256..f27d6a332e 100644
--- a/tests/core/templates/test_vector.h
+++ b/tests/core/templates/test_vector.h
@@ -257,27 +257,42 @@ TEST_CASE("[Vector] Slice") {
vector.push_back(3);
vector.push_back(4);
+ Vector<int> slice0 = vector.slice(0, 0);
+ CHECK(slice0.size() == 0);
+
Vector<int> slice1 = vector.slice(1, 3);
CHECK(slice1.size() == 2);
CHECK(slice1[0] == 1);
CHECK(slice1[1] == 2);
Vector<int> slice2 = vector.slice(1, -1);
- CHECK(slice2.size() == 4);
+ CHECK(slice2.size() == 3);
CHECK(slice2[0] == 1);
CHECK(slice2[1] == 2);
CHECK(slice2[2] == 3);
- CHECK(slice2[3] == 4);
- Vector<int> slice3 = vector.slice(3, -1);
+ Vector<int> slice3 = vector.slice(3);
CHECK(slice3.size() == 2);
CHECK(slice3[0] == 3);
CHECK(slice3[1] == 4);
Vector<int> slice4 = vector.slice(2, -2);
- CHECK(slice4.size() == 2);
+ CHECK(slice4.size() == 1);
CHECK(slice4[0] == 2);
- CHECK(slice4[1] == 3);
+
+ Vector<int> slice5 = vector.slice(-2);
+ CHECK(slice5.size() == 2);
+ CHECK(slice5[0] == 3);
+ CHECK(slice5[1] == 4);
+
+ Vector<int> slice6 = vector.slice(2, 42);
+ CHECK(slice6.size() == 3);
+ CHECK(slice6[0] == 2);
+ CHECK(slice6[1] == 3);
+ CHECK(slice6[2] == 4);
+
+ Vector<int> slice7 = vector.slice(5, 1);
+ CHECK(slice7.size() == 0);
}
TEST_CASE("[Vector] Find, has") {
diff --git a/tests/core/variant/test_array.h b/tests/core/variant/test_array.h
index 205e34daea..6093048307 100644
--- a/tests/core/variant/test_array.h
+++ b/tests/core/variant/test_array.h
@@ -254,27 +254,52 @@ TEST_CASE("[Array] slice()") {
array.push_back(3);
array.push_back(4);
+ Array slice0 = array.slice(0, 0);
+ CHECK(slice0.size() == 0);
+
Array slice1 = array.slice(1, 3);
CHECK(slice1.size() == 2);
CHECK(slice1[0] == Variant(1));
CHECK(slice1[1] == Variant(2));
Array slice2 = array.slice(1, -1);
- CHECK(slice2.size() == 4);
+ CHECK(slice2.size() == 3);
CHECK(slice2[0] == Variant(1));
CHECK(slice2[1] == Variant(2));
CHECK(slice2[2] == Variant(3));
- CHECK(slice2[3] == Variant(4));
- Array slice3 = array.slice(3, -1);
+ Array slice3 = array.slice(3);
CHECK(slice3.size() == 2);
CHECK(slice3[0] == Variant(3));
CHECK(slice3[1] == Variant(4));
Array slice4 = array.slice(2, -2);
- CHECK(slice4.size() == 2);
+ CHECK(slice4.size() == 1);
CHECK(slice4[0] == Variant(2));
- CHECK(slice4[1] == Variant(3));
+
+ Array slice5 = array.slice(-2);
+ CHECK(slice5.size() == 2);
+ CHECK(slice5[0] == Variant(3));
+ CHECK(slice5[1] == Variant(4));
+
+ Array slice6 = array.slice(2, 42);
+ CHECK(slice6.size() == 3);
+ CHECK(slice6[0] == Variant(2));
+ CHECK(slice6[1] == Variant(3));
+ CHECK(slice6[2] == Variant(4));
+
+ Array slice7 = array.slice(4, 0, -2);
+ CHECK(slice7.size() == 2);
+ CHECK(slice7[0] == Variant(4));
+ CHECK(slice7[1] == Variant(2));
+
+ ERR_PRINT_OFF;
+ Array slice8 = array.slice(4, 1);
+ CHECK(slice8.size() == 0);
+
+ Array slice9 = array.slice(3, -4);
+ CHECK(slice9.size() == 0);
+ ERR_PRINT_ON;
}
TEST_CASE("[Array] Duplicate array") {
diff --git a/tests/scene/test_code_edit.h b/tests/scene/test_code_edit.h
index be6e796da8..53ae01f9c7 100644
--- a/tests/scene/test_code_edit.h
+++ b/tests/scene/test_code_edit.h
@@ -3158,7 +3158,7 @@ TEST_CASE("[SceneTree][CodeEdit] symbol lookup") {
code_edit->set_text("this is some text");
Point2 caret_pos = code_edit->get_caret_draw_pos();
- caret_pos.x += 55;
+ caret_pos.x += 58;
SEND_GUI_MOUSE_EVENT(code_edit, caret_pos, MouseButton::NONE, MouseButton::NONE);
CHECK(code_edit->get_text_for_symbol_lookup() == "this is s" + String::chr(0xFFFF) + "ome text");
diff --git a/tests/servers/test_shader_lang.cpp b/tests/servers/test_shader_lang.cpp
index acc7e32441..06e28212d2 100644
--- a/tests/servers/test_shader_lang.cpp
+++ b/tests/servers/test_shader_lang.cpp
@@ -211,9 +211,6 @@ static String dump_node_code(SL::Node *p_node, int p_level) {
SL::ArrayNode *vnode = (SL::ArrayNode *)p_node;
code = vnode->name;
} break;
- case SL::Node::TYPE_ARRAY_DECLARATION: {
- // FIXME: Implement
- } break;
case SL::Node::TYPE_ARRAY_CONSTRUCT: {
// FIXME: Implement
} break;
diff --git a/tests/test_main.cpp b/tests/test_main.cpp
index 3826c03cad..0190fa5184 100644
--- a/tests/test_main.cpp
+++ b/tests/test_main.cpp
@@ -203,7 +203,7 @@ struct GodotTestCaseListener : public doctest::IReporter {
memnew(InputMap);
InputMap::get_singleton()->load_default();
- make_default_theme(false, Ref<Font>());
+ make_default_theme(1.0, Ref<Font>());
memnew(SceneTree);
SceneTree::get_singleton()->initialize();
diff --git a/thirdparty/README.md b/thirdparty/README.md
index 6183aaa03c..2cb5458952 100644
--- a/thirdparty/README.md
+++ b/thirdparty/README.md
@@ -613,6 +613,8 @@ Files extracted from upstream source:
See `thorvg/update-thorvg.sh` for extraction instructions. Set the version
number and run the script.
+Patches in the `patches` directory should be re-applied after updates.
+
## vhacd
diff --git a/thirdparty/thorvg/patches/thorvg-pr1159-mingw-fix.patch b/thirdparty/thorvg/patches/thorvg-pr1159-mingw-fix.patch
new file mode 100644
index 0000000000..a174880306
--- /dev/null
+++ b/thirdparty/thorvg/patches/thorvg-pr1159-mingw-fix.patch
@@ -0,0 +1,73 @@
+diff --git a/thirdparty/thorvg/src/loaders/svg/tvgSvgLoader.cpp b/thirdparty/thorvg/src/loaders/svg/tvgSvgLoader.cpp
+index def8ae169a..cf103774c5 100644
+--- a/thirdparty/thorvg/src/loaders/svg/tvgSvgLoader.cpp
++++ b/thirdparty/thorvg/src/loaders/svg/tvgSvgLoader.cpp
+@@ -51,6 +51,7 @@
+
+ #define _USE_MATH_DEFINES //Math Constants are not defined in Standard C/C++.
+
++#include <cstring>
+ #include <fstream>
+ #include <float.h>
+ #include <math.h>
+diff --git a/thirdparty/thorvg/src/loaders/svg/tvgSvgPath.cpp b/thirdparty/thorvg/src/loaders/svg/tvgSvgPath.cpp
+index 2b62315de8..32685ee620 100644
+--- a/thirdparty/thorvg/src/loaders/svg/tvgSvgPath.cpp
++++ b/thirdparty/thorvg/src/loaders/svg/tvgSvgPath.cpp
+@@ -50,6 +50,7 @@
+
+ #define _USE_MATH_DEFINES //Math Constants are not defined in Standard C/C++.
+
++#include <cstring>
+ #include <math.h>
+ #include <clocale>
+ #include <ctype.h>
+diff --git a/thirdparty/thorvg/src/loaders/svg/tvgSvgSceneBuilder.cpp b/thirdparty/thorvg/src/loaders/svg/tvgSvgSceneBuilder.cpp
+index 8701fe32b1..ae17634f31 100644
+--- a/thirdparty/thorvg/src/loaders/svg/tvgSvgSceneBuilder.cpp
++++ b/thirdparty/thorvg/src/loaders/svg/tvgSvgSceneBuilder.cpp
+@@ -49,6 +49,7 @@
+ */
+
+
++#include <cstring>
+ #include <string>
+ #include "tvgMath.h"
+ #include "tvgSvgLoaderCommon.h"
+diff --git a/thirdparty/thorvg/src/loaders/svg/tvgSvgUtil.cpp b/thirdparty/thorvg/src/loaders/svg/tvgSvgUtil.cpp
+index d5b9cdcf7b..9f269b29a2 100644
+--- a/thirdparty/thorvg/src/loaders/svg/tvgSvgUtil.cpp
++++ b/thirdparty/thorvg/src/loaders/svg/tvgSvgUtil.cpp
+@@ -20,6 +20,7 @@
+ * SOFTWARE.
+ */
+
++#include <cstring>
+ #include <math.h>
+ #include <memory.h>
+ #include "tvgSvgUtil.h"
+diff --git a/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp b/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp
+index 2e3d5928d9..1571aa4e25 100644
+--- a/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp
++++ b/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp
+@@ -20,6 +20,7 @@
+ * SOFTWARE.
+ */
+
++#include <cstring>
+ #include <ctype.h>
+ #include <string>
+
+diff --git a/thirdparty/thorvg/src/savers/tvg/tvgTvgSaver.cpp b/thirdparty/thorvg/src/savers/tvg/tvgTvgSaver.cpp
+index 9450d80e88..9dd57e5a89 100644
+--- a/thirdparty/thorvg/src/savers/tvg/tvgTvgSaver.cpp
++++ b/thirdparty/thorvg/src/savers/tvg/tvgTvgSaver.cpp
+@@ -24,6 +24,8 @@
+ #include "tvgTvgSaver.h"
+ #include "tvgLzw.h"
+
++#include <cstring>
++
+ #ifdef _WIN32
+ #include <malloc.h>
+ #else
diff --git a/thirdparty/thorvg/patches/thorvg-pr1166-vs2017-minmax.patch b/thirdparty/thorvg/patches/thorvg-pr1166-vs2017-minmax.patch
new file mode 100644
index 0000000000..0b045bd05a
--- /dev/null
+++ b/thirdparty/thorvg/patches/thorvg-pr1166-vs2017-minmax.patch
@@ -0,0 +1,49 @@
+diff --git a/thirdparty/thorvg/src/lib/sw_engine/tvgSwRenderer.cpp b/thirdparty/thorvg/src/lib/sw_engine/tvgSwRenderer.cpp
+index 78537e7726..c75e73760e 100644
+--- a/thirdparty/thorvg/src/lib/sw_engine/tvgSwRenderer.cpp
++++ b/thirdparty/thorvg/src/lib/sw_engine/tvgSwRenderer.cpp
+@@ -23,6 +23,7 @@
+ #include "tvgSwCommon.h"
+ #include "tvgTaskScheduler.h"
+ #include "tvgSwRenderer.h"
++#include "tvgMath.h"
+
+ /************************************************************************/
+ /* Internal Class Implementation */
+@@ -594,10 +595,10 @@ void* SwRenderer::prepareCommon(SwTask* task, const RenderTransform* transform,
+ task->surface = surface;
+ task->mpool = mpool;
+ task->flags = flags;
+- task->bbox.min.x = max(static_cast<SwCoord>(0), static_cast<SwCoord>(vport.x));
+- task->bbox.min.y = max(static_cast<SwCoord>(0), static_cast<SwCoord>(vport.y));
+- task->bbox.max.x = min(static_cast<SwCoord>(surface->w), static_cast<SwCoord>(vport.x + vport.w));
+- task->bbox.max.y = min(static_cast<SwCoord>(surface->h), static_cast<SwCoord>(vport.y + vport.h));
++ task->bbox.min.x = mathMax(static_cast<SwCoord>(0), static_cast<SwCoord>(vport.x));
++ task->bbox.min.y = mathMax(static_cast<SwCoord>(0), static_cast<SwCoord>(vport.y));
++ task->bbox.max.x = mathMin(static_cast<SwCoord>(surface->w), static_cast<SwCoord>(vport.x + vport.w));
++ task->bbox.max.y = mathMin(static_cast<SwCoord>(surface->h), static_cast<SwCoord>(vport.y + vport.h));
+
+ if (!task->pushed) {
+ task->pushed = true;
+diff --git a/thirdparty/thorvg/src/lib/tvgMath.h b/thirdparty/thorvg/src/lib/tvgMath.h
+index 9e5c915fc3..94b4fe1cf1 100644
+--- a/thirdparty/thorvg/src/lib/tvgMath.h
++++ b/thirdparty/thorvg/src/lib/tvgMath.h
+@@ -29,6 +29,10 @@
+ #include "tvgCommon.h"
+
+
++#define mathMin(x, y) (((x) < (y)) ? (x) : (y))
++#define mathMax(x, y) (((x) > (y)) ? (x) : (y))
++
++
+ static inline bool mathZero(float a)
+ {
+ return (fabsf(a) < FLT_EPSILON) ? true : false;
+@@ -154,4 +158,4 @@ static inline Matrix mathMultiply(const Matrix* lhs, const Matrix* rhs)
+ }
+
+
+-#endif //_TVG_MATH_H_
+\ No newline at end of file
++#endif //_TVG_MATH_H_
diff --git a/thirdparty/thorvg/src/lib/sw_engine/tvgSwRenderer.cpp b/thirdparty/thorvg/src/lib/sw_engine/tvgSwRenderer.cpp
index 78537e7726..c75e73760e 100644
--- a/thirdparty/thorvg/src/lib/sw_engine/tvgSwRenderer.cpp
+++ b/thirdparty/thorvg/src/lib/sw_engine/tvgSwRenderer.cpp
@@ -23,6 +23,7 @@
#include "tvgSwCommon.h"
#include "tvgTaskScheduler.h"
#include "tvgSwRenderer.h"
+#include "tvgMath.h"
/************************************************************************/
/* Internal Class Implementation */
@@ -594,10 +595,10 @@ void* SwRenderer::prepareCommon(SwTask* task, const RenderTransform* transform,
task->surface = surface;
task->mpool = mpool;
task->flags = flags;
- task->bbox.min.x = max(static_cast<SwCoord>(0), static_cast<SwCoord>(vport.x));
- task->bbox.min.y = max(static_cast<SwCoord>(0), static_cast<SwCoord>(vport.y));
- task->bbox.max.x = min(static_cast<SwCoord>(surface->w), static_cast<SwCoord>(vport.x + vport.w));
- task->bbox.max.y = min(static_cast<SwCoord>(surface->h), static_cast<SwCoord>(vport.y + vport.h));
+ task->bbox.min.x = mathMax(static_cast<SwCoord>(0), static_cast<SwCoord>(vport.x));
+ task->bbox.min.y = mathMax(static_cast<SwCoord>(0), static_cast<SwCoord>(vport.y));
+ task->bbox.max.x = mathMin(static_cast<SwCoord>(surface->w), static_cast<SwCoord>(vport.x + vport.w));
+ task->bbox.max.y = mathMin(static_cast<SwCoord>(surface->h), static_cast<SwCoord>(vport.y + vport.h));
if (!task->pushed) {
task->pushed = true;
diff --git a/thirdparty/thorvg/src/lib/tvgMath.h b/thirdparty/thorvg/src/lib/tvgMath.h
index 9e5c915fc3..94b4fe1cf1 100644
--- a/thirdparty/thorvg/src/lib/tvgMath.h
+++ b/thirdparty/thorvg/src/lib/tvgMath.h
@@ -29,6 +29,10 @@
#include "tvgCommon.h"
+#define mathMin(x, y) (((x) < (y)) ? (x) : (y))
+#define mathMax(x, y) (((x) > (y)) ? (x) : (y))
+
+
static inline bool mathZero(float a)
{
return (fabsf(a) < FLT_EPSILON) ? true : false;
@@ -154,4 +158,4 @@ static inline Matrix mathMultiply(const Matrix* lhs, const Matrix* rhs)
}
-#endif //_TVG_MATH_H_ \ No newline at end of file
+#endif //_TVG_MATH_H_
diff --git a/thirdparty/thorvg/src/loaders/svg/tvgSvgLoader.cpp b/thirdparty/thorvg/src/loaders/svg/tvgSvgLoader.cpp
index def8ae169a..cf103774c5 100644
--- a/thirdparty/thorvg/src/loaders/svg/tvgSvgLoader.cpp
+++ b/thirdparty/thorvg/src/loaders/svg/tvgSvgLoader.cpp
@@ -51,6 +51,7 @@
#define _USE_MATH_DEFINES //Math Constants are not defined in Standard C/C++.
+#include <cstring>
#include <fstream>
#include <float.h>
#include <math.h>
diff --git a/thirdparty/thorvg/src/loaders/svg/tvgSvgPath.cpp b/thirdparty/thorvg/src/loaders/svg/tvgSvgPath.cpp
index 2b62315de8..32685ee620 100644
--- a/thirdparty/thorvg/src/loaders/svg/tvgSvgPath.cpp
+++ b/thirdparty/thorvg/src/loaders/svg/tvgSvgPath.cpp
@@ -50,6 +50,7 @@
#define _USE_MATH_DEFINES //Math Constants are not defined in Standard C/C++.
+#include <cstring>
#include <math.h>
#include <clocale>
#include <ctype.h>
diff --git a/thirdparty/thorvg/src/loaders/svg/tvgSvgSceneBuilder.cpp b/thirdparty/thorvg/src/loaders/svg/tvgSvgSceneBuilder.cpp
index 8701fe32b1..ae17634f31 100644
--- a/thirdparty/thorvg/src/loaders/svg/tvgSvgSceneBuilder.cpp
+++ b/thirdparty/thorvg/src/loaders/svg/tvgSvgSceneBuilder.cpp
@@ -49,6 +49,7 @@
*/
+#include <cstring>
#include <string>
#include "tvgMath.h"
#include "tvgSvgLoaderCommon.h"
diff --git a/thirdparty/thorvg/src/loaders/svg/tvgSvgUtil.cpp b/thirdparty/thorvg/src/loaders/svg/tvgSvgUtil.cpp
index d5b9cdcf7b..9f269b29a2 100644
--- a/thirdparty/thorvg/src/loaders/svg/tvgSvgUtil.cpp
+++ b/thirdparty/thorvg/src/loaders/svg/tvgSvgUtil.cpp
@@ -20,6 +20,7 @@
* SOFTWARE.
*/
+#include <cstring>
#include <math.h>
#include <memory.h>
#include "tvgSvgUtil.h"
diff --git a/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp b/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp
index 2e3d5928d9..1571aa4e25 100644
--- a/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp
+++ b/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp
@@ -20,6 +20,7 @@
* SOFTWARE.
*/
+#include <cstring>
#include <ctype.h>
#include <string>
diff --git a/thirdparty/thorvg/src/savers/tvg/tvgTvgSaver.cpp b/thirdparty/thorvg/src/savers/tvg/tvgTvgSaver.cpp
index 9450d80e88..9dd57e5a89 100644
--- a/thirdparty/thorvg/src/savers/tvg/tvgTvgSaver.cpp
+++ b/thirdparty/thorvg/src/savers/tvg/tvgTvgSaver.cpp
@@ -24,6 +24,8 @@
#include "tvgTvgSaver.h"
#include "tvgLzw.h"
+#include <cstring>
+
#ifdef _WIN32
#include <malloc.h>
#else